[postgis-devel] ST_Length, ST_Length3d_spheroid
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Tue May 26 04:42:25 PDT 2009
Paragon Corporation wrote:
> In writing the PostGIS in Action book, this inconsistency is really bugging
> us. I suppose changing this could break some apps.
>
> We have ST_Length -- which is an alias for ST_Lenth2D and we have
> ST_Length3D.
>
> We have ST_Length_Spheroid (which does a 3d length and is an alias for
> ST_Length_Spheroid3D exists) and we have ST_Length_Spheroid2D.
> Also observe we have no ST_Length_Sphere* (seems like it should mirror the
> ST_Distance_Sphere*).
>
> So the main annoying inconsistency here is that ST_Length does a 2D length
> while ST_Length_Spheroid does a 3D length. Can we just have both do a 3D
> length?
>
> Thanks,
> Leo and Regina
That does seem terribly inconsistent. Given that the OGC spec only
covers 2D, I'd expect that if people went out of their way to add 3
dimensions or more then they would expect 3D lengths (otherwise they
could simply wrap with a force_2d() function).
ATB,
Mark.
--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063
More information about the postgis-devel
mailing list