Last active
July 8, 2017 10:00
-
-
Save shakasom/51d415030ddece7db27dccea4ae21781 to your computer and use it in GitHub Desktop.
Geopandas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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