[mapserver-users] Re: Center in lat/lon, radius in miles?
Stephen Lime
steve.lime at dnr.state.mn.us
Fri Sep 7 14:55:10 PDT 2001
Are you using parameters like mapxy and buffer to do this or some other
method? Since your output map is lcc this isn't hard. You just need to convert
your center point from lat/lon to lcc and then generate the exent around that
computed point. The CGI program (compiled with Proj.4) has built-in capabilities
to do this. For example, assuming a non-geographic output projection you can
set mapext or mapxy in the output projection or in lat/lon. If it's in lat/lon MapServer
will convert to the output projection before continuing. You can use the buffer
parameter to specify a radius to use around the mapxy point. In your case you'd
set it to ½ a mile (in output units).
Hope this helps.
Steve
Stephen Lime
Internet Applications Analyst
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Bill Lubanovic <bill at madscheme.com> 09/06/01 04:36PM >>>
Although I've read the docs, installed the demo, and have built working
applications, I'm stuck on something that sounds simple.
I'm trying to plot a map with its center at a given lat/lon and a radius
of a given number of miles. The map would actually be the bounding box
of this circle, not clipped to the circle. And it would only be a
circle in lat/lon space (Mercator), not in any other projection, right?
The data files (state/county/etc. boundaries) are good, and the
projection from lat/lon to lcc and other projections works in the
template file. But I'm not sure how to define the extent around the
centerpoint, since the original lat/lon (DD) space doesn't equate to
miles. I'm approximating the bounding box by trial and error. Should I
use proj.4 to calculate the extents in miles for each lat/lon
centerpoint? Or is there a way in Mapserver to specify this directly?
Thanks,
Bill Lubanovic
Mad Scheme Limited
More information about the MapServer-users
mailing list