[postgis-devel] ST_Area, ST_Area2D
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Mon Jul 21 02:07:04 PDT 2008
Paul Ramsey wrote:
> Optional argument? :)
>
> st_length(geom, [dim])
>
> default is 2d regardless of input, [dim] = 3 allows you to get 3d if
> you need it.
>
> P
Hmmm that seems like a lot of extra clutter. My feeling would be that
the result returned should reflect the highest dimension input geometry,
so as Regina suggests would be 2D length for a 2D line or 3D length for
a 3D line. In terms of compliance, anyone inputting 3D geometries is
already outside of the SFS 1.1 spec, and so I wouldn't feel bad about
asking people to add a force_2d() call to switch the result if the 2D
result is what they actually wanted. Common sense would suggest that if
you have a 3D input, you'll get a 3D output.
ATB,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-devel
mailing list