public long next() throws IOException { if (current != -1) write(); if (reader.hasNext()) { reader.next(); fidIndex = reader.getCurrentFIDIndex(); } else { fidIndex++; } current = fidIndex; return fidIndex; }
/** * Forces the FID index to be regenerated * * @throws IOException */ public void generateFidIndex() throws IOException { FidIndexer.generate(shpFiles); }
private void finishLastWrite() throws IOException { while( hasNext() ) next(); if (current != -1) write(); drain(); writeHeader(); }
public Envelope getBounds(Query query) throws IOException { return IndexedShapefileDataStore.this.getBounds(query); } };
public boolean hasNext() throws IOException { return reader.hasNext(); }
/** * Forces the spatial index to be created */ public void createSpatialIndex() throws IOException { buildQuadTree(); }
/** * Get an array of type names this DataStore holds.<BR/>ShapefileDataStore * will always return a single name. * * @return An array of length one containing the single type held. */ public String[] getTypeNames() { return new String[] { getCurrentTypeName(), }; }
/** * Create a new instance<br> * Note: {@link StorageFile#replaceOriginal()} is NOT called. Call {@link #IndexedFidWriter(ShpFiles)} for that * behaviour. * @param shpFiles The shapefiles to used * @param storageFile the storage file that will be written to. It will NOT be closed. * @throws IOException */ public IndexedFidWriter( ShpFiles shpFiles, StorageFile storageFile ) throws IOException { // Note do NOT assign storageFile so that it is closed because this method method requires that // the caller close the storage file. // Call the single argument constructor instead init(shpFiles, storageFile); }
public IndexedFidReader( ShpFiles shpFiles, ReadableByteChannel in ) throws IOException { init(shpFiles, in); }
/** * In case someone doesn't close me. * * @throws Throwable * DOCUMENT ME! */ protected void finalize() throws Throwable { if (featureReader != null) { try { close(); } catch (Exception e) { // oh well, we tried } } }
private void finishLastWrite() throws IOException { while( hasNext() ) next(); if (current != -1) write(); drain(); writeHeader(); }
public long next() throws IOException { if (current != -1) write(); if (reader.hasNext()) { reader.next(); fidIndex = reader.getCurrentFIDIndex(); } else { fidIndex++; } current = fidIndex; return fidIndex; }
public Envelope getBounds(Query query) throws IOException { return IndexedShapefileDataStore.this.getBounds(query); } };
public boolean hasNext() throws IOException { return reader.hasNext(); }
/** * Forces the FID index to be regenerated * * @throws IOException */ public void generateFidIndex() throws IOException { FidIndexer.generate(shpFiles); }
/** * Forces the spatial index to be created */ public void createSpatialIndex() throws IOException { buildQuadTree(); }
/** * Create a new instance<br> * Note: {@link StorageFile#replaceOriginal()} is NOT called. Call {@link #IndexedFidWriter(ShpFiles)} for that * behaviour. * @param shpFiles The shapefiles to used * @param storageFile the storage file that will be written to. It will NOT be closed. * @throws IOException */ public IndexedFidWriter( ShpFiles shpFiles, StorageFile storageFile ) throws IOException { // Note do NOT assign storageFile so that it is closed because this method method requires that // the caller close the storage file. // Call the single argument constructor instead init(shpFiles, storageFile); }
public Envelope getBounds(Query query) throws IOException { return IndexedShapefileDataStore.this.getBounds(query); } };
public boolean hasNext() throws IOException { return reader.hasNext(); }