opendrive.opendrive_conversion.plane_elements package
Submodules
opendrive.opendrive_conversion.plane_elements.border module
- class opendrive.opendrive_conversion.plane_elements.border.Border(ref_offset=0.0)[source]
Bases:
objectA lane border defines a path along a whole lane section. A lane always uses an inner and outer lane border. The reference can be another lane border or a plan view.
- calc(s_pos, width_offset=0.0, is_last_pos=False, reverse=False, compute_curvature=True)[source]
Calculate the Cartesian coordinates and the tangential direction of the border by calculating position of reference border at s_pos and then adding the width in orthogonal direction to the reference position.
- Parameters:
s_pos (float) – Position s_pos specified in curve parameter ds where to calculate the cartesian coordinates on the border
width_offset (float) – Offset to add to calculated width at position s_pos
is_last_pos (bool) – Whether s_pos is the last position
reverse (bool) – Whether to calculate positions in a reverse order, default is False
compute_curvature (bool) – Whether to computer curvature, default is True
- Returns:
coord: (x,y) tuple of cartesian coordinates and the direction angle in radians.
tang: Tangential at s_pos, a float. curv: Curvature at s_pos, a float, optional. max_geometry_length: Maximum length of the geometry, a float. :rtype: tuple[Optional[Any], Any, Any, Any]
- get_next_width_coeffs(s_pos, is_last_pos=False)[source]
Get width coefficients which apply at position s_pos.
- Parameters:
s_pos (float) – Position on border in curve_parameter ds
is_last_pos (bool, default is False) – Whether s_pos is the last position
- Returns:
An array with coefficients [a, b, c, d] for the polynomial w = a + b*ds + c*ds² + d*ds³
- Return type:
list
opendrive.opendrive_conversion.plane_elements.crosswalks module
opendrive.opendrive_conversion.plane_elements.geo_reference module
- opendrive.opendrive_conversion.plane_elements.geo_reference.get_geo_reference(geo_reference)[source]
Gets the geographic location information from the geo string extracted from opendrive files.
- Parameters:
geo_reference (String) – Input string from which longitude and latitude should be extracted.
- Returns:
longitude and latitude parsed from input string
- Return type:
float