<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi.<br>
<br>
This is an update to an e-mail I sent at the beginning of October to
the talk@osm list regarding updating postal codes in Iceland
semi-automatically.<br>
<br>
I wanted to let you know I have written the script, which is for
Python 3.2. I have not yet submitted data made by the script but I
haven't detected any problems thus far. I have performed some random
manual checks on the output and see nothing wrong with the XML. JOSM
didn't complain when I opened the .osc file.<br>
<br>
The input is any valid .osm file and the output is an .osc file (
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="https://wiki.openstreetmap.org/wiki/Osc">https://wiki.openstreetmap.org/wiki/Osc</a>)
which lists any changes made. The output can be loaded into an
editor and submitted to the OSM server from there.<br>
<br>
You're free to adapt the script to suit your purpose but I recommend
that you always check the proposed changes before uploading. The
code is commented enough so anybody who knows Python should be able
to know what's going on there.<br>
<br>
Minimum requirements:<br>
- Enough computer memory. The larger the .osm file, the more memory
the script needs.<br>
- Python 3.<br>
- A working installation of the Osmosis program (
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="https://wiki.openstreetmap.org/wiki/Osmosis">https://wiki.openstreetmap.org/wiki/Osmosis</a>).<br>
<br>
- Svavar Kjarrval<br>
<br>
<div class="moz-cite-prefix">On 04/10/12 23:48, Martin Guttesen
wrote:<br>
</div>
<blockquote cite="mid:BLU170-DS235503F947037991BA2375AD840@phx.gbl"
type="cite">I have imported all the addresses for Faroe Islands
<br>
and updating them from time to time when there is new data
available
<br>
see <a class="moz-txt-link-freetext" href="http://wiki.openstreetmap.org/wiki/Import/Catalogue/usfo">http://wiki.openstreetmap.org/wiki/Import/Catalogue/usfo</a>
<br>
i keep an Id tag (us.fo:Adressutal) so i can Create/Update or
Delete address nodes
<br>
<br>
<br>
-----Original Message----- From: Jochen Topf
<br>
Sent: Thursday, October 04, 2012 7:39 AM
<br>
To: Svavar Kjarrval
<br>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a>
<br>
Subject: Re: [OSM-talk] Semi-automated edits - postal code
database
<br>
<br>
Hi!
<br>
<br>
On Wed, Oct 03, 2012 at 11:10:05AM +0000, Svavar Kjarrval wrote:
<br>
<blockquote type="cite">I'm trying to find a good method to
maintain data from outside sources.
<br>
The data in question is the Icelandic postal code database
(which they
<br>
say we may use freely). My searches on the OSM wiki have been
fruitless
<br>
so far.
<br>
<br>
The idea is to maintain the data in associatedStreet relations.
Each
<br>
relation has a tag called 'götuskrá:id' which value is a direct
<br>
reference to the row ID in the files we retrieve from the postal
<br>
company's website. The file formats available are CVS and XML
1.0. The
<br>
script would presumably go ever each associatedStreet relation
and make
<br>
any changes (if appropriate) when a götuskrá:id tag is found.
The output
<br>
could be an OSM change file loaded into an editor like JOSM to
be
<br>
uploaded manually. Maybe an automated process later when we're
confident
<br>
that everything is done correctly, and of course after
submitting the
<br>
script(s) for review by the local community.
<br>
</blockquote>
<br>
It is not a good idea to add some random ID of your favourite
database to
<br>
OSM, because nobody except you can understand this ID and do
useful things
<br>
with it. It just confuses mappers and make it more difficult to
edit the
<br>
data. For every change somebody does to the data they have to know
what this
<br>
tag means so that they can properly do their edit. And if they
don't, people
<br>
will just mess up your data and you will not be able to use this
ID for
<br>
syncing the data anyways.
<br>
<br>
And in this case I don't even see why you need it. You have street
names and
<br>
postal codes in both OSM and the Icelandic postal code database.
If something
<br>
changes you can find out which combinations changed and apply
those changes
<br>
to OSM easily just based on the postal code and street name. There
is no
<br>
need for those IDs.
<br>
<br>
And, btw, you should not use the associatedStreet relation. It
solves the same
<br>
problem as the addr:street tags on nodes and buildings but in a
much more
<br>
complicated way. The overwhelming majority of all addresses are
tagged with
<br>
addr:street (there are nearly 15 million addr:street tags vs. only
18.000
<br>
associatedStreet relations).
<br>
<br>
Jochen
<br>
</blockquote>
<br>
</body>
</html>