📄 datafeaturecollection.html
字号:
<p> The method getSchema() is named for compatability with the geotools 2.0 API. In the Geotools 2.2 time frame we should be able to replace this method with a careful check of getFeatureType() and its attributes. </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#getSchema()">getSchema</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>FeatureType describing the "common" schema to all child features of this collection</DL></DD></DL><HR><A NAME="reader()"><!-- --></A><H3>reader</H3><PRE>public abstract <A HREF="../../../../org/geotools/data/FeatureReader.html" title="interface in org.geotools.data">FeatureReader</A> <B>reader</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></B></DD><DD>Provides access to the Features, please note that FeatureReader is a blocking api.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/FeatureResults.html#reader()">reader</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A FeatureReader streaming over the FeatureResults<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> - DOCUMENT ME!</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public abstract <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Envelope.html" title="class or interface in com.vividsolutions.jts.geom">Envelope</A> <B>getBounds</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></B></DD><DD>Returns the bounding box of this FeatureResults. <p> This opperation may be expensive. Consider <code>FeatureSource.getBounds( Query )</code> as an alternative. </p> This method is logically the same as: <pre> <code> <b>public</b> Envelope getBounds() <b>throws</b> IOException { Envelope newBBox = <b>new</b> Envelope(); Envelope internal; Feature feature; <b>for</b> (FeatureReader r = reader(); r.hasNext();) { feature = r.next(); internal = feature.getDefaultGeometry().getEnvelopeInternal(); newBBox.expandToInclude(internal); } <b>return</b> newBBox; } </code> </pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/FeatureResults.html#getBounds()">getBounds</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Bounding box of this FeatureResults, or an empty Envelope</DL></DD></DL><HR><A NAME="getCount()"><!-- --></A><H3>getCount</H3><PRE>public abstract int <B>getCount</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></B></DD><DD>Returns the number of Features in this FeatureResults. <p> This opperation may be expensive. Consider <code>FeatureSource.getCount( Query )</code> as an alternative. </p> This method is logically the same as: <pre> <code> <b>public</b> int getCount() <b>throws</b> IOException { <b>int</b> count = 0; <b>for</b> (FeatureReader r = reader(); r.hasNext(); count++) { r.next(); } <b>return</b> count; } </code> </pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/FeatureResults.html#getCount()">getCount</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The number of Features in this FeatureResults.<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 there are problems getting the count</DL></DD></DL><HR><A NAME="collection()"><!-- --></A><H3>collection</H3><PRE>public abstract <A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A> <B>collection</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></B></DD><DD>Convert this set of results to a FeatureCollection. <p> This method is logically the same as: <pre><code> <b>public</b> FeatureCollection collection() <b>throws</b> IOException { FeatureCollection collection = FeatureCollections.newCollection() <b>for</b> (FeatureReader r = reader(); r.hasNext();) { collection.add( r.next() ); } <b>return</b> collection; } </code></pre> </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/FeatureResults.html#collection()">collection</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/FeatureResults.html" title="interface in org.geotools.data">FeatureResults</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>DOCUMENT ME!<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 any problems occur aquiring Features</DL></DD></DL><HR><A NAME="writer()"><!-- --></A><H3>writer</H3><PRE>protected <A HREF="../../../../org/geotools/data/FeatureWriter.html" title="interface in org.geotools.data">FeatureWriter</A> <B>writer</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>Subclass may provide an implementation of this method to indicate that read/write support is provided. <p> All operations that attempt to modify the "data" will use this method, allowing them to throw an "UnsupportedOperationException" in the same manner as Collections.unmodifiableCollection(Collection c) </p><P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - To indicate that write support is not avaiable<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="addListener(org.geotools.feature.CollectionListener)"><!-- --></A><H3>addListener</H3><PRE>public void <B>addListener</B>(<A HREF="../../../../org/geotools/feature/CollectionListener.html" title="interface in org.geotools.feature">CollectionListener</A> listener)</PRE><DL><DD>Adds a listener for collection events.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#addListener(org.geotools.feature.CollectionListener)">addListener</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to add</DL></DD></DL><HR><A NAME="removeListener(org.geotools.feature.CollectionListener)"><!-- --></A><H3>removeListener</H3><PRE>public void <B>removeListener</B>(<A HREF="../../../../org/geotools/feature/CollectionListener.html" title="interface in org.geotools.feature">CollectionListener</A> listener)</PRE><DL><DD>Removes a listener for collection events.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#removeListener(org.geotools.feature.CollectionListener)">removeListener</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener to remove</DL></DD></DL><HR><A NAME="features()"><!-- --></A><H3>features</H3><PRE>public <A HREF="../../../../org/geotools/feature/FeatureIterator.html" title="interface in org.geotools.feature">FeatureIterator</A> <B>features</B>()</PRE><DL><DD>FeatureIterator is entirely based on iterator(). <p> So when we implement FeatureCollection.iterator() this will work out of the box.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#features()">features</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A FeatureIterator.</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Iterator may (or may) not support modification.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/data/collection/ResourceCollection.html" title="interface in org.geotools.data.collection">ResourceCollection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>Iterator</DL></DD></DL><HR><A NAME="openIterator()"><!-- --></A><H3>openIterator</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>openIterator</B>()</PRE><DL><DD>Returns a FeatureWriterIterator, or FeatureReaderIterator over content. <p> If you have a way to tell that you are readonly please subclass with a less hardcore check - this implementations catches a UnsupportedOpperationsException from wrtier()!<P><DD><DL></DL></DD><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -