[gdal-dev] Motion to adopt RFC 22:

Frank Warmerdam warmerdam at pobox.com
Tue Apr 1 17:41:05 EDT 2008


Ari Jolma wrote:
> Frank Warmerdam kirjoitti:
>> Folks,
>>
>> Motion: To adopt RFC 22: RPC Georeferencing.
>>
>>   http://trac.osgeo.org/gdal/wiki/rfc22_rpc
> 
> In SWIG Bindings issues:
> 
>> ends up returning a (bSuccess, (x, y, z)) result which is somewhat 
>> ackward. Is there a better way of doing this?
> 
> Raise an exception through CPLError?

Ari,

I normally think of CPLError as being for "serious" errors, rather
than expected failures.  Transformers are expected to fail when
the input is outside the bounds of validity and I'd hesitate to
have them calling CPLError() ever time that occurs.  Amoung other
things, it would in some circumstances cause a flood of error messages
to stderr.

I was wondering if at the swig level it might make sense to throw some
particular sort of exception without actually calling CPLError().  But
I wasn't able to wrap my mind around how exceptions are handled in all
the bindings.

I'd add in the Python case what I'd *really* like is to return None
if success is false.  But I'm not convinced this concept translates
well to some of the other bindings.

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 OSGeo, http://osgeo.org



More information about the gdal-dev mailing list