[fdo-trac] #506: Fail to execute IsNull for NULL geometry property
FDO
trac_fdo at osgeo.org
Thu Apr 16 02:59:17 EDT 2009
#506: Fail to execute IsNull for NULL geometry property
----------------------------+-----------------------------------------------
Reporter: christinebao | Owner: christinebao
Type: defect | Status: new
Priority: major | Milestone: 3.5.0
Component: SHP Provider | Version: 3.4.0
Severity: 3 | Keywords:
External_id: 1210720.01 |
----------------------------+-----------------------------------------------
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.
--
Ticket URL: <http://trac.osgeo.org/fdo/ticket/506>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list