ogcapi-features icon indicating copy to clipboard operation
ogcapi-features copied to clipboard

Precision level filter responsibility?

Open ThomasG77 opened this issue 7 years ago • 6 comments

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.

ThomasG77 avatar Nov 17 '17 16:11 ThomasG77

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?

nmtoken avatar Dec 07 '17 18:12 nmtoken

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.

ThomasG77 avatar Dec 07 '17 23:12 ThomasG77

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.

cholmes avatar Dec 07 '17 23:12 cholmes

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.

cportele avatar Jan 30 '18 17:01 cportele

Agreement on 2018-02-01: Defer to an extension.

cportele avatar Feb 01 '18 15:02 cportele