Closed audunska closed 2 years ago
GeoWriter
does not support geometry collections yet. Does your sequence work with wkb.to_json()
instead of wkb.to_geo()
?
Thanks for the reply!
GeoWriter
does not support geometry collections yet.
In that case it would be nice to have an error instead of just writing wrong data. We spent some time chasing down this. Is this documented anywhere?
Does your sequence work with
wkb.to_json()
instead ofwkb.to_geo()
?
That seems to work, yes.
I hit this while working on #19
I updated the title to clarify it's about the target (.to_geo) not the source (WKB or WKT)
I've been contemplating fixing this a few times. We'd need a stack of geometries in GeoWriter
, and it gets into some tricky state machine logic. Is it acceptable to extend the GeoWriter
with a stack?
I've been contemplating fixing this a few times. We'd need a stack of geometries in
GeoWriter
, and it gets into some tricky state machine logic. Is it acceptable to extend theGeoWriter
with a stack?
A geometry stack is acceptable (and with line_strings
we already have kind of a stack).
Hi @audunska - is this something you're actively working on?
If so, I'm happy to wait a bit longer, otherwise I might take a pass at it.
Hi @audunska - is this something you're actively working on?
If so, I'm happy to wait a bit longer, otherwise I might take a pass at it.
I am not working on it right now, so please go ahead!
We hit upon this by passing geometries from postgres using geozero: When a GeometryCollection is stored as a postgis Geometry field in the database, and fetched through geozero using the Decode impl, only the last geometry was returned. I'd expect the full collection to be returned instead.
Reproducing repository: https://github.com/audunska/geozero-bug