Thursday, 8 October 2015

raster - GDAL grid produces NoData



I have a series of text files that represent X,Y,Z elevation data. I'm trying to use the GDAL grid command line tool to convert these text files to raster GeoTIFs. My files are space delimited and so I have created VRT files that point to the data so that GDAL can read them OK. The VRT files work. I can load the layers into QGIS and I can use ogrinfo to describe the data OK.


Many of my text data files convert to raster just fine. These are typically longer files with > 10,000 lines of data. However, my small files (< 5,000 lines) produce a raster with only NoData values.


I am using the linear algorithm. My points are evenly spaced at 1m and I've tried several radius values. The command that I'm using is:


C:/OSGeo4W64/bin/gdal_grid.exe -ot Float32 -of GTiff -txe 239982.0 240207.0 -tye 647659.0 648667.0 -outsize 225 1008 -a linear:radius=1 D:\Temp\19900928.vrt D:\Temp\19900928.tif


I've also tried the nearest neighbour algorithm and get some weird, partial values in the output GeoTiFF for these small files.


A sample source text file is available here:


https://gist.github.com/philipbaileynar/c9eb76880b8ce6fa8c786ca53d892b26


The corresponding VRT file is:






CSV:D:\Temp\elevation_points.txt
elevation_points
wkbPoint
EPSG:2762




Can anyone help and figure out how to make GDAL grid produce a raster from these data please?





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...