Skip to main content

Parser for Lanelet2

Project description

lanelet2-parser: Parser for Lanelet2

Tutorial

Creating Lanelet2Parser instance

>>> from lanelet2_parser import Lanelet2Parser
>>> lanelet2_parser = Lanelet2Parser()

Parse OSM File

>>> osm_data = lanelet2_parser.parse(osm_map_file_path)
OSM Data Format
OSM
- version: Float
- nodes: List<Node>
- ways: List<Way>
- relations: List<Relation>

Node
- id: Int
- lat: Decimal
- lon: Decimal
- ele: Decimal
- tags: List<Tag>
- visible: Bool

Way
- id: Int
- nodes: List<Node>
- tags: List<Tag>
- visible: Bool

Relation
- id: Int
- members: List<Member>
- tags: List<Tag>
- visible: Bool

Tag
- key: String
- value: String

Member
- type: String
- ref: Int
- role: String

Convert Lanelet2 format from OSM

>>> lanelet2_data = lanelet2_parser.convert_to_lanelet2(osm_data)
Lanelet2 Data Format
Lanelet2
- version: Float
- points: List<Node>
- line_strings: List<LineString>
- lanelets: List<Lanelet>
- areas: List<Area>
- polygons: List<Polygon>
- regulatory_elements: List<RegulatoryElement>
- line_string_relations: Dict<line_string_id: LineStringRelation>
- lanelet_relations: Dict<lanelet_id: LaneletRelation>

Point
- id: Int
- lat: Decimal
- lon: Decimal
- ele: Decimal
- x: Decimal
- y: Decimal
- z: Decimal
- attibutes: List<Attribute>

LineString
- id: Int
- points: List<Point>
- attibutes: List<Attribute>

Lanelet
- id: Int
- left_bound: LineString
- right_bound: LineString
- center_line: LineString
- attibutes: List<Attribute>
- regulatory_element: List<RegulatoryElement>

RegulatoryElement
- id: Int
- subtype: String
- attibutes: List<Attribute>
- parameters: List<Parameter>

Parameter
- refers: LineString or Lanelet
- ref_line: LineString
- right_of_way: Lanelet
- param_yield: Lanelet
- cancels: Lanelet
- cancel_line: LineString

LineStringRelation
- prev_ids: List<Int>
- next_ids: List<Int>

LaneletRelation
- prev_ids: List<Int>
- next_ids: List<Int>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lanelet2_parser-0.1.8.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lanelet2_parser-0.1.8-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file lanelet2_parser-0.1.8.tar.gz.

File metadata

  • Download URL: lanelet2_parser-0.1.8.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.11

File hashes

Hashes for lanelet2_parser-0.1.8.tar.gz
Algorithm Hash digest
SHA256 711d4b7a5a70395077166928bb3787cd1db3b0e8bedcffeb82fa2b8fdfb7c69e
MD5 5649e069ef068185ecc383f2e9259425
BLAKE2b-256 bbc87f143573548d550d6fe20ab27a06b10d374210fa410c3cb2b26a0c7e7b68

See more details on using hashes here.

File details

Details for the file lanelet2_parser-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for lanelet2_parser-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6c1b5b10f39c1ea42f0f1b0cf48a746823cd769f090c0ca6b86514354a06bdb3
MD5 0b4f99f3ade0235b1fc4d3cb5bf68b0d
BLAKE2b-256 634f6acb40c0342ebb02498ef7d18b4cde6fa8650aa5d2d18394d467b3fbb18a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page