eodal.mapper.filter module

Predefined filters for EO data selection by metadata.

Copyright (C) 2022 Lukas Valentin Graf

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

class eodal.mapper.filter.Filter(entity: str, operator: str, value: Any)[source]

Bases: object

The generic filter class. A filter is used to query data catalogs.

Each filter follows the following structure:

<entity> <operator> <value>

For instance, cloudy_pixel_percentage < 10, where

  • cloudy_pixel_percentage is the entity to filter

  • < is the operator

  • 10 is the value

Attrib entity:

metadata entity to use for filtering

Attrib operator:

comparison operator to use, e.g., “gt” for “greater than” (>)

Attrib value:

value on the right-hand side of the filter expression

__init__(entity: str, operator: str, value: Any)[source]

Constructor method

Parameters:
  • entity – metadata entity to use for filtering

  • operator – comparison operator to use, e.g., “>” for “greater than” (value)

  • value – value on the right-hand side of the filter expression

property entity: str

metadata entity used to filter

property expression: str

returns the filter expression as string

property operator: str

filter operator

property value: Any

right-side value of the filter