<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>ST_CoordDim(geometry) gives 2 for 2D coordinates, 3 for 3D coordinates.</span></div><div><br><span></span></div><div><span>If you want to use old commands like </span>"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!<br></div><div><br></div><div>Greg<br></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> José María Amuedo <jmamuedo@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> PostGIS Users Discussion
<postgis-users@postgis.refractions.net> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, June 18, 2012 11:36 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [postgis-users] How to use dimension(geometry) command<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv532889770">Hi,<br><br>I meant dimension(geometry) to know if my consulted data is 2D or 3D.<br><br>I found in the oficial documentation that if you use dimension(geometry) you get 2 for 2D or 3 for 3D data.<br><br>Do you know something about this?<br>
<br>Thanks,<br><br>José María<br><br><div class="yiv532889770gmail_quote">2012/6/18 Nicolas Ribot <span dir="ltr"><<a rel="nofollow" ymailto="mailto:nicolas.ribot@gmail.com" target="_blank" href="mailto:nicolas.ribot@gmail.com">nicolas.ribot@gmail.com</a>></span><br><blockquote class="yiv532889770gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, you mean st_dimension ?<br>
<br>
select st_dimension(geom). Returns 0 for points, 1 for linestrings, 2<br>
for polygons.<br>
<br>
Nicolas<br>
<div><div class="yiv532889770h5"><br>
On 18 June 2012 09:37, José María Amuedo <<a rel="nofollow" ymailto="mailto:jmamuedo@gmail.com" target="_blank" href="mailto:jmamuedo@gmail.com">jmamuedo@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I would like to know how can use the dimension(geometry) command.<br>
><br>
> Thanks,<br>
><br>
> Jose María<br>
><br>
</div></div>> _______________________________________________<br>
> postgis-users mailing list<br>
> <a rel="nofollow" ymailto="mailto:postgis-users@postgis.refractions.net" target="_blank" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> http://postgis.refractions.net/mailman/listinfo/postgis-users<br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a rel="nofollow" ymailto="mailto:postgis-users@postgis.refractions.net" target="_blank" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a rel="nofollow" target="_blank" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</blockquote></div><br>
</div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br><br> </div> </div> </div></body></html>