Skip to content

Commit

Permalink
Way: Add .is_area()
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdillah committed May 26, 2021
1 parent cbd078a commit e13e682
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ impl Way {
pub fn nodes(&self) -> PyResult<Vec<i64>> {
Ok(self.inner.nodes.clone())
}

/// Determine whether it is a closed polygon (area) or not
pub fn is_area(&self) -> bool {
self.inner.is_polygon()
}
}

impl From<map::Way> for Way {
Expand Down

0 comments on commit e13e682

Please sign in to comment.