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((object)arg1)
Factory that creates WKB from osmium geometries.
-
create_linestring((WKBFactory)self, (WayNodeList)list[, (use_nodes)use_nodes=osmium.geom.use_nodes.UNIQUE[, (direction)direction=osmium.geom.direction.FORWARD]]) → str :
- create_linestring( (WKBFactory)self, (Way)way [, (use_nodes)use_nodes=osmium.geom.use_nodes.UNIQUE [, (direction)direction=osmium.geom.direction.FORWARD]]) -> str :
- Create a LineString geometry from a osmium.osm.Way.
-
create_multipolygon((WKBFactory)self, (Area)area) → str :
Create a MultiPolygon geometry from a osmium.osm.Area.
-
create_point((WKBFactory)self, (Location)location) → str :
- create_point( (WKBFactory)self, (Node)node) -> str :
- Create a point geometry from a osmium.osm.Node.
- create_point( (WKBFactory)self, (NodeRef)ref) -> str :
- Create a point geometry from a osmium.osm.NodeRef.
-
epsg
(read-only) EPSG number of the output geometry.
-
proj_string
(read-only) projection string of the output geometry.
Other Functions
-
osmium.geom.haversine_distance((WayNodeList)list) → 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.