|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.store.AbstractFeatureSource2
public abstract class AbstractFeatureSource2
Field Summary | |
---|---|
protected ActiveTypeEntry |
entry
the type entry |
protected static java.util.logging.Logger |
LOGGER
The logger for the data module. |
Constructor Summary | |
---|---|
AbstractFeatureSource2(ActiveTypeEntry entry)
|
Method Summary | |
---|---|
void |
addFeatureListener(FeatureListener listener)
Adds a listener to the list that's notified each time a change to the FeatureStore occurs. |
ReferencedEnvelope |
getBounds()
Gets the bounding box of this datasource. |
ReferencedEnvelope |
getBounds(Query query)
Gets the bounding box of the features that would be returned by this query. |
int |
getCount(Query query)
Gets the number of the features that would be returned by this query. |
DataStore |
getDataStore()
Access to the DataStore implementing this FeatureStore. |
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatures(org.opengis.filter.Filter filter)
Loads features from the datasource into the returned FeatureResults, based on the passed filter. |
FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
getFeatures(Query query)
Loads features from the datasource into the returned FeatureResults, based on the passed query. |
org.opengis.feature.simple.SimpleFeatureType |
getSchema()
Retrieves the featureType that features extracted from this datasource will be created with. |
java.util.Set |
getSupportedHints()
By default, no Hints are supported |
void |
removeFeatureListener(FeatureListener listener)
Removes a listener from the list that's notified each time a change to the FeatureStore occurs. |
protected FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
reproject(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features,
org.opengis.referencing.crs.CoordinateReferenceSystem source,
org.opengis.referencing.crs.CoordinateReferenceSystem target)
Template method for reprojecting a feature collection from a source crs to a target crs. |
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.FeatureSource |
---|
getFeatures, getInfo, getName, getQueryCapabilities |
Field Detail |
---|
protected static final java.util.logging.Logger LOGGER
protected ActiveTypeEntry entry
Constructor Detail |
---|
public AbstractFeatureSource2(ActiveTypeEntry entry)
Method Detail |
---|
public DataStore getDataStore()
FeatureSource
getDataStore
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
public void addFeatureListener(FeatureListener listener)
FeatureSource
addFeatureListener
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
listener
- FeatureListenerpublic void removeFeatureListener(FeatureListener listener)
FeatureSource
removeFeatureListener
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
listener
- FeatureListenerpublic FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatures(Query query) throws java.io.IOException
FeatureSource
getFeatures
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
query
- a datasource query object. It encapsulates requested
information, such as typeName, maxFeatures and filter.
java.io.IOException
- For all data source errors.Query
public FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> getFeatures(org.opengis.filter.Filter filter) throws java.io.IOException
FeatureSource
getFeatures
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
filter
- An OpenGIS filter; specifies which features to retrieve.
null is not allowed, use Filter.INCLUDE instead.
java.io.IOException
- For all data source errors.public org.opengis.feature.simple.SimpleFeatureType getSchema()
FeatureSource
The schema returned is the LCD supported by all available Features. In the common case of shapfiles and database table this schema will match that of every feature available. In the degenerate GML case this will simply reflect the gml:AbstractFeatureType.
getSchema
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
public ReferencedEnvelope getBounds() throws java.io.IOException
FeatureSource
With getBounds(Query) this becomes a convenience method for getBounds(Query.ALL), that is the bounds for all features contained here.
If getBounds() returns null
due to expense consider using
getFeatures().getBounds()
as a an alternative.
getBounds
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
java.io.IOException
- if there are errors getting the bounding box.public ReferencedEnvelope getBounds(Query query) throws java.io.IOException
FeatureSource
To retrieve the bounds of the DataSource please use getBounds(
Query.ALL )
.
This method is needed if we are to stream features to a gml out, since a
FeatureCollection
If getBounds(Query) returns null
due to expense consider
using getFeatures(Query).getBounds()
as a an alternative.
getBounds
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
query
- Contains the Filter, and optionally MaxFeatures and StartIndex to
find the bounds for.
java.io.IOException
- DOCUMENT ME!public int getCount(Query query) throws java.io.IOException
FeatureSource
If getBounds(Query) returns -1
due to expense consider
using getFeatures(Query).getCount()
as a an alternative.
This method should take into account the Query's maxFeatures
and startIndex
, if present, in order to
consistently return the number of features the query would return.
getCount
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
query
- Contains the Filter, and optionally MaxFeatures and StartIndex to
find the count for.
-1
if count is too expensive to calculate or any errors or occur.
java.io.IOException
- if there are errors getting the countprotected FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reproject(FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features, org.opengis.referencing.crs.CoordinateReferenceSystem source, org.opengis.referencing.crs.CoordinateReferenceSystem target)
Subclasses may override, the default implementation wraps features in a
ReprojectingFeatureCollection
.
features
- The feature collection to be reprojected.
public java.util.Set getSupportedHints()
getSupportedHints
in interface FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
RenderingHints#Key
objects (eventually empty, never null).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |