mapchete.processes.convert module¶
- mapchete.processes.convert.execute(mp, resampling='nearest', band_indexes=None, td_matching_method='gdal', td_matching_max_zoom=None, td_matching_precision=8, td_fallback_to_higher_zoom=False, clip_pixelbuffer=0, scale_ratio=1.0, scale_offset=0.0, clip_to_output_dtype=None, **kwargs)¶
Convert and optionally clip input raster or vector data.
- Parameters
- resamplingstr (default: ‘nearest’)
Resampling used when reading from TileDirectory.
- band_indexeslist
Bands to be read.
- td_matching_methodstr (‘gdal’ or ‘min’) (default: ‘gdal’)
- gdal: Uses GDAL’s standard method. Here, the target resolution is
calculated by averaging the extent’s pixel sizes over both x and y axes. This approach returns a zoom level which may not have the best quality but will speed up reading significantly.
- min: Returns the zoom level which matches the minimum resolution of the
extents four corner pixels. This approach returns the zoom level with the best possible quality but with low performance. If the tile extent is outside of the destination pyramid, a TopologicalError will be raised.
- td_matching_max_zoomint (optional, default: None)
If set, it will prevent reading from zoom levels above the maximum.
- td_matching_precisionint (default: 8)
Round resolutions to n digits before comparing.
- td_fallback_to_higher_zoombool (default: False)
In case no data is found at zoom level, try to read data from higher zoom levels. Enabling this setting can lead to many IO requests in areas with no data.
- clip_pixelbufferint
Use pixelbuffer when clipping output by geometry. (default: 0)
- scale_ratiofloat
Scale factor for input values. (default: 1.0)
- scale_offsetfloat
Offset to add to input values. (default: 0.0)
- clip_to_output_dtypestr
Clip output values to range of given dtype. (default: None)