[postgis-users] 3D vs. 2D geometries

Obe, Regina robe.dnd at cityofboston.gov
Wed Apr 11 08:57:03 PDT 2007


I'm a little bit confused about what functions deal with 3d verses 2d
geometries.
 
I noticed for example that in my install - "POSTGIS="1.2.1"
GEOS="3.0.0rc4-CAPI-1.3.3" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS"
 
I have two extent functions -  one called Extent  and one called
Extent3d
 
The extent function always seems to return a box2d even if I call it
with a 3d geometry.  Well since I don't have any 3d geometries as of yet
I faked it by doing this
 
SELECT extent(force_3d(the_geom)) from mytable  
 
 
Extent3d however returns a box3d geometry regardless of whether my
geometry is 2d or 3d.
 
The postgis online manual says that extent returns a box3d which seems
to conflict with what I'm experiencing so I'm just wandering if my
install is somehow buggy or if the manual is wrong and why there is no
mention of extent3d (or is that meant to be undocumented because its
obsolete?)
 
extent(geometry set)
The extent() function is an "aggregate" function in the terminology of
PostgreSQL. That means that it operators on lists of data, in the same
way the sum() and mean() functions do. For example, "SELECT EXTENT(GEOM)
FROM GEOMTABLE" will return a BOX3D giving the maximum extend of all
features in the table. Similarly, "SELECT EXTENT(GEOM) FROM GEOMTABLE
GROUP BY CATEGORY" will return one extent result for each category.

-----------------------------------------
Be part of Boston's housing future.
Attend the Housing Boston 2012 conference, April 26-27, 2007.
Register now: http://www.cityofboston.gov/housingboston2012



-----------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070411/58a4f0d9/attachment.html>


More information about the postgis-users mailing list