This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Query Postgres DB for changeset comments

0

I imported a metro extract from Mapzen to my DB with osm2pgsql. In the default.style I added the line:

 node,waycomment      text         linear

and removed it from the deleted tags.

If I query now a table for the comments the following way:

SELECT COUNT(*) FROM planet_osm_roads WHERE comment != ''

I get zero rows:

 count 
-------
     0
(1 row)

What do I have to do to get the rows that contain changset comments.


I ultimately want to create a map that contain certain changes comment committed by me.

asked 18 Jan '15, 13:12

Wasus's gravatar image

Wasus
346161725
accept rate: 0%

edited 18 Jan '15, 13:12


One Answer:

3

The generic comment tag (on objects) doesn't have anything to do with the same on changesets, nor does osm2pgsql know anything about changesets in the first place.

Likely the best current way to get changesets in to a database is https://github.com/ToeBee/ChangesetMD

Note that the metro extracts are unlikely to contain changesets to start with and that there is no real issue with simply using the full planet given that we are talking about a fairly small dataset. The latest full changeset dump can be obtained from http://planet.openstreetmap.org/planet/

answered 18 Jan '15, 14:36

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701
accept rate: 18%

edited 18 Jan '15, 15:26

Source code available on GitHub .