Revision: 6385 http://sourceforge.net/p/jump-pilot/code/6385 Author: michaudm Date: 2020-08-22 08:37:10 +0000 (Sat, 22 Aug 2020) Log Message: ----------- Fix spatialite loader : could not load spatialite exported from QGIS (OGC_OGR_LAYOUT)
Modified Paths: -------------- core/trunk/ChangeLog core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java Modified: core/trunk/ChangeLog =================================================================== --- core/trunk/ChangeLog 2020-08-20 07:17:48 UTC (rev 6384) +++ core/trunk/ChangeLog 2020-08-22 08:37:10 UTC (rev 6385) @@ -4,6 +4,10 @@ # 3. be concise but convey the change in a way that ordinary users understand #<-------------------------------- 80 chars ----------------------------------># +2020-08-22 mmichaud <m.michael.mich...@orange.fr> + * Fix a bug in spatialite loader preventing loading anything exported + from QGis using spatialite format (OGC_OGR_LAYOUT) + 2020-08-20 mmichaud <m.michael.mich...@orange.fr> * #497 : read dates from database as java.util.Date, not String * update postgresql and sqlite jdbc drivers Modified: core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java 2020-08-20 07:17:48 UTC (rev 6384) +++ core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDSMetadata.java 2020-08-22 08:37:10 UTC (rev 6385) @@ -154,6 +154,8 @@ spatialIndexQuery = "SELECT CASE WHEN CheckSpatialIndex('%s', '%s') = 1 then 1 else 0 end as isindexed"; } else if (this.geometryColumnsLayout == GeometryColumnsLayout.OGC_SPATIALITE_LAYOUT) { spatialIndexQuery = "select spatial_index_enabled from geometry_columns where f_table_name = '%s' and f_geometry_column = '%s'"; + } else if (this.geometryColumnsLayout == GeometryColumnsLayout.OGC_OGR_LAYOUT) { + spatialIndexQuery = "select spatial_index_enabled from geometry_columns where f_table_name = '%s' and f_geometry_column = '%s'"; } else { // TODO: spatialIndexQuery = ""; @@ -489,6 +491,8 @@ } catch (Exception e) { //TODO... e.printStackTrace(); + } finally { + if (gc.isIndexed() == null) gc.setIndexed(false); } } _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel