On 05/03/2012 11:27 AM, Peter Halls wrote:
Ari,

as a user (and teacher of users), I would urge you to keep to the model where the output is always a new object (actually the same as ArcGIS), rather than consider modifying an input for any of these spatial operations. That automatically solves the read-only input issue.

Peter,

At least Perl, probably some other languages too, detect between the two usages:

C = A.method(B)

and

A.method(B)

and adjust accordingly. Compare for example to

C = A + B

and

A += B

which is commonly supported in programming languages. In principle, I would support (as I wrote) implementing only the in-place version, and allow the new object syntax and implement it using the in-place for a new object. But, as I wrote, GDAL is often geared towards the former paradigm and datasets are often read-only. So, in this case we'll go the other way. I want to support the latter paradigm (in-place) in Perl bindings - it is often more useful in interactive work, where one may typically manipulate a dataset in several steps.

Best regards,

Ari

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to