wradlib.zonalstats.ZonalDataPoint#

class wradlib.zonalstats.ZonalDataPoint(src, trg=None, buf=0.0, srs=None, **kwargs)[source]#

ZonalData object for source points

Parameters:
  • src (sequence or str) – sequence of source points (shape Nx2) or ESRI Shapefile filename containing source points

  • trg (sequence or str) – sequence of target polygons (shape Nx2, num vertices x 2) or ESRI Shapefile filename containing target polygons

Keyword Arguments:
  • buf (float) – (same unit as coordinates) Points will be considered inside the target if they are contained in the buffer.

  • srs (osgeo.osr.SpatialReference) – OGR.SpatialReference will be used for DataSource object. src and trg data have to be in the same srs-format

Examples

See ZonalData.

__init__(src, trg=None, buf=0.0, srs=None, **kwargs)#

Methods

__init__(src[, trg, buf, srs])

dump_vector(filename[, driver, remove])

Output source/target grid points/polygons to ESRI_Shapefile

get_isec(idx)

Returns intersections

get_source_index(idx)

Returns source indices referring to target polygon idx

load_vector(filename)

Load source/target grid points/polygons into in-memory Shapefile

Attributes

count_intersections

Returns number of intersections

isecs

Returns intersections

srs

Returns SpatialReferenceSystem object