[gdal-dev] grid from point dataset without interpolation
Frank Warmerdam
warmerdam at pobox.com
Wed Jan 27 21:27:12 EST 2010
Matthew,
I am not aware of a utility that reads ascii point data
and directly creates a grid file without any attempt
to interpolate. You could take a couple approaches.
One is to write a script in a language like Python
that will do the task and write the result out to a
GDAL supported grid format. This is not particularly
complicated, but it would be hard if you are not
a programmer.
The other is to restructure the data somewhat into
an accepted format, like arc/info ascii grid. This
format is fairly simple but it assumes a regular
grid of data and you would need to restructure your
data appropriately. An example small grid is:
ncols 5
nrows 7
xllcorner 440720.000000000000
yllcorner 3751020.000000000000
cellsize 60.000000000000
NODATA_value 132
107 123 132 115 132
115 132 132 123 123
115 132 140 132 123
148 132 123 123 123
156 156 156 140 132
156 100 156 101 102
156 156 156 103 103
Best regards,
On Thu, Jan 28, 2010 at 12:57 AM, Matthew Snape <SnapeM at rpsgroup.com> wrote:
> Hi,
>
> I have a set of points in a shapefile that represent gridded height
> data. I would like to convert them to a raster without using any
> interpolation, merely using each point as the centre of a cell. I have
> tried using gdal_grid with the nearest algorithm but this appears very
> slow. Is there a better way?
>
> my current command is:
>
> gdal_grid -a nearest -txe 420000 640000 -tye 240000 460000 -outsize 4400
> 4400 -of "GTiff" -ot Int16 -co "COMPRESS=LZW" -zfield HEIGHT -l all
> all.shp all.tif
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list