GeoPandas
pandas
is a high-performance Python data analysis library that can handle large datasets that are tabular (similar to a database), ordered/unordered, labeled matrices, or unlabeled statistical data. GeoPandas
is simply a geospatial extension to pandas
that builds upon Shapely
, Fiona
, PyProj
, matplotlib
, and Descartes
, all of which must be installed. It allows you to easily perform operations in Python that would otherwise require a spatial database such as PostGIS.
As GeoPandas
has so many complex dependencies, we’ll create a separate environment for it in Anaconda to keep things clean. First we need to deactivate our current environment:
conda deactivate lgawp4
Next we’ll create a new one for GeoPandas
:
conda create -n geopandas python=3.10.9
Then we can activate it as follows:
conda activate geopandas
Then we need to install GeoPandas
itself:
conda install geopandas
The following script opens a shapefile and dumps it into GeoJSON. Then...