📄 shapefiledatastore.html
字号:
<A NAME="getFeatureReader(java.lang.String, org.geotools.data.Query)"><!-- --></A><H3>getFeatureReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/FeatureReader.html" title="interface in org.geotools.data">FeatureReader</A> <B>getFeatureReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName, <A HREF="../../../../org/geotools/data/Query.html" title="interface in org.geotools.data">Query</A> query) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Just like the basic version, but adds a small optimization: if no attributes are going to be read, don't uselessly open and read the dbf file. Makes sure to consider also attributes in the query.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html#getFeatureReader(java.lang.String, org.geotools.data.Query)">getFeatureReader</A></CODE> in class <CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html" title="class in org.geotools.data">AbstractDataStore</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/data/AbstractDataStore.html#getFeatureReader(java.lang.String, org.geotools.data.Query)"><CODE>AbstractDataStore.getFeatureReader(java.lang.String, org.geotools.data.Query)</CODE></A></DL></DD></DL><HR><A NAME="createFeatureReader(java.lang.String, org.geotools.data.shapefile.ShapefileDataStore.Reader, org.geotools.feature.FeatureType)"><!-- --></A><H3>createFeatureReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/FeatureReader.html" title="interface in org.geotools.data">FeatureReader</A> <B>createFeatureReader</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName, <A HREF="../../../../org/geotools/data/shapefile/ShapefileDataStore.Reader.html" title="class in org.geotools.data.shapefile">ShapefileDataStore.Reader</A> r, <A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> readerSchema) throws <A HREF="../../../../org/geotools/feature/SchemaException.html" title="class in org.geotools.feature">SchemaException</A></PRE><DL><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/feature/SchemaException.html" title="class in org.geotools.feature">SchemaException</A></CODE></DL></DD></DL><HR><A NAME="getAttributesReader(boolean)"><!-- --></A><H3>getAttributesReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/shapefile/ShapefileDataStore.Reader.html" title="class in org.geotools.data.shapefile">ShapefileDataStore.Reader</A> <B>getAttributesReader</B>(boolean readDbf) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Returns the attribute reader, allowing for a pure shapefile reader, or a combined dbf/shp reader.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>readDbf</CODE> - - if true, the dbf fill will be opened and read<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="openShapeReader()"><!-- --></A><H3>openShapeReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/shapefile/shp/ShapefileReader.html" title="class in org.geotools.data.shapefile.shp">ShapefileReader</A> <B>openShapeReader</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Convenience method for opening a ShapefileReader.<P><DD><DL><DT><B>Returns:</B><DD>A new ShapefileReader.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an error occurs during creation.<DD><CODE><A HREF="../../../../org/geotools/data/DataSourceException.html" title="class in org.geotools.data">DataSourceException</A></CODE> - DOCUMENT ME!</DL></DD></DL><HR><A NAME="openDbfReader()"><!-- --></A><H3>openDbfReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/shapefile/dbf/DbaseFileReader.html" title="class in org.geotools.data.shapefile.dbf">DbaseFileReader</A> <B>openDbfReader</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Convenience method for opening a DbaseFileReader.<P><DD><DL><DT><B>Returns:</B><DD>A new DbaseFileReader<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an error occurs during creation.</DL></DD></DL><HR><A NAME="openIndexFile(java.net.URL)"><!-- --></A><H3>openIndexFile</H3><PRE>protected <A HREF="../../../../org/geotools/data/shapefile/shp/IndexFile.html" title="class in org.geotools.data.shapefile.shp">IndexFile</A> <B>openIndexFile</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A> shxURL) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Convenience method for opening an index file.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>shxURL</CODE> - TODO<DT><B>Returns:</B><DD>An IndexFile<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE></DL></DD></DL><HR><A NAME="openPrjReader()"><!-- --></A><H3>openPrjReader</H3><PRE>protected <A HREF="../../../../org/geotools/data/shapefile/prj/PrjFileReader.html" title="class in org.geotools.data.shapefile.prj">PrjFileReader</A> <B>openPrjReader</B>() throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>, FactoryException</PRE><DL><DD>Convenience method for opening a DbaseFileReader.<P><DD><DL><DT><B>Returns:</B><DD>A new DbaseFileReader<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If an error occurs during creation.<DD><CODE>FactoryException</CODE> - DOCUMENT ME!</DL></DD></DL><HR><A NAME="getTypeNames()"><!-- --></A><H3>getTypeNames</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getTypeNames</B>()</PRE><DL><DD>Get an array of type names this DataStore holds.<BR/>ShapefileDataStore will always return a single name.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/DataStore.html#getTypeNames()">getTypeNames</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/DataStore.html" title="interface in org.geotools.data">DataStore</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html#getTypeNames()">getTypeNames</A></CODE> in class <CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html" title="class in org.geotools.data">AbstractDataStore</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>An array of length one containing the single type held.</DL></DD></DL><HR><A NAME="createFeatureTypeName()"><!-- --></A><H3>createFeatureTypeName</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>createFeatureTypeName</B>()</PRE><DL><DD>Create the type name of the single FeatureType this DataStore represents.<BR/> For example, if the urls path is file:///home/billy/mytheme.shp, the type name will be mytheme.<P><DD><DL><DT><B>Returns:</B><DD>A name based upon the last path component of the url minus the extension.</DL></DD></DL><HR><A NAME="getCurrentTypeName()"><!-- --></A><H3>getCurrentTypeName</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getCurrentTypeName</B>()</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="typeCheck(java.lang.String)"><!-- --></A><H3>typeCheck</H3><PRE>protected void <B>typeCheck</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> requested) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>A convenience method to check if a type name is correct.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>requested</CODE> - The type name requested.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If the type name is not available</DL></DD></DL><HR><A NAME="createFeatureWriter(java.lang.String, org.geotools.data.Transaction)"><!-- --></A><H3>createFeatureWriter</H3><PRE>protected <A HREF="../../../../org/geotools/data/FeatureWriter.html" title="interface in org.geotools.data">FeatureWriter</A> <B>createFeatureWriter</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName, <A HREF="../../../../org/geotools/data/Transaction.html" title="interface in org.geotools.data">Transaction</A> transaction) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Create a FeatureWriter for the given type name.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html#createFeatureWriter(java.lang.String, org.geotools.data.Transaction)">createFeatureWriter</A></CODE> in class <CODE><A HREF="../../../../org/geotools/data/AbstractDataStore.html" title="class in org.geotools.data">AbstractDataStore</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>typeName</CODE> - The typeName of the FeatureType to write<DD><CODE>transaction</CODE> - DOCUMENT ME!<DT><B>Returns:</B><DD>A new FeatureWriter.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If the typeName is not available or some other error occurs.</DL></DD></DL><HR><A NAME="getSchema(java.lang.String)"><!-- --></A><H3>getSchema</H3><PRE>public <A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> <B>getSchema</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> typeName) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Obtain the FeatureType of the given name. ShapefileDataStore contains only one FeatureType.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/DataStore.html#getSchema(java.lang.S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -