question on projections

Ed McNierney ed at TOPOZONE.COM
Thu Nov 11 17:50:43 PST 2004


Chris -

While I agree with Frank, I'd like to point out that the OGC WMS interface allows you (in fact, requires you) to request the output projection for any map image.  This would, of course, limit you to using MapServer only to generate images - you'd need to manage the rest of the application and presentation logic yourself.

However, you'd need to do that anyway to keep track of the UTM zone you're in and calculate the appropriate bounding box coordinates for the map request in the zone/projection you desire.  That's exactly what we do on TopoZone, and you can see an example here:

http://www.topozone.com/map.asp?lat=36&lon=-120

That's just a random spot right on the UTM Zone 10/11 boundary.  Click just to the right of center and you'll be looking at a UTM Zone 11 map, with the left-hand side reprojected into Zone 11; click to the left of center and you'll see a UTM Zone 10 map, with the right side reprojected.  Since the default coordinate datum is NAD83, the transition point is actually a little to the right of where you can see the seam between quads, because the quads are bounded by NAD27 lat/lon boxes.

The map images are all generated using OGC WMS requests.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 978 251-4242   Fax: +1 978 251-1396

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Frank Warmerdam
Sent: Thursday, November 11, 2004 5:26 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] question on projections

Chris wrote:
> Hi everyone,
>
> I'm wondering how I can change from one projection to the other one
> the fly, depending on the area of the map I'm in.
>
> For example, if I'm using UTM projections, and I pan from one UTM zone
> to ther other, how can I switch my output projection let's say from
> UTM 16 to UTM 17.  It looks like I can only define one output
> projection in a map file.

Chris,

This would be tricky.  You would likely need to have a bunch of mapscript magic to control something like this.  In "normal" use of MapServer, the URL will have the requested region to display in the URL but the region is in the coordinates of the map.  So you would have to do a whole bunch of preprocessing magic in a mapscript script to recognise that a request has wandered from one zone into another and transform the requested BBOX as well as overriding the mapObj coordinate system.

I personally would encourage you to select a single coordinate system appropriate for the whole region you want to work on if at all possible.
It would save you alot of headaches.

Best regards,
--
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the MapServer-users mailing list