3

End goal: visualize geographic data from .osm file with QGIS by adding PostGIS layers which include changeset information.

I have used osm2pgsql successfully to populate PostGIS and visualize the layers in QGIS but cannot bring in the changeset field.

I have used the --extra attributes function to bring in fields like osm_uid and osm_user but --extra attributes apparently does not allow you to bring in the changeset field.

How can I bring in the changeset field with osm2pgsql? Is there some alternative route I should take instead of osm2pgsql?

2 Answers 2

1

It seems to me, that you can't do it with osm2pgsql.

You may:

  • Use osmosis http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.44 but it uses different db schema, and there is no such thing as separate import of changesets into sole table.
  • Do it yourself. It's actually quite easy to use SAX xml parser to get changesets and their tags. Just don't try to upload full dump into memory.
-1

You need one more step which is adding the values to your style file.

For details: http://wiki.openstreetmap.org/wiki/Osm2pgsql#Import_style

Default Style file: https://raw.githubusercontent.com/openstreetmap/osm2pgsql/master/default.style

2
  • 1
    Could you share examples and more detail? Links can disappear!
    – Simbamangu
    Commented Aug 6, 2015 at 5:13
  • osm2pgsq has only user, timestamp, and few more changesets' attributes, but no changesets' tags. Commented Aug 6, 2015 at 6:06

Your Answer

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

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