Way¶
Bases: Element
Represents a single way (series of nodes) in the OSM database.
A way may be closed (i.e a building, loop, etc.) or open (road).
To construct the full geometry, a full way is required (see fetch_full).
is_closed
property
¶
Helper property to check if a way is closed or not.
This can also be determined by fetching the full way, construction the geometry, and checking the is_closed property on the geometry.
FullWay¶
Bases: Way
Represents a way with additional information about child nodes.
This function is useful since it the additional information about nodes is required to generate the geometry of the way.
Notes
In reality this object only contains a list of elements, but to make it easier to use, it populates itself with the contents of the way itself (which is always one of the items in the list of elements)
geometry
property
¶
Constructs the geometry of the way
Returns:
| Type | Description |
|---|---|
LineString
|
A line string representing the way. |