Why not ask your question on the new OpenStreetMap Community Forum?

Hi everyone :) I am having trouble making specific queries for Switzerland. Below is the query that I am using that works for cities i.e. Bern and other countries i.e. United Kingdom, however for some reason whenever I change the name to Switzerland it does not work. Any advice on what I am doing wrong??
solar_query = """ [out:json]; area["name"="Switzerland"]->.searchArea; ( node(area.searchArea)["generator:source"="solar"]['generator:output:electricity'='yes']; way(area.searchArea)["generator:source"="solar"]['generator:output:electricity'='yes']; relation(area.searchArea)["generator:source"="solar"]['generator:output:electricity'='yes']; ); out body; >; out skel qt; """ Thanks so much :)

asked 15 Aug '21, 10:42

dylan_johnson123's gravatar image

accept rate: 0%

Should it be name:en rather than name, to match the English language name "Switzerland"?

permanent link

answered 15 Aug '21, 18:51

alan_gr's gravatar image

accept rate: 15%

Yes it worked :)! Thanks so much, must have missed that on the docs !

(15 Aug '21, 20:20) dylan_johnso...
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Aug '21, 10:42

question was seen: 812 times

last updated: 15 Aug '21, 20:20

powered by OSQA