I have been trying to find the difference in the number of features of an area over a specific time period. My workflow:
The result is equivalent to the number of hospitals mapped in that region within that particular period. I cross-checked the number by applying the overpass query in the same area over the same period and clipped the data with my area of interest using QGIS. nwr["amenity"="hospital"] (if:timestamp()>="2020-01-01T00:00:00Z" && timestamp() <="2020-02-01T00:00:00Z")({{bbox}}); To my surprise, the numbers (difference) obtained from osmium and overpass-turbo were very different. My understanding is that these numbers should match. Am I doing something wrong? asked 08 Jan '21, 18:46 rabenojha |
The two queries ask for different numbers. The Osmium query gives the number you want to know - how much did the number of hospitals change in the given time range. The Overpass query asks how many hospitals have been last edited in the time range. I.e. if the object was edited later again, it is not counted. Likewise, if an old hospital object got updated in the period it is counted. If you want to use Overpass (on a server that has the full history), you can use the 'date' modifier to access historic data, see Overpass Language Documentation answered 09 Jan '21, 13:46 mueschel |
I'd cross check first by doing two date queries on overpass [date:"2020-01-01T00:00:00Z"] & [date:"2020-01-01T00:00:00Z"] with your regular nwr"amenity"="hospital" query & comparing those to your two osmium extracts. Not sure why you're clipping in QGIS rather than with Osmium.
I am talking about clipping the resulted file (exported as GeoJSON) obtained by the overpass query in the bounding box by my area of interest. But, if you are mentioning osmium-extract about clipping with Osmium, I am yet to explore that.