[gdal-dev] gdal_grid - VRT - flipped image

Pierric pierric7 at yahoo.com
Sun Jun 16 13:19:21 PDT 2013


Hello,

By using the following commands, it creates a raster which is opened and shown correctly in GIS software but it is displaid upside down in an image viewer or internet browser. ( gdalinfo gives  Upper Right (  11.0000000,  10.0000000) and Lower Right (  11.0000000,  70.0000000)  which shows image is upside down somehow )

Could you please help me to understand why ?   

I use GDAL_grid to convert a list of coordinates into a raster (interpolated). 

- VRT file I use is :

<OGRVRTDataSource>
    <OGRVRTLayer name="lonlat">
        <SrcDataSource>lonlat.csv</SrcDataSource> 
    <GeometryType>wkbPoint</GeometryType>
    <GeometryField encoding="PointFromColumns" x="longitude" y="latitude" z="ssha"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>



- Command is :


> gdal_grid -a invdist:power=3.0:smoothing=0.0: -zfield "ssha" -outsize 20 10 -ot Int16  -a_srs EPSG:4326 -of GTiff -l lonlat lonlat.vrt A.tiff --config GDAL_NUM_THREADS ALL_CPUS


>  gdalinfo A.tif


Size is 20, 10
Coordinate System is:
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"]]
Origin = (-80.000000000000000,10.000000000000000)
Pixel Size = (4.550000000000000,6.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -80.0000000,  10.0000000)
Lower Left  ( -80.0000000,  70.0000000)
Upper Right (  11.0000000,  10.0000000)
Lower Right (  11.0000000,  70.0000000)
Center      ( -34.5000000,  40.0000000)


More information about the gdal-dev mailing list