[mapserver-users] reprojection
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Tue Sep 21 23:36:10 PDT 2010
Hi,
For sure the original image is not in EPSG:4326. You can guess it from the coordinates, for example
Origin = (-8563840.575678950175643,6466755.550653258338571)
EPSG:4326 is naturally between -90,90 and -180,180. There does read
AUTHORITY["EPSG","4326"]] in one place of the gdalinfo report, but it is in the section that tells the datum or the projection.
I am not sure what the right projection could be, but I found this projection wiht the same lookin parametrers
from my Mapserver proj directory:
# WGS 84 / Antarctic Polar Stereographic
<3031> +proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs <>
If this is correct, you do not need to reproject at all because your image is already in EPSG:3031.
-Jukka Rahkonen-
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Julien Cigar
> Lähetetty: 21. syyskuuta 2010 22:09
> Vastaanottaja: mapserver-users at lists.osgeo.org
> Aihe: [mapserver-users] reprojection
>
> Hello,
>
> I'm trying to re-project a RASTER layer but without success so far.
> I have the following TIFF file:
>
> mage at mordor:/home/mage/gis % gdalinfo antarctica_sthn_ocean.tiff
> Driver: GTiff/GeoTIFF
> Files: antarctica_sthn_ocean.tiff
> Size is 12216, 9094
> Coordinate System is:
> PROJCS[" Projection Name = WGS_1984_Stereographic_South_Pole Units =
> meters GeoTIFF Units = meters",
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433],
> AUTHORITY["EPSG","4326"]],
> PROJECTION["Polar_Stereographic"],
> PARAMETER["latitude_of_origin",-71],
> PARAMETER["central_meridian",0],
> PARAMETER["scale_factor",1],
> PARAMETER["false_easting",0],
> PARAMETER["false_northing",0],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]]]
> Origin = (-8563840.575678950175643,6466755.550653258338571)
> Pixel Size = (1420.390210742724321,-1420.394765779645695)
> Metadata:
> TIFFTAG_XRESOLUTION=900
> TIFFTAG_YRESOLUTION=900
> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
> AREA_OR_POINT=Area
> Image Structure Metadata:
> INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left (-8563840.576, 6466755.551) ( 52d56'33.71"W, 8d
> 9'27.23"S)
> Lower Left (-8563840.576,-6450314.449) (126d59'13.87"W,
> 8d12'36.90"S)
> Upper Right ( 8787646.239, 6466755.551) ( 53d39'3.45"E, 7d12'35.07"S)
> Lower Right ( 8787646.239,-6450314.449) (126d16'45.99"E,
> 7d15'38.97"S)
> Center ( 111902.832, 8220.551) ( 85d47'54.65"E, 88d58'2.41"S)
> Band 1 Block=256x256 Type=Byte, ColorInterp=Red
> Overviews: 6108x4547, 3054x2274, 1527x1137, 764x569
> Metadata:
> LAYER_TYPE=athematic
> Band 2 Block=256x256 Type=Byte, ColorInterp=Green
> Overviews: 6108x4547, 3054x2274, 1527x1137, 764x569
> Metadata:
> LAYER_TYPE=athematic
> Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
> Overviews: 6108x4547, 3054x2274, 1527x1137, 764x569
> Metadata:
> LAYER_TYPE=athematic
>
> If I understood well the output of gdalinfo, the projection
> seems to be
> EPSG:4326.
> Now I want to re-project this to EPSG:3031.
> I tried with the following MAP file :
>
> MAP
> NAME "antarctic"
> STATUS ON
> SIZE 600 400
> EXTENT -8563840.576 -6450314.449 8787646.239 6466755.551
> IMAGECOLOR 255 255 255
>
> PROJECTION
> "init=epsg:3031"
> END
>
> OUTPUTFORMAT
> NAME png
> DRIVER "GD/PNG"
> MIMETYPE "image/png"
> IMAGEMODE RGBA
> EXTENSION "png"
> END
>
> LAYER
> NAME "ocean"
> TYPE RASTER
> STATUS DEFAULT
> DATA antarctica_sthn_ocean.tiff
> PROJECTION
> "init=epsg:4326"
> END
> END
> END
>
> ... but all what I get is a gray 600x400 PNG image ...
>
> Any idea what could be the problem ?
>
> Thanks,
> Julien
>
More information about the MapServer-users
mailing list