[gdal-dev] gdal_grid - cannot get interpolation to work

Chaitanya kumar CH chaitanya.ch at gmail.com
Fri Jan 28 00:23:44 EST 2011


Werner,

You swapped the X and Y extents in the command.

On Thu, Jan 27, 2011 at 11:14 PM, Werner Reiche <w.reiche at hotmail.com>wrote:

>
> I'm trying to use gdal_grid to generate a .tiff file from a .csv file.
>
> The problem I am encountering is that output file always contains 'no-data'
> values.
>
> The command I am using is:
>
> gdal_grid -txe -51.428009 -43.153992 -tye 46.112598 51.347198 -outsize 1024
> 796 \
>           -a nearest:radius1=10.0:radius2=10.0:angle=0.0:nodata=0.0 \
>           -l rs2_file_1 -l rs2_file_2 -l rs2_file_3 \
>           -of GTiff -ot Byte rs2_file.vrt test.tiff
>
> I have also tried the following interpolation parameters:
>
> # Results in all black
> # -a nearest:radius1=1.0:radius2=1.0:angle=0.0:nodata=0.0 \
> # -a average:radius1=1.0:radius2=1.0:angle=0.0:min_points=1:nodata=0.0 \
> # -a
> invdist:radius1=1.0:radius2=1.0:angle=0.0:max_points=1:min_points=1:nodata=0.0
> \
>
> # Results in all one shade of grey (average of entire image)
> # -a
> invdist:radius1=0.0:radius2=0.0:angle=0.0:max_points=10:min_points=1:nodata=0.0
> \
>
> The .vrt and csv file used are shown below.
>
> rs2_file.vrt
> ::::::::::::::
> <OGRVRTDataSource>
> <OGRVRTLayer name="rs2_file_1">
> <SrcDataSource>rs2_file_1.csv</SrcDataSource>
> <GeometryType>wkbPoint25D</GeometryType>
> <GeometryField encoding="PointFromColumns" x="lon" y="lat" z="red"/>
> </OGRVRTLayer>
> <OGRVRTLayer name="rs2_file_2">
> <SrcDataSource>rs2_file_2.csv</SrcDataSource>
> <GeometryType>wkbPoint25D</GeometryType>
> <GeometryField encoding="PointFromColumns" x="lon" y="lat" z="green"/>
> </OGRVRTLayer>
> <OGRVRTLayer name="rs2_file_3">
> <SrcDataSource>rs2_file_3.csv</SrcDataSource>
> <GeometryType>wkbPoint25D</GeometryType>
> <GeometryField encoding="PointFromColumns" x="lon" y="lat" z="blue"/>
> </OGRVRTLayer>
> </OGRVRTDataSource>
> rs2_file.vrt (partial)
> ::::::::::::::
> lat,lon,red,green,blue
> -51.428009,50.522499,0,0,143
> -50.049011,50.720699,0,0,143
> -48.660004,50.902401,0,159,255
> -47.260010,51.067501,0,239,255
> -45.851013,51.215900,255,255,15
> -44.433014,51.347198,255,191,0
> -50.433014,50.657600,255,255,0
> -49.046997,50.844200,255,223,0
> -47.649994,51.014301,255,159,0
> -46.243988,51.167599,255,191,0
> -44.829010,51.303799,255,255,15
> -50.816010,50.593800,255,255,0
> -49.433014,50.784698,255,175,0
> -48.040009,50.959202,255,239,0
> -46.635986,51.117100,255,191,0
> -45.222992,51.257999,255,223,0
> -51.197998,50.528301,255,175,0
> -49.819000,50.724098,255,191,0
> -48.428009,50.903500,255,223,0
> -47.028015,51.066299,255,207,0
> -45.618011,51.211800,255,255,0
> -44.199005,51.340199,255,255,0
> -50.203003,50.661999,223,255,47
> -48.816010,50.845798,255,223,0
> -47.417999,51.013000,255,191,0
> -46.010986,51.163502,255,207,0
> -44.595001,51.297001,255,255,15
> -50.585999,50.598900,255,191,0
> -49.201996,50.787601,255,255,0
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110128/df5935c2/attachment.html


More information about the gdal-dev mailing list