-
Notifications
You must be signed in to change notification settings - Fork 398
Description
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