# pyresample.geo_filter module

Filters based on geolocation validity.

class pyresample.geo_filter.GridFilter(area_def, filter, nprocs=1)

  Bases: `object`

  Geographic filter from a grid.

  Parameters:

    - grid_ll_x (float) – Projection x coordinate of lower left corner of lower left pixel

    - grid_ll_y (float) – Projection y coordinate of lower left corner of lower left pixel

    - grid_ur_x (float) – Projection x coordinate of upper right corner of upper right pixel

    - grid_ur_y (float) – Projection y coordinate of upper right corner of upper right pixel

    - proj4_string (str) – Projection definition as a PROJ.4 string.

    - mask (numpy array) – Mask as boolean numpy array

  __init__(area_def, filter, nprocs=1)
  filter(geometry_def, data)

    Get coordinate definition and data where invalid lon/lats are removed.

  get_valid_index(geometry_def)

    Calculate valid_index array based on lons and lats.

    Parameters:

      geometry_def – Geometry definition (ex. SwathDefinition)

    Returns:

      Boolean numpy array of same shape as lons and lats