mapchete.processes.contours module

mapchete.processes.contours.execute(mp, resampling='nearest', interval=100, field='elev', base=0, td_matching_method='gdal', td_matching_max_zoom=None, td_matching_precision=8, td_fallback_to_higher_zoom=False, clip_pixelbuffer=0, **kwargs)

Generate hillshade from DEM.

Parameters
resamplingstr (default: ‘nearest’)

Resampling used when reading from TileDirectory.

intervalinteger

Elevation value interval when drawing contour lines.

fieldstring

Output field name containing elevation value.

baseinteger

Elevation base value the intervals are computed from.

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)