0

I want to import OSM data into postgresql with imposm. How do I have to modify the import process in order to have the user name as an attribute in my tables? Do I have to change that in the data mapping file?

asked Nov 18, 2014 at 19:50
5
  • I have never used imposm but I would guess that this is what you should edit by adding the "osm_user" tag: bitbucket.org/olt/imposm/src/tip/imposm/defaultmapping.py Commented Nov 18, 2014 at 21:17
  • @user30184 I tried your idead, but it doesn't work. "osm_user" is not a real tag unfortunately. Commented Nov 19, 2014 at 15:28
  • Sorry, I did not mede a proper check before writing. It seems to be only "user" in the data. See wiki.openstreetmap.org/wiki/OSM_XML and sample data with <node id="298884269" lat="54.0901746" lon="12.2482632" user="SvenHRO" . Commented Nov 19, 2014 at 15:42
  • "user" is in postgres already reserved for the database user. So if I add the field "user" to the mapping file, I'll end up with the database user. Commented Nov 19, 2014 at 21:24
  • Hmm, tricky. Perhaps you should contact imposm developers and hope that they can tell you what to do with the reserver keyword. A workaround that should work is to download OSM data in OSM XML format and change all occasions of user= into osm_user= with sed or some other editor. Commented Nov 19, 2014 at 21:59

1 Answer 1

1

I believe adding the osm user name or osm user id is out of the design scope of imposm. I don't know if the design goals are any different for the rewrite of the tool in Google's go language. Imposm wants to be fast at helping you create maps and does not appear to be interested in other data that may be used for statics or does not add to map data. Most imposm examples show tag filters because of imposm's design goals. Callbacks are What you are looking for. Here's a stat parser discussion that includes information from imposm's author. The final code is on github with the added timestamp. If you can adapt Martijn's code and use it in place of the original imposm parser code, then you are good to go. Otherwise, the answer is no.

answered Nov 19, 2014 at 5:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.