osm-is-area
An OpenSreetMap area must be a way or a relation. But not just any way or relation.
If you are not so fortunate that all your elements are nodes, look further...
API
osm_is_area::way
According to Overpass turbo, a way is considered an area if
- It forms a closed loop
- It is not tagged
area=no
- It conforms to one of the conditions for polygon tags.
use osm_is_area;
let tags = vec!;
let refs = vec!;
let is_area = way;
assert_eq!;
osm_is_area::relation
A relation is an area when it has a tag "type" with value "multipolygon".
use osm_is_area;
let tags = vec!;
let members = vec!;
let is_area = relation;
assert_eq!;
License
MIT