[geos-devel] Precision/tolerance questions
strk at keybit.net
Thu Jul 30 03:03:34 PDT 2015
On Thu, Jul 30, 2015 at 11:03:55AM +0200, Hugo Mercier (ML) wrote:
> Hi all,
> I am not very familiar with the way GEOS can handle precision models ...
> If I am correct, having a "fixed" precision model, i.e. a regular grid
> allows to define a tolerance where (point) coordinates will be snapped
> before computations.
This is actually not always true. Input coordinates are tipically NOT
snapped/rounder, while coordinates that are generated by internal
operations will be. This is to avoid duplicating the work when the
input is already rounded.
> Does it mean also predicates work with a tolerance, like the
> intersection test between a point and a line will take a distance into
> account ?
Nope, predicates are exact.
> Similarly on this page
> I can read "Adding a PrecisionModel to the GEOS functionality uses a
> precision grid to "snap" all coordinates, which could eliminate some
> rounding and robustness issues with some functions. "
> What rounding and robustness issues are they ? and which functions ?
Constructive functions can raise an exception when unable to deal with
numerical instabilities. Intersection/Difference/Union...
() Free GIS & Flash consultant/developer
More information about the geos-devel