User:Soldier Boy/overpass-turbo

From OpenStreetMap Wiki
Jump to navigation Jump to search

Overpass-Turbo-Scripts

Missing postal_code (Austria)

<osm-script output="json">
    <query type="relation">
      <has-kv k="ref:at:gkz"/>
      <has-kv k="admin_level" v="8"/>
      <has-kv k="postal_code" modv="not" regv="."/>
      <has-kv k="name" modv="not" regv="Wien"/>
      <bbox-query {{bbox}}/>
    </query>
  <print mode="body"/>
  <recurse type="down"/>
  <print mode="skeleton"/>
</osm-script>

Power-Generator

{{key=power}}
{{value=generator}}
<osm-script output="json">
  <union>
    <query type="node">
      <has-kv k="{{key}}" v="{{value}}"/>
      <bbox-query {{bbox}}/>
    </query>
    <query type="way">
      <has-kv k="{{key}}" v="{{value}}"/>
      <bbox-query {{bbox}}/>
    </query>
    <query type="relation">
      <has-kv k="{{key}}" v="{{value}}"/>
      <bbox-query {{bbox}}/>
    </query>
  </union>
  <print mode="body"/>
  <recurse type="down"/>
  <print mode="skeleton"/>
</osm-script>

{{style:
/* all black */
node,way,area
{ fill-color:#000000; fill-opacity:0.4; color:#000000; opacity:0.8; width:3; }

/* power_source: outer red */
node[power_source],
way[power_source],
area[power_source]
{ color:#ff0000; }

/* generator:source: outer green */
node[generator:source],
way[generator:source],
area[generator:source]
{ color:#00ff00; }

/* power_source & generator:source: outer yellow */
node[generator:source][power_source],
way[generator:source][power_source],
area[generator:source][power_source]
{ color:#ffff00; }

/* generator:method: outer bigger */
node[generator:method],
way[generator:method],
area[generator:method]
{ width:7; }

/* power_rating: inner red */
node[power_rating],
way[power_rating],
area[power_rating]
{ fill-color:#ff0000; }

/* generator:output: inner yellow */
node[generator:output],
way[generator:output],
area[generator:output]
{ fill-color:#ffff00; }

/* generator:output*: inner green */
node[generator:output:electricity],
way[generator:output:electricity],
area[generator:output:electricity],
node[generator:output:heat],
way[generator:output:heat],
area[generator:output:heat],
node[generator:output:cold],
way[generator:output:cold],
area[generator:output:cold]
{ fill-color:#00ff00; }

}}