You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll preface this with the warning that I am a novice at OpenLayers and js in general.
The output mode of Overpass out meta returns useful metadata for OSM data, such as timestamp at which the features were last updated.
Example for a way:
Currently the feature returned by OSM XML seems to only be able to to get the id and the tags and the lat and lon for the nodes.
Some users have previously accomplished this as an extension to a much earlier version of OpenLayers; Extended OSM parser. Adds meta attributes as tags
It would be useful if the metadata attributes were added in an accessible way similar to how tags are.
The use case would ideally be styling of the geometry as per timestamp. Image below is in QGIS (OSM data parsed using QuickOSM plugin and then symbology Graduated by to_int(format_date(osm_timestamp,'yyyy')))
The overpass query for this was;
rel(11334807)->.suburb;
.suburb;map_to_area;
way[highway=residential](area);
(._;>;);
out meta;
The purpose being to highlight antiquated data.
The text was updated successfully, but these errors were encountered:
I think it would make sense to add that metadata as a configurable metadata property for each feature. Do you think you'd be able to create a pull request?
Hello, I appreciate the reply. I tried for a couple hours to modify the existing osmxml.js part of ol.js.map offline to parse the timestamp with getAttribute similarly to how lat and lon are parsed, but was unable to make any headway. I think it's beyond my capabilities unfortunately.
The easy (and obvious) workaround to this was to simply convert it to GeoJSON using osmtogeojson which adds the metadata tags as feature properties. So it's effectively solved.
I'll preface this with the warning that I am a novice at OpenLayers and js in general.
The output mode of Overpass
out meta
returns useful metadata for OSM data, such as timestamp at which the features were last updated.Example for a way:
Example for a node:
Currently the
feature
returned by OSM XML seems to only be able to to get theid
and thetags
and thelat
andlon
for the nodes.Some users have previously accomplished this as an extension to a much earlier version of OpenLayers;
Extended OSM parser. Adds meta attributes as tags
It would be useful if the metadata attributes were added in an accessible way similar to how tags are.
The use case would ideally be styling of the geometry as per timestamp. Image below is in QGIS (OSM data parsed using QuickOSM plugin and then symbology Graduated by
to_int(format_date(osm_timestamp,'yyyy'))
)The overpass query for this was;
The purpose being to highlight antiquated data.
The text was updated successfully, but these errors were encountered: