/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * @throws IOException If an error occurs during creation. */ protected ShapefileReader openShapeReader(GeometryFactory gf, boolean onlyRandomAccess) throws IOException { try { return new ShapefileReader( shpFiles, true, store.isMemoryMapped(), gf, onlyRandomAccess); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory()); reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory());
/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * * @throws IOException * If an error occurs during creation. */ protected ShapefileReader openShapeReader(GeometryFactory gf, boolean onlyRandomAccess) throws IOException { try { return new ShapefileReader(shpFiles, true, useMemoryMappedBuffer, gf, onlyRandomAccess); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * * @throws IOException * If an error occurs during creation. */ protected ShapefileReader openShapeReader(GeometryFactory gf) throws IOException { try { return new ShapefileReader(shpFiles, true, useMemoryMappedBuffer, gf); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * * @throws IOException * If an error occurs during creation. */ protected ShapefileReader openShapeReader(GeometryFactory gf, boolean onlyRandomAccess) throws IOException { try { return new ShapefileReader(shpFiles, true, useMemoryMappedBuffer, gf, onlyRandomAccess); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * * @throws IOException * If an error occurs during creation. */ protected ShapefileReader openShapeReader(GeometryFactory gf) throws IOException { try { return new ShapefileReader(shpFiles, true, useMemoryMappedBuffer, gf); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
public static void main(String[] args) throws Exception { FileChannel channel = new FileInputStream(args[0]).getChannel(); ShapefileReader reader = new ShapefileReader(channel, new Lock()); System.out.println(reader.getHeader()); while (reader.hasNext()) { System.out.println(reader.nextRecord().shape()); } reader.close(); }
/** * Convenience method for opening a ShapefileReader. * * @return A new ShapefileReader. * * @throws IOException If an error occurs during creation. * @throws DataSourceException DOCUMENT ME! */ protected ShapefileReader openShapeReader() throws IOException { ReadableByteChannel rbc = getReadChannel(shpURL); if (rbc == null) { return null; } try { return new ShapefileReader(rbc, true, useMemoryMappedBuffer, readWriteLock); } catch (ShapefileException se) { throw new DataSourceException("Error creating ShapefileReader", se); } }
reader = new ShapefileReader(channel, true, false, lock);
reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory()); reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory());
reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory()); reader = new ShapefileReader(shpFiles, true, false, new GeometryFactory());
ShapefileReader reader = new ShapefileReader(shpFiles, false, false, geometryFactory); try { ret = new ReferencedEnvelope(getSchema().getCoordinateReferenceSystem());
ShapefileReader reader = new ShapefileReader(shpFiles, false, false, geometryFactory); try { ret = new ReferencedEnvelope(getSchema().getCoordinateReferenceSystem());
return null; ShapefileReader reader=new ShapefileReader(getReadChannel(shpURL), this.readWriteLock); try{ ret=new Envelope();
reader = new ShapefileReader(new ShpFiles(shpDir), false, false, new GeometryFactory());
ShapefileReader reader = new ShapefileReader( getReadChannel(shpURL), readWriteLock); int count = -1;