Shape 'Relates' function does not always return proper VARIANT_BOOL value

Description

The Shape 'Relates' function, and all functions dependent on the Relates function, do not return a proper VARIANT_BOOL on all return paths. The Shapes are converted to OGRGeometry types and passed into GDAL for comparison, which returns an OGRBoolean (which is equivalent to a c++ BOOL, where TRUE = 1). This result is then returned (with no conversion) as a VARIANT_BOOL (in which VARIANT_TRUE = -1). As a result, callers that compare with VARIANT_TRUE may not get the expected result.

Function affected include:

  • Contains

  • Crosses

  • Disjoint

  • Equals

  • Intersects

  • Overlaps

  • Touches

  • Within

 

Environment

None

Status

Assignee

Jerry Faust

Reporter

Jerry Faust

Labels

None

Fix versions

Priority

High
Configure