1

I created a shapefile in ArcGIS and I converted my CRS in QGIS to EPSG: 4326, WGS 84. I have done this method before and it allows me to plot my shapefile over a basemap in python. However, I am continuously getting an error that is meant when I have not converted my CRS to EPSG 4326, even though I have???

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)

Usually, when I change the CRS, the problem is solved but for some reason it is not fixing the issue.

I have followed this procedure many times, and it always works except for this time! http://fascicul.us/convert-display-shapefile-matplotlib.html

I have also converted my shapefile to EPSG: 4326, WGS 84 with ogr2ogr and I am still getting the same error when I attempt to plot it.

I can plot the shapefile with geopandas, but not with readshapefile (which is where I get the error). I would prefer to plot with readshapefile.

  • hmmm, maybe post the shapefile? – ziggy Apr 26 '17 at 18:52
  • ok will do. An image or a link to the file? mediafire.com/folder/sg72tpgit74gr/new_shapefile – Bjortt Apr 26 '17 at 18:55
  • 1
    I don't know what coordinates you're supposed to be in but it looks like the shapfile is not WGS84 but has been defined as such. You have very large negative X values and very large Y values suggesting a projected coordinate system but knowing which one is only a wild stab in the dark for me... How did you create the shapefile in ArcGIS? BTW if you're going to post a shapefile on cloud storage I would recommend zipping to a single archive, downloading multiple files from mediafire is seriously annoying for unregistered users. – Michael Stimson Apr 26 '17 at 21:33
  • I believe help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… may fix my issues. I converted my polygon to a point shape file, because my attribute table for my polygon shapefile did not have any Lat or Long data -__-.. – Bjortt Apr 26 '17 at 21:45
  • 1
    No, that wont fix it.. the points will still be incorrectly defined as the spatial reference is copied from the source unless the geoprocessing output coordinate system environment is set and even then because the coordinates are incorrectly defined you may end up with an empty output as the vertices disappear over the horizon. You need to find out what coordinates the file is actually in then define as that before you do anything else resources.arcgis.com/en/help/main/10.2/index.html#//… – Michael Stimson Apr 26 '17 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.