[gdal-dev] gdal_grid - VRT - flipped image
Even Rouault
even.rouault at mines-paris.org
Sun Jun 16 13:25:14 PDT 2013
Le dimanche 16 juin 2013 22:19:21, Pierric a écrit :
> 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 ?
Well, this is the behaviour of the utility that puts a correct, but unusual
georeferencing. You can flip the image back to normal convention by using
"gdalwarp src.tif out.tif" where src.tif if the output of gdal_grid.
>
> 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)
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list