[gdal-dev] Import raw binary with pixel-geolocation
Frank Warmerdam
warmerdam at pobox.com
Tue Jul 1 08:32:17 EDT 2008
Andrew Brooks wrote:
> Hello
>
> Is it possible to import/warp raw binary data which has no projection just
> associated arrays of latitude/longitude for each pixel?
>
> How about if the latitude/longitude arrays were sub-sampled? For example
> MODIS 250m resolution has coordinates at 1000m resolution.
Andrew,
You can make the raw binary available for use in GDAL by writing an XML VRT
file that describes the raw binary file(s). This is described in the
virtual format tutorial - note particularly the later section ".vrt
Descriptions for Raw Files".
http://www.gdal.org/gdal_vrttut.html
You can utilize the geolocation (lat/long) arrays even if they are subsampled
as long as you know the details. For more information on this, read up on
geolocation array support in:
http://trac.osgeo.org/gdal/wiki/rfc4_geolocate
The geolocation metadata will need to be included in the VRT file defined
above. Note that you may need two .vrt files, one for the main image, and
one for the geolocation arrays (even if they both happen to live in the
same raw binary file).
What you want to do is fairly complicated to achieve with GDAL, but doable.
If you get the raw image access working, but have trouble with the geolocation
stuff feel free to contact me privately for some additional hints and answers.
> Would it be easier if I converted the data into HDF format first? If so,
> what SD names does the HDF importer use when looking for latitude and
> longitude geolocation arrays?
If you have an easy way of writing the HDF file yourself, you could
take this approach. However, it is unclear exactly what you would need
to produce for things to work with GDAL. GDAL does support two classes of
HDF products with geolocation arrays. Some particular MODIS product format
and HDF-EOS swaths with geolocation in the normal HDF-EOS fashion.
But my suggestion is to go with the VRT files.
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 | President OSGeo, http://osgeo.org
More information about the gdal-dev
mailing list