Skip to content

Instantly share code, notes, and snippets.

@shakasom
Last active July 8, 2017 10:00
Show Gist options
  • Save shakasom/51d415030ddece7db27dccea4ae21781 to your computer and use it in GitHub Desktop.
Save shakasom/51d415030ddece7db27dccea4ae21781 to your computer and use it in GitHub Desktop.
Geopandas
# Read_file --> Geopandas library uses fiona library which in turn uses GDAL/OGR
world = gpd.read_file("C:/GIS/GIS Data/countries/ne_50m_admin_0_countries.shp")
cities = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
# Ploting to check the shapefile
base = world.plot(color='grey')
cities.plot(ax=base, marker='*', color='red', markersize=12);
plt.show()
# Read_file --> Geopandas library uses fiona library which in turn uses GDAL/OGR
world = gpd.read_file("C:/GIS/GIS Data/countries/ne_50m_admin_0_countries.shp")
cities = gpd.read_file(gpd.datasets.get_path('naturalearth_cities'))
# Ploting to check the shapefile
base = world.plot(color='grey')
cities.plot(ax=base, marker='*', color='red', markersize=12);
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment