/** * Creates the spatial index is appropriate. * @param force Forces the index re-creation even if the spatial index seems to be up to date * @return true if the spatial index has been created/updated */ public boolean createSpatialIndex(boolean force) { // create index as needed try { if (shpFiles.isLocal() && createIndex && (needsGeneration(treeType.shpFileType) || force)) { createSpatialIndex(); return true; } } catch (IOException e) { this.treeType = IndexType.NONE; ShapefileDataStoreFactory.LOGGER.log(Level.SEVERE, e .getLocalizedMessage()); } return false; }
/** * Creates the spatial index is appropriate. * @param force Forces the index re-creation even if the spatial index seems to be up to date * @return true if the spatial index has been created/updated */ public boolean createSpatialIndex(boolean force) { // create index as needed try { if (shpFiles.isLocal() && createIndex && (needsGeneration(treeType.shpFileType) || force)) { createSpatialIndex(); return true; } } catch (IOException e) { this.treeType = IndexType.NONE; ShapefileDataStoreFactory.LOGGER.log(Level.SEVERE, e .getLocalizedMessage()); } return false; }
((IndexedShapefileDataStore) datastore).createSpatialIndex(false);