Package org.oscim.tiling.source.mapfile
Class OSMUtils
java.lang.Object
org.oscim.tiling.source.mapfile.OSMUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisArea(MapElement mapElement) Heuristic to determine from attributes if a map element is likely to be an area.
-
Method Details
-
isArea
Heuristic to determine from attributes if a map element is likely to be an area. Precondition for this call is that the first and last node of a map element are the same, so that this method should only return false if it is known that the feature should not be an area even if the geometry is a polygon.Determining what is an area is neigh impossible in OSM, this method inspects tag elements to give a likely answer. See http://wiki.openstreetmap.org/wiki/The_Future_of_Areas and http://wiki.openstreetmap.org/wiki/Way
The order in which the if-clauses are checked is determined with the help from https://taginfo.openstreetmap.org
- Parameters:
mapElement- the map element (which is assumed to be closed and have enough nodes to be an area)- Returns:
- true if tags indicate this is an area, otherwise false.
-