[OSM-dev] osm2pgsql fails on current data

Frederik Ramm frederik at remote.org
Sun Apr 13 21:30:42 BST 2008


Hi,

> Thinking about this more and more: that just isn't going to work, we
> need to discourage people from doing that. And I think i need to add
> some checking osm2pgsql to detect these kinds of errors sooner (i.e.
> before the database). If a way is for two adminn levels, then I
> suggest using two relations using the same way.

We have three options:

1. stricter rules about what is allowed and not allowed, or "wanted" 
   and "unwanted", in the database (that's your "discouraging
   people");

2. an automated process that streamlines data upon entering the
   system, or inside the system on a regular basis;

3. "work with what we've got" and fix the data we get out of the 
   system to suit our needs.

Dave's patch is in the spirit of option 3, and frankly I think that
way is the only acceptable way.

I have often thought about writing a kind of "OSM sanitizer", a bit
like the existing tag extractors but much more comprehensive, where
you input a catalog of stuff you're interested in (like: "my software
can only process the following 10 values for the highway tag so please
if something is tagged differently then throw it away/re-tag it as
unclassified/use the nearest phonetic match/whatever") and which
generates output that is guaranteed to conform to the rules that you
made.

If we ever get local language tagging ("de:strasse=autobahn" instead
of "highway=motorway"), then such a preprocessor could also be used
to transform everything into your format.

I think that's in line with the spirit of OSM - everybody enters what
they find important, and everybody extracts what they can use. 

One of those projects!

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"





More information about the dev mailing list