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:
Bborie Park 2012-11-16 01:32:02 +00:00
parent 14dfdbfd6b
commit 81d92baf7d

View file

@ -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;