[mapserver-users] Define WKT shape with projection

Mark Wright sparkymeister at gmail.com
Wed Jun 9 17:15:42 EDT 2010


What I think you need to do is reproject those points to a projection
that uses meters rather than degrees. You'll still be getting the same
basic result where the distance between 0,0,and 0,1 is one but now the
distance between those points is one meter.



Mark

On Wed, Jun 9, 2010 at 2:23 PM, Josh Hevenor <jhevenor at rogers.com> wrote:
> I think I'm missing something obvious here.
>
> I'm using PHP mapscript and I have two points (epsg:4326). I want to
> measure the distance between the two points and get the result in
> meters.  I've come at it a couple ways and I'm definitely getting
> degrees returned. Well, I think I'm just getting the simple difference
> between the two points. For example, I'm getting the distance between
> point (0,0) and (0,1) as 1.
>
> I've tried making a shape object (MS_SHAPE_LINE) and using getLength()
> and I've tried making two point objects and using distanceToPoint. I get
> the same sort of thing.
>
> I guess I'm just looking for how I can define the output unit on a
> dynamically created shape. Any suggestions are welcome.
>
> Thanks!
>
> Josh
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
Have fun or die trying - but try not to actually die.


More information about the mapserver-users mailing list