# Geonames

The GeoNames record backing a place, as indexed.

Only administrative divisions (feature class `A`) and capital or seat-of-administration cities (feature codes `PPLC` and `PPLA*`) are indexed. Historical features (feature codes ending in `H`) are excluded.

## Example Record

| Field                                     | Example                  | Type     |
| ----------------------------------------- | ------------------------ | -------- |
| [`id`](#id)                               | geonames\_7296662        | `string` |
| [`dataset`](#dataset)                     | geonames                 | `string` |
| [`geonameid`](#geonameid)                 | `7296662`                | `number` |
| [`name`](#name)                           | Strumpshaw               | `string` |
| [`asciiname`](#asciiname)                 | Strumpshaw               | `string` |
| [`alternatenames`](#alternatenames)       | `{ 0 fields }`           | `object` |
| [`language`](#language)                   | en                       | `string` |
| [`latitude`](#latitude)                   | `52.60599`               | `number` |
| [`longitude`](#longitude)                 | `1.47572`                | `number` |
| [`feature_class`](#feature_class)         | A                        | `string` |
| [`feature_code`](#feature_code)           | ADM4                     | `string` |
| [`country_code`](#country_code)           | GB                       | `string` |
| [`country_iso`](#country_iso)             | GBR                      | `string` |
| [`cc2`](#cc2)                             | `{ 0 fields }`           | `object` |
| [`admin1_name`](#admin1_name)             | England                  | `string` |
| [`admin1_geonameid`](#admin1_geonameid)   | `6269131`                | `number` |
| [`admin1_code`](#admin1_code)             | ENG                      | `string` |
| [`admin2_name`](#admin2_name)             | Norfolk                  | `string` |
| [`admin2_geonameid`](#admin2_geonameid)   | `2641455`                | `number` |
| [`admin2_code`](#admin2_code)             | I9                       | `string` |
| [`admin3_code`](#admin3_code)             | 33UC                     | `string` |
| [`admin4_code`](#admin4_code)             | 33UC056                  | `string` |
| [`population`](#population)               | 0                        | `string` |
| [`elevation`](#elevation)                 | `null`                   | `object` |
| [`dem`](#dem)                             | `25`                     | `number` |
| [`timezone`](#timezone)                   | Europe/London            | `string` |
| [`modification_date`](#modification_date) | 2010-05-25T00:00:00.000Z | `string` |

```json
{
  "id": "geonames_7296662",
  "dataset": "geonames",
  "geonameid": 7296662,
  "name": "Strumpshaw",
  "asciiname": "Strumpshaw",
  "alternatenames": {
  },
  "language": "en",
  "latitude": 52.60599,
  "longitude": 1.47572,
  "feature_class": "A",
  "feature_code": "ADM4",
  "country_code": "GB",
  "country_iso": "GBR",
  "cc2": {
  },
  "admin1_name": "England",
  "admin1_geonameid": 6269131,
  "admin1_code": "ENG",
  "admin2_name": "Norfolk",
  "admin2_geonameid": 2641455,
  "admin2_code": "I9",
  "admin3_code": "33UC",
  "admin4_code": "33UC056",
  "population": "0",
  "elevation": null,
  "dem": 25,
  "timezone": "Europe/London",
  "modification_date": "2010-05-25T00:00:00.000Z"
}
```

Every field is documented below.

* `geonameid` integer

  Geoname ID

  Unique identifier for GeoNames place

  Format: `int32`

  Example: `7296662`

* `name` string

  Name

  Place name (UTF8)

  Example: `Strumpshaw`

* `asciiname` string

  ASCII Name

  Place name (ASCII). Empty string if not available

  Example: `Strumpshaw`

* `alternatenames` array

  Alternate Names

  List of alternate names for the place

* `latitude` string | number

  Latitude

  The latitude of the address or postcode (WGS84).

  Can be a positive or negative decimal. E.g. `51.5083983`.

  Returns an empty string if no location data is available.

  Example: `52.60599`

* `longitude` string | number

  Longitude

  The longitude of the address or postcode (WGS84).

  Can be a positive or negative decimal. E.g. -0.1283983

  Returns an empty string if no location data is available.

  Example: `1.47572`

* `feature_class` string

  Feature Class

  GeoNames single letter feature class (http\://www\.geonames.org/export/codes.html). Only two are indexed

  * `A` Country, state, region
  * `P` City, village

  Example: `A`

  Enum: "A", "P"

* `feature_code` string

  Feature Code

  Full GeoNames feature code (http\://www\.geonames.org/export/codes.html)

  Example: `ADM4`

* `country_code` string

  Country Code

  2 letter ISO country code. Empty string if not available

  Example: `GB`

* `cc2` array

  CC2

  List of other country codes mapping to this place

* `admin1_name` string

  Admin1 Name

  Name of first administrative area. Empty string if not available

  Example: `England`

* `admin1_geonameid` integer

  Admin1 Geoname ID

  GeoName ID for first administrative area

  Format: `int32`

  Example: `6269131`

* `admin1_code` string

  Admin1 Code

  Fipscode (subject to change to iso code)

  Example: `ENG`

* `admin2_name` string

  Admin2 Name

  Name of second administrative area. Empty string if not available

  Example: `Norfolk`

* `admin2_geonameid` integer

  Admin2 Geoname ID

  GeoName ID for second administrative area

  Format: `int32`

  Example: `2641455`

* `admin2_code` string

  Admin2 Code

  Code for the second administrative division

  Example: `I9`

* `admin3_code` string

  Admin3 Code

  Code for third level administrative division

  Example: `33UC`

* `admin4_code` string

  Admin4 Code

  Code for fourth level administrative division

  Example: `33UC056`

* `population` string

  Population

  Population at place. Represented as a string as it can be larger than a 32 bit integer

  Example: `0`

* `elevation` integer

  Elevation

  Elevation in metres. `null` if not available

  Format: `int32`

* `dem` integer

  Digital Elevation Model

  Digital elevation model (srtm3 or gtopo30), average elevation in metres

  Format: `int32`

  Example: `25`

* `timezone` string

  Timezone

  The IANA timezone ID. Empty string if not available

  Example: `Europe/London`

* `modification_date` string

  Modification Date

  Date the GeoNames record was last modified

  Format: `date-time`

  Example: `2010-05-25T00:00:00.000Z`

* `dataset` string

  Dataset

  Indicates the provenance of a place

  Example: `geonames`

  Enum: "geonames"

* `id` string

  ID

  Unique place ID

  Example: `geonames_7296662`
