1

I'm trying to create a generic XML response from DescribeCoverage response. For my tests, i used Mapserver 7.0.7
With gdalinfo, i got this :

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

With Mapserver DescribeCoverage response, i got this :

... 
    <gml:origin>  
        <gml:Point gml:id="geostationary_ir-120" srsName="http://www.opengis.net/def/crs/EPSG/0/4326">   
            <gml:pos>5729834.556857 -5729834.556857</gml:pos>   
        </gml:Point>
    </gml:origin>
...

Why there is a difference between these data (Origin Point) ?

Moreover, in XML response, the size of the TIFF is 2287 2287 while in gdalinfo is 2288 2288.

  • see the last answer here. – JGH Mar 9 '18 at 14:58
1

When it comes to the origin, there are two things in the play:

  1. If srsName="http://www.opengis.net/def/crs/EPSG/0/4326" then the coordinates in WCS DescribeCoverage are expressed in order Latitude-Longitude.
  2. In WCS the origin means the centre of the pixel while GDAL reports the origin as the top-left corner of the top left pixel which leads to half-a-pixel shifts in the coordinate values.

Lets examine the longitude coordinate

 (GDAL Lon_coordinate) + (Lon_pixel_size/2) = WCS Lon_coordinate

-573233995 + (5010.78667/2) = -5729834.557

For latitude the equation is

(GDAL Lat_coordinate) - (Lat_pixel_size/2) = WCS Lat_coordinate

So far everything looks fine. However, you have obviously configured the service somehow whong because WCS is adverticing the coverage to be in EPSG:4326 which is obviously not true (EPSG:4326 is from -90 to +90 degrees N and from -180 to +180 degrees E while in your data the numbers are much higher). Unfortunately I do not know how your Geostationary_Satellite CRS should be configured correctly for MapServer.

I can't guess the reason for the output size of 2287 2287 vs. 2288 2288 in the source data. For my mind that should not happen. I would prepare a test case with source data and complete mapfile and send to question to the mapserver-users mailing list.

  • Thank you for your answer. That's working ! In 1.1.1. DescribeCoverage XML response, there are a <ows:WGS84BoundingBox> with LowerCorner(6.86949633855596 -77.206989333735) and UpperCorner(166.130503661444 77.206989333735) with axis X/Y and not Y/X. I don't know how Mapserver do a reprojection from a unknown SRS (for me) to WGS84. I test my file in WMS GetMap request and my imagery is well located. Keep me informed about the size in XML response. For the moment, I keep 2288 2288 as width and height in my XML response. – Quentin S33 Mar 14 '18 at 9:01

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.