mapchete.processes.hillshade module¶
- mapchete.processes.hillshade.execute(mp, resampling='nearest', azimuth=315.0, altitude=45.0, z=1.0, scale=1.0, td_matching_method='gdal', td_matching_max_zoom=None, td_matching_precision=8, td_fallback_to_higher_zoom=False, clip_pixelbuffer=0, **kwargs)¶
Extract contour lines from DEM.
- Parameters
- resamplingstr (default: ‘nearest’)
Resampling used when reading from TileDirectory.
- azimuthfloat
Light source direction in degrees. (default: 315, top left)
- altitudefloat
Light source altitude angle in degrees. (default: 45)
- zfloat
Vertical DEM exaggeration factor. (default: 1)
- scalefloat
Scale factor of pixel size units versus height units (insert 112000 when having elevation values in meters in a geodetic projection).
- 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)