public interface GeoName
| Modifier and Type | Field and Description |
|---|---|
static int |
OUT_OF_BOUNDS
sentinel value used in place of null when numeric value in
GeoNames record is not provided (see: geonameID, latitude,
longitude, population, elevation, digitalElevationModel)
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAdmin1Code()
Get the code for the first level administrative division (e.g.
|
String |
getAdmin2Code()
Get the code for the second level administrative division (e.g.
|
String |
getAdmin3Code()
Get the code for the third level administrative division.
|
String |
getAdmin4Code()
Get the code for the fourth level administrative division.
|
List<CountryCode> |
getAlternateCountryCodes()
Get the alternate ISO-3166 2-letter country codes.
|
List<String> |
getAlternateNames()
Get the alternate names for the location.
|
String |
getAncestryKey()
Get the ancestry key that can be used to identify this administrative division.
|
String |
getAsciiName()
Get the name of the geographical point in plain ascii characters.
|
int |
getDigitalElevationModel()
Get the digital elevation model, srtm3 or gtopo30, average
elevation of 3''x3'' (ca 90mx90m) or 30''x30'' (ca 900mx900m)
area in meters, integer.
|
int |
getElevation()
Get the elevation in meters.
|
FeatureClass |
getFeatureClass()
Get the major feature category.
|
FeatureCode |
getFeatureCode()
Get the feature code.
|
String |
getGazetteerRecord()
Get the gazetteer record for this GeoName.
|
String |
getGazetteerRecordWithAncestry()
Get the gazetteer records for this GeoName and its ancestors, separated
by newline characters.
|
int |
getGeonameID()
Get the ID of the record in geonames database.
|
double |
getLatitude()
Get the latitude in decimal degrees.
|
double |
getLongitude()
Get the longitude in decimal degrees.
|
Date |
getModificationDate()
Get the last modification date in the GeoNames database.
|
String |
getName()
Get the name of the geographical point (UTF-8).
|
GeoName |
getParent()
Get the parent of this GeoName.
|
String |
getParentAncestryKey()
Get the ancestry key that can be used to identify the direct administrative
parent of this GeoName.
|
Integer |
getParentId()
Get the ID of the parent of this GeoName.
|
long |
getPopulation()
Get the total number of inhabitants.
|
String |
getPreferredName()
Gets the preferred name of this GeoName, if configured,
otherwise returns the name.
|
CountryCode |
getPrimaryCountryCode()
Get the primary ISO-3166 2-letter country code.
|
String |
getPrimaryCountryName()
Get the name of the country associated with the primary country code.
|
TimeZone |
getTimezone()
Get the time zone for the geographical point.
|
boolean |
isAncestorOf(GeoName geoname)
Is this GeoName an ancestor of the provided GeoName?
|
boolean |
isAncestryResolved()
Check to see if the ancestry hierarchy has been completely resolved for this GeoName.
|
boolean |
isDescendantOf(GeoName geoname)
Is this GeoName a descendant of the provided GeoName?
|
boolean |
isTopLevelAdminDivision()
Is this GeoName a top-level administrative division (e.g.
|
boolean |
isTopLevelTerritory()
Is this GeoName a top-level territory? A GeoName is considered to be a
top-level territory if it is an A:TERR record and the name assigned to
its primary country code is either the name of the GeoName or one of its
configured alternate names.
|
boolean |
setParent(GeoName prnt)
Set the parent of this GeoName.
|
static final int OUT_OF_BOUNDS
String getPrimaryCountryName()
String getParentAncestryKey()
getAncestryKey() for a description
of an ancestry key.
For example, the GeoName "Reston, VA" is found in
the hierarchy:
getAncestryKey() for the GeoName "Fairfax County."null for top-level elements such as countriesString getAncestryKey()
null for all feature types except the following
FeatureClass.A records:
FeatureCode.PCL)FeatureCode.ADM1)FeatureCode.ADM2)FeatureCode.ADM3)FeatureCode.ADM4)null)null if this
GeoName is not an administrative division or its ancestry key cannot be derived.boolean isTopLevelAdminDivision()
true if this is a top-level administrative divisionboolean isTopLevelTerritory()
true if the GeoName is a top level territoryboolean isDescendantOf(GeoName geoname)
geoname - the GeoName to testtrue if the provided GeoName is hierarchically an ancestor of this GeoNameboolean isAncestorOf(GeoName geoname)
geoname - the GeoName to testtrue if this GeoName is hierarchically an ancestor of the provided GeoNameInteger getParentId()
GeoName getParent()
boolean setParent(GeoName prnt)
prnt - the parent; if provided, parent.getAncestryKey() must
match this.getParentAncestryKey(); null
is ignoredtrue if the parent was set, false if
the parent was not the valid parent for this GeoNameboolean isAncestryResolved()
true if all administrative parents have been resolvedint getGeonameID()
String getName()
String getAsciiName()
List<String> getAlternateNames()
String getPreferredName()
double getLatitude()
double getLongitude()
FeatureClass getFeatureClass()
FeatureCode getFeatureCode()
CountryCode getPrimaryCountryCode()
List<CountryCode> getAlternateCountryCodes()
String getAdmin1Code()
String getAdmin2Code()
String getAdmin3Code()
String getAdmin4Code()
long getPopulation()
int getElevation()
int getDigitalElevationModel()
TimeZone getTimezone()
nullDate getModificationDate()
nullString getGazetteerRecord()
String getGazetteerRecordWithAncestry()
Copyright © 2012–2016 Berico Technologies. All rights reserved.