[gdal-dev] GDALGrid

Even Rouault even.rouault at spatialys.com
Wed Oct 28 02:40:29 PDT 2015


Le mercredi 28 octobre 2015 10:07:09, Ari Jolma a écrit :
> The documentation of GDALGrid in gdal_utils.h claims it to
> 
> " Converts raster data between different formats."

Copy&paste from GDALTranslate(). Fixed

> 
> Although it is the same as gdal_grid, which creates regular grid from
> the scattered data, i.e., vector data source.
> 
> It seems to work, also from the bindings, if one uses a vector data
> source as the source dataset. That requires using OGRDataSourceShadow in
> the definition of the method in gdal.i & definition of
> OGRDataSourceShadow with typedef.

Following the unification, I decided to use only GDALDatasetH even when a 
vector datasource is expected/output. So you may have to use GDALOpenEx() to 
open the vector dataset so as to get a GDALDatasetH instead of the legacy 
OGRDataSourceH.

Or perhaps we could have some tricks at the SWIG level so as to have the 
possibility to use a OGRDataSourceShadow as well, but I wasn't brave enough to 
try that so I happily let it to you if you want.

> 
> I can fix the bindings but I rather not touch gdal_grid_lib.cpp - it
> also has the ugly ^M since it is in DOS text format. I think its
> svn:mime-type needs to be set or something.

Just converted it to Unix eol.

> 
> Best,
> 
> Ari

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list