[geos-devel] Precision model and predicates

Martin Davis mbdavis at refractions.net
Wed Jan 28 12:16:59 EST 2009


The Precision Model is primarily used in constructive methods.  New 
Geometrys are computed so that their coordinates fall on the implicit 
grid defined by the Precision Model.

Currently the Precision Model is not used in evaluation of geometric 
predicates.  They are evaluated on the exact values of the coordinates.

What is your use case for wanting approximate predicates?

Ben Harper wrote:
>
> Hi,
>
> I'm trying to use GEOS to evaluate geometric predicates while using a 
> Precision Model that is lower than the default. It looks as though the 
> Precision Model is only used for certain operations, and in particular 
> ignored when evaluating the border conditions of whether lines touch 
> each other. I've read the JTS technical docs, and they seemed to imply 
> that this type of thing should work.
>
>  
>
> My test is to create two polygons side by side, with one touching 
> edge. The TOUCH predicate evaluates true. I then move one polygon away 
> by DBL_EPSILON (1e-16), and evaluate the predicate again. This time it 
> is false. A brief step through and code search seems to reveal that 
> the precision model is not used here.
>
>  
>
> Am I completely missing the point?
>
>  
>
> Thanks,
>
> Ben
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022



More information about the geos-devel mailing list