/** * Forces the spatial index to be created */ public void createSpatialIndex() throws IOException { buildQuadTree(); }
/** * Forces the spatial index to be created */ public void createSpatialIndex() throws IOException { buildQuadTree(); }
if (this.createIndex) { try { this.buildQuadTree(maxDepth); } catch (Throwable e) { createIndex=false;
buildQuadTree(maxDepth); filename = shpURL.getFile().substring(0, shpURL.getFile().length() - 4);
/** * Release resources and flush the header information. */ public void close() throws IOException { super.close(); fidWriter.close(); try { if (shpFiles.isLocal()) { if (indexedShapefileDataStore.needsGeneration(ShpFileType.FIX)) { FidIndexer.generate(shpFiles); } deleteFile(ShpFileType.QIX); if (indexedShapefileDataStore.treeType == IndexType.QIX) { indexedShapefileDataStore.buildQuadTree(); } } } catch (Throwable e) { indexedShapefileDataStore.treeType = IndexType.NONE; ShapefileDataStoreFactory.LOGGER.log(Level.WARNING, "Error creating Spatial index", e); } }
/** * Release resources and flush the header information. */ public void close() throws IOException { super.close(); fidWriter.close(); try { if (shpFiles.isLocal()) { if (indexedShapefileDataStore.needsGeneration(ShpFileType.FIX)) { FidIndexer.generate(shpFiles); } deleteFile(ShpFileType.QIX); if (indexedShapefileDataStore.treeType == IndexType.QIX) { indexedShapefileDataStore.buildQuadTree(); } } } catch (Throwable e) { indexedShapefileDataStore.treeType = IndexType.NONE; ShapefileDataStoreFactory.LOGGER.log(Level.WARNING, "Error creating Spatial index", e); } }