[gdal-dev] Call for discussion on RFC 59 (v2): GDAL/OGR utilities as a library

Even Rouault even.rouault at spatialys.com
Tue Sep 8 08:28:59 PDT 2015


> > For example, let's say the user calls gdal.Translate("format" => "GTiff",
> > "src_win" => [100,400,50,50] ) (this is probably not valid Perl syntax,
> > but hope you got it !), and you would call GDALTranslateOptionsNew(list)
> > where you would build list = { "-format", "GTiff", "-src_win", "100",
> > "400", "50", "50", NULL }
> 
> Geo::GDAL->Translate("format" => "GTiff", "src_win" => [100,400,50,50] )
> 
> would be valid. The argument system sounds reasonable. However, why not
> 
> $dst_dataset = $src_dataset->Translate("format" => "GTiff", "src_win" =>
> [100,400,50,50] )
> 
> i.e., apply the method on an object and get an object, as the command
> line utility conceptually does? Also, the command line uses "-of", which
> the method could also accept - the method could perhaps accept a longer
> version "--output_format" too. I'm just wondering,

Well, I'd say that can be a per-binding choice (and that depends on utilities.
For example gdalwarp can accept several input datasets). My fundamental question was if my
proposal https://lists.osgeo.org/pipermail/gdal-dev/2015-September/042512.html
was OK at the C API level so as to be able to build upon it.

Even

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


More information about the gdal-dev mailing list