[gdal-dev] using GDALGridCreate in python?
Matt Funk
matze999 at gmail.com
Thu Sep 1 12:10:07 EDT 2011
Hi,
i got a question on using the gdal_grid utility:
My input file looks like:
lat,lon,data
24.007521,-114.111420,-0.078077
24.003864,-114.064293,-0.017523
24.000221,-114.017540,-0.069692
23.996593,-113.971153,-0.014572
23.992981,-113.925117,-0.032931
23.989380,-113.879440,-0.068089
23.985794,-113.834114,-0.027493
23.982224,-113.789124,-0.046154
23.978666,-113.744476,-0.073945
23.975121,-113.700165,-0.072757
23.971590,-113.656174,-0.048775
...
3.034852,-96.767853,0.459120
3.028167,-96.727135,0.649308
3.021430,-96.686111,0.994770
3.014640,-96.644768,1.085215
3.007797,-96.603119,1.350796
3.000899,-96.561142,1.879670
2.993942,-96.518822,1.470742
I use gdal_grid:
"C:\software\gdal\gdalwin32-1.6\bin\gdal_grid.exe" -a
invdist:power=2.0:smoothing=1.0 -txe 2 24 -tye -117 -92 -outsize 50 50
-of GTiff -ot Float64 -l dust_t1735 dust_t1735.vrt dust_t1735.tiff
The tiff file is generated, but when i try to open it, but i cannot open
it and the file is somehow corrupted. For the experts on this utility,
am i doing something obviously wrong?
thanks
matt
On 8/30/2011 3:04 PM, Even Rouault wrote:
> Le mardi 30 août 2011 22:57:34, Matt Funk a écrit :
>> On 8/30/2011 1:39 PM, Even Rouault wrote:
>>> Le mardi 30 août 2011 21:28:11, Matt Funk a écrit :
>>>> Hi,
>>>> i have several satellite scenes which basically give me 3 vectors:
>>>> lat/lon/data which is on an irregular. I would like to interpolate those
>>>> onto a regular grid. I found that GDALGridCreate would meet my need
>>>> except that i am developing in python, but it appears the bindings for
>>>> it don't exist (unless i am mistaken).
>>>> So my question is whether someone knows of an alternative route to
>>>> accomplish this or whether i am possible wrong in that i cannot use
>>>> GDALGridCreate in python?
>>> Yes, you cannot use GDALGridCreate() in python. It has only been mapped
>>> to Java bindings for now. You can as a workaround for a process with the
>>> gdal_grid utility.
>> I have never used the gdal_grid utility. Outside of its manpage
>> (http://www.gdal.org/gdal_grid.html) i haven't found any usage examples.
> That's already a beginning ;-)
>
>> As far as inputs are concerned it talks about csv file. Are there other
>> input formats.
> All OGR supported formats : http://gdal.org/ogr/ogr_formats.html
>
>> Also, this might be a dumb question, but would it be of any value to
>> call the compiled c-gdal library directly from my python code?
> Possibly, but someone has to code the missing python swig typemaps however.
>
>> matt
>>
>>>> thanks
>>>> matt
>>>>
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Matt Funk
Research Associate
Plant and Environmental Scienc. Dept.
New Mexico State University
More information about the gdal-dev
mailing list