hawkaa / pygeojson

GeoJSON library for Python with types
8 stars 1 forks source link

Always output Feature geometry and properties #19

Open danvk opened 1 month ago

danvk commented 1 month ago

Fixes #18

According to the spec, both "geometry" and "properties" are required members on a Feature. Either may be set to null.

pygeojson is also lax in enforcing this when it parses GeoJSON. I've left that behavior as-is, but I do want to note that some of the test files are invalid GeoJSON, e.g.

https://github.com/hawkaa/pygeojson/blob/eaf554ea3a0a34fa20b4b080751d706820984342/assets/feature_without_geom.json#L1-L3

I had to bump a few dependencies to get poetry install --with=dev to run.