wradlib.georef.polar.spherical_to_proj(r, phi, theta, sitecoords, proj=None, re=None, ke=1.3333333333333333)

Transforms spherical coordinates (r, phi, theta) to projected coordinates centered at sitecoords in given projection.

It takes the shortening of the great circle distance with increasing elevation angle as well as the resulting increase in height into account.

Parameters
Returns

coords (`numpy.ndarray`) – Array of shape (…, 3). Contains projected map coordinates.

Examples

A few standard directions (North, South, North, East, South, West) with different distances (amounting to roughly 1°) from a site located at 48°N 9°E

```>>> r  = np.array([0.,   0., 111., 111., 111., 111.,])*1000
>>> az = np.array([0., 180.,   0.,  90., 180., 270.,])
>>> th = np.array([0.,   0.,   0.,   0.,   0.,  0.5,])
>>> csite = (9.0, 48.0)
>>> coords = spherical_to_proj(r, az, th, csite)
>>> for coord in coords:
...     print( '{0:7.4f}, {1:7.4f}, {2:7.4f}'.format(*coord))
...
9.0000, 48.0000,  0.0000
9.0000, 48.0000,  0.0000
9.0000, 48.9981, 725.7160
10.4872, 47.9904, 725.7160
9.0000, 47.0017, 725.7160
7.5131, 47.9904, 1694.2234
```

Here, the coordinates of the east and west directions won’t come to lie on the latitude of the site because the beam doesn’t travel along the latitude circle but along a great circle.