[postgis-devel] ST_Expand unexpected behavior

Obe, Regina robe.dnd at cityofboston.gov
Tue Sep 16 06:20:42 PDT 2008


Typo I meant
SELECT CAST(ST_Expand(ST_GeomFromEWKT('SRID=2163;LINESTRING(2312980
110676 1,2312923 110701 5,2312892 110714 2)'),12) As box3d);

yields
BOX3D(2312880 110664 0,2312992 110726 0)

Whic is essentially a 2d box.

-----Original Message-----
From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of Obe,
Regina
Sent: Tuesday, September 16, 2008 8:51 AM
To: PostGIS Development Discussion
Subject: [postgis-devel] ST_Expand unexpected behavior

I'm not really quite sure whether to consider this a bug, but it seems
like unexpected behavior to me.

1) If I expand a 3d box, I get a 3d box back
SELECT ST_Expand(CAST('BOX3D(778783 2951741 1,794875 2970042.61545891
10)' As box3d),10)

yields
BOX3D(778773 2951731 -9,794885 2970052.61545891 20)

2) However if I expand out a 3d geometry, I get back a 2d box. 

SELECT CAST(ST_Expand(ST_GeomFromEWKT('SRID=2163;LINESTRING(2312980
110676 1,2312923 110701 5,2312892 110714 2)'),12) As box3d);

yields
SELECT CAST(ST_Expand(ST_GeomFromEWKT('SRID=2163;LINESTRING(2312980
110676 1,2312923 110701 5,2312892 110714 2)'),12) As box3d);

I understand this is because
I assume we only keep 2d boxes around geometries, but to the casual user
(or at least me with a casual user hat on, its unexpected behavior).

Should I just make a note of this in the docs? I presume there is no
easy fix for this and since our indexes are all 2d, its not all that
useful right now anyway.

Thanks,
Regina

-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.

_______________________________________________
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