To take OpenLayers out of the equation, I made myself a test.map file that just included two layers and used shp2img.

If I switch on the 2007 (raster07) then I get no arial (the result image is just a gray slate).

If I switch on raster09_chil, the result image has the arial's as expected.


Hopefully the attachment will make it through.

-Andy



On 2/8/2010 11:05 AM, Andy Colson wrote:
Thank you, but that didnt seem to help.

I left the main PROJECTION as is, and I changed my raster to this:

LAYER
NAME "raster07"
STATUS off
TILEINDEX "raster07.shp"
TILEITEM "location"
TYPE RASTER
PROJECTION
"+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
END
END


Now, here's another problem (to add to the layers of projections). I'm
using OpenLayers on the front end (for the website), and I have no idea
what all this projection stuff means, and wasnt sure how to set it in
OpenLayers.

I create the map like this:

map = new OpenLayers.Map("map", {
controls: [
new OpenLayers.Control.Navigation( {zoomWheelEnabled: false} ),
new OpenLayers.Control.PanZoomBar(),
ls
],
numZoomLevels: 12,
maxExtent: new OpenLayers.Bounds([%minx%], [%miny%], [%maxx%], [%maxy%]),
maxResolution: 250,
unit: 'm',
projection: "EPSG:2816"}
);

It seems to work. I totally guessed at EPSG:2816, I have no idea if it
matches:
"+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"

The shapefiles show up, as do most of the arials.

 > Are these all publicly available datasets?

I dont know, they are from the Livingston county Missouri Assessors
office. Hum... did I say Minnesota before? That was wrong, its MO not
MN. Its about 2 gig, and I could email and ask them if it really comes
down to it.

-Andy

On 2/8/2010 10:36 AM, Fawcett, David (MPCA) wrote:
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-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

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

MAP
        NAME LivingstonMO
        SIZE 800 800
        UNITS feet
        SHAPEPATH '/pub/maps/LivingstonMO/shape'
        FONTSET "/pub/www/fonts/fonts.txt"

        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

        IMAGECOLOR 192 192 192
        IMAGEQUALITY 95
        IMAGETYPE jpeg
        OUTPUTFORMAT
                NAME jpeg
                DRIVER 'GD/JPEG'
                MIMETYPE 'image/jpeg'
                #IMAGEMODE PC256
                EXTENSION 'jpeg'
        END


        LAYER
                NAME "raster09_chil"
                STATUS off
                TILEINDEX "raster09_chil.shp"
                TILEITEM "location"
                TYPE RASTER
        END

        LAYER
                NAME "raster07"
                STATUS on
                TILEINDEX "raster07.shp"
                TILEITEM "location"
                TYPE RASTER
                PROJECTION
                "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
                END
        END
END
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to