I'm try to load this shapefile with Basemap in order to plot it in Python:
http://geodata.gov.gr/en/dataset/periphereies-elladas/resource/7c80a2c1-93b7-4814-9fc4-245e775acaa6
But I get the following error:
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
I tried using shpproj
or ogr2ogr
as another answer in this site suggested, but for the life of me I can not figure out what parameters I should pass to those programs, as I have zero knowledge about GIS in general. So if anyone here could help me with the conversion command that would be great.
I am on Ubuntu and the code I'm using is pretty simple I guess:
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
map = Basemap()
map.drawmapboundary(fill_color='aqua')
map.fillcontinents(color='#ddaa66',lake_color='aqua')
map.drawcoastlines()
map.readshapefile('periphereies/periphereies', 'periphereies')
plt.show()
ogr2ogr
can be downloaded in ubuntu with the gdal-bin package ``` sudo apt-get install gdal-bin ```