[gdal-dev] gridding binary data

David Hoese dhoese at gmail.com
Sun Jan 20 12:51:58 PST 2013


I have 3 flat binary files that I would like to use to grid data. The 3 
binary files are the "scattered" image data pixels and the other two 
specify the fractional column and row for each input pixel in the output 
grid.  So the image pixel in the first file at offset 0 is mapped to the 
grid column at offset 0 (from the columns file) and the grid row at 
offset 0 (from the rows file).

One way I think I can get the data gridded is to use the "gdal_grid" 
utility, but I'm not really sure how to get the flat binary files to be 
accepted by "gdal_grid".  I thought I could use VRT files, but I'm not 
exactly sure how I would do that.  I wasn't sure since the documentation 
here http://www.gdal.org/ogr/drv_vrt.html says that I need to specify a 
"SrcLayer", but binary files don't have layers. So then would I need an 
intermediate VRT file to define layers for the binaries?  If I need an 
intermediate VRT maybe I should just push the data into a geotiff (with 
no projection info) and try using that?  Could someone clear this up for me?

My other question is has there been any work done to make a python 
wrapper for GDALGridCreate().  I found email threads and a ticket 
(http://trac.osgeo.org/gdal/ticket/2023) talking about creating one, but 
then conversation just stops and those are from 5 years ago.  I didn't 
notice anything that screamed "this is impossible" when skimming through 
those threads and the ticket.  I'm also sure a lot has changed for GDAL 
and numpy in the last 5 years.  If it's a time thing I'm willing to add 
it if someone can point me in the right direction to start (how-to on 
adding to GDAL).

Thanks.

-Dave


More information about the gdal-dev mailing list