In this small PR from Support we aim to fix an undesired behavior when using the rename_geometry method from the to_carto function.
Since the latest additions to GeoPandas, if the column name to be used as input for the referred function is already present in the GeoDataFrame columns, an error would be raised, which seems to break data uploads when the geometry column is named the_geom.
Context
In this small PR from Support we aim to fix an undesired behavior when using the
rename_geometry
method from theto_carto
function.Since the latest additions to GeoPandas, if the column name to be used as input for the referred function is already present in the GeoDataFrame columns, an error would be raised, which seems to break data uploads when the geometry column is named
the_geom
.Further details can be found in this CH story.
PR changes
io/carto.py: Avoid using the
rename_geometry
method if the GeoDataFrame's geometry column is named as GEOM_COLUMN_NAME (the_geom)Result with PR changes