[postgis-users] Geometry almost-equality
Willy-Bas Loos
willybas at gmail.com
Wed Jul 27 05:17:52 PDT 2011
= - Returns TRUE if A's *bounding box* is the same as B's.
ST_Equals - Returns true if the given geometries represent the same
geometry. Directionality is ignored.
select
'0101000020E6100000CC2555DBCD206340130F289B72693BC0' =
'0101000020E6100000B4E386DFCD2063407217618A72693BC0',
st_equals('0101000020E6100000CC2555DBCD206340130F289B72693BC0'::geometry,
'0101000020E6100000B4E386DFCD2063407217618A72693BC0'::geometry)
--> f, f
Cheers,
WBL
On Sun, Jul 24, 2011 at 11:54 PM, Brendan Morley <morb.gis at beagle.com.au> wrote:
> Hi all,
>
> On my machine the following query gives a "non intuitive" result. What do
> other people get as a result here?
>
> select
> '0101000020E6100000CC2555DBCD206340130F289B72693BC0' =
> '0101000020E6100000B4E386DFCD2063407217618A72693BC0',
> '0101000020E6100000CC2555DBCD206340130F289B72693BC0'::geometry =
> '0101000020E6100000B4E386DFCD2063407217618A72693BC0'::geometry
>
> I get f,t (false, true) where I would have expected f,f
>
> The 2 geometries, by the way, are (respectively)
> "POINT(153.025129 -27.411905)"
> "POINT(153.025131 -27.411904)"
>
> So, very close in coordinate space but not the same!
>
> I am running PostGIS_Full_Version() = "POSTGIS="1.5.1"
> GEOS="3.2.0-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" LIBXML="2.7.6"
> USE_STATS" on PostgreSQL 8.4 on Windows 7.
>
>
> Thanks,
> Brendan
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
"Patriotism is the conviction that your country is superior to all
others because you were born in it." -- George Bernard Shaw
More information about the postgis-users
mailing list