Newbie qn re using lat/lon bounding box for eastings raster image in map file

Brent Fraser bfraser at GEOANALYTIC.COM
Tue Oct 9 11:45:35 EDT 2007


Andrew,


  MapServer re-projects each raster and vector data layer
from their native coordinate systems to the "output"
coordinate system you specify in the MAP file.

  Your raster file (Transverse Mercator) is not natively in
the same coordinate system as your output image (likely
Geographic?).  Since the definition is stored in the tiff
file in a way GDAL/Mapserver can get at it, you can simply
add the following to your raster layer definition:

    PROJECTION
      "AUTO"
    END


  I'm tempted to file an enhancement request to make this
the default and not actually be required since lots of
raster and vector formats include a coordinate system
definition.

  If the above doesn't work, post your map file so we can
have a look at it...

Brent Fraser
GeoAnalytic Inc.
Calgary, Alberta

----- Original Message ----- 
From: "Andrew Schofield" <a.schofield at SSTL.CO.UK>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, October 08, 2007 5:07 AM
Subject: [UMN_MAPSERVER-USERS] Newbie qn re using lat/lon
bounding box for eastings raster image in map file


Apologies if this is covered by the mailing list already. I
have looked through
the documentation etc. and couldn’t find a clear explanation
and have tried a
variety of srs settings to no avail. (BTW, how do you search
the mailing lists
for multiple words?)


I have a map file with a mixture of vector and raster
layers. For the vector
layers, my request url works fine with Lat/Lon ranges for
the bounding box but
the raster layer requires the bounding box in
eastings/northings ranges. I
would like one url that can query both layers with a
latitude/longitude range
only. I think I’m missing something in explicitly declaring
the overriding
projection scheme for the raster layer, is that correct?
(The vector layers are
epsg:4326).


Thanks,

Andy




Below is the gdalinfo response for the single image covered
by the raster layer.


Driver: GTiff/GeoTIFF
Size is 3431, 4021
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.2572235630016,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32611"]]
Origin = (648640.000000000000000,4250560.000000000000000)
Pixel Size = (32.000000000000000,-32.000000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Corner Coordinates:
Upper Left  (  648640.000, 4250560.000) (115d17'52.78"W,
38d23'27.28"N)
Lower Left  (  648640.000, 4121888.000) (115d19'27.86"W,
37d13'54.01"N)
Upper Right (  758432.000, 4250560.000) (114d 2'31.34"W,
38d21'57.36"N)
Lower Right (  758432.000, 4121888.000) (114d 5'16.39"W,
37d12'27.75"N)
Center      (  703536.000, 4186224.000) (114d41'17.34"W,
37d48'2.64"N)
Band 1 Block=3431x128 Type=Byte, ColorInterp=Red
Band 2 Block=3431x128 Type=Byte, ColorInterp=Green
Band 3 Block=3431x128 Type=Byte, ColorInterp=Blue



More information about the mapserver-users mailing list