# `osm` - Basic Datatypes

The `osm` submodule contains definition of the basic data types used throughout the library.

## Native OSM Objects

Native OSM object classes are lightwight wrappers around the osmium OSM data classes. They are immutable and generally bound to the life-time of the buffer they are saved in.

There are five classes representing the basic OSM entities.

## Mutable OSM Objects

The objects in `osmium.osm.mutable` are Python versions of the native OSM objects that can be modified. You can use these classes as a base class for your own objects or to modify objects read from a file.

## Node Reference Lists

Line geometries in OSM are simply a sequence of nodes. To simplify processing osmium returns such node sequences using a special datatype that contains a reference to the node id and also the location geometry. The latter is only valid if the node locations have been cached by a location handler.

## Other OSM Entity Attributes

Some of the attributes of the OSM entities are represented with more complex classes.