5

I am aware of Open Infrastructure Map - it does a great job of showing electric power lines. I would like to have a datasource independent from OIM, showing the Swedish electricity grid, possibly with substations.

I am also aware of this map - I need higher resolution though. This map shows the locations connected, but the power lines itself are not marked with precision. I can use this map to confirm OIM's map of high voltage power lines, but that map has only the highest voltage lines, and not the lower level ones.

This map is about the US. I would need a similar one but of Sweden.

1
  • I was looking foward to find some answers here... did you find what you are looking for? I am searching also data about substations and low voltage grid. until now the best source was OpenstreetMap
    – A.Bazan
    Jun 29, 2022 at 15:45

1 Answer 1

3

Open Infrastructure Map is based on OSM Data. Let's use it to create own map / dataset. In below example I'm using R and mainly osmdata together with sf packages.

Let's download the boundary of Sweden, which will be used as a clipping area.

sw <- osmdata::getbb("Sweden", featuretype = "country", format_out = "matrix") |>
  osmdata::opq(timeout = 60) |>
  osmdata::add_osm_feature(key = "boundary", value = "administrative") |>
  osmdata::add_osm_feature(key = "admin_level", value = "2") |>
  osmdata::osmdata_sf()

boundary <- sw$osm_multipolygons |>
  subset(name.en == "Sweden") |>
  sf::st_geometry()

boundary |>
  plot(col = "grey90")

Let's download all features with power key (for details, see https://wiki.openstreetmap.org/wiki/Key:power):


p <- osmdata::getbb("Sweden", featuretype = "country", format_out = "matrix") |>
  osmdata::opq(timeout = 600) |>
  osmdata::add_osm_feature(key = "power") |>
  osmdata::osmdata_sf()

Now, we will extract only power lines, which spatially belong to Sweden. They are in osm_lines data:

grid <- p$osm_lines |>
  subset(apply(sf::st_intersects(p$osm_lines, boundary, sparse = TRUE), 1, any)) |>
  subset(power == "line") |>
  subset(select = c("osm_id", "voltage")) |>
  tidyr::separate_rows(voltage) |>
  dplyr::distinct(.keep_all = TRUE) |>
  dplyr::mutate(voltage = as.numeric(voltage))

And let's add them to the plot:

plot(grid["voltage"], add = TRUE)

Let's extract the substations form osm_polygon and osm_multipolygon data, bind them together and add to plot as well:

subst <- p$osm_polygons |>
  subset(apply(sf::st_intersects(p$osm_polygons, boundary, sparse = TRUE), 1, any)) |>
  subset(power == "substation") |>
  subset(select = c("osm_id", "name"))

subst <- p$osm_multipolygons |>
  subset(apply(sf::st_intersects(p$osm_multipolygons, boundary, sparse = TRUE), 1, any)) |>
  subset(power == "substation") |>
  subset(select = c("osm_id", "name")) |>
  rbind(subst)

subst |>
  sf::st_geometry() |>
  plot(col = "grey90", add = TRUE)

The downloaded data can be saved on disc for further use with st_write() function from sf package. Then you can open it in QGIS and style it properly.

Created on 2022-10-01 with reprex v2.0.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.