Identify tool fails to select Point and Polyline-type features
Using the built-in Identify tool, Polygon shapes can be selected when clicked, but Point and Polyline shapes cannot.
Finally, there was a problem in CShapefile::SelectShapesCore, in which for Point and Polyline features (and not Polygons) the code checks to see if the Shape was just rendered, presumably intended to bypass those shapes that are outside of the current map extents. However, at this point in time, the test is no longer valid. Although it is set properly during the standard layer drawing, it ends up getting cleared during the 'volatile' layer drawing. I have commented out this code (at line 193). It was intended as an optimization, but is not required. It would be nice to bypass those outside of the current view, but we will have to modify or augment the use of the 'wasRendered' flag, and this is a larger task that will introduce a higher risk.
A secondary issue was found in CMapView:rillDownSelect. As a pre-check, the input point is checked to see if it is within the Extents of the Layer, on the notion that you can bypass the search of the layer if you know you are outside of the entire layer Extents. However, the problem occurs when you are searching for one of the points on the edge of the layer Extents. For example, if the point you are searching for defines the bottom left corner of the layer Extents, and your mouse position is just below or to the left of the point, the code will bypass the layer search, and the point will not be included in the results. There was a TODO note on the line of code, indicating the need to add a tolerance to the test.
For now, I have commented the line of code (at line 324) since it is an optimization as opposed to a requirement, and we will need to discuss the best options for determination of tolerance in this case.
First issue discovered was related to Point shapes that are rendered using Picture symbols. ShapeStyleHelper::GetPointBounds builds a rectangle intended to be more inclusive of the size of the image. However, the Extents left bound was not set properly, resulting in inconsistent containment.