# `geom` - Geometry Helper Functions

This module provides various helper functions for geometry handling. Note: remember to apply a location handler before in order to use these geometry utilities on node locations.

## Geometry Factories

class osmium.geom.WKBFactory

  Factory that creates WKB from osmium geometries.

  create_linestring(self: osmium.geom.WKBFactory, list: object, use_nodes: osmium.geom.use_nodes = <use_nodes.UNIQUE: 1>, direction: osmium.geom.direction = <direction.FORWARD: 0>) → str

    Create a LineString geometry from a `osmium.osm.Way`.

  create_multipolygon(self: osmium.geom.WKBFactory, area: object) → str

    Create a MultiPolygon geometry from a `osmium.osm.Area`.

  create_point(self: osmium.geom.WKBFactory, pt: object) → str

    Create a point geometry from a `osmium.osm.Node`.

  property epsg

    (read-only) EPSG number of the output geometry.

  property proj_string

    (read-only) projection string of the output geometry.

class osmium.geom.WKTFactory

  Factory that creates WKT from osmium geometries.

  create_linestring(self: osmium.geom.WKTFactory, list: object, use_nodes: osmium.geom.use_nodes = <use_nodes.UNIQUE: 1>, direction: osmium.geom.direction = <direction.FORWARD: 0>) → str

    Create a LineString geometry from a `osmium.osm.Way`.

  create_multipolygon(self: osmium.geom.WKTFactory, area: object) → str

    Create a MultiPolygon geometry from a `osmium.osm.Area`.

  create_point(self: osmium.geom.WKTFactory, pt: object) → str

    Create a point geometry from a `osmium.osm.Node`.

  property epsg

    (read-only) EPSG number of the output geometry.

  property proj_string

    (read-only) projection string of the output geometry.

class osmium.geom.GeoJSONFactory

  Factory that creates GeoJSON geometries from osmium geometries.

  create_linestring(self: osmium.geom.GeoJSONFactory, list: object, use_nodes: osmium.geom.use_nodes = <use_nodes.UNIQUE: 1>, direction: osmium.geom.direction = <direction.FORWARD: 0>) → str

    Create a LineString geometry from a `osmium.osm.Way`.

  create_multipolygon(self: osmium.geom.GeoJSONFactory, area: object) → str

    Create a MultiPolygon geometry from a `osmium.osm.Area`.

  create_point(self: osmium.geom.GeoJSONFactory, pt: object) → str

    Create a point geometry from a `osmium.osm.Node`.

  property epsg

    (read-only) EPSG number of the output geometry.

  property proj_string

    (read-only) projection string of the output geometry.

## Other Functions

osmium.geom.haversine_distance(list: object) → float

  Compute the distance using the Haversine algorithm which takes the curvature of earth into account. If a `WayNodeList` is given as a parameter the total length of the way in meters is computed.