georust / geozero

Zero-Copy reading and writing of geospatial data.
Apache License 2.0
336 stars 33 forks source link

Add `Gpx` which impls GeozeroGeometry and example failing tests #51

Closed michaelkirk closed 1 year ago

michaelkirk commented 1 year ago

Note this is targeting @frewsxcv'd PR #48

The hope is to make sure the new data source aligns with the expectations of the existing processors. Currently some invalid input is produced.

In particular, there's no separation between the various elements in the case of converting the "comprehensive" test file to other formats.

e.g. to_wkt produces: MULTIPOINT(-1.5153741828293 47.253146555709,-1.5482325613225 47.235331031612)MULTILINESTRING((-1.55 (note the lack of separator before MULTILINESTRING.

I also think that, like our geo-types output, that this should produce a top level GeometryCollection to contain the multiple geometries, since WKT doesn't support multiple top level geometries (see #35 for a related discussion about how geojson FeatureCollections to WKT produces invalid output)

Similarly the current output of gpx.to_json() is not parsable.