OUT_OF_BOUNDS| Constructor and Description |
|---|
BasicGeoName(int geonameID,
String name,
String asciiName,
List<String> alternateNames,
String preferredName,
Double latitude,
Double longitude,
FeatureClass featureClass,
FeatureCode featureCode,
CountryCode primaryCountryCode,
List<CountryCode> alternateCountryCodes,
String admin1Code,
String admin2Code,
String admin3Code,
String admin4Code,
Long population,
Integer elevation,
Integer digitalElevationModel,
TimeZone timezone,
Date modificationDate,
String gazetteerRecord)
Sole constructor for
BasicGeoName class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
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.
|
int |
hashCode() |
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.
|
static GeoName |
parseFromGeoNamesRecord(String inputLine)
Builds a
BasicGeoName object based on a single gazetteer
record in the GeoNames geographical database. |
static GeoName |
parseFromGeoNamesRecord(String inputLine,
String preferredName)
Builds a
BasicGeoName object based on a single gazetteer
record in the GeoNames geographical database. |
boolean |
setParent(GeoName prnt)
Set the parent of this GeoName.
|
String |
toString()
For pretty-printing.
|
public BasicGeoName(int geonameID,
String name,
String asciiName,
List<String> alternateNames,
String preferredName,
Double latitude,
Double longitude,
FeatureClass featureClass,
FeatureCode featureCode,
CountryCode primaryCountryCode,
List<CountryCode> alternateCountryCodes,
String admin1Code,
String admin2Code,
String admin3Code,
String admin4Code,
Long population,
Integer elevation,
Integer digitalElevationModel,
TimeZone timezone,
Date modificationDate,
String gazetteerRecord)
BasicGeoName class.
Encapsulates a gazetteer record from the GeoNames database.geonameID - unique identifiername - name of this locationasciiName - plain text version of namealternateNames - list of alternate names, if anypreferredName - the preferred name, if knownlatitude - lat coordlongitude - lon coordfeatureClass - general type of feature (e.g., "Populated place")featureCode - specific type of feature (e.g., "capital of a political entity")primaryCountryCode - ISO country codealternateCountryCodes - list of alternate country codes, if any (i.e., disputed territories)admin1Code - FIPS code for first-level administrative subdivision (e.g., state or province)admin2Code - second-level administrative subdivision (e.g., county)admin3Code - third-level administrative subdivisionadmin4Code - fourth-level administrative subdivisionpopulation - number of inhabitantselevation - elevation in metersdigitalElevationModel - another way to measure elevationtimezone - timezone for this locationmodificationDate - date of last modification for the GeoNames recordgazetteerRecord - the gazetteer recordpublic String getPrimaryCountryName()
GeoNamegetPrimaryCountryName in interface GeoNamepublic static GeoName parseFromGeoNamesRecord(String inputLine)
BasicGeoName object based on a single gazetteer
record in the GeoNames geographical database.inputLine - single line of tab-delimited text representing one record from the GeoNames gazetteerpublic static GeoName parseFromGeoNamesRecord(String inputLine, String preferredName)
BasicGeoName object based on a single gazetteer
record in the GeoNames geographical database.inputLine - single line of tab-delimited text representing one record from the GeoNames gazetteerpreferredName - the preferred name of this GeoName as indicated by the GeoNames alternate names tablepublic String getParentAncestryKey()
GeoNameGeoName.getAncestryKey() for a description
of an ancestry key.
For example, the GeoName "Reston, VA" is found in
the hierarchy:
GeoName.getAncestryKey() for the GeoName "Fairfax County."getParentAncestryKey in interface GeoNamenull for top-level elements such as countriespublic String getAncestryKey()
GeoNamenull for all feature types except the following
FeatureClass.A records:
FeatureCode.PCL)FeatureCode.ADM1)FeatureCode.ADM2)FeatureCode.ADM3)FeatureCode.ADM4)null)getAncestryKey in interface GeoNamenull if this
GeoName is not an administrative division or its ancestry key cannot be derived.public boolean isTopLevelAdminDivision()
GeoNameisTopLevelAdminDivision in interface GeoNametrue if this is a top-level administrative divisionpublic boolean isTopLevelTerritory()
GeoNameisTopLevelTerritory in interface GeoNametrue if the GeoName is a top level territorypublic boolean isDescendantOf(GeoName geoname)
GeoNameisDescendantOf in interface GeoNamegeoname - the GeoName to testtrue if the provided GeoName is hierarchically an ancestor of this GeoNamepublic boolean isAncestorOf(GeoName geoname)
GeoNameisAncestorOf in interface GeoNamegeoname - the GeoName to testtrue if this GeoName is hierarchically an ancestor of the provided GeoNamepublic GeoName getParent()
GeoNamepublic boolean setParent(GeoName prnt)
GeoNamepublic Integer getParentId()
GeoNamegetParentId in interface GeoNamepublic boolean isAncestryResolved()
GeoNameisAncestryResolved in interface GeoNametrue if all administrative parents have been resolvedpublic int getGeonameID()
GeoNamegetGeonameID in interface GeoNamepublic String getName()
GeoNamepublic String getAsciiName()
GeoNamegetAsciiName in interface GeoNamepublic List<String> getAlternateNames()
GeoNamegetAlternateNames in interface GeoNamepublic String getPreferredName()
GeoNamegetPreferredName in interface GeoNamepublic double getLatitude()
GeoNamegetLatitude in interface GeoNamepublic double getLongitude()
GeoNamegetLongitude in interface GeoNamepublic FeatureClass getFeatureClass()
GeoNamegetFeatureClass in interface GeoNamepublic FeatureCode getFeatureCode()
GeoNamegetFeatureCode in interface GeoNamepublic CountryCode getPrimaryCountryCode()
GeoNamegetPrimaryCountryCode in interface GeoNamepublic List<CountryCode> getAlternateCountryCodes()
GeoNamegetAlternateCountryCodes in interface GeoNamepublic String getAdmin1Code()
GeoNamegetAdmin1Code in interface GeoNamepublic String getAdmin2Code()
GeoNamegetAdmin2Code in interface GeoNamepublic String getAdmin3Code()
GeoNamegetAdmin3Code in interface GeoNamepublic String getAdmin4Code()
GeoNamegetAdmin4Code in interface GeoNamepublic long getPopulation()
GeoNamegetPopulation in interface GeoNamepublic int getElevation()
GeoNamegetElevation in interface GeoNamepublic int getDigitalElevationModel()
GeoNamegetDigitalElevationModel in interface GeoNamepublic TimeZone getTimezone()
GeoNamegetTimezone in interface GeoNamenullpublic Date getModificationDate()
GeoNamegetModificationDate in interface GeoNamenullpublic String getGazetteerRecord()
GeoNamegetGazetteerRecord in interface GeoNamepublic String getGazetteerRecordWithAncestry()
GeoNamegetGazetteerRecordWithAncestry in interface GeoNameCopyright © 2012–2016 Berico Technologies. All rights reserved.