Why there is a Tolerance parameter in oracle sdo_geom.sdo_length

946 Views Asked by At

Documentation says that tolerance reflects the distance that two points can be apart and still be considered the same (for example, to accommodate rounding errors)

but in a length function there should be no number comparison.

Is it for the arc segments? or the geodetic coordinates?

2

There are 2 best solutions below

0
On BEST ANSWER

Short answer: If the start and end nodes of a line are within the specified tolerance of each other, then the length of that line will be zero.


For background information on tolerance / rounding errors:

When the documentation mentions accommodating rounding errors, it's really talking about this type of scenario:

1 decimal degree / 60 = 0.01666666666 (recurring) decimal minutes

However, 0.01666666666 decimal minutes * 60 is not equal to 1 decimal degree, it's actually 0.9999999996.

Applying a tolerance of 0.1 (for example) to the comparison of these two values would treat the values as equal.

0
On

To clarify: the tolerance value is always expressed in meters for geodetic (long/lat) data. So a tolerance of 0.1 means 10cm.

For projected data, the tolerance is expressed in the unit for that projection - generally meters (but some US systems use feet).