From OpenStreetMap Wiki
Jump to navigation Jump to search

Area Proposal

A new OSM data type "Area" in addition to "Node", "Way" and "Relation"

For the database of OSM this new data type is just the same as a relation which is handled differently only in the API. For the editors handling will become easier as lines and areas have rather different operations and they are easily recognized without analyzing tags and tag changes.

Viewed as a relation, it contains ways with the roles "left" (object is on the left side of this way) and "right" (object is on the right side of this way). All members with other roles (even the empty role) belong to the object defined and have no influence whatsoever on the geometry of the area.

OSM coastlines can be viewed as an area of this kind where the membership in the virtual "ocean"-Relation is implemented as the tag "natural=coastline" and the role "right" is assumed.

All other kinds of OSM-areas (closed ways, multipolygon- and boundary-relations) are to be replaced on the long run.

Software no longer needs to work on three totally different concepts of areas. Editors no longer need complicated rules to find out if it's an area or not or even both. It becomes possible to work on partially loaded area data and to render it. (It might be wise to restrict the distance between two nodes of member ways)

The editors and others programs uploading to the API are responsible for uploading only geometrically correct areas. They should neither expect the API to accept bad areas nor expect the API to do some or all of the checks.

This new API is only an extension of the old one and the changes can be done without outage. Programs using the API can be extended to use the new API functions without big changes to the existing software parts. After API and software changes are done, a bot may be used to convert all areas which are known to be without errors into the new data structure. It's not necessary to convert areas with problems or potential problems. The mappers can look up the remaining areas and either convert them themselves or just make them good enough for automatic conversion. In the end, type=multipolygon and area=yes/no become deprecated.