Changes between Initial Version and Version 1 of ToleranceDiscussion


Ignore:
Timestamp:
Feb 28, 2012, 11:32:01 PM (12 years ago)
Author:
nicklas
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • ToleranceDiscussion

    v1 v1  
     1
     2== What functions need a tolerance/precision and how should it be implemented ==
     3
     4Aiming at 2.1
     5The double precision floating point values in the coordinates and function returns sometimes makes things difficult.[[BR]]
     6It is for instance impossible to find a point that is intersecting a linestring except some special cases. 
     7
     8What makes things difficult is that the number of decimals that the double precision value can hold depends on how many digits is needed on the left of the decimal sign.
     9
     10The good thing is that double precision hold way more precision than needed in mapping. It is not common to use maps for better precision than decimeters or centimeters.
     11
     12So, we need some way to do the calculations with best possible precision and then from a given tolerance '''or''' decided from the precision of the input take the inaccuracy in account.
     13
     14List of functions that should take tolerance and precision.
     15
     16
     17'''Native PostGIS'''
     18 * ST_Distance, would be nice if the output was based on the input precision.
     19
     20'''In GEOS'''
     21 * ST_Intersects with tolerance
     22     Should behave like ST_Dwithin with the tolerance as the second argument. But ST_Intersects is way faster than ST_Dwithin so hopefully it is possible to implement in that algoritm