|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.store.DataFeatureCollection org.geotools.data.DefaultFeatureResults org.geotools.data.wfs.WFSFeatureSource.WFSFeatureResults
Nested Class Summary |
Nested classes inherited from class org.geotools.feature.Feature |
Feature.NULL |
Field Summary |
Fields inherited from class org.geotools.data.DefaultFeatureResults |
featureSource |
Constructor Summary | |
WFSFeatureSource.WFSFeatureResults(WFSFeatureSource fs,
Query query)
|
Method Summary | |
com.vividsolutions.jts.geom.Envelope |
getBounds()
Returns the bounding box of this FeatureResults. |
int |
getCount()
Returns the number of Features in this FeatureResults. |
FeatureType |
getSchema()
Returns the FeatureType of the contents of this collection. |
FeatureReader |
reader()
Provides access to the Features, please note that FeatureReader is a blocking api. |
Methods inherited from class org.geotools.data.DefaultFeatureResults |
collection, getTransaction |
Methods inherited from class org.geotools.data.store.DataFeatureCollection |
accepts, add, addAll, addListener, clear, close, close, closeIterator, contains, containsAll, features, fireChange, fireChange, fireChange, getAttribute, getAttribute, getAttributes, getDefaultGeometry, getFeatureType, getID, getNumberOfAttributes, getParent, isEmpty, iterator, openIteartor, purge, remove, removeAll, removeListener, retainAll, setAttribute, setAttribute, setDefaultGeometry, setParent, size, sort, sort, subCollection, toArray, toArray, writer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.data.FeatureResults |
collection |
Methods inherited from interface java.util.Collection |
equals, hashCode |
Constructor Detail |
public WFSFeatureSource.WFSFeatureResults(WFSFeatureSource fs, Query query)
fs
- query
- Method Detail |
public FeatureType getSchema()
FeatureResults
Please note that for a collection with a mixed contents the FeatureType may be degenerate (ie very generic). For many applications (like shapefiles or tables) the FeatureType can safely be used to describe all the Features in the result set.
getSchema
in interface FeatureResults
getSchema
in class DefaultFeatureResults
FeatureResults.getSchema()
public FeatureReader reader() throws java.io.IOException
FeatureResults
reader
in interface FeatureResults
reader
in class DefaultFeatureResults
java.io.IOException
- If results could not be obtainedFeatureResults.reader()
public com.vividsolutions.jts.geom.Envelope getBounds()
FeatureResults
This opperation may be expensive. Consider
FeatureSource.getBounds( Query )
as an alternative.
public Envelope getBounds() throws IOException {
Envelope newBBox = new Envelope();
Envelope internal;
Feature feature;
for (FeatureReader r = reader(); r.hasNext();) {
feature = r.next();
internal = feature.getDefaultGeometry().getEnvelopeInternal();
newBBox.expandToInclude(internal);
}
return newBBox;
}
getBounds
in interface FeatureResults
getBounds
in class DefaultFeatureResults
FeatureResults.getBounds()
public int getCount() throws java.io.IOException
FeatureResults
This opperation may be expensive. Consider FeatureSource.getCount(
Query )
as an alternative.
public int getCount() throws IOException {
int count = 0;
for (FeatureReader r = reader(); r.hasNext(); count++) {
r.next();
}
return count;
}
getCount
in interface FeatureResults
getCount
in class DefaultFeatureResults
java.io.IOException
- If feature could not be readFeatureResults.getCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |