Opened 14 years ago
Closed 10 years ago
#3502 closed defect (wontfix)
[PATCH] Spatialite: work around crash when creating a spatialindex on a layer without SRS
Reported by: | Even Rouault | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | sqlite spatialite |
Cc: |
Description
spatialite-2.3.1 and recent trunk crashes when calling SELECT CreateSpatialIndex('layer_name', 'GEOMETRY') where layer_name is a layer created without any SRS. Thus the current code doesn't fill the srid column in the geometry_columns table. But the CreateSpatialIndex() function in spatialite code supposes the content is not NULL and crashes. I reported this to Alessandro Furieri but haven't received any answer back.
Anyway, the workaround is simple. Just insert srid=-1 when no srid is available. But I'm still reluctant to commit the patch as the srid in geometry_columns should match a srid in spatial_ref_sys (foreign key). The triggers to check the condition during the insertion is not created by spatialite, so this actually works
Attachments (1)
Change History (4)
by , 14 years ago
Attachment: | ticket3502.patch added |
---|
comment:1 by , 14 years ago
comment:2 by , 10 years ago
Current Spatialite version is 4.1.1 and the way to handle the metadata of geometry columns has changed and GDAL plays well with it. If this issue affecting Spatialite v. 2.3.1 was not corrected I would say that it won't fix ever.
comment:3 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Got an answer from Alessandro :