eumap.qc.Test

class Test(bounds, crs=None, verbose=False)[source]

Bases: object

Class for performing QC against GH datasets.

Parameters
  • bounds (Iterable) – Iterable of bounding coordinates to check quality within, if None the bounds of the raster will be used

  • verbose (bool) – Verbosity of the checks

  • crs (Optional[bool]) – CRS of the bounding coordinates (defaults to the raster coordinates)

Examples

>>> from eumap.qc import Test
>>>
>>> bounds = (4751935.0, 2420238.0, 4772117.0, 2444223.0)
>>> test = Test(bounds, verbose=True)
>>> dataset_url = 'https://s3.eu-central-1.wasabisys.com/eumap/lcv/lcv_landcover.hcl_lucas.corine.rf_p_30m_0..0cm_2019_eumap_epsg3035_v0.1.tif'
>>>
>>> available = test.availability(dataset_url)
>>> coverage_fraction = test.raster_land_coverage(dataset_url, include_ice=True, include_wetlands=True)

Methods

accessibility

Check if a remote resource is available.

metadata_consistency

rtype

dict

raster_land_coverage

Check completeness of a remote raster resource against land mask derived from [1].

accessibility(dataset_url)[source]

Check if a remote resource is available.

Parameters

dataset_url (str) – URL of remote resource

Return type

bool

Returns

True if dataset is accessible, otherwise False

raster_land_coverage(dataset_path, include_ice=False, include_wetlands=False)[source]

Check completeness of a remote raster resource against land mask derived from [1].

Parameters
  • dataset_path (Union[str, Path]) – Path or URL to raster dataset

  • include_ice (bool) – Include snow and ice in landmask

  • include_wetlands (bool) – Include wetlands in landmask

Return type

float

Returns

Fraction of pixels which are not nodata accross the landmask

References

[1] Pan-European land cover map 2015 (Pflugmacher et al., 2019)