[postgis-devel] optional units parameter...

Jeff Hamann jeff.hamann at forestinformatics.com
Mon Oct 12 10:19:55 PDT 2009


Paul,

You're totally right. Sorry for the segue. If I have meters, I can  
rely on that and code accordingly.

Thanks,
Jeff.

On Oct 12, 2009, at 10:13 AM, Paul Ramsey wrote:

> On Mon, Oct 12, 2009 at 10:05 AM, Jeff Hamann
>> having very familiarity with how this might be accomplished, I can  
>> envision
>> the following examples:
>> st_area( boundary, 'hectares')
>> where boundary is from a google earth file (WGS84)
>> st_buffer( stream, stream_buffer[1], 'feet' )
>> where stream is in UTM (meters), stream buffer vector is in feet,  
>> and the
>> resulting buffer area needs to be reported in acres or hectares.
>
> As Regina pointed out, this conversation can segue very quickly from a
> specific "what should geography do" question into a larger "what
> should geometry and geography do" place. Supporting arbitrary output
> units in geometry involves a great deal more new machinery than doing
> it for geography (because the geometry is currently blissfully unaware
> of what SRS it is in, except for the SRID number).
>
> Geography, on the other hand, is already returning all answers in
> metres, so supporting other units is "just" a matter of providing a
> lookup table and mechanisms for parsing the string inputs of unit
> names.
>
> I think I'm going to err on the side of simplicity right now, which is
> just return metres, since the story is so simple: we return metres. If
> you want something else, scale appropriately.
>
> P.

Jeff Hamann, PhD
PO Box 1421
Corvallis, Oregon 97339-1421
541-754-2457
jeff.hamann[at]forestinformatics[dot]com
http://www.forestinformatics.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20091012/e98e6030/attachment.html>


More information about the postgis-devel mailing list