From e13e682a55c3303ed71fd250ee6da01db1fa7168 Mon Sep 17 00:00:00 2001 From: Hernawan Fa'iz Abdillah Date: Wed, 26 May 2021 17:22:50 +0700 Subject: [PATCH] Way: Add .is_area() --- src/python.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/python.rs b/src/python.rs index 58d8878..a2b71fa 100644 --- a/src/python.rs +++ b/src/python.rs @@ -77,6 +77,11 @@ impl Way { pub fn nodes(&self) -> PyResult> { 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 for Way {