[postgis-users] New within problem
Martin Davis
mbdavis at VividSolutions.com
Thu Jul 28 09:53:27 PDT 2005
Whoops, that was a typo. It should have read:
"running the given test case in JTS returns g1.within(g2) = true. "
In any case, your identification of the difference between the binary
points solves the problem - the geometries are different.
I'm amazed that a difference in such a high-order bit doesn't show up in
the WKT. I always figured that displaying 16 digits or so from
floating-point pretty much displayed all the bits of the FP number.
This calls for some more investigation to improve my intuition!
I'm thinking about the HEX-WKB I/O... In general, I think the real
answer is not to expose zillions of digits of precision, but to
encourage users to use a reasonable precision grid. 56 bits is waaaay
more precision than most data really has. Also, the more "free" bits
there are in coordinate values, the more robust the geometric
computation is.
Martin Davis, Senior Technical Architect
Vivid Solutions Inc. www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On
> Behalf Of strk at refractions.net
> Sent: July 28, 2005 9:38 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] New within problem (was:(URGENT
> BUGFIX (was:twodifferent geometries with the same Astext))
>
>
> On Thu, Jul 28, 2005 at 08:43:17AM -0700, Martin Davis wrote:
> > Strk, running the given test case in JTS returns
> g1.within(g1) = true.
> > I'm pretty sure this is the correct answer. Converting
> the geometries
> > to LineStrings gives the same result.
> >
> > So there does seem to be a discrepancy between PostGIS and
> JTS here...
>
> g1.within(g1) always returns true, I confirm this
> (I was wrong about definition of within).
> I did not notice any discrepancy between GEOS and JTS.
>
> This is one of the cases in which having hex-wkb parsing
> capability in JTS would help (read my other message for details)...
>
> --strk;
>
> _______________________________________________
> 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