[postgis-users] How to use dimension(geometry) command

Greg Polanski polanski.greg at yahoo.com
Mon Jun 18 02:54:25 PDT 2012


ST_CoordDim(geometry) gives 2 for 2D coordinates, 3 for 3D coordinates.

If you want to use old commands like "dimension" with a recent postgis version, you have to run legacy.sql that comes with your postgis installation. But note the st_dimension and st_coorddim are different things!


Greg



________________________________
 From: José María Amuedo <jmamuedo at gmail.com>
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net> 
Sent: Monday, June 18, 2012 11:36 AM
Subject: Re: [postgis-users] How to use dimension(geometry) command
 

Hi,

I meant dimension(geometry) to know if my consulted data is 2D or 3D.

I found in the oficial documentation that if you use dimension(geometry) you get 2 for 2D or 3 for 3D data.

Do you know something about this?

Thanks,

José María


2012/6/18 Nicolas Ribot <nicolas.ribot at gmail.com>

Hi, you mean st_dimension ?
>
>select st_dimension(geom). Returns 0 for points, 1 for linestrings, 2
>for polygons.
>
>Nicolas
>
>
>On 18 June 2012 09:37, José María Amuedo <jmamuedo at gmail.com> wrote:
>> Hello,
>>
>> I would like to know how can use the dimension(geometry) command.
>>
>> Thanks,
>>
>> Jose María
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120618/c3e0d3a8/attachment.html>


More information about the postgis-users mailing list