-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The specification says:
The size of a GeoJSON text in bytes is a major interoperability
consideration, and precision of coordinate values has a large impact
on the size of texts. A GeoJSON text containing many detailed
Polygons can be inflated almost by a factor of two by increasing
coordinate precision from 6 to 15 decimal places. For geographic
coordinates with units of degrees, 6 decimal places (a default common
in, e.g., sprintf) amounts to about 10 centimeters, a precision well
within that of current GPS systems. Implementations should consider
the cost of using a greater precision than necessary.
Things to investigate:
- Does kotlinx-serialization let us control the precision of
Doubleserialization?- Yes, but only with a custom serializer for the field
- Does it make sense to expose some configurable serialization (
class GeoJsoninstead ofobject GeoJson)? Other than coordinate precision, I could see this being used to:- register additional default serializers for feature properties
- configure strictness of coordinate validate (allow / disallow invalid latlon)
- configure whether foreign keys are allowed, etc.
- allow lenient json (comments, trailing comma,
Infinity,NaN)
Metadata
Metadata
Assignees
Labels
No labels