# Wradlib - synthetic CAPPI

**URL:** <https://openradar.discourse.group/t/wradlib-synthetic-cappi/342>\
**Category:** Python\
**Tags:** wradlib\
**Created:** [November 15, 2023, 10:49am UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342 "2023-11-15T10:49:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![atmoboran](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@atmoboran](https://openradar.discourse.group/u/atmoboran)\
**Post date:** [November 15, 2023, 10:49am UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/1 "2023-11-15T10:49:55Z")

</div>

Hello everybody,

I’m trying to use wradlibs tutorial in creating a set of CAPPIs with synthetic radar polar volume data (see here: [wradlib.vpr.CAPPI — wradlib](https://docs.wradlib.org/en/latest/generated/wradlib.vpr.CAPPI.html)).

I get the following error, when running this script. I guess it has something to do with gdal/ osgeo:  
It is in line 16, when using: wradlib.vpr.volcoords\_from\_polar:

File ~\anaconda3\envs\radar\_venv1\lib\site-packages\wradlib\georef\projection.py:333 in reproject  
trans = np.array(ct.TransformPoints(C))

AttributeError: ‘NoneType’ object has no attribute ‘TransformPoints’

I use python 3.9 and tried it with gdal 3.2.3 and gdal 3.4.3.

Thanks for your help

---

<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:** [November 15, 2023, 1:53pm UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/2 "2023-11-15T13:53:05Z")

</div>

@atmoboran Welcome to openradar discourse.

You probably have to set environment variables `GDAL_DATA` or `PROJ_DATA` pointing to the location of the projection database (`~\anaconda3\envs\radar_venv1\share\gdal` or `~\anaconda3\envs\radar_venv1\share\proj`). At least that’s the most likely issue here. Also set `PROJ_NETWORK=On` to enable automatic loading of transformation data.

There’s also `proj-data` package available at conda-forge which contains complere proj database.

HTH,  
Kai

---

<div class="post-metadata">

**Author:** ![atmoboran](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@atmoboran](https://openradar.discourse.group/u/atmoboran)\
**Post date:** [November 15, 2023, 4:02pm UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/3 "2023-11-15T16:02:49Z")

</div>

Thanks Kai!

For me it worked with installing proj-data and setting the environment variables accordingly.  
I’m working on Windows, so there are some problems with GDAL.

I attached a screenshot - is this how it’s supposed to look like?

 ![vpr synthetic CAPPI](https://global.discourse-cdn.com/free1/uploads/openradar/original/1X/8c8e4f3dc7c6b877bcc0832c2df3de1f9edc6775.png)

And to everyone who is having a similar problem (working with Windows):  
be sure the slashes are correct, when setting the environment variable  
(see this discussion for more: [Problem with WRADLIB-DATA (google.com)](https://groups.google.com/g/wradlib-users/c/_fg-mlHbtTo))

---

<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:** [November 15, 2023, 4:43pm UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/4 "2023-11-15T16:43:21Z")

</div>

@atmoboran Glad you got it working.

The image in general looks OK. Is this artificial Data? That striping pattern makes me a bit nervous 😬 Can you elaborate a bit on the source data?

---

<div class="post-metadata">

**Author:** ![atmoboran](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@atmoboran](https://openradar.discourse.group/u/atmoboran)\
**Post date:** [November 21, 2023, 9:10am UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/5 "2023-11-21T09:10:00Z")

</div>

I literally just ran the example code from [wradlib.vpr.CAPPI — wradlib](https://docs.wradlib.org/en/stable/generated/wradlib.vpr.CAPPI.html) without changing anything.  
I didn’t set ‘PROJ\_NETWORK=On’ though, as I didn’t know where to do this.

PS: when copying the whole code with the copy buttom all the ‘\>\>\>’ are copied too, so one needs to copy by hand.

---

<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:** [November 21, 2023, 9:33am UTC](https://openradar.discourse.group/t/wradlib-synthetic-cappi/342/6 "2023-11-21T09:33:28Z")

</div>

Hi @atmoboran

OMG 😂, I totally forgot about that example in the docstring 🤦‍♂️. Yes, this is how it should look like.

> [@atmoboran](#):
>
> PS: when copying the whole code with the copy buttom all the ‘\>\>\>’ are copied too, so one needs to copy by hand.

We would need to fix this in the docstring somehow, to tell sphinx to remove the `>>>` when copying.
