Changes between Version 5 and Version 6 of rfc13_createfeatures
- Timestamp:
- May 16, 2007, 12:16:15 AM (17 years ago)
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''' 2 2 3 3 Author: Konstantin Baumann[[BR]] … … 7 7 '''Summary''' 8 8 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).9 Some 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). 10 10 11 11 '''!CreateFeatures()''' … … 59 59 Individual drivers can override the default implementation and can implement an optimized algorithm for updating a set of features. 60 60 61 '''!DeleteFeatures()''' 62 63 The following new virtual method is added to the OGRLayer class, with an analogous C function: 64 {{{ 65 virtual OGRErr DeleteFeatures( OGRFeature** papoFeatures, int iFeatureCount ); 66 }}} 67 68 A default implementation is given as below: 69 {{{ 70 OGRErr 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 82 This triggers the old behavior of an unoptimized deletion. 83 84 Individual drivers can override the default implementation and can implement an optimized algorithm for deleting a set of features. 85 61 86 '''Additional Notes''' 62 87 … … 74 99 75 100 14-May-2007: initial version created[[BR]] 76 15-May-2007: !SetFeatures() added 101 15-May-2007: !SetFeatures() added[[BR]] 102 16-May-2007: !DeleteFeatures() added[[BR]]