[postgis-devel] Should EMPTY be spatially equal to self ?

Paul Ramsey pramsey at opengeo.org
Wed Jan 11 10:00:06 PST 2012


You might need to untease it further, as there is no such thing as an
empty box (in our code, notionally there is)... but right you could
just have the ~= operator implement the right semantic. OK.

Having it always be true is fine w/ me.
Note this, warning, warning.

'POINT EMPTY'::geometry::wkb::geometry = 'MULTIPOINT EMPTY'

Sowwy.

P.

On Wed, Jan 11, 2012 at 9:48 AM, Sandro Santilli <strk at keybit.net> wrote:
> I was doing this nice round-trip WKB test:
>
>  SELECT ST_Equals(g, g::wkb::geometry)
>
> ... when I got a few FALSE returns.
>
> WKB Reader or Writer bug ?
> NO, it is that EMPTY isn't equal to itself !
>
> So, what do you think ? Should it be equal ?
>
> The box of an EMPTY geometry is an EMPTY box.
> Is the EMPTY box equal to self ? I think it is.
>
> See also http://trac.osgeo.org/postgis/ticket/1453
>
> --strk;
>
>  ()   Free GIS & Flash consultant/developer
>  /\   http://strk.keybit.net/services.html
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list