Bug #83562 Level of precision during spatial types definition
Submitted: 27 Oct 2016 6:12 Modified: 2 Nov 2016 12:15
Reporter: Nikolaos Priggouris Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: GIS Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: gis, precision, spatial types, tolerance

[27 Oct 2016 6:12] Nikolaos Priggouris
Description:
The existing GIS data types in Mysql do not allow to set a level of precision.
Currently mysql seems to use internally double precision for spatial data computations. 
However, in most cases when storing spatial data and/or performing topological operations (intersect, overlap, touches etc.) we want computations to be performed with a specific tolerance and thus a double precision is not always desired. To give an example:
 We may need to have GIS coordinates with precision of 5 decimal points max. That means that in spatial operations the following two points:
 - POINT(12.1111111,13.1111111)
 - POINT(12.1111115,13.1111115)
 should be considered the same although they are actually apart if double precision is used.
 

How to repeat:
Not applicable

Suggested fix:

 It would be really useful if future versions of Mysql can support any of the following enhancements (listed in order of importance):
 1. allow GIS data types to be defined with a level of precision (i.e. in terms of significant decimal points) irrespective of the SRID used
 2. spatial operations allow for the definition of a given tolerance to be used during computations.
[2 Nov 2016 8:31] Norvald Ryeng
Thanks for the feature request!

If we implement it, it would be good if we didn't reinvent the wheel. Are you aware of any systems that implement this, or any standards that specify this feature?
[2 Nov 2016 12:15] Nikolaos Priggouris
I think there are a couple of commercial solutions:
In terms of Databases, I know for sure that ORACLE spatial extension supports the concept of spatial data tolerance.
From other systems also esri's ArcGIS supports in the definition of geodatabase the notion of precision/tolerance.