primaryLangID
When lang ID will do. see primaryLanguage() if Language object is desired.
- Parameters:
cc- Country code- Returns:
- Lang ID
protected voidstatic intapproximateLongitudeForUTCOffset(int utc) countriesInDSTOffset(double dst) countriesInUTCOffset(double utc) countriesSpeaking(String lang) booleancountrySpeaks(String lang,
String cc) getAdmin1Place(String cc,
String adm1) getAdmin1PlaceByHASC(String path) getCountry(String isocode) getCountryByFIPS(String fips) getDefaultCountryName(String cc_iso2) static StringgetFeatureDesignation(String cls,
String code) getFeatureName(String cls,
String code) static Stringstatic Stringprotected static StringgetProvince(String cc,
String adm1) static booleanisAbbreviation(char name_type) static booleanstatic booleanstatic booleanstatic booleanstatic booleanisAdministrative(String featClass) static booleanisAdministrative(String featClass,
String featCode) static booleanisCode(char name_type) static booleanstatic booleanstatic booleanstatic booleanstatic booleanisName(char name_type) static booleanisNationalCapital(String featCode) static booleanstatic booleanisPoliticalEntity(String featCode) static booleanstatic booleanisPopulated(String featClass) static booleanstatic booleanbooleanisPrimaryLanguage(String lang,
String cc) static booleanstatic booleanisUpperAdminLevel(String featCode) static booleanvoidloadMajorCities(InputStream strm) loadMajorCities(String resourcePath) voidvoidmapMajorCityIDs(List<Place> cities) mapPopulationByLocation(List<Place> cities) mapPopulationByLocation(List<Place> cities,
int ghResolution) static Stringstatic StringprimaryLangID(String cc) IOException - if metadata files are not found or do not load.c - country namecls - feature class, e.g., Pcode - feature code, e.g., PPLutc - UTC offsettz - TZ nameutc - offset in decimal hoursdst - DST offsetresourcePath - CLASSPATH location of a resource.IOException - if resource file is not foundcities - arra of Place objectscities - list of major citiescities - list of major citiesghResolution - number of geohash chars in prefix, for keys in map.
Higher resolution means
finer geohash gridSchema: http://download.geonames.org/export/dump/ pass in the files formatted in geonames.org format, and named citiesNNNN.zip (.txt) where NNNN is the population threshold.
strm - input stream for geonames.org cities fileIOException - if parsing goes wrong.IOException - if geonames.org table cannot be found in classpathcc - ISO country codeadm1 - ISO province codegetAdmin1Place(String, String)cc - country codeadm1 - ADM level 1 codepath - hierarchical pathTODO: This is mildly informed by geonames.org, however even there we are still missing a mapping between ADM1 FIPS/ISO codes for a state and the Postal codes/abbreviations. Aliases for the same US province: "US.25" = "MA" = "US.MA" = "Massachussetts" = "the Bay State" Easily mapping the coded data (e.g., 'MA' = '25') worldwide would be helpful. TODO: Make use of geonames.org or other sources for ADM1 postal code listings at top level.
IOException - if CSV file not found in classpathcc_iso2 - country code.isocode - ISO codecc - country code from any standard.fips - FIPS codefips - FIPS codev - admin codeCC.ADM1.ADM2.ADM3... etc. for example: 'US.48.201' ... some county in Texas.
c - country codeadm1 - ADM1 codenm - country namename_type - codename_type - OpenSextant codefeatCode - feat code or designationfeatCode - featCode - feature codefeatCode - featCode - feature codep - placep - placep - Placep - placep - placefeatClass - feature type in questionfeatClass - featCode - featClass - geonames feature class, e.g., A, P, H, L, V, T, Rlang - mixed case langID or langID+Locale.cc - UPPERCASE country code.lang - Lang IDcc - Country codecc - Country codecc - Country codelang - lang IDcc - UPPERCASE country code.IOException - if geonames.org resource file is not foundlangOrLocale - lang codecc - country codelangid - lang ID