Template:OTUP/doc
Jump to navigation
Jump to search
Usage
Overpass Turbo Ultra Postpass
Notes
WIP
Syntax
Parameters
Examples
Overpass only
{{OTUP|id=simpleexample|
Overpass=
[out:json][timeout:25];
{{((}}geocodeArea:Iceland{{))}}->.searchArea;
nwr["natural"="glacier"](area.searchArea);
out geom;
}}
[[#simpleexample_B-2|Jump to and highlight line 2 of part B (Overpass/Postpass)]][out:json][timeout:25];
{{geocodeArea:Iceland}}->.searchArea;
nwr["natural"="glacier"](area.searchArea);
out geom;
Jump to and highlight line 2 of part B (Overpass/Postpass)
Overpass Turbo MapCSS
{{OTUP|mode=collapsed|
MapCSS=
{{((}}style:
node, way, relation
{{(}}
text: eval("tag('name') . ' (' . tag('wikidata') . ')'");
{{)}}
{{))}}
|
Overpass=
[out:json][timeout:25];
{{((}}geocodeArea:Iceland{{))}}->.searchArea;
nwr["natural"="glacier"](area.searchArea);
out geom;
}}Query
{{style:
node, way, relation
{
text: eval("tag('name') . ' (' . tag('wikidata') . ')'");
}
}}
[out:json][timeout:25];
{{geocodeArea:Iceland}}->.searchArea;
nwr["natural"="glacier"](area.searchArea);
out geom;
Overpass Ultra MapLibre YAML Postpass
{{OTUP|mode=collapsed|title=Representative points|highlightpart=YAML|highlightlines=6-8,14|
YAML=
---
type: postpass
style:
layers:
- type: fill
filter: [==, [get, osm_type], W]
fill-color: gray
fill-opacity: 0.5
- type: fill
filter: [==, [get, osm_type], R]
fill-color: black
fill-opacity: 0.5
- type: line
filter: [==, [geometry-type], LineString]
line-width: 10
---
|
Postpass=
SELECT osm_type, osm_id, tags, ST_Collect(ARRAY[geom, ST_MakeLine(ARRAY[ST_Centroid(geom), ST_PointOnSurface(geom), (MIC).center]::geometry[]), ST_Buffer((MIC).center,(MIC).radius)])
FROM
(
SELECT osm_type, osm_id, tags, geom, ST_MaximumInscribedCircle(geom) AS MIC
FROM postpass_pointpolygon
WHERE
geom && ST_MakeEnvelope({{((}}wsen{{))}},4326) AND
tags->>'landuse'='residential' AND tags->>'residential'='apartments'
)
}}Representative points
---
type: postpass
style:
layers:
- type: fill
filter: [==, [get, osm_type], W]
fill-color: gray
fill-opacity: 0.5
- type: fill
filter: [==, [get, osm_type], R]
fill-color: black
fill-opacity: 0.5
- type: line
filter: [==, [geometry-type], LineString]
line-width: 10
---
SELECT osm_type, osm_id, tags, ST_Collect(ARRAY[geom, ST_MakeLine(ARRAY[ST_Centroid(geom), ST_PointOnSurface(geom), (MIC).center]::geometry[]), ST_Buffer((MIC).center,(MIC).radius)])
FROM
(
SELECT osm_type, osm_id, tags, geom, ST_MaximumInscribedCircle(geom) AS MIC
FROM postpass_pointpolygon
WHERE
geom && ST_MakeEnvelope({{wsen}},4326) AND
tags->>'landuse'='residential' AND tags->>'residential'='apartments'
)
See also
- {{[[Template:|]]}}