[Mapserver-users] distanceToPoint in kilometres?
Daniel Morissette
morissette at dmsolutions.ca
Mon Nov 3 13:36:46 PST 2003
You could also have a look at the 'geod' program that comes with PROJ.
Daniel
Yewondwossen Assefa wrote:
> One possible way of doing that would be to convert your 2 lat/long
> positions to a projected unit system and then use the distanceToPoint
> (or your local code) to compute the distance.
> You can use the php_proj utility (which uses Proj.4) to do your
> conversion. If you are builing mapserver yourself, the file is
> php_proj.c inside the php3 directory and It should be built into a
> php_proj.so. If you are on windows, you can download the php_proj.dll
> which should be bundeled with the php zip file at
> http://www.maptools.org/php_mapscript/index.phtml
>
> Later,
>
> Sebastian Albrecht wrote:
>
>> Hi everybody,
>>
>> I just tried to use the distanceToPoint method in my PHP Mapscript
>> application. It seems to calculate the mathematical distance of the
>> two given points (Pythagoras?).
>>
>> Of course this is not very useful because I cannot convert it to a
>> metric distance so that a distance of 90,00 can be very short (at the
>> poles) or very long.
>>
>> Is there a possibility to calculate the real distance considering
>> projection and ellipsoids? I think it might work with PROJ.4 somehow,
>> but the whole site seems to be offline at the moment.
>>
>> Does anybody have a clue?
>>
>> Best regards,
>> Sebastian
>>
More information about the MapServer-users
mailing list