Skip to content

Commit

Permalink
Index coordinates as geopoints in geonames track
Browse files Browse the repository at this point in the history
With this commit, we store locations not as latitude / longitude double
values but as `geo_point` instead. We also use the most recent version
of the geonames dataset and enhance documentation a bit.

Closes elastic#2
  • Loading branch information
danielmitterdorfer committed May 2, 2017
1 parent fa8268b commit 26bf9cc
Show file tree
Hide file tree
Showing 6 changed files with 45,566 additions and 34,666 deletions.
20 changes: 20 additions & 0 deletions geonames/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Geonames track

This track is based on a [geonames](http://www.geonames.org/) dump of the file [allCountries.zip](http://download.geonames.org/export/dump/allCountries.zip) retrieved as of April 27, 2017.

For further details about the semantics of individual fields, please see the [geonames dump README](http://download.geonames.org/export/dump/readme.txt).

Modifications:

* The original CSV data have been converted to JSON.
* We combine the original `longitude` and `latitude` fields to a new `location` field of type [geo_point](https://www.elastic.co/guide/en/elasticsearch/reference/current/geo-point.html).

### License

We use the same license for the data as the original data from Geonames:

```
This work is licensed under a Creative Commons Attribution 3.0 License,
see http://creativecommons.org/licenses/by/3.0/
The Data is provided "as is" without warranty or any representation of accuracy, timeliness or completeness.
```
112 changes: 0 additions & 112 deletions geonames/README.txt

This file was deleted.

7 changes: 2 additions & 5 deletions geonames/mappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
}
}
},
"longitude": {
"type": "double"
"location": {
"type": "geo_point"
},
"cc2": {
"type": "text",
Expand Down Expand Up @@ -92,9 +92,6 @@
}
}
},
"latitude": {
"type": "double"
},
"feature_code": {
"type": "text",
"fields": {
Expand Down
Loading

0 comments on commit 26bf9cc

Please sign in to comment.