[gdal-dev] Length method for geometries in bindings

Ari Jolma ari.jolma at gmail.com
Thu Feb 18 11:16:18 EST 2010


Frank Warmerdam wrote:
> Ari Jolma wrote:
>> Folks,
>>
>> I added a Length() method for geometries into bindings. The method 
>> re-dos a simple euclidean distance as the get_Length of OGR proper is 
>> not exposed.
>
> Ari,
>
> I'm not clear on why you reimplemented it for the bindings instead of
> just exposing it from the core, and adding a binding around it.

I simply don't feel confident enough on changing the C API as I've so 
far only worked on the bindings.

>
>> I hope this is ok. Length is in OGC SF with that name. However, the 
>> standard specifies that the length should be in its associated 
>> spatial reference and that's not the case here.
>
> I don't understand this statement.  In what way is the length not being
> returned in the linear measure of the spatial referenced associated with
> the geometry?  It seems to be - it seems to me something special would
> need to be done to make that not-true.

For example if the data is in geographic coordinates then the distance 
between two points is not euclidean distance.

Regards,

Ari

>
> Best regards,



More information about the gdal-dev mailing list