Skip to content

Node

Bases: Element

Represents a single node with a latiude and longitude.

A node is one of the main OSM element types alongside ways and relations, and as such inhertits all the attributes from Element. A node may form part of a way or relation, be a standalone POI, or both.

Attributes:

Name Type Description
type str

The OSM element type. Always "node".

lat float

The latitude in degrees.

lon float

The longitude in degrees.

geometry property

Constructs a shapely point for the node

Returns:

Type Description
Point

A point with the longitude and latitude of the object

fetch_history()

Fetches a list of all of the version of the node

Returns:

Type Description
list[Node]

A list containing all the versions of the node

fetch_relations()

Fetches the relations that the node is a member of

Returns:

Type Description
list[Relation]

A list of the relations the node is a member of if any

fetch_version(version)

Fetches a specific version of the node

Returns:

Type Description
Node

The version of the node requested

fetch_ways()

Fetches the ways that the node is a member of

Returns:

Type Description
list[Way]

A list of the ways the node is a member of if any