[mapserver-users] on the fly projection modifications

Kralidis, Tom Tom.Kralidis at CCRS.NRCan.gc.ca
Tue Aug 28 07:33:55 PDT 2001


Thanks for the info.

I tried this, but did not get the coords back as per the map_projection
param:

http://[host]/cgi-bin/mapserv_35?map_projection=proj%3Dlcc%2Clat_0%3D49n%2Cl
on_0%3D95w%2Clat_1%3D49n%2Clat_2%3D77n&map=%2Fhome%2Fhttpd%2Fhtml%2Fprototyp
es%2Fframed%2Fmap.map&imgbox=-1+-1+-1+-1&imgxy=249.5+149.5&mode=browse&zoom=
1&imgext=-141.178000+36.481974+-52.178000+89.873974

....I then changed the 'imgext' param to 'mapext', and received back LCC
coordinates, so this looked ok.

- Does one have to use mapext instead of imgext to make this work?  My
application sort of depends on imgext and zoom params to take care of
zooming factors.

Thanks

..Tom

> -----Original Message-----
> From: Stephen Lime [mailto:steve.lime at dnr.state.mn.us]
> Sent: Monday, August 27, 2001 3:57 PM
> To: Tom.Kralidis at CCRS.NRCan.gc.ca; mapserver-users at lists.gis.umn.edu
> Subject: Re: [mapserver-users] on the fly projection modifications
> 
> 
> It can be done. You need to use lat/lon coordinates to move 
> between different
> projections. No biggie in your case. You can change the 
> output projection using
> the "map_projection" parameter and you set it's value to a 
> comma delimited
> string of proj options. For example:
> 
>   "proj=lcc,lat_0=49n,lon_0=95w,lat_1=49n,lat_2=77n"
> 
> anything spit out at that point will be in that new 
> coordinate system. One caveat might
> be that you should set the new projection BEFORE passing the 
> extent but I'm not
> positive about that.
> 
> Steve
> 
> Stephen Lime
> Internet Applications Analyst
> 
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
> 
> >>> "Kralidis, Tom" <Tom.Kralidis at CCRS.NRCan.gc.ca> 08/27/01 
> 02:31PM >>>
> Hi,
> 
> Anyone have any experience / suggestions on how to change 
> projection params
> on the fly within a MapServer web app?
> 
> i.e. An existing .map file:
> 
> MAP
>  NAME CAN
>  EXTENT -180 -90 180 90
>  UNITS DD
>  TRANSPARENT ON
>  SIZE 500 300
>  WEB
>   TEMPLATE  map.htm
>   IMAGEPATH /home/httpd/html/img_cache/
>   IMAGEURL  "/img_cache/"
>   LOG       process_log
>  END
>  LAYER
>   NAME   world_at_night
>   TYPE   RASTER
>   STATUS DEFAULT
>   DATA   ../firemapping/world_stable_lights.tif
>  END
> END
> 
> ..then, in the web app, the user wishes to change projections to:
> 
> PROJECTION
>   "proj=lcc"
>   "lat_0=49n"
>   "lon_0=95w"
>   "lat_1=49n"
>   "lat_2=77n"
> END
> 
> ...how can one set this up via GET or POST.  I'd like to have the page
> refresh with coords in LCC, as per this example.
> 
> Thanks
> 
> ..Tom
> 
> =================================
> Tom Kralidis
> Systems Scientist
> Canada Centre for Remote Sensing
> Tel: (613) 947-1828
> http://www.ccrs.nrcan.gc.ca/ 
> =================================
> 



More information about the MapServer-users mailing list