Closed Zaczero closed 7 months ago
A dirty fix would be just to apply:
orient(shape(feature['geometry']).buffer(0))
(which I am doing at the moment)
there is also a validate
argument as option within serialize_as_geojson(.., validate=True)
. See here what it is doing:
https://github.com/mattijn/topojson/blob/main/topojson/utils.py#L533
geom = shape(geom_map).buffer(0)
And documented here too: https://mattijn.github.io/topojson/example/output-types.html#to_geojson
I have noticed that geometry produced by serialize_as_geojson is not always valid. Essentially, a PostGIS server logged information like:
which made me investigate. I then confirmed the issue by checking:
where
wkt_string
is:wkt.txt
I am using the following configuration: