1

I would like to import a osm-db (from planet) with the "name_de" and "source" column. So I added/changed those lines in the default.style:

node,way   source       text         linear    
node,way   name_de      text         linear

After import, both columns are created but empty. What I am doing wrong?

2 Answers 2

2

German names are stored with the "name:de" tag. I would not expect you to find anything in a "name_de" column.

I've created an issue on github about dropping names early in the processing chain.

2
  • taginfo.openstreetmap.org/keys/name_de collects at least 12 objects with name_de.
    – AndreJ
    Apr 8, 2014 at 11:06
  • Yes, it also shows 254 thousand objects with name:de. It's hard to say without knowing exactly what they're doing, but if they're after German names, name:de is what they want. Apr 8, 2014 at 21:47
1

The source tag is always deleted. This is hardcoded in osm2pgsql / parse-primitive.c and parse-xml2.c:

/* 'created_by' and 'source' are common and not interesting to mapnik renderer */
    if (strcmp((char *)xk, "created_by") && strcmp((char *)xk, "source")) {
    ...

To keep the source tag, there are two options:

  • Change the code and compile osm2pgsql;
  • Use a hex editor to change the osm2pgsql binary. Open the binary and search for "created_by". Replace the string "source" that occurs next to it by something else, for example "xxxxxx". Continue searching and replacing, because there are multiple occurrences.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.