Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

Search by changeset metadata ?

Open pyrog opened this issue 10 years ago • 18 comments

I would like to search for changesets with specific metadata, but I don't find any information in the wiki.

Examples:

  • searching changesets with comment starting with "#hotosm-task-"
  • or with source equal to "bing"

Syntax:

<changeset comment~"^#hotosm-task-"/>
<changeset source="bing"/>

Note: The use case is to search the numbers of changeset made by one hot task manager user (see hotosm/osm-tasking-manager2#538

pyrog avatar Jan 23 '15 08:01 pyrog

Overpass API doesn't support queries on changeset metadata at this time, but you could use the main API instead. A bit of post processing (=filtering) on the result will be required, though.

Due to the limit of 100 changesets, you might have to create several requests with different timestamps as selection criteria or even use the bbox restriction.

Example:

https://api.openstreetmap.org/api/0.6/changesets?display_name=pyrog

mmd-osm avatar Jan 23 '15 11:01 mmd-osm

I also need this feature, especially filtering for source tag of the changeset.

Or simply filter objects by changeset id? Similar to user or type filter:

changeset:1234567

This data is available for overpass, returns with objects. Related to #162.

kolesar-andras avatar Mar 18 '15 05:03 kolesar-andras

@kolesar-andras : can you shed some more light on your use case?

Applying today's logic to query by user name, filtering by changeset (changeset:1234567) would only return objects which have been last modified in that changeset 1234567. It will certainly not return an object, it any of its versions was modified in changeset 1234567.

Is this what you're expecting?

mmd-osm avatar Mar 19 '15 17:03 mmd-osm

@pyrog : there are also some other approaches available to query changeset metadata. One example is OpenStreetMap Changeset Sync for PostgreSQL.

mmd-osm avatar Mar 19 '15 17:03 mmd-osm

I would like to follow progress digitizing objects of a high resolution ortohoto. Searching objects for source tag matches only objects explicitly tagged with source, misses objects where changeset was tagged with source.

Best solution would be if an object does not have a source tag, overpass would substitute it with changeset source. In this case a simple search for source would return objects of both tagging scheme.

One more solution: searching for changeset:source would match source tag of the objects's changeset. In this case simple source search would match source tag of the object only.

kolesar-andras avatar Mar 20 '15 04:03 kolesar-andras

I got here when looking for a way to find a changeset created by me using OpenMaps. Pascal Neis says there is one: http://hdyc.neis-one.org/?rmikke but it's most probably something accidental as I didn't even know it's possible to edit with OpenMaps.

So, there is no way to find it?

rmikke avatar Dec 20 '15 19:12 rmikke

@rmikke : it's actually in changeset 26767766. No, you can't find it via Overpass API. I use a dedicated database based on https://github.com/zhm/osmchanges-postgres for it.

mmd-osm avatar Dec 20 '15 19:12 mmd-osm

@mmd-osm : Wow, thanks. So it wasn't accidental after all, I just didn't remember it.

rmikke avatar Dec 20 '15 20:12 rmikke

Could you also identify my change with editor reported as unknown? Or not one of: iD Potlatch JOSM Vespucci OpenMaps ?

2015-12-20 20:54 GMT+01:00 mmd [email protected]:

@rmikke https://github.com/rmikke : it's actually in changeset 26767766 http://www.openstreetmap.org/changeset/26767766. No, you can't find it via Overpass API. I use a dedicated database based on https://github.com/zhm/osmchanges-postgres for it.

— Reply to this email directly or view it on GitHub https://github.com/drolbr/Overpass-API/issues/189#issuecomment-166150139 .

http://tnij.com/WyszukiwarkaRowerowa http://jolanta.korwin-mikke.pl/ [email protected] [email protected]

دراجة أكبر

rmikke avatar Dec 20 '15 20:12 rmikke

It's this empty changeset: http://www.openstreetmap.org/changeset/26767650

mmd-osm avatar Dec 21 '15 10:12 mmd-osm

Regardless of OPAPI, even simplest form of this would be nice to have:

  • query change-sets by their tags (type:changeset + source:survey + user:myfriend)
  • get ids as result (out:ids)

there are also some other approaches available to query changeset metadata. One example is OpenStreetMap Changeset Sync for PostgreSQL.

This tool is great, thanks for suggestion! But overpass API is integrated in simple-to-use JOSM dialogues and overpass-turbo, they are more easily reachable than suggested solution!

While, change-sets are not part of our data model (in the strict or "academic" sense) they are heavily utilized in workflows (I guess people asking for change-sets because they seen how it is powerful could be in JOSM Ctrl+F), but they are not familiar with true databases

Instead of re-writing overpass, we could adapt some other solution to mimic overpass syntax, but translate queries (to, say, PostgreSQL). At least one online solution would help our users (no need to setup their own servers, if they cannot do this).

d1g avatar Mar 27 '16 09:03 d1g

I think created_by tag should be searchable also because of the many changesets created by Maps.Me app, filter out it would be great.

erickdeoliveiraleal avatar Aug 17 '16 14:08 erickdeoliveiraleal

Also check the discussion on https://github.com/openstreetmap/openstreetmap-website/issues/1500

mmd-osm avatar Mar 25 '17 07:03 mmd-osm

By the way, OSMCha supports changeset metadata queries.

mmd-osm avatar Dec 28 '18 07:12 mmd-osm

OSMCha supports changeset metadata queries

Yes, but it is not possible to answer questions like:

  • what are all OSM edit used this year ?
  • what are the most editor used ?

And/or draw editor's statistics (cf. graphs below)

Instead of re-writing overpass, we could adapt some other solution to mimic overpass syntax, but translate queries (to, say, PostgreSQL). At least one online solution would help our users (no need to setup their own servers, if they cannot do this).

👍

It could be done in other tools like https://resultmaps.neis-one.org, ohsome (see graphs below) This will help i.e. OSM API developer to check API downstream consumer… (See discussion)

But we need more details : which editors are used, and which version…

ohsome osmstats HDYC Browser Statistics

pyrog avatar Jul 25 '20 12:07 pyrog

Sorry, what you wrote is totally off topic for the Overpass API repository.

Also, downstream consumers include tools like osm2pgsql and many others, so your analysis is unfortunately irrelevant for the problem at hand.

mmd-osm avatar Jul 25 '20 12:07 mmd-osm

Sorry, what you wrote is totally off topic for the Overpass API repository.

I don't want to draw graphics from overpass-API, I would collect easily osm data and export them in other tools 😃

By the way, OSMCha supports changeset metadata queries.

Yes, that's nice. But we must:

  1. copy manually the link of each changeset
  2. edit them to get only the id
  3. make a query in overpass to find all objects edited… ?

After the storm Alex, I would like to display changes made with Alpes-Maritimes 2020 (Storm Alex) imagery. Partial search of Alex Storm destructions

An alternative is to use osm-changesets from Pascal Neis 😃 Unfortunately, it is not possible to:

  • display this imagery
  • get the changeset id

@mmd-osm and @drolbr Could you, please, support at least a changeset: filter ?

pyrog avatar Oct 17 '20 08:10 pyrog

Just wanted to chime in with another usecase. Related to: https://github.com/streetcomplete/StreetComplete/issues/5180 get all railway-crossings that have a non-standard-height (e.g. https://overpass-turbo.eu/s/1Ag3 ) and then color the ones that have StreetComplete:quest_type=AddMaxHeight differently since those got changed by that quest.

gdprdatasubect avatar Sep 12 '23 15:09 gdprdatasubect