# wradlib.zonalstats.grid_centers_to_vertices¶

wradlib.zonalstats.grid_centers_to_vertices(x, y, dx, dy)

Produces array of vertices from grid’s center point coordinates.

Warning

This has to be done in the “native” grid projection. Once you reprojected the coordinates, this trivial function cannot be used to compute vertices from center points.

Parameters: x (numpy.ndarray) – 2-d array of x coordinates (same shape as the actual 2-D grid) y (numpy.ndarray) – 2-d array of y coordinates (same shape as the actual 2-D grid) dx (float) – grid spacing in x direction dy (float) – grid spacing in y direction out (3-d array) – of vertices for each grid cell of shape (n grid points,5, 2)