[OSM-talk-ie] All places in Ireland - GNS Data now accessible!

Dermot McNally dermotm at gmail.com
Thu Sep 13 22:22:24 BST 2007


(Also copying to the main talk list, since there was a recent question
about GNS data import)

Hi Folks,

Those of you at the meeting in Balbriggan will recall our conversation
about the GNS data and my eagerness to turn it into usable OSM data.
It took me a while longer, but some usable work is now there to be
seen. In the absence of a good place to put it, I've made it available
here:

http://rapidshare.com/files/55482368/gns.tar.gz.html

What you get:

You'll find a directory structure with a perl script and some of its
supporting modules. If you know perl, feel free to play and enhance.
If you don't, don't panic! In the data directory you'll find the
original gns data file along with the output of this script. This
output isn't useful for import into OSM, but it's generated from an
object which will import quite easily (I haven't written the script to
do that yet). This text output is designed to illustrate what I've
managed to extract from the original file and to allow for discussion
of whether we're all happy to see this stuff uploaded or whether we'd
like to change some things first.

Running the script:

Everything I've done so far will run on vanilla perl - based on the
location of the data file, you should get some action by doing:

perl gns_import.pl < data/ei.txt
or ./gns_import.pl < data/ei.txt

What you'll see is the lat and long of the POI along with the
attributes I'd propose to set for each one within OSM. These are:

gns:<various>: This is to preserve availability of the raw GNS data
from whence this all came. Yes, there's a lot of it, but it does mean
that if we work out a nifty use for SORT_NAME or some such data field
we'll be able to use it without a reimport.

comment, source: An explanation of where we got this from.

name: The POI name. For now, only POIs of type 'place' are being
output, and I'd suggest we get our feet wet on this much before trying
subsequent passes for the rest of the items (we'll need to work out a
bunch of mapping stuff for them anyway).

name:ga, name:en: For places where English and Irish names were
available, both are entered. Whichever named seemed from the
data-source to be definitive (usually the English one, but possibly
different in the Gaeltacht) was used for the 'name' attribute, which
is likely to be necessary to ensure that the renderers will Do The
Right Thing.

is_in: I've built a county lookup table of the codes used in the ADM1
field. Based on this, I've set is_in to "County <county name>" for
each POI where this was possible. (some have ADM1 set to 00, and I
haven't worked out whether this corresponds to anything other than
'unknown').

place: The type of place this is - city, town, village, hamlet.
Unfortunately, the information available isn't that specific, and
nothing below the level of town comes with information on size or
population. For this reason, I've had to fail safe and set all others
to 'hamlet' - which I'm treating as the best standard equivalent for a
townland. This means that points that are really villages or small
towns will need manual touch-up. I don't have a better idea for these,
but the alternative is for thousands of townlands to start
overwhelming the map, and fixing these would be even harder.

place_county: This doesn't seem to be in standard use, but it struck
me as worthwhile to set a field to the county name (without the prefix
'County '). Maybe we'll find a use for it...

population: Only present for a handful of locations, but set where available.


I'd be very interested in some comments on this. It would be really
easy to add these to the database, but we should have a good look now
just to make sure we like what's going in. Since the source is set, it
would be easy to back the stuff out as well, but that's a bit rough on
anyone who has already adopted some of the points, enhanced and maybe
respotted them :-)

What do you all think?
Dermot




More information about the Talk-ie mailing list