ogcapi-features
ogcapi-features copied to clipboard
Precision level filter responsibility?
I'm wondering if limit precision should be managed in the spec with a filter like 'precision=6' or should be kept at data file/store behind the web service or both.
This viewpoint comes from 2 main reasons:
- Sending ten digits precision has no meaning: see this summary https://gis.stackexchange.com/a/8674
- The cost of geometry precision: for WGS 84, each coordinates with 10 digit precision would cost around 30% of the geometry size
Geometry with 6 digits (10 characters)
179.999999
Geometry with 10 digits (14 characters)
179.999999999
For point geometry, the gain is small but for lines and polygones, the improvement would be worth for the response size.
The other question it would open is about rounding or cutting for this precision, if considered in the core spec.
But what if you have datasets that deal with measurements at sub millimetre level, I know we do for ground motion data, are you saying don't use WFS?
No, just use WFS. If an option like precision
in the call to the API is accepted in the specs, set it to 9 or 10 digits "for measurements at sub millimetre level".
If your data and scenario need this precision, keep it. It will take more time to retrieve data but you will have no choice. This answer is relevant only if you need vector data for your purpose on the browser side. Otherwise, you may prefer images instead of features.
Seems pretty specific to go into the core specification, while increasing the implementation overhead. But would make a great little extension that implementors who want dynamic user-defined management of precision could use.
I agree, I would also see it in an extension. Another aspect that could be addressed in the same extension is the resolution
parameter from the WFS 2.x draft to generalise geometries to a specified resolution (Change Request 11-004).
Both are addressing the Spatial Data on the Web Best Practice 6.
Agreement on 2018-02-01: Defer to an extension.