org.opengts.geocoder.nominatim
Class Nominatim

java.lang.Object
  extended by org.opengts.geocoder.ReverseGeocodeProviderAdapter
      extended by org.opengts.geocoder.nominatim.Nominatim
All Implemented Interfaces:
ReverseGeocodeProvider

public class Nominatim
extends ReverseGeocodeProviderAdapter
implements ReverseGeocodeProvider


Field Summary
protected static java.lang.String ATTR_osm_type
           
protected static java.lang.String ENCODING_UTF8
           
protected static java.lang.String HOST_MAPQUEST
           
protected static java.lang.String HOST_OPENSTREETMAP
           
protected static java.lang.String HOST_PRIMARY
           
protected static java.lang.String PROP_addressdetails
           
protected static java.lang.String PROP_email
           
protected static java.lang.String PROP_hostName
           
protected static java.lang.String PROP_reverseURL
           
protected static java.lang.String PROP_useResultAddress
           
protected static java.lang.String PROP_zoom
           
protected static java.lang.String TAG_addressparts
           
protected static java.lang.String TAG_bar
           
protected static java.lang.String TAG_city
           
protected static java.lang.String TAG_country
           
protected static java.lang.String TAG_country_code
           
protected static java.lang.String TAG_county
           
protected static java.lang.String TAG_fast_food
           
protected static java.lang.String TAG_hamlet
           
protected static java.lang.String TAG_house
           
protected static java.lang.String TAG_postcode
           
protected static java.lang.String TAG_residential
           
protected static java.lang.String TAG_result
           
protected static java.lang.String TAG_reversegeocode
           
protected static java.lang.String TAG_road
           
protected static java.lang.String TAG_state
           
protected static java.lang.String TAG_state_district
           
protected static java.lang.String TAG_suburb
           
protected static java.lang.String TAG_town
           
protected static java.lang.String TAG_tram
           
protected static java.lang.String TAG_village
           
 
Fields inherited from class org.opengts.geocoder.ReverseGeocodeProviderAdapter
_PROP_isEnabled, DEFAULT_MAX_FAILOVER_SECONDS, MIN_FAILOVER_SECONDS, PROP_alwaysFast, PROP_maxFailoverSeconds, PROP_ReverseGeocodeProvider_
 
Constructor Summary
Nominatim(java.lang.String name, java.lang.String key, RTProperties rtProps)
          Constructor
 
Method Summary
 ReverseGeocode getReverseGeocode(GeoPoint gp, java.lang.String localeStr, boolean cache)
          Returns a ReverseGeocode instance for the specified GeoPoint
 java.lang.String getSubdivision(GeoPoint gp)
           
 boolean isFastOperation()
          Returns true if locally resolved, false otherwise.
static void main(java.lang.String[] argv)
          Main entery point for debugging/testing
 
Methods inherited from class org.opengts.geocoder.ReverseGeocodeProviderAdapter
_getUserPass, _main, getAuthorization, getFailoverReverseGeocodeProvider, getFailoverReverseGeocodeProviderName, getMaximumFailoverElapsedSec, getName, getPassword, getProperties, getUsername, hasFailoverReverseGeocodeProvider, isEnabled, isReverseGeocodeFailoverMode, setAuthorization, setFailoverReverseGeocodeProvider, setName, setProperties, startReverseGeocodeFailoverMode, startReverseGeocodeFailoverMode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengts.geocoder.ReverseGeocodeProvider
getFailoverReverseGeocodeProvider, getName, isEnabled, setFailoverReverseGeocodeProvider
 

Field Detail

TAG_reversegeocode

protected static final java.lang.String TAG_reversegeocode
See Also:
Constant Field Values

TAG_result

protected static final java.lang.String TAG_result
See Also:
Constant Field Values

TAG_addressparts

protected static final java.lang.String TAG_addressparts
See Also:
Constant Field Values

TAG_bar

protected static final java.lang.String TAG_bar
See Also:
Constant Field Values

TAG_fast_food

protected static final java.lang.String TAG_fast_food
See Also:
Constant Field Values

TAG_house

protected static final java.lang.String TAG_house
See Also:
Constant Field Values

TAG_tram

protected static final java.lang.String TAG_tram
See Also:
Constant Field Values

TAG_road

protected static final java.lang.String TAG_road
See Also:
Constant Field Values

TAG_residential

protected static final java.lang.String TAG_residential
See Also:
Constant Field Values

TAG_village

protected static final java.lang.String TAG_village
See Also:
Constant Field Values

TAG_town

protected static final java.lang.String TAG_town
See Also:
Constant Field Values

TAG_city

protected static final java.lang.String TAG_city
See Also:
Constant Field Values

TAG_county

protected static final java.lang.String TAG_county
See Also:
Constant Field Values

TAG_postcode

protected static final java.lang.String TAG_postcode
See Also:
Constant Field Values

TAG_hamlet

protected static final java.lang.String TAG_hamlet
See Also:
Constant Field Values

TAG_suburb

protected static final java.lang.String TAG_suburb
See Also:
Constant Field Values

TAG_state

protected static final java.lang.String TAG_state
See Also:
Constant Field Values

TAG_state_district

protected static final java.lang.String TAG_state_district
See Also:
Constant Field Values

TAG_country

protected static final java.lang.String TAG_country
See Also:
Constant Field Values

TAG_country_code

protected static final java.lang.String TAG_country_code
See Also:
Constant Field Values

ATTR_osm_type

protected static final java.lang.String ATTR_osm_type
See Also:
Constant Field Values

PROP_reverseURL

protected static final java.lang.String PROP_reverseURL
See Also:
Constant Field Values

PROP_hostName

protected static final java.lang.String PROP_hostName
See Also:
Constant Field Values

PROP_zoom

protected static final java.lang.String PROP_zoom
See Also:
Constant Field Values

PROP_addressdetails

protected static final java.lang.String PROP_addressdetails
See Also:
Constant Field Values

PROP_email

protected static final java.lang.String PROP_email
See Also:
Constant Field Values

PROP_useResultAddress

protected static final java.lang.String PROP_useResultAddress
See Also:
Constant Field Values

HOST_OPENSTREETMAP

protected static java.lang.String HOST_OPENSTREETMAP

HOST_MAPQUEST

protected static java.lang.String HOST_MAPQUEST

HOST_PRIMARY

protected static java.lang.String HOST_PRIMARY

ENCODING_UTF8

protected static final java.lang.String ENCODING_UTF8
See Also:
Constant Field Values
Constructor Detail

Nominatim

public Nominatim(java.lang.String name,
                 java.lang.String key,
                 RTProperties rtProps)
Constructor

Parameters:
name - The name assigned to this ReverseGeocodeProvider
key - The optional authorization key
rtProps - The properties associated with this ReverseGeocodeProvider
Method Detail

isFastOperation

public boolean isFastOperation()
Returns true if locally resolved, false otherwise. (ie. remote address resolution takes more than 20ms to complete)

Specified by:
isFastOperation in interface ReverseGeocodeProvider
Overrides:
isFastOperation in class ReverseGeocodeProviderAdapter
Returns:
true if locally resolved, false otherwise.

getReverseGeocode

public ReverseGeocode getReverseGeocode(GeoPoint gp,
                                        java.lang.String localeStr,
                                        boolean cache)
Returns a ReverseGeocode instance for the specified GeoPoint

Specified by:
getReverseGeocode in interface ReverseGeocodeProvider
Specified by:
getReverseGeocode in class ReverseGeocodeProviderAdapter
Parameters:
gp - The GeoPoint
Returns:
The ReverseGeocode instance

getSubdivision

public java.lang.String getSubdivision(GeoPoint gp)

main

public static void main(java.lang.String[] argv)
Main entery point for debugging/testing