[Gdal-dev] swig/perl

Kevin Ruland kruland at ku.edu
Wed Aug 31 21:45:21 EDT 2005


Congratulations Ari!

Perl should be able to do the tostring argin pretty easily since it
takes any object and "string-ifies" it.

IF_FALSE_RETURN_NONE should also be pretty easy since Perl has a very
nice sense of none.

Send me the code and we'll put it in CVS.

Kevin

Ari Jolma wrote:

> Ken Boss wrote:
>
>> Hello Ari--
>>
>> I think Howard Butler and Kevin Ruland have already laid much of the
>> groundwork that you'll require with their "next generation" (ng) GDAL
>> bindings project.  See Howard's recent post at
>> http://lists.maptools.org/pipermail/gdal-dev/2005-August/006120.html.
>>
>> Further, Schuyler Erle did some preliminary work on perl bindings for
>> GDAL a while back (http://search.cpan.org/~sderle/Geo-GDAL/).  I
>> think in particular you might find his typemap work
>> (http://search.cpan.org/src/SDERLE/Geo-GDAL-0.11/typemap) to be of use.
>>  
>>
>
> Thanks. Well, after a few hours of learning swig, perlguts, etc, I
> could finally get my first "hello world, this is your spatial
> data:..." running. My typemaps_perl.i (which is basically where the
> porting happens) is based on the python one but the internals had to
> be changed of course. "make generate" gives two warnings because it
> can't apply IF_FALSE_RETURN_NONE and "tostring argin" because I just
> removed those typemaps for now. I have a small Makefile.PL (perl
> standard) which makes a Makefile ok but "make -f Makefile" fails
> saying there are two _wrap_GetDriverCount's, the other is of course
> from OGR. If I fix that by hand (edit ogr_wrap.cpp by hand) it
> compiles. I don't know how to control the naming of the _wrap
> function, %rename does not seem to do that. I then have a small
> test.pl which does gdal::AllRegister, opens a GTiff and prints out
> some info from it, works ok but method names are a bit odd: e.g.
> "$dataset->swig_RasterXSize_get" works but not "$dataset->RasterXSize".
>
> Ari
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list