[Mapserver-users] Enhancement for tiling files in multiple coordinate systems

Paul Ramsey pramsey at refractions.net
Fri Apr 25 14:19:03 EDT 2003


If I am not mistaken, the simplest trick would be to have one layer for 
each UTM zone, and assign all the layers to a single GROUP. Then you can 
reference the GROUP as if it were a layer and mapserver automagically 
handles the projections for you.

If you are having too many layers, consider some of the layer handling 
tricks that come up on the list occasionally:

- Use a C preprocessor to turn #INCLUDE sub mapfiles into a complete 
mapfile.
- Use a null mapfile and built up a mapfile from database definitions

Paul

Brent Fraser wrote:
> Mapserver users,
>  
>  
>   I've got about 4 gb of U.S. topos (1:250k scale DRGs) .  My goal is to 
> serve up the DRGs as one layer and have Mapserver reproject them on the 
> fly when necessary to the UTM zone used for viewing (I'll be using 
> scripting to determine which UTM zone to use for the user's current 
> extent every time they pan or zoom).  Usually no reprojection will be 
> required except when the user's extent is at the edge of a UTM zone.  My 
> plan is to use the TILEINDEX feature to reference the raster data. 
> Currently Mapserver requires the TILEINDEX shapefile to be in the same 
> coordinate system as the data it references.
>  
>   One option, given the current capabilities of Mapserver, is to have 
> one layer for each UTM zone.  In the U.S. that would mean about 10 layer 
> definitions, not too bad but I may eventually have some other data 
> covering 16 zones (or all 60!).  Too many layer definitions would be a 
> maintenance problem I'd like to avoid.
>  
>     Another option would be to pre-condition the raster data by 
> reprojecting it to geographic coordinates.  This would allow one 
> tileindex file and therefore one layer definition.  But the result is 
> that the raster data would always be re-projected on the fly by 
> Mapserver (since the display projection would be UTM) and performance 
> would suffer.
>  
>   A solution might be enhance Mapserver to allow the tileindex shapefile 
> to be in geographic coords while using the "PROJECTION AUTO" feature to 
> determine the coordinate system of the data file.  That would require 
> two projection definitions in one layer: one for the tileindex 
> (proj=latlong) and one for the data (AUTO) requiring either a change to 
> structure of the map file or the addition of keywords.  How about 
> replacing TILEINDEX and TILEITEM with a TILE object containing INDEX, 
> ITEM, and PROJECTION?  Any other ideas?
>  
> Thanks!
> Brent Fraser
>  
> GeoAnalytic Inc.
> Tel:(403) 213-2700
> bfraser at geoanalytic.com <mailto:bfraser at geoanalytic.com>
> www.geoanalytic.com <http://www.geoanalytic.com>


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the mapserver-users mailing list