[mapserver-users] Mapserver and projcs in geotiff header

Jørn Vegard Røsnes jorn at spacetec.no
Thu Oct 28 05:50:29 EDT 2010


Hi all,

just a feature check of Mapserver.

Should Mapserver read the projection information in the geotiff header, if 
PROJECTION is not set in the LAYER def. of the map file?

I'm testing with Mapserv 5.1-dev, and it's not working without PROJECTION, 
only when PROJECTION is set. 
I will soon try with a recent version of Mapserver (compiling).

Here is my geotiff header (gdalinfo):

Coordinate System is:
PROJCS["Mercator WGS84",
    GEOGCS["unnamed",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,0,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT[,0.0174532925199433]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["unknown",1]]
Origin = (-143878.103329198609572,7218088.338938739150763)
Pixel Size = (75.000000000000000,-75.000000000000000)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_DATETIME=2010:09:21 14:32:57
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_MAXSAMPLEVALUE=255
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -143878.103, 7218088.339) (  1d17'32.92"W, 54d26'4.08"N)
Lower Left  ( -143878.103, 6441988.339) (  1d17'32.92"W, 50d 9'52.31"N)
Upper Right (  660946.897, 7218088.339) (  5d56'14.59"E, 54d26'4.08"N)
Lower Right (  660946.897, 6441988.339) (  5d56'14.59"E, 50d 9'52.31"N)
Center      (  258534.397, 6830038.339) (  2d19'20.83"E, 52d21'4.61"N)
Band 1 Block=10731x97 Type=Byte, ColorInterp=Gray


Mapfile (partly):

MAP
UNITS DD
PROJECTION
  "init=epsg:4326"
END

    LAYER
        NAME "mygeotiff"
        DATA "geo.tiff"
        TYPE RASTER
        PROJECTION
                "proj=merc"
                "a=6378137"
                "b=6378137"
                "lat_ts=0.0"
                "lon_0=0.0"
                "x_0=0.0"
                "y_0=0"
                "k=1.0"
                "units=m"
                "nadgrids=@null"
        END
     END
END


cheers
Jørn Vegard Røsnes


More information about the mapserver-users mailing list