[mapserver-users] many raster projections

Fawcett, David (MPCA) David.Fawcett at state.mn.us
Mon Feb 8 08:36:07 PST 2010


Andy, 

It looks like you have data in at least two or three different projections.  If you want to display them in the same map using MapServer, you need:

- a projection block at the MAP level.  This defines your output projection.  The map UNITS and EXTENT need tobe consistent with this projection.  

- a projection block for each layer.  This is used to tell MapServer what projection the data for that layer is currently in.  

MapServer then uses this info to warp all of the layers into the same output projection.  

Does this help?  

Are these all publicly available datasets?

David.



-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Andy Colson
Sent: Monday, February 08, 2010 10:11 AM
To: mapserver-users
Subject: [mapserver-users] many raster projections

Ok, I'm confused.  Most of the problem is probably because I'm a 
programmer, not a mapper.

I have arial imagery of Minnesota, multiple sets, each seeming to be in 
a different projection.

At the top of my mapfile I have this:

MAP
   EXTENT 1285920 1377857 1426390 1506589

   PROJECTION
     "+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 
+x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs"
   END

There are no other PROJECTION settings.  Most of the images seem to 
work.  I got the projtext above from loading one of the shapefiles into 
qgis and looking at its properties.  I just kinda hoped they'd all be 
the same.  I did try adding a PROJECTION to the raster layer, but it 
didnt seem to work.  So I thought I'd "just" re-project the imagery.


Three sets of imagery seem to work (I didnt touch them, they always 
worked), they have (again copied from qgis) proj text's of:

+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 
+x_0=500000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83 
+to_meter=0.3048006096012192 +no_defs

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

and

+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs

One set is displayed way off the map, way far away from where its 
supposed to be.  Its projtext is:

+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs

I attempted to use gdal_translate and gdal_warp.

gdal_translate made a new image, with projtext:
+proj=tmerc +lat_0=35.83333333333334 +lon_0=-92.5 +k=0.999933333 
+x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs

but its in the exact same spot, it didnt re-position to where images are 
supposed to be.

A gdalwarp moved it, but not to the right place.

So I'm confused, and not sure what I'm doing.  Hopefully there is some 
info in here someone can use to set me on the right path.  Any help 
would be appreciated.

-Andy
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list