mirror of
https://git.osgeo.org/gitea/postgis/postgis
synced 2024-10-24 09:02:37 +00:00
If hillshade < 0, hillshade = 0 for ST_HillShade()
git-svn-id: http://svn.osgeo.org/postgis/trunk@10689 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
parent
14dfdbfd6b
commit
81d92baf7d
|
@ -3795,6 +3795,11 @@ CREATE OR REPLACE FUNCTION _st_hillshade4ma(value double precision[][][], pos in
|
|||
END IF;
|
||||
|
||||
shade := _bright * ((cos(zenith) * cos(slope)) + (sin(zenith) * sin(slope) * cos(azimuth - aspect)));
|
||||
|
||||
IF shade < 0. THEN
|
||||
shade := 0;
|
||||
END IF;
|
||||
|
||||
RETURN shade;
|
||||
END;
|
||||
$$ LANGUAGE 'plpgsql' IMMUTABLE;
|
||||
|
|
Loading…
Reference in a new issue