24.12.2013 Views

wradlib Documentation - Bitbucket

wradlib Documentation - Bitbucket

wradlib Documentation - Bitbucket

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>wradlib</strong> <strong>Documentation</strong>, Release 0.1.1<br />

Parameters fname : string<br />

name of the file to save the vertex data to<br />

polygons : list of lists<br />

list of polygon vertices. Each vertex itself is a list of 3 coordinate values and an additional<br />

value. The third coordinate and the fourth value may be nan.<br />

Returns None :<br />

Notes<br />

As Polygons are closed shapes, the first and the last vertex of each polygon must be the same!<br />

Examples<br />

Writes two triangle Polygons to a text file<br />

>>> poly1 = [[0.,0.,0.,0.],[0.,1.,0.,1.],[1.,1.,0.,2.],[0.,0.,0.,0.]]<br />

>>> poly2 = [[0.,0.,0.,0.],[0.,1.,0.,1.],[1.,1.,0.,2.],[0.,0.,0.,0.]]<br />

>>> polygons = [poly1, poly2]<br />

>>> writePolygon2Text(’polygons.txt’, polygons)<br />

The resulting text file will look like this:<br />

Polygon<br />

0 0<br />

0 0.000000 0.000000 0.000000 0.000000<br />

1 0.000000 1.000000 0.000000 1.000000<br />

2 1.000000 1.000000 0.000000 2.000000<br />

3 0.000000 0.000000 0.000000 0.000000<br />

1 0<br />

0 0.000000 0.000000 0.000000 0.000000<br />

1 0.000000 1.000000 0.000000 1.000000<br />

2 1.000000 1.000000 0.000000 2.000000<br />

3 0.000000 0.000000 0.000000 0.000000<br />

END<br />

3.1.3 <strong>wradlib</strong>.io.read_EDGE_netcdf<br />

<strong>wradlib</strong>.io.read_EDGE_netcdf(filename, range_lim=200000.0)<br />

Data reader for netCDF files exported by the EDGE radar software<br />

Parameters filename : path of the netCDF file<br />

range_lim : range limitation [m] of the returned radar data<br />

(200000 per default)<br />

Returns output : numpy array of image data (dBZ), dictionary of attributes<br />

3.1.4 <strong>wradlib</strong>.io.read_BUFR<br />

<strong>wradlib</strong>.io.read_BUFR(buffile)<br />

Main BUFR interface: Decodes BUFR file and returns metadata and values<br />

36 Chapter 3. Library Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!