[postgis-users] geos result sets

James S reid james.reid at ed.ac.uk
Thu Feb 26 01:15:17 PST 2004


thanks for that - I can see where you are coming from even if the results
ends up a little unexpected - interstingly, if you use a distance() = 0
function you get the 'correct' result so I guess there is some intrinsic
tolerance in the distance() function?
one consequence of course is that geometries would need to be very clean to
prevent this sort of behaviour. Have you any thoughts on what operators I
could use that would give me the expected result without have to check for
data inconsistencies ? In practical terms I need to be able to establsih
containment without the exacting tolerances that geos seems to demand? Will
the distance function work predicatbly on differnt machine architectures?

BTW - the whole potgis/geos solution is really neat - Im sure it wont stop
Jack Dangermouse sleeping contentedly but its good to see theres viable
alternatives rather than paying in blood : ) keep up the good work...

james
----- Original Message ----- 
From: "Martin Davis" <mbdavis at VividSolutions.com>
To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
Sent: Wednesday, February 25, 2004 6:23 PM
Subject: RE: [postgis-users] geos result sets


I thought I better leap to the defence of JTS/GEOS.  I've analyzed the
situation and (no surprise to me) found that the results from GEOS are
correct.  The Within=FALSE result is caused by a slight difference in
the vertices in the two coverages.

I've attached a full analysis (with screenshots from JUMP).

I have no idea why ArcView gives a different result - you'll have to ask
ESRI    8^)

Martin Davis, Senior Technical Architect
Vivid Solutions Inc.
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046


> -----Original Message-----
> From: James S reid [mailto:james.reid at ed.ac.uk]
> Sent: Wednesday, February 25, 2004 1:09 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] geos result sets
>
>
> hi  - thanks and I appreciate that your times at a premium -
> Ive checked that the geoms are valid and run the follwing sql
> (2 tables 1=large poly,1=small polys (8 polys):
>
> test=# select small.* into temp from small,large where
> within(small.the_geom,large.the_geom) = TRUE;
>
> dumping temp gives sthe GEOS result set seen in the
> screenshot attached (along with the sql load files for the
> original shapes).
>
> as you can see - AV gets all eight polys and GEOS only the seven?
>
> Im I missing something or is there a bug?
>
> cheers
>
> james
>
> ----- Original Message ----- 
> From: "David Blasby" <dblasby at refractions.net>
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Sent: Tuesday, February 24, 2004 5:48 PM
> Subject: Re: [postgis-users] geos result sets
>
>
> > Why dont you send us the actual query thats going wrong?
> >
> > ie. something like:
> >
> > select within(<polygon 1>,<polygon 2>);
> >
> > I need to see what <polygon 1> and <polygon 2> are to do
> any testing.
> > Saying GEOS and ARC have a different answer isnt enough to
> diagnose a
> > problem - I need a specific example.
> >
> > I, unfortunately, dont have time to sift through your data
> in PostGIS
> > and ARC to find differences.
> >
> > Did you check to see if your geometries are valid (ie. select
> > isvalid(the_geom) from <table>;)?
> >
> > dave
> > _______________________________________________
> > postgis-users mailing list postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>



----------------------------------------------------------------------------
----


> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>




More information about the postgis-users mailing list