Errors writing Geopandas Dataframe to Shapefile

Viewed 35

I'm writing a geopandas polygon file to an Esri Shapefile. I can't write directly because I have date fields that I don't want to convert to text, I want to keep them as date.

I've written a custom schema, but how do I handle the geomtry column in the custom shapefile? It's a WKT field.

This is my custom schema (shortened for length):

schema = {
    'geometry':'MultiPolygon',
    'properties':{
        'oid':'int',
        'date_anncd':'date',
        'value_mm':'float',
        'geometry':??
    }
}
    
1 Answers

Change the geometry type to 'Polygon' (MultiPolygon isn't an Esri type) and drop the geometry value in the properties.

Related