Geoname

data class Geoname(var geonameId: Long, var name: String, var latitude: Double, var longitude: Double, var countryCode: String, var admin1Code: String, var population: ULong)

A single geographic place.

This corresponds to a single row in the main "geoname" table described in the GeoNames documentation 1. We exclude fields we don't need.

Constructors

Link copied to clipboard
constructor(geonameId: Long, name: String, latitude: Double, longitude: Double, countryCode: String, admin1Code: String, population: ULong)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The top-level administrative region for the place within its country, like a state or province. For the U.S., the two-letter uppercase state abbreviation.

Link copied to clipboard

ISO-3166 two-letter uppercase country code, e.g., "US".

Link copied to clipboard

The geonameid straight from the geoname table.

Link copied to clipboard

Latitude in decimal degrees.

Link copied to clipboard

Longitude in decimal degrees.

Link copied to clipboard

This is pretty much the place's canonical name. Usually there will be a row in the alternates table with the same name, but not always. When there is such a row, it doesn't always have is_preferred_name set, and in fact fact there may be another row with a different name with is_preferred_name set.

Link copied to clipboard

Population size.