[postgis-users] two different geometries with the same Astext

Martin Davis mbdavis at VividSolutions.com
Mon Jul 18 10:09:12 PDT 2005


Why don't you post the WKT for the failure cases?  That way we have a
fighting chance of seeing what's going on.

Although some of the OGC predicates have non-intuitive behaviour, within
pretty much works the way you think it should.  In particular, if
LineString A is a subset of LineString B, then A is within B.  So it
certainly sounds as though your case should report within = true.  But
without the WKT it's impossible to determine anything more.

(Post the equals case too - this also sounds suspicious).

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 Miguel de la Fuente
> Sent: July 18, 2005 8:55 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] two different geometries with the same Astext
> 
> 
> Hello, I'looking for help with something that already happens 
> to me in the past, comparing two geometries with equals() 
> return false but when I get the AsText() of both it was the 
> same. Right now I'm having a similar problem with within(), 
> when I ask if a geometry1 is within a geometry2 in another 
> table, both multilinestrings,  the result is false. I ask the 
> AsText of both and see that the geometry1 is one segment of 
> geometry2, so it is within it. And, if I ask 
> wthin(GeometryFormText(AsText(geometry1)),GeometryFormText(AsT
> ext(geometry2)))
> return true
> 
> Then, why wthin(geometry1,geometry2) return false ?
> 
> Can anyone help me??
> 
> Thanks
> _______________________________________________
> 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