OverviewTeaching: 35 min Exercises: 0 minQuestions
What is GeoPandas?
What functionality and advantages does GeoPandas offer over other Python geospatial tools?
What geospatial storage, analytical and plotting capabilities does it include?
What is its relationship to Pandas?Objectives
Learn to use GeoPandas by reading from common vector geospatial formats (shape files, GeoJSON, etc), PostGIS databases, and from geospatial data generated on the fly.
Learn to leverage Pandas functionality in GeoPandas, for effective, mixed attribute-based and geospatial analyses.
Learn about common geospatial operations, including reprojection, spatial joins, and overlays.
Emilio Mayorga, University of Washington. 2019-9-8
GeoPandas adds a spatial geometry data type to
Pandas and enables spatial operations on these types, using shapely. GeoPandas leverages Pandas together with several core open source geospatial packages and practices to provide a uniquely simple and convenient framework for handling geospatial feature data, operating on both geometries and attributes jointly, and as with Pandas, largely eliminating the need to iterate over features (rows). Also as with Pandas, it adds a very convenient and fine-tuned plotting method, and read/write methods that handle multiple file and “serialization” formats.
shapely, these spatial data types are limited to discrete entities/features and do not address continuously varying rasters or fields.
- While GeoPandas spatial objects can be assigned a Coordinate Reference System (
CRS), operations can not be performed across CRS’s. Plus, geodetic (“unprojected”, lat-lon) CRS are not handled in a special way; the area of a geodetic polygon will be in degrees.
GeoPandas builds on mature, stable and widely used packages (Pandas, shapely, etc). It is being supported more and more as the preferred Python data structure for geospatial vector data.
When should you use GeoPandas?
When it may not be the best tool?
Leveraging Pandas and core vector geospatial libraries, Python GeoPandas greatly simplifies the use of vector geospatial data and provides powerful capabilities.