[Fdo_issues] SHP defect fix (loss of precision in spatial index)

Dan Stoica dan.stoica at autodesk.com
Thu Jan 11 10:26:42 EST 2007


 

The nature of the defect is the loss of precision in the spatial index
which stores the bounding boxes as floats, while the ordinates are
doubles. This causes (sometimes) geometries on the boundary of the
selected area not to be found.

 

Took the approach to enlarge the searching area with a fudge factor. For
consistency, this factor is computed based on the associated spatial
context XY tolerance, i.e. SPATIALCONTEXT_DEFAULT_XY_TOLERANCE/2.0 =
0.0005; For geodetic coordinate system, use instead
SPATIALCONTEXT_DEFAULT_XY_TOLERANCE_LL/2.0 = 0.00000005;

 

Also, enlarge the extents returned by SpatialExtents() by the same
amounts as above.

 

Changed files:

-------------------------------------

\branches\3.2.x\Providers\Shp\Src\Provider\ShpConnection.cpp

\branches\3.2.x\Providers\Shp\Src\Provider\ShpConnection.h

\branches\3.2.x\Providers\Shp\Src\Provider\ShpFeatIdQueryEvaluator.cpp

\branches\3.2.x\Providers\Shp\Src\Provider\ShpOptimizedAggregateReader.c
pp

\branches\3.2.x\Providers\Shp\Src\Provider\ShpProvider.h

\branches\3.2.x\Providers\Shp\Src\UnitTest\SelectAggregateTests.cpp

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo_issues/attachments/20070111/925374f6/attachment.html


More information about the Fdo_issues mailing list