[mapserver-users] Define WKT shape with projection

Josh Hevenor jhevenor at rogers.com
Wed Jun 9 13:23:22 PDT 2010


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



More information about the MapServer-users mailing list