Changes between Version 13 and Version 14 of GdalOgrInPerl


Ignore:
Timestamp:
Apr 7, 2021, 1:27:54 AM (20 months ago)
Author:
Even Rouault
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GdalOgrInPerl

    v13 v14  
    1 The GDAL Perl bindings are distributed within the main GDAL source distribution but they are also available on [http://www.cpan.org CPAN] as [http://www.cpan.org/modules/by-module/Geo/AJOLMA/ Geo::GDAL].  They are maintained by [http://arijolma.org Ari Jolma].
    2 
    3 The README: https://svn.osgeo.org/gdal/trunk/gdal/swig/perl/README
    4 
    5 The documentation: http://arijolma.org/Geo-GDAL/snapshot
    6 
    7 Geo::GDAL is a building block of the (now more or less retired) [https://github.com/ajolma/geoinformatica Geoinformatica] stack. You can add processing tools written in Perl into QGIS using the Perl Processing Provider Plugin https://plugins.qgis.org/plugins/perlprocessing/ (also https://github.com/ajolma/QGISPerlProcessingProviderPlugin and https://github.com/ajolma/GDALToolsWithPerl).
    8 
    9 You may enable building a foreign function interface ("bindings") to GDAL for a specific supported language by using the option --with-perl (replace "perl" with your favorite language) with configure. The effect of this is that during the build process {{{cd swig; make build}}} is issued and all specified interfaces are built by {{{make build}}} in respective library (swig/perl in the case of Perl).
    10 
    11 However, for Perl it is suggested that you do not use the --with-perl option but instead first build (or at least run {{{./configure}}} at GDAL root to get GDALmake.opt) GDAL itself, then {{{cd to swig/perl}}}, issue {{{make generate}}}, and proceed as normal with Perl modules, i.e., {{{perl Makefile.pl; make; make test; make install}}}. Generation of the bindings require swig, but chances are that there is a recent enough swig available for your system easily (hint: {{{sudo apt-get install swig}}}).
    12 
    13 The Perl bindings for GDAL are generated from [wiki:SWIG GDAL SWIG interface] files with SWIG. The bindings are a set of .c and .cpp files and other files whose type depends on the language. In the case of Perl, these SWIG generated files are not stored in the repository. The bindings are generated by {{{make generate}}}. In the case of Perl, {{{make build}}} falls back to do {{{make generate}}} first if a wrapper file does not exist.
    14 
    15 To rebuild wrappers make sure to remove the old ones by {{{make veryclean}}} first.
    16 
    17 The Perl module version numbering differs from that of GDAL because Perl module version numbers are real numbers and GDAL uses semantic numbering (major.minor.patch). GDAL develops in branches, and there is a branch for each minor version. Perl module version numbering is the following.
    18 
    19 ||GDAL branch||Geo::GDAL module version||
    20 ||1.10||1.991x||
    21 ||1.11||1.992x||
    22 ||2.0||2.00x||
    23 ||2.1||2.01x||
    24 
    25 Where 'x' is an arbitrary string denoting the patch level.
    26 
    27 The CPAN version for each branch may not be the latest since it may have a lower patch level than what is the current. To create a module with latest patches for a branch it is required to obtain a copy of that branch, either downloading a tarball or grabbing a repository snapshot {{{svn co https://svn.osgeo.org/gdal/branches/2.0}}}, configure GDAL, and proceed as explained above. However, there may be a very recent version of the module available at http://arijolma.org/Geo-GDAL/modules
    28 
    29 For information how to build the Perl bindings in Windows (Strawberry Perl), go to Shawn Laffan's notes at https://github.com/shawnlaffan/bd_travis_experiment/tree/master/strawberry_notes
     1See https://gdal.org/api/index.html#gdal-ogr-in-other-languages