openlr_dereferencer.example_sqlite_map package¶
Submodules¶
openlr_dereferencer.example_sqlite_map.primitives module¶
Contains the Node and the Line class of the example format
-
exception
openlr_dereferencer.example_sqlite_map.primitives.ExampleMapError[source]¶ Bases:
ExceptionSome error reading the DB
-
class
openlr_dereferencer.example_sqlite_map.primitives.Line(map_reader, line_id: int)[source]¶ Bases:
openlr_dereferencer.maps.abstract.LineLine object implementation for the example format
-
end_node¶ Returns the node to which this line goes
-
fow¶ Returns the form of way for this line
-
frc¶ Returns the functional road class for this line
-
geometry¶ Returns the line geometry
-
length¶ Length of line in meters
-
line_id¶ Returns the line id
-
point_n(index) → openlr.locations.Coordinates[source]¶ Returns the n th point in the path geometry, starting at 0
-
start_node¶ Returns the node from which this line comes from
-
-
class
openlr_dereferencer.example_sqlite_map.primitives.Node(map_reader, node_id: int)[source]¶ Bases:
openlr_dereferencer.maps.abstract.NodeNode class implementation for example_sqlite_map
-
connected_lines() → Iterable[openlr_dereferencer.example_sqlite_map.primitives.Line][source]¶ Returns lines which touch this node
-
coordinates¶ Returns the lon, lat coordinates of this node
-
incoming_lines() → Iterable[openlr_dereferencer.example_sqlite_map.primitives.Line][source]¶ Yields all lines coming directly to this node.
-
node_id¶ Returns the id of this node.
-
Module contents¶
The example map format described in map_format.md, conforming to the interface in openlr_dereferencer.maps
-
class
openlr_dereferencer.example_sqlite_map.ExampleMapReader(map_db_file: str)[source]¶ Bases:
openlr_dereferencer.maps.abstract.MapReaderThis is a reader for the example map format described in map_format.md.
Create an instance with: ExampleMapReader(‘example.sqlite’).
-
find_lines_close_to(coord: openlr.locations.Coordinates, dist: float) → Iterable[openlr_dereferencer.example_sqlite_map.primitives.Line][source]¶ Yields all lines within dist meters around coord
-
find_nodes_close_to(coord: openlr.locations.Coordinates, dist: float) → Iterable[openlr_dereferencer.example_sqlite_map.primitives.Node][source]¶ Finds all nodes in a given radius, given in meters
Yields every node within this distance to coord.
-
get_line(line_id: int) → openlr_dereferencer.example_sqlite_map.primitives.Line[source]¶ Returns a line by its id
-
get_lines() → Iterable[openlr_dereferencer.example_sqlite_map.primitives.Line][source]¶ Yields all lines in the map.
-