Changes between Version 14 and Version 15 of PythonGotchas


Ignore:
Timestamp:
Oct 23, 2013, 12:47:39 PM (11 years ago)
Author:
sudobangbang
Comment:

updating according to EvenR's comments

Legend:

Unmodified
Added
Removed
Modified
  • PythonGotchas

    v14 v15  
    126126=== Layers with attribute filters {{{SetAttributeFilter()}}} will only return filtered features when using {{{GetNextFeature()}}} ===
    127127
    128 If you read the documentation for {{{SetAttributeFilter()}}} carefully you will see the caveat about {{{OGR_L_GetNextFeature()}}}. This means that you can still access and work with features from the layer that are not covered by the filter. In combination with {{{GetFeatureCount()}}} as a loop, this can lead to some subtle confusion. Iterating over the {{{Layer}}} object or using {{{GetNextFeature()}}} should be the default method for accessing features:
     128If you read the documentation for {{{SetAttributeFilter()}}} carefully you will see the caveat about {{{OGR_L_GetNextFeature()}}}. This means that, if you use {{{GetFeature()}}} instead of {{{GetNextFeature()}}}, you can still access and work with features from the layer that are not covered by the filter. In combination with {{{GetFeatureCount()}}} as a loop, this can lead to some subtle confusion. Iterating over the {{{Layer}}} object or using {{{GetNextFeature()}}} should be the default method for accessing features. :
    129129
    130130{{{