Skip to content

ldodds/geonames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

geonames

Simple utility scripts for downloading, unpacking and reformatting the Geonames RDF data dumps.

Author

Leigh Dodds ([email protected])

Download

[http://github.com/ldodds/geonames]

Overview

Geonames is a great resource for geographical information. Helpfully they publish data exports in a variety of formats, allowing others to process and manipulate the data locally.

Unfortunately the RDF data dump that is available from:

[http://download.geonames.org/export/dump/all-geonames-rdf.txt.zip]

is a little idiosyncratic. Rather than provide a single ntriples or even RDF/XML file the dump consists of a text file that consists of alternating lines like this:

...feature URI.... rdf:RDF...RDF/XML description of feature....</rdf:RDF>

This means you need to script up unpacking the file in order to load it into a triple store.

The Rakefile and script provided here make it easy to download, unpack and convert the data dump into ntriples.

The conversion is written in Ruby and uses the RDF.rb and rdf/raptor libraries. So before running the scripts you'll need to execute:

sudo gem install rdf rdf-raptor

To download and convert the files into ntriples simply run:

rake download convert

The converted data is stored in geonames.nt.

License

These scripts are free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

About

Download and convert geonames export

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages