[gdal-dev] gdal_grid help

Even Rouault even.rouault at mines-paris.org
Sun Sep 23 00:54:43 PDT 2012


Le dimanche 23 septembre 2012 06:20:27, Jeff Lake a écrit :
> ugh..
> I have been attempting to create an interpolated (IDW) raster from CSV,
> to no avail all I get is either a totally black tiff or white tiff
> here is the command line I have been trying
> 
> gdal_grid -a invdist:power=2.0:smoothing=1.0 -outsize 800 600 -ot
> Float64 -l temps temps.vrt temps.tiff
> 
> and the CSV http://metar.michiganwxsystem.net/temps.csv
> 
> here is the vrt
> 
> <OGRVRTDataSource>
>      <OGRVRTLayer name="temps">
> <SrcDataSource>/var/www/html/metar/temps.csv</SrcDataSource>
>          <GeometryType>wkbPoint</GeometryType>
> <GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude"/>
>   <LayerSRS>WGS84</LayerSRS>
>      </OGRVRTLayer>
> </OGRVRTDataSource>
> 
> 
> anybody gather where I'm going wrong ??

Jeff,

The issue here is that gdal_grid doesn't find the value to interpolate from.

2 possibilities :

- change the <GeometryField> element as the following so that the value of the 
temps field is set as the Z value of the geometry :
<GeometryField encoding="PointFromColumns" x="Longitude" y="Latitude" 
z="temps"/>

- or specify "-zfield temps" on the gdal_grid command line

Best regards,

Even



More information about the gdal-dev mailing list