Package com.massifmaps.search
Class FeatureCollectionSearchService
java.lang.Object
com.massifmaps.search.FeatureCollectionSearchService
A search service for finding features from a specified feature collection.
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureCollectionSearchService(Projection projection, FeatureCollection featureCollection) Constructs a FeatureCollectionSearchService for given feature collection. -
Method Summary
Modifier and TypeMethodDescriptionfindFeatures(SearchRequest request) Searches for the features specified by search request from the feature collection bound to the service.Returns the feature collection of the search service.intReturns the maximum number of results the search service returns.Returns the projection of the feature collection of the search service.voidsetMaxResults(int maxResults) Sets the maximum number of results the search service returns.
The default number of results is 1000.
-
Constructor Details
-
FeatureCollectionSearchService
Constructs a FeatureCollectionSearchService for given feature collection.- Parameters:
projection- The projection to use for the feature collection.featureCollection- The feature collection to search from.
-
-
Method Details
-
getProjection
Returns the projection of the feature collection of the search service.- Returns:
- The projection of the feature collection of the search service.
-
getFeatureCollection
Returns the feature collection of the search service.- Returns:
- The feature collection of the search service.
-
getMaxResults
public int getMaxResults()Returns the maximum number of results the search service returns.- Returns:
- The maximum number of results the search service returns.
-
setMaxResults
public void setMaxResults(int maxResults) Sets the maximum number of results the search service returns.
The default number of results is 1000.- Parameters:
maxResults- The new maximum number of results the geocoding service returns.
-
findFeatures
Searches for the features specified by search request from the feature collection bound to the service.- Parameters:
request- The search request containing search filters.- Returns:
- The resulting feature collection containing features matching the request.
-