Opened 16 years ago

Closed 16 years ago

#506 closed defect (fixed)

Fail to execute IsNull for NULL geometry property

Reported by: christinebao Owned by: christinebao
Priority: major Milestone: 3.5.0
Component: SHP Provider Version: 3.4.0
Severity: 3 Keywords:
Cc: External ID: 1210720.01

Description

This defect is reported from Map 3D.

Steps:

  1. Connect to the attached SHP file.
  2. Make a calculated field of Area2D(Geometry) named Calculation1.
  3. Open DataTable and sort the Calculation1 column, the data disappear.

Cause: This SHP file is special, that it contains records which are all full, even for Geometry property. As the attached screen shot shows. Thus when re-order the calculated field and query from datasource, the following code fails (ShpReader.h line 629):

else if (0 == wcscmp (propertyName, mLogicalGeometryPropertyName))

ret = (eNullShape == mShape->GetShapeType ());

because mShape is NULL. Then the select command fails, and cause nothing show on DataTable.

Fix: The above code should check mShape first. If mShape is NULL then the return value (means IsNULL) should be set true.

Change History (2)

comment:1 by christinebao, 16 years ago

The SHP file is too large to attach. Please refer to the defect in Clarify for the test data.

comment:2 by christinebao, 16 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.