[gdal-dev] lat lon matrix tables to geotif

Nikolaos Hatzopoulos nhatzop at gmail.com
Wed Feb 16 01:48:24 EST 2011


So you are talking for something like this:

Example VRT file for data (just to show the geolocation metadata reference):

<VRTDataset rasterXSize="2048" rasterYSize="964">
  <Metadata domain="GEOLOCATION">
    <MDI key="X_DATASET">data.lon.vrt</MDI>
    <MDI key="X_BAND">1</MDI>
    <MDI key="Y_DATASET">data.lat.vrt</MDI>
    <MDI key="Y_BAND">1</MDI>
    <MDI key="PIXEL_OFFSET">0</MDI>
    <MDI key="LINE_OFFSET">0</MDI>
    <MDI key="PIXEL_STEP">1</MDI>
    <MDI key="LINE_STEP">1</MDI>
  </Metadata>
  <SRS> stuff goes here</SRS>

  <VRTRasterBand dataType="UInt16" band="1" subClass="VRTRawRasterBand">
    <ImageOffset>1500</ImageOffset>
    <PixelOffset>10</PixelOffset>
    <LineOffset>22180</LineOffset>
    <ByteOrder>LSB</ByteOrder>
  </VRTRasterBand>
</VRTDataset>



On Tue, Feb 15, 2011 at 10:34 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> On 11-02-15 01:20 PM, Nikolaos Hatzopoulos wrote:
>
>> So we have three tables:
>> one matrix for latitude values
>> one matrix for longitude values
>> one matrix for our data values
>>
>> all the matrix have the same dimensions
>>
>> how we can convert these three tables to geotif using gdal??
>>
>
> Mikos,
>
> This is a georeferencing method I refer to as "geolocation grids".  It is
> not a supported organization in GeoTIFF so there is no way to produce
> a GeoTIFF with the above data where the meaning of the latitude and
> longitude
> values will be well understood.
>
> If you want to use the resulting geotiffs in non-GDAL applications I
> think you are best just turning each matrix into a separate TIFF file
> with appropriate file names to suggest the meaning to and end user.
>
> Another option is to just rectify the image data into a normal north
> up rectified grid and write that to GeoTIFF.  Such an output would be
> easily exploited in any GeoTIFF reading application.
>
> It also is possible to use metadata to associate the latitude and longitude
> as geolocation grids within a GeoTIFF file in a way that some GDAL
> applications (like gdalwarp) could take advtange of.  This requires setting
> up very specific metadata items to relate the data.  The metadata required
> (for geotiff or other formats) is listed in RFC 4:
>
>  http://trac.osgeo.org/gdal/wiki/rfc4_geolocate
>
> 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
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110215/6b0b3212/attachment-0001.html


More information about the gdal-dev mailing list