[Zoo-discuss] GDAL/OGR C/C++ utilities available as library functions

Even Rouault even.rouault at spatialys.com
Thu Oct 15 02:52:37 PDT 2015


Le jeudi 15 octobre 2015 11:21:45, Fenoy Gerald a écrit :
> Hello Even,
> thanks a lot for this information which is indeed of big interest for the
> ZOO-Project community.
> 
> It is a big asset for us as it makes us able to follow the new releases of
> GDAL by taking advantages of this API. In the past, despite we can take
> advantages of new features, we sometime have to edit the source code to
> just make it continuing working.
> 
> I should say that what I liked a lot when integrating the OTB and SAGA-GIS
> as a support was that there were providing some kind fo catalog of the
> available applications providing also the expected inputs and outputs for
> each of them. 

That's a good point. Auto-discovery of available switches for each utility and 
their short documentation could be a further step indeed...

> Note that they are more targeting producing applications
> than GDAL is probably but this was also of great help to automate the
> generation of ZCFG files (metadata files lined to service defining the
> inputs and outputs). Nevertheless, if we only need to write the ZCFG by
> hand and no code anymore for GDAL web services it is already appreciated a
> lot.
> 
> It will be a great jump to move to this new GDAL version. Nevertheless, I
> suppose that we should wait for OTB and SAGA-GIS to also support this new
> GDAL version in other case we may break those two supports. But I also
> feel that we may think of providing new services versions for GDAL 2.1
> support in another directory to keep the compatibility with OTB and
> SAGA-GIS for some times. Note that I remember during the OTB HackFest in
> Toulouse that they were speaking about the GDAL 2 support as a next step
> so it should probably arrive soon. 

Yes, got an email from Julien Michel about that. He's almost finished : 
https://lists.osgeo.org/pipermail/gdal-dev/2015-October/042863.html

> Nevertheless, it is important to keep
> this two new supports as they offer a lot of services available.

Yes, the transition plan is not obvious. You'd need first to wait for 2.1 to be 
released (probably April or May next year), then packaged and spread, which 
will add extra months.

<brainstorming>
Hum, well there could be a potential transition plan to anticipate that. You 
could borrow the *_lib.cpp files (as well as gdal_utils.h and 
gdal_utils_priv.h) from https://svn.osgeo.org/gdal/trunk/gdal/apps/ in Zoo-
project and compile them only if GDAL < 2.1 (for GDAL >= 2.1 they wouldn't be 
needed anymore). The Zoo services could use the API of gdal_utils.h.
However I'm not sure how well that plan would work in practice since I'm 
pretty sure that the *_lib.cpp files must refer at some points at 
API/capabilities only available in GDAL 2.1dev. So editing of the borrowed 
*_lib.cpp files would certainly be needed to make them compile against GDAL 2.0 
(I'm not even mentionning GDAL 1.X where that wouldn't work for the utilities 
refering to vector dataset, such as ogr2ogr or gdal_rasterize)
</brainstorming>

> 
> Thanks a lot again for this informations and be sure that we will use it in
> a near future and provide services based on this new version.
> 
> Best regards,
> 
> > Le 12 oct. 2015 à 14:39, Even Rouault <even.rouault at spatialys.com> a
> > écrit :
> > 
> > Hi,
> > 
> > Just to "advertize" a new capability in GDAL trunk (2.1dev) which could
> > be of interest for the Zoo project. Most GDAL/OGR C/C++ utilities
> > (gdalinfo, gdal_translate, gdalwarp, ogr2ogr, gdaldem, nearblack,
> > gdal_rasterize and gdal_grid) are now available as C callable functions.
> > This could potentially simplify the code of most services under
> > http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-services/gdal
> > 
> > For details, see
> > http://erouault.blogspot.fr/2015/10/gdal-and-ogr-utilities-as-library.htm
> > l for the "public relation" version ;-) and
> > https://trac.osgeo.org/gdal/wiki/rfc59.1_utilities_as_a_library for the
> > developer version.
> > 
> > Cheers,
> > 
> > Even
> 
> Gérald Fenoy
> http://wiki.osgeo.org/wiki/User:Djay

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


More information about the Zoo-discuss mailing list