[Gdal-dev] Bugs in the bindings
Frank Warmerdam
warmerdam at pobox.com
Mon Jun 26 11:37:48 EDT 2006
Ari Jolma wrote:
> First, could we have the bindings as a component in Bugzilla?
Ari,
I've created new GDAL/OGR components for:
* PerlBindings - defaults to Ari
* PythonBindings - defaults to me.
* JavaBindings - defaults to me.
* RubyBindings - defaults to Charlie.
> Second, two bugs in ogr.i:
>
> - CreateGeometryFromWk?: it is not nice to silently return null in case of an
> error, I'm going to use croak(OGRErrMessages(err)) in Perl bindings
It would seem in general that an error should be produced on failure.
> - SetPoint: test wkb25DBit and call ..SetPoint _or_ ..SetPoint_2D
I'm not too sure what you mean. In the NG bindings I see:
%feature("kwargs") SetPoint;
void SetPoint(int point, double x, double y, double z=0) {
OGR_G_SetPoint(self, point, x, y, z);
}
In the old bindings we have:
def SetPoint( self, i, x, y, z = 0):
return _gdal.OGR_G_SetPoint( self._o, i, x, y, z )
def SetPoint_2D( self, i, x, y):
return _gdal.OGR_G_SetPoint_2D( self._o, i, x, y )
What would you be doing the wkb25DBit check on in the new bindings? I
suspect we ought to offer two methods, a SetPoint() method which is
implicitly 3D and SetPoint_2D() which is 2D.
It would be nicer if we could have distinct versions of SetPoint()
for two arguments and three, but I don't imagine that is safe for
us to do.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list