Pyproj error in XODR conversion

Hello,

We are trying to convert an XODR map into CommonRoad map, however, we get this error:

File "/home/sofya/.local/lib/python3.8/site-packages/pyproj/crs/crs.py", line 348, in __init__
    self._local.crs = _CRS(self.srs)
  File "pyproj/_crs.pyx", line 2366, in pyproj._crs._CRS.__init__
pyproj.exceptions.CRSError: Invalid projection: <![CDATA[PROJCS["OSHKOSH_road_MD",PARAMETER["latitude_of_origin",43.9831244],PARAMETER["central_meridian",-88.586869]]]]>: (Internal Proj Error: proj_create: unrecognized format / unknown name)

I have been able to convert map successfully before, but this error is new and I couldn’t find anything related to it in the forum. I can send you the two maps that causes this error if needed (one of the maps is the smaller version of the other).

I was wondering if any of you have seen this error, or if you could expand what it could it indicating?

It looks like the projection string in your OpenDRIVE map cannot be parsed by the third-party package we use for the coordinate projection.
We had similar problems with projections strings containing “+geoidgrids” elements.
Removing this part, solved the problem in our case.
If this does not help in your case, please post the projection string of your OpenDRIVE map.

1 Like

It unfortunately didn’t work. I couldn’t find any items with “+geoidgrids”.

How does a projection string looks like? I’m not quite sure what that is.

It is the part in <geoReference>...</geoReference>, e.g.,
<geoReference><![CDATA[+proj=tmerc +lat_0=48.17722803371593 +lon_0=11.59292664305758 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +vunits=m +no_defs ]]></geoReference>

Oh I see. My geoReference is:

<geoReference>&lt;![CDATA[PROJCS["OSHKOSH_road_final3",PARAMETER["latitude_of_origin",43.9831244],PARAMETER["central_meridian",-88.586869]]]]&gt;</geoReference>

Our conversion supports only proj-strings as described here.
Probably you have to comment the line in your OpenDRIVE file or convert it in the required format.