You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a feature with a Point geometry, I would expect an exception when the number of coordinates doesn't match the coordinateDimension. Instead, the feature is successfully parsed.
When parsing this feature with a CRS that has a coordinateDimension of 2, the resulting feature has 2 coordinates.
Would it be possible to throw an exception during parsing when the number of coordinates doesn't match coordinateDimension? This could be a Setting, so it won't break current behavior. And would a Pull Request be accepted for this new setting?
The text was updated successfully, but these errors were encountered:
The current behavior is motivated by the fact that most CRS definitions in common use seem to be 2D, but for many use cases users need 3D or 3DM coordinates.
But if you need to have the parser be strict in the coordinate dimension, then having a special feature setting for this is I think a good solution. I'd be happy to consider a PR for this.
In the meanwhile I've realised that throwing an exception when the number of coordinates doesn't match the coordinateDimension will not fix the problem it was supposed to fix.
The features that get parsed can have a 2D or 3D Point. To fix the problem, it would be necessary that the number of coordinates in the parsed Geometry would match the number of coordinates in the original feature.
Is this already possible with Geolatte? Or would it be possible to add a new setting for this?
I don't exactly understand what your use case is. What are the "original features" here?
For what it is worth, Geolatte ensures that if you serialize a feature, no additional coordinate values are introduced. In other words there is an invariant like
When parsing a feature with a Point geometry, I would expect an exception when the number of coordinates doesn't match the coordinateDimension. Instead, the feature is successfully parsed.
Example feature:
When parsing this feature with a CRS that has a coordinateDimension of 2, the resulting feature has 2 coordinates.
Would it be possible to throw an exception during parsing when the number of coordinates doesn't match coordinateDimension? This could be a Setting, so it won't break current behavior. And would a Pull Request be accepted for this new setting?
The text was updated successfully, but these errors were encountered: