User:Hvidstue

From OpenStreetMap Wiki
Jump to navigation Jump to search


About Me
OSM Logo This user submits data to OpenStreetMap under the name
mikkolukas.
Flag of Denmark.svg This user hails from Denmark
Gps-304419.svg Hvidstue uses a Garmin Nüvi 3597 and is willing to answer questions on it from OSM users.
Chrome This user prefers Google Chrome.
JOSM Hvidstue submits data to OpenStreetMap using JOSM.
iD Hvidstue submits data to OpenStreetMap using iD.
Tux.svg Hvidstue uses a Linux-based computer.
Hvidstue uses MAPS.ME
Overpass-turbo.svg Hvidstue uses Overpass turbo, an OSM database search tool, and is willing to advise on it

Template:UserOsmose

Go Do Some Mapping Hvidstue
prefers to go outside and map.
Bike Hvidstue
is a bicyclist.
Sinnbild PKW.svg Hvidstue is a motorist.
Train This user maps along railway lines and while travelling by train. For more information see OpenRailwayMap.
Babel user information
da-N Denne bruger har dansk som modersmål.
en-4 This user has near native speaker knowledge of English.
Users by language

Overpass Turbo

My own home made "Osmose". The queries are finding errors I often stumble upon.

Syntax

OverpassQL - Recurse (n, w, r, bn, bw, br)

Queries

Only using the bbox view
try it yourself in overpass-turbo
[out:xml][timeout:200];

node({{bbox}});

out meta;
>;
out meta qt;


Public Transport

Both platform and nearby bus_stop are marked as public_transport=platform
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// Nodes with highway=bus_stop and public_transport=platform within 5 meters from a way with public_transport=platform
way[public_transport=platform](area.searchArea)->.platforms;
node(around.platforms:5)[highway=bus_stop][public_transport=platform]->.busstops;
way(around.busstops:5)[public_transport=platform]->.platforms_nearbusstops;

(.busstops; .platforms_nearbusstops;);

out body;
>;
out skel qt;

This is double tagging.
The public_transport=platform should probably be removed from the bus_stop node.

Platform with nearby bus_stop is missing highway=* and/or bus=yes
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// public_transport=platform without highway=* and/or bus=yes within 5 meters from a node with highway=bus_stop
way[public_transport=platform][!highway][railway!=platform](area.searchArea)->.platforms;
node(around.platforms:5)[highway=bus_stop]->.busstops;
way(around.busstops:5)[public_transport=platform][!highway]->.platforms_nohighway;
way(around.busstops:5)[public_transport=platform][bus!=yes]->.platforms_nobus;

(.platforms_nohighway; .platforms_nobus;);

out body;
>;
out skel qt;

The way public_transport=platform should probably have highway=footway and bus=yes also.
Note: highway=platform should not be used where public_transport=platform is present. You probably want to use highway=footway.

try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// public_transport=platform with highway=platform
way[public_transport=platform][highway=platform](area.searchArea)->.platforms;

(.platforms;);

out body;
>;
out skel qt;

highway=platform should not be used where public_transport=platform is present. You probably want to use highway=footway.

Closed-way platforms without area=yes
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// Closed-way '''platforms''' without <tt dir="ltr" class="mw-content-ltr" style="background:#EEF;font-size:1em;line-height:1.6"><bdi style="white-space:nowrap">[[Key:area|area]]</bdi>=[[Tag:area=yes|<bdi>yes</bdi>]]</tt>
(
  way[public_transport=platform][!area](if:is_closed())(area.searchArea)->.platforms;
  way[highway=platform][!area](if:is_closed())(area.searchArea)->.platforms;
  way[railway=platform][!area](if:is_closed())(area.searchArea)->.platforms;
);

out body;
>;
out skel qt;

You should probably add area=yes to all these platforms

railway=station placed on a railway
highway=bus_stop placed on a highway
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// a bus stop is placed on a highway
// a station is placed on a railway
node[highway=bus_stop](area.searchArea)->.busstops;
way(bn.busstops)[highway]->.highways;

(
  node[railway=station](area.searchArea);
  node[railway=halt](area.searchArea);
)->.stations;

(
  way(bn.stations)[railway=rail];
  way(bn.stations)[railway=light_rail];
  way(bn.stations)[railway=tram];
)->.railways;

(
  node(w.highways)[highway=bus_stop];
  node(w.railways)[railway=station];
  node(w.railways)[railway=halt];
);

out body;
>;
out skel qt;

Station nodes should be separate from railways.
highway=bus_stop should be disconnected from way highway=*.
A public_transport=stop_position can be placed there instead.

public_transport=stop_position without railway=stop and vice versa.
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// public_transport=stop_position without railway=stop or railway=tram_stop and vice versa.
(
  way[railway=rail](area.searchArea);
  way[railway=light_rail](area.searchArea);
)->.rails;

(
  way[railway=tram](area.searchArea);
)->.lightrails;

(
  node(w.rails)[railway=stop][public_transport!=stop_position];
  node(w.rails)[railway!=stop][public_transport=stop_position];
  node(w.lightrails)[railway=tram_stop][public_transport!=stop_position];
  node(w.lightrails)[railway!=tram_stop][public_transport=stop_position];
);

out body;
>;
out skel qt;

railway=stop without public_transport=stop_position can be valid e.g. on a cargo-only station.
public_transport=stop_position without railway=stop is never valid.

named stop nodes on railways [runme]
try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// railway=stop or public_transport=stop_position with name
(
  way[railway=rail](area.searchArea);
  way[railway=light_rail](area.searchArea);
)->.rails;

(
  way[railway=tram](area.searchArea);
)->.lightrails;

(
  node(w.rails)[railway=stop][railway!=tram_stop][name];
  node(w.rails)[public_transport=stop_position][railway!=tram_stop][name];
);

out body;
>;
out skel qt;

Stop nodes on railways should rarely be named. Use the public_transport=stop_area or railway=station or -halt for that.

try it yourself in overpass-turbo
[out:json][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// public_transport elements not part of a public_transport=stop_area
(
  node[public_transport=stop_position](area.searchArea);
  node[public_transport=platform](area.searchArea);
  way[public_transport=platform](area.searchArea);
)->.public_transport_elements;

(
  rel[public_transport=stop_area](bn.public_transport_elements);
  rel[public_transport=stop_area](bw.public_transport_elements);
)->.stop_areas;

(
  node(r.stop_areas);
  way(r.stop_areas);
)->.relation_elements;

( .public_transport_elements; - .relation_elements; );

out body;
>;
out skel qt;


Railways cleanup project

Snippet for selecting the S-train area
try it yourself in overpass-turbo
[bbox:55.457322,12.064056,55.927086,12.593851][out:xml][timeout:200];

way[railway=light_rail];

out meta;
>;
out meta qt;


A station is placed on a railway=*
try it yourself in overpass-turbo
[out:xml][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// a station is placed on a railway
(
  way(area.searchArea)[railway=rail];
  way(area.searchArea)[railway=light_rail];
  way(area.searchArea)[railway=tram];
)->.railways;

(
  node(w.railways)[railway=station];
  node(w.railways)[railway=halt];
);

out meta;
>;
out meta qt;


A railway=stop or public_transport=stop_position is placed on a railway and have a name=*
try it yourself in overpass-turbo
[out:xml][timeout:200];
{{geocodeArea:Danmark}}->.searchArea;

// railway=stop or public_transport=stop_position with name
(
  way(area.searchArea)[railway=rail];
  way(area.searchArea)[railway=light_rail];
)->.rails;

(
  node(w.rails)[railway=stop][name];
  node(w.rails)[public_transport=stop_position][railway!=tram_stop][name];
);

out meta;
>;
out meta qt;


Interesting places

More links at the user page for Hjart (in Danish).