Struct OwnedChangeEntry
One format-independent owned OSM change entry.
struct OwnedChangeEntry;
Fields common to every element are stored once. The payload selected by type
Fields
| Name | Type | Description |
|---|---|---|
action
|
ChangeAction | Requested whole-object operation. |
deleteIfUnused
|
bool | Explicit conditional-delete policy. Meaningful only for deleteObject. |
id
|
long | Element identifier. Negative local/create IDs are preserved. |
location
|
LocationView | Node location when type is node and objectState is complete. |
metadata
|
OwnedMetadata | Optional OSM element metadata with independent presence flags. |
objectState
|
ChangeObjectState | Whether full object content is present. |
relationMembers
|
OwnedRelationMember[] | Ordered Relation members when type is relation. |
tags
|
OwnedTag[] | Ordered tags, preserving input order and duplicates. |
type
|
ElementType | OSM element kind. |
wayNodes
|
OwnedNodeRef[] | Ordered Way node references when type is way. |
Properties
| Name | Type | Description |
|---|---|---|
complete[get]
|
bool | Whether this entry carries a complete element state. |
shapeValid[get]
|
bool | Check only the representation-shape invariants of this entry. |
Methods
| Name | Description |
|---|---|
deepCopy
()
|
Create an independently mutable copy. |
deletion
(type, id, metadata, ifUnused)
|
Construct an identity-only deletion. |
fromNode
(action, value)
|
Construct a complete Node change without copying child-array storage. |
fromRelation
(action, value)
|
Construct a complete Relation change without copying child-array storage. |
fromWay
(action, value)
|
Construct a complete Way change without copying child-array storage. |
is
- node: location + tags; - way: wayNodes + tags; - relation: relationMembers + tags.
Unused payload arrays must be empty for a structurally valid entry. deleteIfUnused represents the Editing API/osmChange deletion policy explicitly. It is meaningful only for deleteObject and is never implied.
.init is safe to destroy and assign, but it is not a valid change operation: it describes a create action with identity-only content.