[FWTools] gdalwarp -geoloc

Frank Warmerdam warmerdam at pobox.com
Sat Mar 12 16:11:12 EST 2011


On 11-03-12 03:38 PM, combal at free.fr wrote:
> hi!
>
> I've got a dataset containing 3 images:
> lat for each pixel, lon for each pixel and value (in this case SST).
> I think that gdalwarp would let me use the 2 first bands to reproject by using
> the -geoloc arrays.
> For that, I extracted the bands to a new dataset (in geotiff), adding the
> meta-information, gdal_info shows:
>
> Driver: GTiff/GeoTIFF
> Files: mydataset.tif
> Size is 2048, 1080
> Coordinate System is `'
> Metadata:
>   SRS=EPSG:4326
>   X_BAND=2
>   Y_BAND=1
>   PIXEL_OFFSET=0
>   LINE_OFFSET=0
>   PIXEL_STEP=1
>   LINE_STEP=1
...
> which fails with:
> ERROR 1: Unable to compute a GEOLOC_ARRAY based transformation between
> pixel/line
> and georeferenced coordinates for mydataset.tif.
>

Bruno,

I believe the problem is that the geolocation metadata needs to be
in the "GEOLOCATION" metadata domain.  I'm not sure how you set the
metadata - perhaps with the -mo flag?  Unfortunately the -mo flag does
not provide a mechanism to set the metadata in a metadata subdomain.

The normal approach to doing this is to setup a VRT around the source
dataset with the metadata in a particular domain.  I have attached an
example VRT with geolocation metadata.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: example.vrt
Url: http://lists.maptools.org/pipermail/fwtools/attachments/20110312/d20f9023/attachment.txt 


More information about the FWTools mailing list