[postgis-devel] optional units parameter...

Paul Ramsey pramsey at cleverelephant.ca
Sun Oct 11 14:07:49 PDT 2009


Glad to hear an opposing viewpoint, Jeff. Is this:

  select st_distance(g1, g2, 'feet')

so much better than

  select st_distance(g1, g2) / 0.3048

? I guess there's something to be said for transparency, when you look
at that, it's clear what's going on in the first one.

P.

On Sun, Oct 11, 2009 at 8:47 AM, Jeff Hamann
<jeff.hamann at forestinformatics.com> wrote:
> Paul,
> I just read the threads about having optional units in the geography
> functions.
> Should the geography functions have a (optional) units parameter? Are
> the users that lazy? Do they need that? Oracle does it. Does
> SQLServer?
>
> ST_Distance(a.geog, b.geog, 'miles')
> ST_Area(a.geog, 'acres')
>
> IMHO, I think "users" are that lazy, thus the need for server-side
> applications. As for myself, I'm currently grappling with units in report
> views, and having units would be absolutely awesome! I'm just not sure how
> to implement them so that the value *and* the units are usable.
> Jeff.
> Jeff Hamann, PhD
> PO Box 1421
> Corvallis, Oregon 97339-1421
> 541-754-2457
> jeff.hamann[at]forestinformatics[dot]com
> http://www.forestinformatics.com
>



More information about the postgis-devel mailing list