Replies: 2 comments
-
We are right now doing an improvement of some of the core de-/serialization features of GeoJSON and we can prioritise a few checks here. For polygons it would definitely make sense to have that (incl. a check if the first equals the last coordinate). The problem is with more complex geometries the assertios / checks are getting increasingly complex too with different edge-cases, etc. So we have to really see if we want to add all of that complexity to our library. But I think a few more checks would definitely make sense. But I think these checks should only be the default during debugging, not in a production app, as they could potentially crash a whole app and make deserialization considerably slower. @jsiedentop What's your opinion about that? |
Beta Was this translation helpful? Give feedback.
-
I think it's a good idea, thank you for initiating the discussion. Basically, I would try to separate the three topics:
So what could be a possible roadmap?
|
Beta Was this translation helpful? Give feedback.
-
As I'm leaning into this package, I wanted to know if we want to use any of the other GeoJSON rules with harder typing. As for Polygons, we can assert that they are closed or contain at least 3 positions, which is required, but we don't. Similarly, I believe features are required to have IDs, at least from what I'm reading online.
I find it hard to debug broken GeoJSONs because the consumers are platform view apps like Google Maps and Flutter Maps that don't return input formatting errors. If we don't want to force some of the GeoJSON conventions, does anyone have advice on dubbing formatted goujons for dynamic data with turf? I'm having issues putting together multi polygons, collections of polygons, and larger feature lists.
Beta Was this translation helpful? Give feedback.
All reactions