Files & formats
Reading and writing shapefiles, GeoPackages, GeoJSON and CSV — and what breaks in each.
Everything on Spatial Workflow about files & formats, in the order that usually works: understand the idea, then run the task, then fix it when it goes wrong. 39 guides in total.
5 learning paths run through this topic — follow one if you would rather work through a route than pick a single guide.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- WKT, WKB and GeoJSON: How Geometry Is Actually Stored wkt wkb geojson difference
- GIS Vector File Formats Compared: Shapefile, GeoPackage, GeoJSON, Parquet gis vector file formats compared
- What GDAL and OGR Actually Are (and Why Everything Depends on Them) what is gdal ogr
- Fiona vs pyogrio: How GeoPandas Reads and Writes Files fiona vs pyogrio
- QGIS Data Providers Explained: How QGIS Reads Any Data Source qgis data provider explained
- PostGIS Explained: When a Spatial Database Beats a Folder of Files postgis vs shapefile when to use
- How PostGIS Stores Geometry: SRID, EWKB and the Typed Column postgis geometry column srid
- The Raster Data Model Explained: Bands, dtype, NoData and the Transform raster data model python
- GeoParquet and Columnar Storage Explained: Why It Reads So Much Faster geoparquet explained python
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Read GeoJSON in Python with GeoPandas read geojson python geopandas
- How to Read a CSV with Coordinates as a GeoDataFrame csv to geodataframe python
- How to Read and Write GeoPackage Files in Python geopackage python geopandas
- How to Connect GeoPandas to PostGIS geopandas postgis connection
- How to Read a Shapefile in Python with GeoPandas read shapefile geopandas
- How to Export GeoJSON in Python with GeoPandas export geojson geopandas
- How to Clean Messy CSV Coordinates into a Reliable GeoDataFrame clean csv coordinates
- How to Batch Convert Shapefiles to GeoPackage in Python batch convert shapefile to geopackage python
- How to Merge Many Shapefiles into One File in Python merge multiple shapefiles python geopandas
- How to Batch Export a GeoDataFrame to Multiple Formats in Python export geodataframe multiple formats python
- How to Move Data Between QGIS and GeoPandas qgis geopandas data exchange
- How to Reduce GIS File Size in Python Without Wrecking the Data reduce gis file size python
- How to Package GIS Deliverables into Zipped Bundles with Python package gis deliverables zip python
- How to Write a GeoDataFrame to PostGIS write geodataframe to postgis
- How to Set Up a Python GIS Environment That Actually Works python gis environment setup
- How to Standardise Attribute Values Against a Controlled Vocabulary standardise attribute values python
- How to Test a GIS Script That Reads and Writes Files test gis file io pytest
- How to Work with a Custom or Local CRS in Python custom crs proj string python
- How to Open Any Spatial File in Python When You Do Not Know the Format open any spatial file python
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
- Fiona ImportError When Using GeoPandas: How to Fix It fiona importerror geopandas
- GeoPandas Not Reading Shapefile: Common Causes and Fixes geopandas not reading shapefile
- Why Are My Shapefile Column Names Truncated? How to Fix It shapefile column names truncated
- RasterioIOError: Not Recognized as a Supported File Format (How to Fix) rasterioioerror supported file format
- GeoPandas "No Geometry Column" Error: How to Fix It geopandas no geometry column
- Python glob Is Not Finding All My Shapefiles: How to Fix It glob not finding files python
- Garbled Attribute Text and UnicodeDecodeError from a Shapefile: How to Fix Encoding shapefile encoding error python
- GeoPandas to_file() Fails on a Column Type: How to Fix It geopandas to_file field type error
- Mixed Geometry Types Error When Saving a GeoDataFrame: How to Fix It mixed geometry types geopandas
- Rasterio Output GeoTIFF Is Black or Empty: How to Fix It rasterio output black empty
- PostGIS "relation does not exist" and Permission Errors: How to Fix Them postgis relation does not exist
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
-
Raster Analysis
Read, reproject, clip and summarise raster data in Python.
Open path → -
Spatial SQL & PostGIS
Move the heavy lifting from Python into the database.
Open path → -
GIS Data Cleaning
Turn messy spatial data into analysis-ready datasets.
Open path → -
Batch Processing
Process many files at once, reliably.
Open path → -
QGIS Automation
Automate QGIS with PyQGIS and Processing models.
Open path →
Related topics
Subjects that keep coming up alongside this one, most overlap first.