open-simulation-interface icon indicating copy to clipboard operation
open-simulation-interface copied to clipboard

Missing offset for geo reference projection

Open tbleher opened this issue 4 years ago • 4 comments

The OSI GroundTruth provides a field proj_string to describe a mapping between the coordinates used in OSI and global world coordinates. My understanding is that ideally one would copy the projection string directly from OpenDRIVE to OSI. However, OpenDRIVE provides not just a geoReference but also an offset field.

OSI currently does not have an offset field. To support an OpenDRIVE file which has a defined offset, there are two workarounds currently:

  • Create a non-standard projection based on the OpenDRIVE projection and the offset. This is quite cumbersome to do.
  • Store different coordinates in OSI than in OpenDRIVE. Then the map_reference and model_reference fields might not work correctly.

None of the workarounds is satisfactory.

Suggestion: add an additional x and y offset with the same semantics as in OpenDRIVE. This will make it trivial to copy the projection from OpenDRIVE to OSI. This should not affect backward compatibility, since the offset will be zero by default, which is the existing behaviour. Alternatively, the offset should be deprecated in OpenDRIVE.

tbleher avatar Feb 09 '21 10:02 tbleher

The offset in OpenDRIVE is nothing else than a false northing / false easting, which can also be described within the PROJ-string (OpenDRIVE geoReference / OSI proj_string), usually by x_0 and y_0 . This means that the same thing can be defined twice. I would rather remove this redundancy in OpenDRIVE than add it to OSI.

TimFrickeBMW avatar May 05 '21 08:05 TimFrickeBMW

@TimFrickeBMW Thanks for the explanation! I agree that removing this from OpenDRIVE makes more sense. I have created https://code.asam.net/simulation/standard/opendrive/-/issues/71 for this - hopefully this can be deprecated for OpenDRIVE 1.7 (alternatively 1.8).

tbleher avatar May 05 '21 13:05 tbleher

In OpenDRIVE, the offset is used to not run into problems with floating point accuracy (most decimal places / best accuracy around 0) and to not have to manipulate the proj string. "If you want to apply an offset, use the element instead of changing all parameter values." (See: https://releases.asam.net/OpenDRIVE/1.6.0/ASAM_OpenDRIVE_BS_V1-6-0.html#_georeferencing_in_opendrive)

adrianschultz avatar May 19 '21 07:05 adrianschultz

@adrianschultz I was in the OpenDRIVE standardization group when the line quoted above was added, and now (after further discussion) believe that this was a mistake. I think the offset should be deprecated in OpenDRIVE. I will try to do that for OpenDRIVE 1.7 or 1.8 (as mentioned above). So this ticket was a mistake - please do not add anything here to OSI (I explicitly closed this, since the request was misguided).

tbleher avatar May 25 '21 14:05 tbleher