[gdal-dev] Contour generation method in bindings
szekerest at gmail.com
Sat Dec 1 18:11:02 EST 2007
Ari, (and the other swiggers)
I appreciate to add every new functionality in the SWIG bindings.
However this change seems to be perl specific, and I don't know how is
it planned to migrate the functionality to the common ground.
My other problem is that the layout of the codebase will be fairly
chaotic in a little while. I personally don't favour blindly including
many of the code between the interface files and manually excluding
the name collisions. What if we will have to use GDALDriver an
OGRDriver simultaneously in a function in the future?
I would be in favour of refactoring the code using the following common rules:
1. Every target class would go into a separate interface file
2. Every interface file would be responsible to include the interface
files that it depends on.
3. To avoid the name collisions we should either use namespaces (not
sure how it is supported by the various target languages) or prefixes
in the classnames
4. We should declare the constants in separate interface files that
can be included by the others if needed.
I agree that this concept would require to change many of the files
and would possibly bring in some backward incompatibility and would
require some further investigations regarding to the feasibility and
at least an RFC would be required and some support from the swiggers
to tolerate and eliminate the breaking changes in the languages if
2007/12/1, Ari Jolma <ari.jolma at tkk.fi>:
> Howard Butler kirjoitti:
> > I am planning to add CreateGrid support as well.
> > I am slightly confused by http://trac.osgeo.org/gdal/changeset/13163
> > Why are we importing ogr.i into gdal.i?
> Since CreateContour needs an OGR layer as a attribute. Similaryly ogr.i
> imports osr.i. Importing ogr.i created a problem between GDAL and OGR
> Drivers and I solved it by defining GDAL_BINDINGS when ogr.i is imported
> from gdal.i.
> > Howard
> > On Nov 30, 2007, at 4:33 PM, Ari Jolma wrote:
> >> I added a function and, based on that, a method for Band for making
> >> contour lines into the Swig bindings. These are currently only in
> >> Perl (see the end of gdal_perl.i) since it needs a couple of new
> >> typemaps.
> >> Tamas, Hobu, other swig bindings people, comments?
> >> Ari
> >> --
> >> Prof. Ari Jolma
> >> Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
> >> Teknillinen Korkeakoulu / Helsinki University of Technology
> >> tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
> >> Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma
> >> _______________________________________________
> >> gdal-dev mailing list
> >> gdal-dev at lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> Prof. Ari Jolma
> Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
> Teknillinen Korkeakoulu / Helsinki University of Technology
> tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
> Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
More information about the gdal-dev