Class GeocodeParameters
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.geocode.GeocodeParameters
-
public final class GeocodeParameters extends Object
Holds parameters to be passed to geocode operations.
-
-
Constructor Summary
Constructors Constructor Description GeocodeParameters()
Constructs a GeocodeParameters with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCategories()
Gets a mutable list of categories used to filter the results of the geocode operation.String
getCountryCode()
Gets the country code used to filter the results of the geocode operation.int
getMaxResults()
Gets the maximum number of results to be returned by the geocode operation.double
getMinScore()
Gets the minimum score used to filter the results of the geocode operation.String
getOutputLanguageCode()
Gets the language code to be requested in the geocode operation.SpatialReference
getOutputSpatialReference()
Gets the spatial reference to be used for coordinates returned in the GeocodeResults.Point
getPreferredSearchLocation()
Gets the preferred search location.List<String>
getResultAttributeNames()
Gets a mutable list of the names of attributes to be returned in the GeocodeResults.Geometry
getSearchArea()
Gets the search area used to filter the results of the geocode operation.boolean
isForStorage()
Gets the value of the forStorage flag.void
setCountryCode(String countryCode)
Sets the country code used to filter the results of the geocode operation.void
setForStorage(boolean forStorage)
Sets the value of the forStorage flag.void
setMaxResults(int maxResults)
Sets the maximum number of results to be returned by the geocode operation.void
setMinScore(double minScore)
Sets the minimum score used to filter the results of the geocode operation.void
setOutputLanguageCode(String languageCode)
Sets the language code to be requested in the geocode operation.void
setOutputSpatialReference(SpatialReference outputSpatialReference)
Sets the spatial reference to be used for coordinates returned in the GeocodeResults.void
setPreferredSearchLocation(Point preferredSearchLocation)
Sets the preferred search location.void
setSearchArea(Geometry searchArea)
Sets the search area used to filter the results of the geocode operation.
-
-
-
Method Detail
-
getResultAttributeNames
public List<String> getResultAttributeNames()
Gets a mutable list of the names of attributes to be returned in the GeocodeResults. Initially this is an empty list which means no attributes will be returned. Add names to this list for each attribute to be returned, or add "*" for all attributes to be returned.- Returns:
- the list of attribute names to be returned
- Since:
- 100.0.0
- See Also:
GeocodeResult.getAttributes()
-
getCategories
public List<String> getCategories()
Gets a mutable list of categories used to filter the results of the geocode operation. Initially this is an empty list which means no category filtering is done. Add entries to this list for each category for which results are required. Categories represent address and place types, for example "city", "school", "Ski Resort".- Returns:
- the list of categories used to filter geocode results
- Since:
- 100.0.0
-
getCountryCode
public String getCountryCode()
Gets the country code used to filter the results of the geocode operation.- Returns:
- the country code, or an empty String if none has been set
- Since:
- 100.0.0
-
setCountryCode
public void setCountryCode(String countryCode)
Sets the country code used to filter the results of the geocode operation. By default no such filtering is done.- Parameters:
countryCode
- the country code- Since:
- 100.0.0
-
isForStorage
public boolean isForStorage()
Gets the value of the forStorage flag. This specifies whether the results of the geocode operation will be persisted.- Returns:
- true if the results of the geocode operation will be persisted, false otherwise
- Since:
- 100.0.0
-
setForStorage
public void setForStorage(boolean forStorage)
Sets the value of the forStorage flag. This specifies whether the results of the geocode operation will be persisted. The default value is false, which indicates the results of the operation can't be stored, but they can be temporarily displayed on a map for instance. If you store the results, in a database for example, you need to set this parameter to true.- Parameters:
forStorage
- true if the results of the geocode operation will be persisted, false otherwise- Since:
- 100.0.0
-
getMaxResults
public int getMaxResults()
Gets the maximum number of results to be returned by the geocode operation.- Returns:
- the maximum number of results
- Since:
- 100.0.0
-
setMaxResults
public void setMaxResults(int maxResults)
Sets the maximum number of results to be returned by the geocode operation. By default all matching results are returned unless limited by the geocode service.- Parameters:
maxResults
- the maximum number of results- Since:
- 100.0.0
-
getMinScore
public double getMinScore()
Gets the minimum score used to filter the results of the geocode operation.Note: minimum score is not supported by online geocoding services.
- Returns:
- the minimum score, in the range [0..100], or 0 if none has been set
- Since:
- 100.0.0
-
setMinScore
public void setMinScore(double minScore)
Sets the minimum score used to filter the results of the geocode operation. The default value is 0.Note: minimum score is not supported by online geocoding services.
- Parameters:
minScore
- the minimum score, in the range [0..100]- Since:
- 100.0.0
-
getOutputLanguageCode
public String getOutputLanguageCode()
Gets the language code to be requested in the geocode operation. Results will be returned in this language if it is available.- Returns:
- a two-digit language code, for example "FR" for French, or an empty String if none has been set
- Since:
- 100.0.0
-
setOutputLanguageCode
public void setOutputLanguageCode(String languageCode)
Sets the language code to be requested in the geocode operation. Results will be returned in this language if it is available. By default no particular language is requested.- Parameters:
languageCode
- a two-digit language code, for example "FR" for French- Since:
- 100.0.0
-
getOutputSpatialReference
public SpatialReference getOutputSpatialReference()
Gets the spatial reference to be used for coordinates returned in the GeocodeResults.- Returns:
- the output spatial reference, or null if none has been set
- Since:
- 100.0.0
-
setOutputSpatialReference
public void setOutputSpatialReference(SpatialReference outputSpatialReference)
Sets the spatial reference to be used for coordinates returned in the GeocodeResults. By default the output spatial reference is determined by the geocode service.- Parameters:
outputSpatialReference
- the spatial reference for output coordinates- Since:
- 100.0.0
- See Also:
GeocodeResult.getDisplayLocation()
,GeocodeResult.getInputLocation()
,GeocodeResult.getRouteLocation()
,GeocodeResult.getExtent()
-
getPreferredSearchLocation
public Point getPreferredSearchLocation()
Gets the preferred search location.- Returns:
- the preferred search location point, or null if none has been set
- Since:
- 100.0.0
-
setPreferredSearchLocation
public void setPreferredSearchLocation(Point preferredSearchLocation)
Sets the preferred search location. This defines an origin point location that is used to sort the GeocodeResults based on their proximity to the location. The priority of results within a radius of 50000 meters is boosted relative to those outside that radius. By default no preferred search location is set.- Parameters:
preferredSearchLocation
- the preferred search location point- Throws:
IllegalArgumentException
- if preferredSearchLocation is null- Since:
- 100.0.0
-
getSearchArea
public Geometry getSearchArea()
Gets the search area used to filter the results of the geocode operation. This is a bounding rectangle outside which results are not returned.- Returns:
- a Geometry specifying the search area, or null if none has been set
- Since:
- 100.0.0
-
setSearchArea
public void setSearchArea(Geometry searchArea)
Sets the search area used to filter the results of the geocode operation. This is a bounding rectangle outside which results are not returned. By default no preferred search area is set.- Parameters:
searchArea
- a Geometry specifying the search area- Throws:
IllegalArgumentException
- if searchArea is null- Since:
- 100.0.0
-
-