1

I would like to know how MapServer can do the reprojection from a unknown CRS to EPSG:4326. I think it uses GDAL but how I can do the same thing?

GDAL Info output from data input (no EPSG code):

Driver: GTiff/GeoTIFF
Files: geostationary_ir-120_20170619083000_c7142d3e384e192461debbe8c32751c1___b8aedb3f.tiff
Size is 2288, 2288
Coordinate System is:
PROJCS["Geostationary_Satellite",
    GEOGCS["GCS_unnamed ellipse",
        DATUM["D_unknown",
            SPHEROID["Unknown",6378160,298.2539162964669]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Geostationary_Satellite"],
    PARAMETER["central_meridian",86.5],
    PARAMETER["satellite_height",35785993.3373],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (-5732339.950191651470959,5732339.950191651470959)
Pixel Size = (5010.786669747946689,-5010.786669747946689)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_ARTIST=""
  TIFFTAG_DATETIME=2017:06:19 08:30:00
  TIFFTAG_DOCUMENTNAME="TIFF-MF CMS" 126 155 0
  TIFFTAG_HOSTCOMPUTER=REANIM02
  TIFFTAG_IMAGEDESCRIPTION= 126 155 0
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
  TIFFTAG_SOFTWARE=Pnm2TiffMF v1.2
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=BAND
Corner Coordinates:
ERROR 1: tolerance condition error
Upper Left  (-5732339.950, 5732339.950) 
ERROR 1: tolerance condition error
Lower Left  (-5732339.950,-5732339.950) 
ERROR 1: tolerance condition error
Upper Right ( 5732339.950, 5732339.950) 
ERROR 1: tolerance condition error
Lower Right ( 5732339.950,-5732339.950) 
Center      (   0.0000000,   0.0000000) ( 86d30' 0.00"E,  0d 0' 0.01"N)
Band 1 Block=2288x1 Type=Byte, ColorInterp=Gray 

I tried to use GDAL to reproject my GeoTIFF

gdalwarp -s_srs "+proj=geos +lon_0=86.5 +h=35785993.3373 +x_0=0 +y_0=0 +a=6378160 +b=6" -t_srs "EPSG:4326" geostationary_ir-120_20170619083000_c7142d3e384e192461debbe8c32751c1___b8aedb3f.tiff geostationary.tiff

But, and the reprojection doesn't work. Below, this is my output. GDALWARP output

ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
Creating output file that is 3236P x -2147483648L.
ERROR 1: Attempt to create 3236x-2147483648 dataset is illegal,sizes must be larger than zero.

By using MapServer with WCS 1.1.1 DescribeCoverage query, I got this:

<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::4326" dimensions="2">
    <ows:LowerCorner>-5732339.95019165 -5732339.95019165</ows:LowerCorner>
    <ows:UpperCorner>-5732339.95019165 -5732339.95019165</ows:UpperCorner>
</ows:BoundingBox>
<ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>6.86949633855596 -77.206989333735</ows:LowerCorner>
    <ows:UpperCorner>166.130503661444 77.206989333735</ows:UpperCorner>
</ows:WGS84BoundingBox>

I saw similar questions but in my case, I don't understand why there are errors with GDAL (gdalwarp) while with MapServer it's working...

Software used:

  • Mapserver 7.0.7
  • GDAL 1.11.2
  • Please check the +b parameter. Is it a typo? – mkennedy Mar 20 '18 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.