Logainm & Open Data
Logainm (Irish for "place name") is the offical placename database of Ireland. Download the database here.
They recently released data.logainm.ie
and machine readable data, under a permissive Open Database License (ODbL) v1.0, which is the same licence as OpenStreetMap.
Download the nationwide dump file
You can either choose to download the original RDF file, or the processed CSVs
Both are under Open Database License (ODbL) v1.0.
CSV format
This is a zipfile of several CSV files. Each file has a header, fields are separated by ,
and lines are terminated by a newline \n
.
-
logainm_categories.csv
What are the category codes that logainm uses?
Columns:
logainm_category_code
: e.g.TR
name_en
: Description of this code (in English)name_ga
: Description of this code (in Irish)
-
logainm_names.csv
Everything in logainm has an entry in this file.
Columns:
logainm_id
logainm_category_code
name_en
name_ga
-
geometries.csv
If a logainm object has a lat/lon, it's in this file
Columns:
logainm_id
lon
lat
-
geometric_contains.csv
Lots of objects in logainm have a lat/lon, however there is a hierachy of objects, using GeoVocab, saying "this object is inside this other object". (e.g. townland X is inside county Y). This file has these relationships
Columns:
outer_obj_id
inner_obj_id
-
townlands.csv
This is a custom subset of all of the above files, with just the townlands.
Columns:
logainm_id
name_en
name_ga
lon
lat
Creating the CSV files from RDF
It was created with rdf2csv, and a configuration YAML file on github.
RDF Format
This is a bzip2'ed, of N-Triples RDF file.
After unzipping, it can be used easily in Python with the rdflib.
>>> import rdflib
>>> graph = rdflib.Graph()
>>> graph.parse("logainm.nt", format="nt")
rdflib allows you to easily query the rdf graph.
N-triples files are line based, so you can use standard unix tools to examine it.
For example, to examine the details for the townland Ravensdale Park, you can use grep
:
$ bzcat logainm.nt.bz2 | grep "/33943>"
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/easting> "08805" .
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/northing> "16244" .
<http://data.logainm.ie/geometry/33943> <http://data.logainm.ie/ontology/square> "J" .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://geovocab.org/geometry#Geometry> .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "54.0833"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://data.logainm.ie/geometry/33943> <http://www.w3.org/2003/01/geo/wgs84_pos#long> "-6.33729"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://data.logainm.ie/place/126017> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/126101> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/126102> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/33943> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/geometry#geometry> <http://data.logainm.ie/geometry/33943> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/100021> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/165> .
<http://data.logainm.ie/place/33943> <http://geovocab.org/spatial#P> <http://data.logainm.ie/place/1712> .
<http://data.logainm.ie/place/33943> <http://purl.org/dc/terms/isReferencedBy> <http://www.logainm.ie/Iomhanna/Ref136%20d/33943.jpg> .
<http://data.logainm.ie/place/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://data.logainm.ie/category/BF> .
<http://data.logainm.ie/place/33943> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://geovocab.org/spatial#Feature> .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/isPrimaryTopicOf> <http://logainm.ie/33943.aspx> .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/name> "Gleann na bhFiach"@ga .
<http://data.logainm.ie/place/33943> <http://xmlns.com/foaf/0.1/name> "Ravensdale Park"@en .
Source
This data was downloaded from data.logainm.ie in September 2014 in an automated fashion, as their documentation suggests. This resulted in 240,000 RDF files in turtle. I wrote a one off script to parse all these files using rdflib, and update one graph, and serialize it into a n-triples file.
Logainm's website claims you can download county-by-county dumps, but that link is dead, so I had to download a file per object.