ScreenMap optimization currently filters out (screen) coincident features without consideration for subsequent filtering. This becomes apparent when ScreenMap filtering accepts a feature that will be rejected by a subsequent filter and rejects a subsequent, (screen) coincident feature that would be accepted by the later filter. In this situation a feature should be rendered but is not.
I submitted a pull request (I believe it is #444) that includes unit tests to illustrate the problem as well as a proof-of-concept solution.
The proof-of-concept solution pushes the layer filter to ShapefileFeatureReader. When provided, the filter is evaluated before assessing the ScreenMap filtering. Because the filter evaluation in the forked repo is naive (it always assumes that attributes are required), the new execution path effectively removes the benefits of the ScreenMap optimization for any layers with filters. This could be improved by making the filter evaluation smarter in cases where a DBF read is not required. The changes do not include similar enhancements for IndexedShapefileFeatureReader but it is expected that this should be handled in a similar manner to ShapefileFeatureReader.
I am leaving this with priority of major because I don't believe that there is a general workaround for the problem since features can become ScreenMap coincident on many different situations.
|