# OGR Error: Unsupported SRS

**URL:** <https://openradar.discourse.group/t/ogr-error-unsupported-srs/260>\
**Category:** Python\
**Tags:** wradlib\
**Created:** [July 4, 2023, 4:56am UTC](https://openradar.discourse.group/t/ogr-error-unsupported-srs/260 "2023-07-04T04:56:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alan-weatherradar](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/alan-weatherradar/32/180_2.png) [@alan-weatherradar](https://openradar.discourse.group/u/alan-weatherradar)\
**Post date:** [July 4, 2023, 4:56am UTC](https://openradar.discourse.group/t/ogr-error-unsupported-srs/260/1 "2023-07-04T04:56:47Z")

</div>

Hi

## I have just installed wradlib (using conda on a fedora 38 wkstation) and now running the ppi\_example notebook and get the following error:

RuntimeError Traceback (most recent call last)  
Cell In[5], line 1  
----\> 1 ax, pm = wradlib.vis.plot\_ppi(img)  
2 txt = pl.title(“Simple PPI”)

File ~/anaconda3/envs/wradlib/lib/python3.11/site-packages/wradlib/vis.py:473, in plot\_ppi(data, r, az, elev, site, proj, fig, ax, func, rf, \*\*kwargs)  
459 elev = np.ones\_like(az) \* elev  
461 da = georef.create\_xarray\_dataarray(  
462 data,  
463 r=r,  
(…)  
470 \*\*kw\_spherical,  
471 )  
 → 473 da = georef.georeference\_dataset(da, proj=proj)  
475 if util.has\_import(osr):  
476 # fallback to proj=None for GDAL OSR  
477 if isinstance(proj, osr.SpatialReference):

File ~/anaconda3/envs/wradlib/lib/python3.11/site-packages/wradlib/georef/xarray.py:194, in georeference\_dataset(obj, \*\*kwargs)  
189 xyz, dst\_proj = polar.spherical\_to\_xyz(  
190 r, az, obj[“elevation”], site, re=re, ke=ke, squeeze=True  
191 )  
192 # proj, convert to aeqd and add offset  
193 else:  
 → 194 xyz, dst\_proj = polar.spherical\_to\_xyz(  
195 r, az, obj[“elevation”], site, re=re, ke=ke, squeeze=True  
196 )  
197 xyz += np.array(site).T  
199 # calculate center point  
200 # use first range bins

File ~/anaconda3/envs/wradlib/lib/python3.11/site-packages/wradlib/georef/polar.py:106, in spherical\_to\_xyz(r, phi, theta, sitecoords, re, ke, squeeze, strict\_dims)  
104 osr = import\_optional(“osgeo.osr”)  
105 if has\_import(osr):  
 → 106 rad = projection.proj4\_to\_osr(projstr)  
107 else:  
108 rad = projstr

File ~/anaconda3/envs/wradlib/lib/python3.11/site-packages/wradlib/georef/projection.py:206, in proj4\_to\_osr(proj4str)  
204 proj = osr.SpatialReference()  
205 proj.ImportFromProj4(proj4str)  
 → 206 proj.AutoIdentifyEPSG()  
208 if proj.Validate() == ogr.OGRERR\_CORRUPT\_DATA:  
209 raise ValueError(  
210 “proj4str validates to ‘ogr.OGRERR\_CORRUPT\_DATA’”  
211 “and can’t be imported as OSR object”  
212 )

File ~/anaconda3/envs/wradlib/lib/python3.11/site-packages/osgeo/osr.py:616, in SpatialReference.AutoIdentifyEPSG(self, \*args)  
614 def AutoIdentifyEPSG(self, \*args):  
615 r"““AutoIdentifyEPSG(SpatialReference self) → OGRErr””"  
 → 616 return \_osr.SpatialReference\_AutoIdentifyEPSG(self, \*args)

RuntimeError: OGR Error: Unsupported SRS

Any ideas on what is going on?

Many thanks  
Alan Seed

---

<div class="post-metadata">

**Author:** ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)\
**Post date:** [July 4, 2023, 6:53pm UTC](https://openradar.discourse.group/t/ogr-error-unsupported-srs/260/2 "2023-07-04T18:53:57Z")

</div>

@alan-weatherradar

Please install GDAL \< 3.7 to make this work. There have been some changes which lead to this behaviour. Still investigating what causes this.

---

<div class="post-metadata">

**Author:** ![alan-weatherradar](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/alan-weatherradar/32/180_2.png) [@alan-weatherradar](https://openradar.discourse.group/u/alan-weatherradar)\
**Post date:** [July 4, 2023, 10:31pm UTC](https://openradar.discourse.group/t/ogr-error-unsupported-srs/260/3 "2023-07-04T22:31:16Z")

</div>

Many thanks Kai, much appreciated, Alan

---

<div class="post-metadata">

**Author:** ![kmuehlbauer](https://yyz2.discourse-cdn.com/free1/user_avatar/openradar.discourse.group/kmuehlbauer/32/439_2.png) [@kmuehlbauer](https://openradar.discourse.group/u/kmuehlbauer)\
**Post date:** [July 6, 2023, 9:24am UTC](https://openradar.discourse.group/t/ogr-error-unsupported-srs/260/4 "2023-07-06T09:24:54Z")

</div>

@alan-weatherradar Alan, you’re very welcome.

I’ll add this issue [Beam Blockage Calculation Example - RuntimeError: OGR Error: Unsupported SRS · Issue #628 · wradlib/wradlib · GitHub](https://github.com/wradlib/wradlib/issues/628) here which tracks this special error.

I did not find out which change in GDAL causes this behaviour, but the solution is obviously just to not use `AutoIdentifyEPSG()` in GDAL \>= 3.7.
