tum-gis / rtron

r:trån is a road space model transformer library for OpenDRIVE, CityGML and beyond
https://rtron.io
Apache License 2.0
50 stars 12 forks source link

Warning raised when no "height" attribute is indicated for an object #25

Closed MatteoRagni closed 1 year ago

MatteoRagni commented 1 year ago

RTron version: 1.3.0

If the "height" attribute is not generated for an object, the following warning is added to the 02_opendrive_evaluator_report.json report file:

{
    "type": "",
    "info": "Road object contains a polyhedron with non-zero height, but the height of the road object element is Option.None.",
    "location": "Road object: roadObjectId=2, roadId=8",
    "incidentSeverity": "WARNING",
    "wasFixed": false,
    "infoValues": {
    },
    "messageSeverity": "WARNING"
}

This warning indicates that the "height" attribute was not indicated. However, according to the OpenDRIVE schema, this attribute is optional. Because of this, we believe that this message should be of level "INFO" rather than "WARNING".

benediktschwab commented 1 year ago

Thanks for reporting, I agree. The standard states the following:

"If an \ is defined, it supersedes the bounding box." ~ ASAM OpenDRIVE v1.7.0

Therefore, a bounding box representation as an angular object (width, length, and height attributes) or a circular object (radius and height attributes) is not strictly needed in my understanding. The reason for this can be either a more complex object geometry (e.g. outlines or repeats) or simply a point geometry (only s, t, and zOffset attributes).

I would suggest that neither a warning nor an info message should be reported by rtron. Would that be appropriate from your side or do you know of a special attribute combination that should be reported?

MatteoRagni commented 1 year ago

We agree that should not have info or warning. In general all optional fields for the standard shall raise nor info or warnings messages.

From a side note, there are some issues using bounding boxes also with outlines and repeats (it is not possible to define the center of the bounding box, the bbox will have size but not location when using objects with a "projection", and thus e.g. in VTD is not interpreted correctly - bounding box is in a different place wrt object).

benediktschwab commented 1 year ago

Should be fixed in ce30d42 on the develop branch. Can you verify that it is solved? For the VTD problem, a multi-geometry transformation to CityGML would indeed be useful (see #27).

DavideFarina96 commented 1 year ago

I tested the development branch, and the issue appears to be fixed! No warnings are now raised if those optional fields are missing. Thanks for the update