Skip to content

Commit

Permalink
Merge pull request #165 from osm-without-borders/add_capital
Browse files Browse the repository at this point in the history
Add capital
  • Loading branch information
sdrll authored Jan 23, 2024
2 parents 7b048fb + 8028518 commit 898e5bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The best way to explore the data (i.e. the coverage, the zones metadata, the hie
You can build cosmogony to extract the regions on your own.

- #### Build
Here are the necessary manual steps to build cosmogony:
Here are the necessary manual steps to build cosmogony :
```bash
curl https://sh.rustup.rs -sSf | sh # intall rust
apt-get install libgeos-dev # install GEOS
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ pub fn is_admin(obj: &OsmObj) -> bool {
&&
rel.tags.get("admin_level").is_some()
}
OsmObj::Node(ref node) => {
node.tags.get("capital").map_or(false, |v| v == "yes")
}
_ => false,
}
}
Expand Down

0 comments on commit 898e5bb

Please sign in to comment.