| org.geotools.data.shapefile.ShapefileDataStore org.geotools.data.shapefile.indexed.IndexedShapefileDataStore
IndexedShapefileDataStore | public class IndexedShapefileDataStore extends ShapefileDataStore (Code) | | A DataStore implementation which allows reading and writing from Shapefiles.
author: Ian Schneider author: Tommaso Nolli |
Constructor Summary | |
public | IndexedShapefileDataStore(URL url) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, URI namespace) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer, boolean createIndex) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType) Creates a new instance of ShapefileDataStore. | public | IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType, Charset dbfCharset) Creates a new instance of ShapefileDataStore. |
Method Summary | |
public void | buildQuadTree(int maxDepth) Builds the QuadTree index. | protected FeatureReader | createFeatureReader(String typeName, Reader r, FeatureType readerSchema) | protected String | createFeatureTypeName() Create the type name of the single FeatureType this DataStore represents.
For example, if the urls path is file:///home/billy/mytheme.shp, the type
name will be mytheme. | protected FeatureWriter | createFeatureWriter(String typeName, Transaction transaction) Create a FeatureWriter for the given type name. | protected void | finalize() | protected Reader | getAttributesReader(boolean readDbf, boolean readGeometry, Filter filter) Returns the attribute reader, allowing for a pure shape reader, or a
combined dbf/shp reader. | protected Envelope | getBounds(Query query) | protected String | getCurrentTypeName() | protected FeatureReader | getFeatureReader(String typeName, Query query) Use the spatial index if available and adds a small optimization: if no
attributes are going to be read, don't uselessly open and read the dbf
file. | public FeatureSource | getFeatureSource(String typeName) | public FeatureWriter | getFeatureWriterAppend(String typeName, Transaction transaction) | public FeatureType | getSchema(String typeName) Obtain the FeatureType of the given name. | public FeatureType | getSchema() | public String[] | getTypeNames() Get an array of type names this DataStore holds. ShapefileDataStore
will always return a single name. | protected Filter | getUnsupportedFilter(String typeName, Filter filter) | public boolean | isIndexed() Returns true if the indices already exist and do not need to be regenerated. | public boolean | isLocal() Determine if the location of this shape is local or remote. | public boolean | isMemoryMapped() | protected DbaseFileReader | openDbfReader() Convenience method for opening a DbaseFileReader. | protected QuadTree | openQuadTree() Convenience method for opening a QuadTree index. | protected RTree | openRTree() Convenience method for opening an RTree index. | protected void | typeCheck(String requested) A convenience method to check if a type name is correct. |
TREE_GRX | final public static byte TREE_GRX(Code) | | |
TREE_NONE | final public static byte TREE_NONE(Code) | | |
TREE_QIX | final public static byte TREE_QIX(Code) | | |
createIndex | boolean createIndex(Code) | | |
useIndex | final boolean useIndex(Code) | | |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, URI namespace) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: namespace - DOCUMENT ME! |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: namespace - DOCUMENT ME! Parameters: useMemoryMappedBuffer - enable/disable memory mapping of files |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: useMemoryMappedBuffer - enable/disable memory mapping of files |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, boolean useMemoryMappedBuffer, boolean createIndex) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: useMemoryMappedBuffer - enable/disable memory mapping of files Parameters: createIndex - enable/disable automatic index creation if needed |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType) throws MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: namespace - DOCUMENT ME! Parameters: useMemoryMappedBuffer - enable/disable memory mapping of files Parameters: createIndex - enable/disable automatic index creation if needed Parameters: treeType - DOCUMENT ME! throws: NullPointerException - DOCUMENT ME! . |
IndexedShapefileDataStore | public IndexedShapefileDataStore(URL url, URI namespace, boolean useMemoryMappedBuffer, boolean createIndex, byte treeType, Charset dbfCharset) throws java.net.MalformedURLException(Code) | | Creates a new instance of ShapefileDataStore.
Parameters: url - The URL of the shp file to use for this DataSource. Parameters: namespace - DOCUMENT ME! Parameters: useMemoryMappedBuffer - enable/disable memory mapping of files Parameters: createIndex - enable/disable automatic index creation if needed Parameters: treeType - DOCUMENT ME! Parameters: dbfCharset - Charset used to decode strings from the DBF throws: NullPointerException - DOCUMENT ME! . |
buildQuadTree | public void buildQuadTree(int maxDepth) throws TreeException(Code) | | Builds the QuadTree index. Usually not necessary since reading features will index when required
Parameters: maxDepth - depth of the tree. if < 0 then a best guess is made. throws: TreeException - |
createFeatureTypeName | protected String createFeatureTypeName()(Code) | | Create the type name of the single FeatureType this DataStore represents.
For example, if the urls path is file:///home/billy/mytheme.shp, the type
name will be mytheme.
A name based upon the last path component of the url minus theextension. |
createFeatureWriter | protected FeatureWriter createFeatureWriter(String typeName, Transaction transaction) throws IOException(Code) | | Create a FeatureWriter for the given type name.
Parameters: typeName - The typeName of the FeatureType to write Parameters: transaction - DOCUMENT ME! A new FeatureWriter. throws: IOException - If the typeName is not available or some other error occurs. |
getAttributesReader | protected Reader getAttributesReader(boolean readDbf, boolean readGeometry, Filter filter) throws IOException(Code) | | Returns the attribute reader, allowing for a pure shape reader, or a
combined dbf/shp reader.
Parameters: readDbf - -if true, the dbf fill will be opened and read Parameters: readGeometry - DOCUMENT ME! Parameters: filter - -a Filter to use throws: IOException - |
getCurrentTypeName | protected String getCurrentTypeName()(Code) | | |
getSchema | public FeatureType getSchema(String typeName) throws IOException(Code) | | Obtain the FeatureType of the given name. ShapefileDataStore contains
only one FeatureType.
Parameters: typeName - The name of the FeatureType. The FeatureType that this DataStore contains. throws: IOException - If a type by the requested name is not present. |
getTypeNames | public String[] getTypeNames()(Code) | | Get an array of type names this DataStore holds. ShapefileDataStore
will always return a single name.
An array of length one containing the single type held. |
getUnsupportedFilter | protected Filter getUnsupportedFilter(String typeName, Filter filter)(Code) | | |
isIndexed | public boolean isIndexed()(Code) | | Returns true if the indices already exist and do not need to be regenerated.
true if the indices already exist and do not need to be regenerated. |
isLocal | public boolean isLocal()(Code) | | Determine if the location of this shape is local or remote.
true if local, false if remote |
isMemoryMapped | public boolean isMemoryMapped()(Code) | | |
typeCheck | protected void typeCheck(String requested) throws IOException(Code) | | A convenience method to check if a type name is correct.
Parameters: requested - The type name requested. throws: IOException - If the type name is not available |
|
|