matplotlib / matplotlib/basemap
readshapefile() raises incorrect error msg regarding shpproj and shapelib
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 817
- Fork
- 395
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
When plotting a shapefile using readshapefile()
m.readshapefile(shapefile_path, 'roads')
I received this error message:
ValueError: shapefile must have lat/lon vertices - it looks like this one has vertices in map projection coordinates. You can convert the shapefile to geographic coordinates using the shpproj utility from the shapelib tools (http://shapelib.maptools.org/shapelib-tools.html)
However, it appears that the specified module "shapelib" is no longer maintained or available. To add to the confusion, there is a completely different module that also goes by the name "shapelib" available on pypi and github, but that does not contain the functionality suggested above.
In regard to a suggested solution. I found the fix on this site to be useful for converting the shapefile and getting past this readshapefile() error.
http://fascicul.us/convert-display-shapefile-matplotlib.html
However, this conversion sometimes leads to a new error:
ValueError: readshapefile can only handle 2D shape types
Which I have yet to find a way to resolve
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso readshapefile() e ispeziona il percorso di errore che consiglia shpproj di shapelib. Riproduci la conversione segnalata e il successivo errore “only handle 2D shape types”, quindi determina se le indicazioni o la gestione sono errate. Il lavoro è completato quando il messaggio di errore e le indicazioni sulla conversione riflettono accuratamente gli strumenti disponibili e i tipi di shape supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100