Changes between Version 5 and Version 6 of rfc13_createfeatures


Ignore:
Timestamp:
May 16, 2007, 12:16:15 AM (17 years ago)
Author:
Kosta
Comment:

DeleteFeatures() added

Legend:

Unmodified
Added
Removed
Modified
  • rfc13_createfeatures

    v5 v6  
    1 '''RFC 13: Improved Feature Insertion Performance'''
     1'''RFC 13: Improved Feature Insertion/Update/Delete Performance in Batch Mode'''
    22
    33    Author: Konstantin Baumann[[BR]]
     
    77'''Summary'''
    88
    9 Some OGR drivers can dramatically increase the speed of and optimize the insertion of a set of features, if the driver knows, that there is a whole set of features that should/could be inserted or updated at once (instead of just one by one).
     9Some OGR drivers can dramatically increase the speed of and optimize the insertion, update, and deletion of a set of features, if the driver knows, that there is a whole set of features that should/could be inserted, updated, or deleted at once (instead of just one by one).
    1010
    1111'''!CreateFeatures()'''
     
    5959Individual drivers can override the default implementation and can implement an optimized algorithm for updating a set of features.
    6060
     61'''!DeleteFeatures()'''
     62
     63The following new virtual method is added to the OGRLayer class, with an analogous C function:
     64{{{
     65virtual OGRErr DeleteFeatures( OGRFeature** papoFeatures, int iFeatureCount );
     66}}}
     67
     68A default implementation is given as below:
     69{{{
     70OGRErr OGRLayer::DeleteFeatures(
     71    OGRFeature **papoFeatures,
     72    int iFeatureCount
     73) {
     74    for(int i = 0; i < iFeatureCount; ++i) {
     75        OGRErr error = DeleteFeature( papoFeatures[i] );
     76        if( error != OGRERR_NONE ) return error;
     77    }
     78    return OGRERR_NONE;
     79}
     80}}}
     81
     82This triggers the old behavior of an unoptimized deletion.
     83
     84Individual drivers can override the default implementation and can implement an optimized algorithm for deleting a set of features.
     85
    6186'''Additional Notes'''
    6287
     
    7499
    7510014-May-2007: initial version created[[BR]]
    76 15-May-2007: !SetFeatures() added
     10115-May-2007: !SetFeatures() added[[BR]]
     10216-May-2007: !DeleteFeatures() added[[BR]]