[gdal-dev] GDALGrid

Ari Jolma ari.jolma at gmail.com
Wed Oct 28 02:51:52 PDT 2015


On 28.10.2015 11:40, Even Rouault wrote:
>
> 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.

The same thing is in Rasterize, which is clearly also only for vector 
datasources.

I know the unification below but it is not in the bindings. To me it 
looks very simple and working solution to just add

typedef void OGRDataSourceShadow;

into gdal.i - similarly as there is already

typedef void OGRLayerShadow;

etc.

and then use OGRDataSourceShadow in those methods, which clearly expect 
vector datasources.

Making the unification in bindings seems much bigger task and I'd 
postpone it.

How is it in Python bindings? I don't understand how they can be used to 
run Grid without this change.

BTW, I'm making these utilities as methods in the Perl bindings since 
Rasterize is clearly a method for OGR DataSource class and not a 
non-object-oriented subroutine.

Best,

Ari



More information about the gdal-dev mailing list