public class GeoJSONFeatureSource extends ContentFeatureSource
entry, hints, lock, query, queryCapabilities, schema, transaction
Constructor and Description |
---|
GeoJSONFeatureSource(ContentEntry entry) |
GeoJSONFeatureSource(ContentEntry entry,
Query query) |
GeoJSONFeatureSource(GeoJSONDataStore datastore) |
GeoJSONFeatureSource(GeoJSONDataStore datastore,
Query query) |
Modifier and Type | Method and Description |
---|---|
protected SimpleFeatureType |
buildFeatureType()
Creates the feature type or schema for the feature source.
|
protected ReferencedEnvelope |
getBoundsInternal(Query query)
Calculates the bounds of a specified query.
|
protected int |
getCountInternal(Query query)
Calculates the number of features of a specified query.
|
GeoJSONDataStore |
getDataStore()
The datastore that this feature source originated from.
|
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getReaderInternal(Query query)
Subclass method for returning a native reader from the datastore.
|
protected boolean |
handleVisitor(Query query,
FeatureVisitor visitor)
Subclass method which allows subclasses to natively handle a visitor.
|
boolean |
isQuick() |
void |
setQuick(boolean quick) |
accepts, addFeatureListener, addHints, buildQueryCapabilities, canEvent, canFilter, canLimit, canLock, canOffset, canReproject, canRetype, canSort, canTransact, doLockInternal, doUnlockInternal, getAbsoluteSchema, getBounds, getBounds, getCount, getEntry, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getReader, getReader, getReader, getSchema, getState, getSupportedHints, getTransaction, getView, getView, isView, joinQuery, lockFeatures, lockFeatures, lockFeatures, processLock, removeFeatureListener, resolvePropertyNames, resolvePropertyNames, setFeatureLock, setTransaction, unLockFeatures, unLockFeatures, unLockFeatures
public GeoJSONFeatureSource(ContentEntry entry, Query query)
public GeoJSONFeatureSource(GeoJSONDataStore datastore)
public GeoJSONFeatureSource(GeoJSONDataStore datastore, Query query)
public GeoJSONFeatureSource(ContentEntry entry)
public GeoJSONDataStore getDataStore()
ContentFeatureSource
Subclasses may wish to extend this method in order to type narrow its return type.
getDataStore
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
getDataStore
in class ContentFeatureSource
FeatureSource
protected ReferencedEnvelope getBoundsInternal(Query query) throws IOException
ContentFeatureSource
null
.getBoundsInternal
in class ContentFeatureSource
IOException
protected int getCountInternal(Query query) throws IOException
ContentFeatureSource
getCountInternal
in class ContentFeatureSource
IOException
protected FeatureReader<SimpleFeatureType,SimpleFeature> getReaderInternal(Query query) throws IOException
ContentFeatureSource
It is important to note that if the native reader intends to handle any of the following natively:
true
:
ContentFeatureSource.canReproject()
- handles Query.getCoordinateSystemReproject()
internally.
Example would be PostGIS using Proj to handle reproejction internallyContentFeatureSource.canFilter()
- handles Query#getFilter() internally.getReaderInternal
in class ContentFeatureSource
IOException
protected SimpleFeatureType buildFeatureType() throws IOException
ContentFeatureSource
Implementations should use SimpleFeatureTypeBuilder
to build the feature type.
Also, the builder should be injected with the feature factory which has been set on the
DataStore (see ContentDataStore.getFeatureFactory()
. Example:
SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setFeatureTypeFactory( getDataStore().getFeatureTypeFactory() ); //build the feature type ...
buildFeatureType
in class ContentFeatureSource
IOException
protected boolean handleVisitor(Query query, FeatureVisitor visitor) throws IOException
ContentFeatureSource
Subclasses would override this method and return true in cases where the specific visitor could be handled without iterating over the entire result set of query. An example would be handling visitors that calculate aggregate values.
handleVisitor
in class ContentFeatureSource
query
- The query being made.visitor
- The visitor toIOException
public boolean isQuick()
public void setQuick(boolean quick)
quick
- the quick to setCopyright © 1996–2023 Geotools. All rights reserved.