public class GeocoderPreferences extends Object implements Preferences
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CLIENT_COORD_SYS_NAME
Default coordinate system is epsg:4326 (WGS 84)
|
static int |
DEFAULT_CORNER_OFFSET
Default corner offset is 7 meters
|
static DistanceUnit |
DEFAULT_CORNER_OFFSET_UNITS
Default offset unit is meters
|
static int |
DEFAULT_DISTANCE
Default search distance for reverse geocode is 150 meters.
|
static DistanceUnit |
DEFAULT_DISTANCE_UNITS
Default reverse geocode search distance unit is meters
|
static boolean |
DEFAULT_FALL_BACK_TO_GEOGRAPHIC
In street geocoding, when no street candidates are found, geocoder will attempt to return a
geographic centroid
|
static boolean |
DEFAULT_FALL_BACK_TO_POSTAL
In street geocoding, when no street candidates are found, geocoder will attempt to return a
postal centroid
|
static Locale |
DEFAULT_LOCALE
default locale is one in use
|
static MatchMode |
DEFAULT_MATCHMODE
By default, no match mode is specified
|
static int |
DEFAULT_MAX_RETURN_CANDIDATES
Defaults to return only a single matched candidate
|
static int |
DEFAULT_MAX_RETURN_RANGES
Defaults to return only a single address range per candidate
|
static int |
DEFAULT_STREET_OFFSET
Default street offset is 7 meters
|
static DistanceUnit |
DEFAULT_STREET_OFFSET_UNITS
Default offset unit is meters
|
static String |
FALLBACK_TO_WORLD |
static String |
SEARCH_WORLD_PLACES |
GEOHASH_LEVEL, H3HEX_RESOLUTION, KEY_CUSTOM_DICTIONARY_USAGE, PREFER_CUSTOM_DICTIONARIES, PREFER_POBOX_OVER_STREET, PREFER_STANDARD_DICTIONARIES, RETURN_GEOHASH, RETURN_H3HEX, RETURN_PARSED_INPUT, USE_CUSTOM_DICTIONARIES_ONLY, USE_STANDARD_DICTIONARIES_ONLY
Constructor and Description |
---|
GeocoderPreferences()
Constructs a new, empty preferences object
|
GeocoderPreferences(Preferences copyFrom)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomPreference(String key,
String value)
Allows a single custom key-value pair to be added to the preferences.
|
boolean |
equals(Object o) |
BoundingBox |
getBoundingBox() |
String |
getClientCoordSysName()
coordinate system to return points in, specified in teh "codespace:code" format.
|
Locale |
getClientLocale()
user input locale if specified.
|
String |
getClientLocaleString()
(non-Javadoc)
|
double |
getCornerOffset()
Used for interpolating the closest house number on a range.
|
DistanceUnit |
getCornerOffsetUnits()
Units for the corner offset
|
Map<String,String> |
getCustomPreferences()
The custom preferences allow input of String key-value pairs that represent custom geocoding
preferences.
|
double |
getDistance()
Defines the maximum distance to search for reverse geocode candidates.
|
DistanceUnit |
getDistanceUnits()
Units for the distance of the reverse geocode search distance defined with getDistance
|
MatchMode |
getMatchMode()
Returns the match mode
|
int |
getMaxReturnedCandidates()
Specifies the maximum number of candidates to be returned.
|
int |
getMaxReturnedRanges()
Specifies the maximum number of ranges to be returned per candidate.
|
int |
getMaxReturnedRangeUnits()
Maximum number of unit objects to be returned on a range.
|
FieldsMatching |
getMustMatchFields()
Allows you to specify what fields must match input in order for a candidate to be considered
close
|
com.mapinfo.midev.geometry.IPoint |
getPoint() |
List<String> |
getPreferredDictionaryOrder()
If a non empty list is returned, it contains the indexes of the dictionaries to be searched.
|
ReturnFieldsDescriptor |
getReturnFieldsDescriptor()
Allows you to select what parts of a candidate to return.
|
double |
getStreetOffset()
Used for interpolating the closest house number on a range.
|
DistanceUnit |
getStreetOffsetUnits()
Units for the street offset
|
int |
hashCode() |
boolean |
isFallbackToGeographic()
If true and an address level geocode fails to find a close candidate, wil attempt to find a
geographic centroid based on the input address.
|
boolean |
isFallbackToPostal()
If true and an address level geocode fails to find a close candidate, wil attempt to find a
postal centroid based on the input address.
|
boolean |
isReturnAllCandidateInfo()
If set to true, all available information will be returned for each candidate.
|
void |
setBoundingBox(BoundingBox boundingBox)
set the boundingBox
|
void |
setClientCoordSysName(String name)
Set coordinate system to return points in, using format "codespace:code".
|
void |
setClientLocale(Locale locale)
This method allows the user to specify their locale.
|
void |
setCornerOffset(double offset)
Used for interpolating the closest house number on a range.
|
void |
setCornerOffsetUnits(DistanceUnit units)
Units for the corner offset
|
void |
setCustomPreferences(Map<String,String> customPreferences)
Used to map of custom fields
|
void |
setDistance(double distance)
Defines the maximum distance to search for reverse geocode candidates.
|
void |
setDistanceUnits(DistanceUnit LinearUnits)
Units for the distance of the reverse geocode search distance defined with setDistance
|
void |
setFallbackToGeographic(boolean bFallback)
If true and an address level geocode fails to find a close candidate, wil attempt to find a
geographic centroid based on the input address.
|
void |
setFallbackToPostal(boolean bFallback)
If true and an address level geocode fails to find a close candidate, wil attempt to find a
postal centroid based on the input address.
|
void |
setMatchMode(MatchMode mode)
sets the match mode
|
void |
setMaxReturnedCandidates(int max)
Specifies the maximum number of candidates to be returned.
|
void |
setMaxReturnedRanges(int count)
Specifies the maximum number of ranges to be returned per candidate.
|
void |
setMaxReturnedRangeUnits(int count)
Set maximum number of unit objects to be returned on a range.
|
void |
setMustMatchFields(FieldsMatching mustMatchFields)
Allows you to specify what fields must match input in order for a candidate to be considered
close
|
void |
setPoint(com.mapinfo.midev.geometry.IPoint point)
set the origin point
|
void |
setPreferredDictionaryOrder(List<String> orderedList)
For countries with more than one configured dictionary, this method allows the user to define
the priorities of the dictionaries and also exclude specific configured dictionaries from the
search.
|
void |
setReturnAllCandidateInfo(boolean bAll)
If set to true, all available information will be returned for each candidate.
|
void |
setReturnFieldsDescriptor(ReturnFieldsDescriptor descriptor)
Allows you to select what parts of a candidate to return.
|
void |
setStreetOffset(double offset)
Used for interpolating the closest house number on a range.
|
void |
setStreetOffsetUnits(DistanceUnit units)
Units for the street offset
|
String |
toString() |
public static final boolean DEFAULT_FALL_BACK_TO_GEOGRAPHIC
public static final boolean DEFAULT_FALL_BACK_TO_POSTAL
public static final int DEFAULT_MAX_RETURN_CANDIDATES
public static final int DEFAULT_MAX_RETURN_RANGES
public static final int DEFAULT_STREET_OFFSET
public static final int DEFAULT_CORNER_OFFSET
public static final int DEFAULT_DISTANCE
public static final MatchMode DEFAULT_MATCHMODE
public static final Locale DEFAULT_LOCALE
public static final DistanceUnit DEFAULT_STREET_OFFSET_UNITS
public static final DistanceUnit DEFAULT_CORNER_OFFSET_UNITS
public static final DistanceUnit DEFAULT_DISTANCE_UNITS
public static final String DEFAULT_CLIENT_COORD_SYS_NAME
public static final String FALLBACK_TO_WORLD
public static final String SEARCH_WORLD_PLACES
public GeocoderPreferences()
public GeocoderPreferences(Preferences copyFrom)
copyFrom
- object to copy preferences frompublic Locale getClientLocale()
Preferences
getClientLocale
in interface Preferences
public void setClientLocale(Locale locale)
Preferences
setClientLocale
in interface Preferences
locale
- the localepublic String getClientCoordSysName()
Preferences
getClientCoordSysName
in interface Preferences
public void setClientCoordSysName(String name)
Preferences
setClientCoordSysName
in interface Preferences
name
- requested coordinate systempublic int getMaxReturnedRangeUnits()
Preferences
getMaxReturnedRangeUnits
in interface Preferences
public void setMaxReturnedRangeUnits(int count)
Preferences
setMaxReturnedRangeUnits
in interface Preferences
count
- maximum units to returnpublic double getStreetOffset()
Preferences
getStreetOffset
in interface Preferences
public void setStreetOffset(double offset)
Preferences
setStreetOffset
in interface Preferences
offset
- The street offset used to interpolate house numbers.public double getCornerOffset()
Preferences
getCornerOffset
in interface Preferences
public void setCornerOffset(double offset)
Preferences
setCornerOffset
in interface Preferences
offset
- The corner offset used to interpolate house numbers.public DistanceUnit getStreetOffsetUnits()
Preferences
getStreetOffsetUnits
in interface Preferences
public void setStreetOffsetUnits(DistanceUnit units)
Preferences
setStreetOffsetUnits
in interface Preferences
units
- units for the street offsetpublic DistanceUnit getCornerOffsetUnits()
Preferences
getCornerOffsetUnits
in interface Preferences
public void setCornerOffsetUnits(DistanceUnit units)
Preferences
setCornerOffsetUnits
in interface Preferences
units
- units for the corner offsetpublic boolean isReturnAllCandidateInfo()
Preferences
isReturnAllCandidateInfo
in interface Preferences
public void setReturnAllCandidateInfo(boolean bAll)
Preferences
setReturnAllCandidateInfo
in interface Preferences
bAll
- true to return all available information on a candidatepublic ReturnFieldsDescriptor getReturnFieldsDescriptor()
Preferences
getReturnFieldsDescriptor
in interface Preferences
public void setReturnFieldsDescriptor(ReturnFieldsDescriptor descriptor)
Preferences
setReturnFieldsDescriptor
in interface Preferences
descriptor
- return fields objectpublic List<String> getPreferredDictionaryOrder()
Preferences
getPreferredDictionaryOrder
in interface Preferences
public void setPreferredDictionaryOrder(List<String> orderedList)
Preferences
setPreferredDictionaryOrder
in interface Preferences
orderedList
- list containing strings indexes describing order and dictionaries to be
searchedpublic Map<String,String> getCustomPreferences()
Preferences
getCustomPreferences
in interface Preferences
public void setCustomPreferences(Map<String,String> customPreferences)
Preferences
setCustomPreferences
in interface Preferences
customPreferences
- map of custom fieldspublic void addCustomPreference(String key, String value)
Preferences
addCustomPreference
in interface Preferences
key
- this preference must be defined and understood by the target geocodervalue
- the value to be inputpublic int getMaxReturnedRanges()
Preferences
getMaxReturnedRanges
in interface Preferences
public void setMaxReturnedRanges(int count)
Preferences
setMaxReturnedRanges
in interface Preferences
count
- number of ranges to returnpublic boolean isFallbackToGeographic()
Preferences
isFallbackToGeographic
in interface Preferences
public void setFallbackToGeographic(boolean bFallback)
Preferences
setFallbackToGeographic
in interface Preferences
bFallback
- true to turn fallback onpublic boolean isFallbackToPostal()
Preferences
isFallbackToPostal
in interface Preferences
public void setFallbackToPostal(boolean bFallback)
Preferences
setFallbackToPostal
in interface Preferences
bFallback
- true to turn fallback onpublic int getMaxReturnedCandidates()
Preferences
getMaxReturnedCandidates
in interface Preferences
public void setMaxReturnedCandidates(int max)
Preferences
setMaxReturnedCandidates
in interface Preferences
max
- number of candidates to returnpublic FieldsMatching getMustMatchFields()
Preferences
getMustMatchFields
in interface Preferences
public void setMustMatchFields(FieldsMatching mustMatchFields)
Preferences
setMustMatchFields
in interface Preferences
mustMatchFields
- fields to matchpublic MatchMode getMatchMode()
Preferences
getMatchMode
in interface Preferences
public void setMatchMode(MatchMode mode)
Preferences
setMatchMode
in interface Preferences
mode
- mode to setpublic BoundingBox getBoundingBox()
getBoundingBox
in interface Preferences
public void setBoundingBox(BoundingBox boundingBox)
Preferences
setBoundingBox
in interface Preferences
boundingBox
- - boundary to constrain sugguested resultspublic com.mapinfo.midev.geometry.IPoint getPoint()
getPoint
in interface Preferences
public void setPoint(com.mapinfo.midev.geometry.IPoint point)
Preferences
setPoint
in interface Preferences
point
- - Origin point used for constraining suggested resultspublic double getDistance()
Preferences
getDistance
in interface Preferences
public void setDistance(double distance)
Preferences
setDistance
in interface Preferences
distance
- The radius to search for a reverse geocode address.public DistanceUnit getDistanceUnits()
Preferences
getDistanceUnits
in interface Preferences
public void setDistanceUnits(DistanceUnit LinearUnits)
Preferences
setDistanceUnits
in interface Preferences
LinearUnits
- units for the reverse geocode search distancepublic String getClientLocaleString()
getClientLocaleString
in interface Preferences
Preferences
Copyright © 2024. All rights reserved.