Opened 16 years ago
Closed 16 years ago
#524 closed defect (fixed)
SDF spatial index error on existing SDF file
Reported by: | leodai | Owned by: | leodai |
---|---|---|---|
Priority: | major | Milestone: | 3.5.0 |
Component: | SDF Provider | Version: | 3.4.0 |
Severity: | 3 | Keywords: | |
Cc: | External ID: | 1173929 |
Description ¶
I have an SDF file that I created two years ago, it does not open anymore in Map 2010.
Through data connect try to open the attached SDF.
Note Error Message:
Failed To Open FDO Connection Spatial Index Error.
The expectedf behavior would be that SDF recreates the spatial index or that the index did not change and this file still works.
Change History (2)
comment:1 by , 16 years ago
Status: | new → assigned |
---|
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
fixed in trunk by changelist: http://trac.osgeo.org/fdo/changeset/4672
also submitted into branch 3.4: http://trac.osgeo.org/fdo/changeset/4673
Note:
See TracTickets
for help on using tickets.
This problem is because the attached sdf file's RTREE Table is corrupted. Debug into the code, I found the RTREE table is opened successfully, but it return error code while reading the data later. The original code is like blow: If (db->open() != 0) {
} ... get the data If (db->get() !=0)
Apparently, the original rtree table have some problem. To fix this issue, we should actually do a rebuild r-tree, by reading all geometries and build the r- tree. And then the sdf file can be operate successfully.
Take the rebuilding index table for a example, we first detect the case, and recreate an empty r-tree if the original r-tree corrupted. And marked it that this r-tree needs to be regened. Later we will rebuild the r-tree fully.
Note: if the file is read-only, we will pop up the following error msg "Error Rebuilding the corrupted sptial index. File is possibly read-only" And use the the existing string "An error occurred during SDF database access." in update 1 due to resouce modify restriction