Osm parser is simple (under 500 lines) OpenStreetMap xml output parser. It's guided by official OpenStreatMap documentation and consist of a little amount of simple classes that represent specific entity of OpenStreetMap
Class Map represent an object that contains all the entities parsed from osm file. It also have special methods for computing some math
def get_bounds() -> tuple[float]
# Return the coordinates of sides from current map frame in this order. (All values are float)
# (left , right , top , bottom)
def get_size() -> float
# Return the area of current map frame
def get_center() -> tuple[float]
# Return coordinates of center point of current map frame (latitude , longtitute)
def get_ways() -> osmparser.Way
# Return all map ways
def get_routes() -> osmparser.Route
# Return all map routes
def get_relations() -> osmparser.Relation
# Return all map relations
Relation here
Relation base class represent serialization of xml tag from OpenStreetMap xml export.
Way here
Way can be closed or can be opened