Skip to content

Changeset

Bases: BaseModel, Bindable

Represents a single changeset

Attributes:

Name Type Description
id int

The ID of the changeset.

created_at datetime

The date and time the changeset was created (opened)(UTC).

open bool

Whether the changeset is open.

comments_count int

The number of comments on the changeset.

changes_count int

The number of changes made by the changeset.

created_count int

The number of elements created by the changeset.

modified_count int

The number of elements modified by the changeset

closed_at datetime

The date and time the changeset was closed

min_lat float

The minimum latitude of the changeset in degrees.

min_lon float

The minimum longitude of the changeset in degrees.

max_lat float

The maximum latitude of the changeset in degrees.

max_lon float

The maximum longitude of the changeset in degrees.

uid int

The ID of the user that made the changeset

user str

The display name of the user that made the changeset

tags dict[str, str]

A dictionary of tags on the changeset

bbox property

Contstructs a polygon represeting the BBox of the changeset.

Returns:

Type Description
Polygon

The BBox (minimal bounding box) of the changeset.

fetch_changes()

Fetches the changes made by the changeset.

Returns:

Type Description
OsmChange

An object with all the changes made by the changeset.

fetch_user()

Fetches the user that made the changeset

Returns:

Type Description
User

The user that made the changeset

OsmChange

Bases: BaseModel

Represents the changes made by a specific changeset

Attributes:

Name Type Description
created list[Node | Way | Relation]

List of all of the elements created by the changeset

modified list[Node | Way | Relation]

List of all of the elements modified by the changeset

deleted list[Node | Way | Relation]

List of all of the elements deleted by the changeset

Notes

The osmChange format is only available in XML, so this object first parses that XML document and then returns a cleaned up version that is based on the normal Pydantic BaseModel. All XML types used in the initial parsing are effectively duplicates of those found elsewhere.