Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Updated dependabot workflow and added CODEOWNERS [#584](https://github.com/ie3-institute/OSMoGrid/issues/584)
- Update `Gradle` to 9.1.0 [#622](https://github.com/ie3-institute/OSMoGrid/issues/622)
- Update `Gradle Wrapper` to 9.1.0 [#624](https://github.com/ie3-institute/OSMoGrid/issues/624)
- Improve documentation of overpass query [#628](https://github.com/ie3-institute/OSMoGrid/issues/628)

### Fixed
- Fixed bug in `LvGridGeneratorSupport` [#388](https://github.com/ie3-institute/OSMoGrid/issues/388)
Expand Down
53 changes: 27 additions & 26 deletions docs/readthedocs/use/osmInputData.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,36 +60,37 @@ out skel qt;

This example will return the OSM data for the area of [TU Dortmund University](https://www.tu-dortmund.de/)

Please note that the use of relation ids requires some pre-processing. TU Dortmund University has the relation id 6188406, but needs to be added to 3600000000 to get the correct id 3606188406 for the overpass query.
Please note that the boundaries we are using here can be of type relation or of type way. The type needs to be specified. Belows code includes both, the boundary of TU Dortmund University as type relation and, currently comment out, an area in Dortmund which is limited by a way. To use the latter one, simply move the comment (`//`) before `w way(id:37141772);` and place it before `relation(id:6188406);` to change from using relation's id to using the way's id.

```
[out:xml][timeout:30];
// relation of Dortmund University: 6188406
// relation: add 3600000000
{{searcharea=area:3606188406}}
(
relation["boundary"="administrative"]["admin_level"~"^(6|7|8|9|10|11|12)$"]({{searcharea}});
relation["boundary"="census"]["admin_level"~"^(11|12)$"]({{searcharea}});

node["building"]({{searcharea}});
way["building"]({{searcharea}});
relation["building"]({{searcharea}});

node["highway"]({{searcharea}});
way["highway"]({{searcharea}});
relation["highway"]({{searcharea}});

node["landuse"]({{searcharea}});
way["landuse"]({{searcharea}});
relation["landuse"]({{searcharea}});

node["power"="substation"]({{searcharea}});
way["power"="substation"]({{searcharea}});
relation["power"="substation"]({{searcharea}});



// Get the way or relation and convert it to an area dynamically
// id of the relation of Dortmund University: 6188406
// id of an area limted as a way in Dortmund: 37141772
(
//way(id:37141772);
relation(id:6188406);
);

map_to_area -> .searcharea;

(
node["building"](area.searcharea);
way["building"](area.searcharea);
relation["building"](area.searcharea);

node["highway"](area.searcharea);
way["highway"](area.searcharea);
relation["highway"](area.searcharea);

node["landuse"](area.searcharea);
way["landuse"](area.searcharea);
relation["landuse"](area.searcharea);

node["power"="substation"](area.searcharea);
way["power"="substation"](area.searcharea);
relation["power"="substation"](area.searcharea);
);

// print results
out;
Expand Down