abstractfeaturelist.html

来自「Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理」· HTML 代码 · 共 1,047 行 · 第 1/5 页

HTML
1,047 行
字号
setDefaultGeometry</H3><PRE>public void <B>setDefaultGeometry</B>(<A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/Geometry.html" title="class or interface in com.vividsolutions.jts.geom">Geometry</A>&nbsp;geometry)                        throws <A HREF="../../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></B></DD><DD>Sets the default geometry for this feature.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/Feature.html#setDefaultGeometry(com.vividsolutions.jts.geom.Geometry)">setDefaultGeometry</A></CODE> in interface <CODE><A HREF="../../../../org/geotools/feature/Feature.html" title="interface in org.geotools.feature">Feature</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>geometry</CODE> - The geometry to set.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/geotools/feature/IllegalAttributeException.html" title="class in org.geotools.feature">IllegalAttributeException</A></CODE> - If the AttributeType is not a         geometry, or is invalid for some other reason.</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <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="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>&nbsp;listener)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Adds a listener for collection events. <p> When this collection is backed by live data the event notification will follow the guidelines outlined by FeatureListner. </p><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>&nbsp;listener)                    throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><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<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - If the listener is null.</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><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Obtain a FeatureIterator of the Features within this collection. <p> The implementation of Collection must adhere to the rules of fail-fast concurrent modification. In addition (to allow for resource backed collections, the <code>close( Iterator )</code> method must be called. <p> This is almost equivalent to: <ul> <li>a Type-Safe call to: <code>getAttribute(getFeatureType().getAttributeType(0).getName()).iterator();</code>. <li>A Java 5:<code>Iterator&lt;Feature&gt;</code> </ul> </p> Example (safe) use:<pre><code> FeatureIterator iterator=collection.features(); try {     while( iterator.hasNext()  ){          Feature feature = iterator.next();          System.out.println( feature.getID() );     } } finally {     collection.close( iterator ); } </code></pre> </p> <p> GML Note: The contents of this iterator are considered to be defined by <b>featureMember</b> tags (and/or the single allowed <b>FeatureMembers</b> tag). Please see getFeatureType for more details. </p><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="close(org.geotools.feature.FeatureIterator)"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>(<A HREF="../../../../org/geotools/feature/FeatureIterator.html" title="interface in org.geotools.feature">FeatureIterator</A>&nbsp;close)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>Clean up any resources assocaited with this iterator in a manner similar to JDO collections. <p> You must be sure to allow null values, this is because in a try/finally block client code may not be sure if they have actualy succeed in assign a value to an iterator they wish to ensure is closed. By permiting null as an api we prevent a null check in lots of finally statements. </p> <p> Note: Because of FeatureReader using an interator internally, there is only one implementation of this method that makes any sense:<pre><code> <b>public void</b> close( FeatureIterator iterator) {     <b>if</b>( iterator != null ) iterator.close(); } </code></pre> </p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html#close(org.geotools.feature.FeatureIterator)">close</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></DL></DD></DL><HR><A NAME="getSchema()"><!-- --></A><H3>getSchema</H3><PRE>public <A HREF="../../../../org/geotools/feature/FeatureType.html" title="interface in org.geotools.feature">FeatureType</A> <B>getSchema</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/geotools/feature/FeatureCollection.html" title="interface in org.geotools.feature">FeatureCollection</A></CODE></B></DD><DD>The schema for the child features of this collection. <p> There is a difference between getFeatureType() and getSchema()represents the LCD FeatureType that best represents the contents of this collection. <ul> <li>The degenerate case returns the "_Feature" FeatureType, where the onlything known is that the contents are Features. <li>For a collection backed by a shapefiles (or database tables) the FeatureType returned by getSchema() will complete describe each and every child in the collection. <li>For mixed content FeatureCollections you will need to check the FeatureType of each Feature as it is retrived from the collection </ul> </p> <p> The method getSchema() is named for compatability with the geotools 2.0 API. In the Geotools 2.2 time

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?