On 04/19/2012 03:04 PM, Even Rouault wrote:
http://trac.osgeo.org/gdal/wiki/rfc39_ogr_layer_algebra


3) I'm wondering if it would not be more appropriate to separate the creation of
fields of the output layer in a separate method that might be called, or not,
before the real operation. For example IdentifyPrepare() for Identity().

I don't understand your reasoning behind this. I get the point of separating the field map computations, but don't see why or how that would necessitate the *Prepare methods.


This way the XXXXXPrepare() would not need to check that CreateField()
succeeds because XXXX() could work with an output layer with no fields at all.
Checking that there are not fields with same name would not be necessary (in
that case the value from B would override the value from A).

It is possible to have fields with same names in OGR. Having a field with same name does not mean that they are semantically same. Probably more often not. I think the method could be easier to understand if there is no value override. Simpler the better. The only thing I'd check is that the result layer does not have any fields before the method.

Other comments are fine, thanks.

Ari

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

Reply via email to