Skip to content

Instantly share code, notes, and snippets.

@Rabscuttler
Created April 6, 2020 17:46
Show Gist options
  • Select an option

  • Save Rabscuttler/4ff98ee55888695b533ce3fe37af3c3b to your computer and use it in GitHub Desktop.

Select an option

Save Rabscuttler/4ff98ee55888695b533ce3fe37af3c3b to your computer and use it in GitHub Desktop.
Query for all solar PV nodes, ways and relations on OSM overpass turbo
[out:json];
area["name"="United Kingdom"]->.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;
@mmd-osm
Copy link

mmd-osm commented Apr 6, 2020

Let’s make that a bit shorter:

[out:json];
area["name"="United Kingdom"]->.searchArea;
nwr(area.searchArea)["generator:source"="solar"]['generator:output:electricity'='yes'];
out body;
>;
out skel qt;

@Rabscuttler
Copy link
Author

Much better thanks!

To find solar farms I guess these tags would be better:

power=plant
+ plant:source=solar
+ plant:method=photovoltaic
+ plant:output:electricity=*

https://wiki.openstreetmap.org/wiki/Tag:generator:source%3Dsolar

[out:json];
area["name"="United Kingdom"]->.searchArea;
nwr(area.searchArea)["plant:source"="solar"]["plant:method"="photovoltaic"]['plant:output:electricity'='yes'];
out body;
>;
out skel qt;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment