-
Ombrejat: Hillshading of raster and polygon layers
This application is a tool to obtain shadowed images (through light gradation)
according to the relief and the position of the Sun. The localization of the
Sun is determined by the elevation angles (in degrees) with respect to the
horizon and the azimuth in relation to the North in clockwise sense (with 0¼
indicating the North). Specification of these angles will be required when
generating the model derivations of DEM (Digital Elevation Model). These
model derivations are the Digital Illumination Model, which calculates the
cosine of the angle of incidence, and the Digital Shadow Model which determines
the solar elevation angle from which each point of the terrain gets direct light
from the Sun. These models can be pre-calculated with the corresponding applications:
Illum and Ombra. In any of the cases, from the DEM, the application can generate
temporarily the necessary model derivations and delete them when finished, or keep
them for later usage. It has to be born in mind that the calculation of the Shadow
Model can become a long process that needs large memory resources, and therefore, it
is possible to not use this model. Without it, an acceptable result will be generated,
although of a lower quality than when this factor is taken into consideration.
Generating shadowed image (JPG):
This application generates a shadowed images in JPEG format.
Generating shadowed images (RGB):
This application generates a shadowed images in RGB format.
The model to be shadowed can be a raster or a structured vector of
polygons. If it is a raster, it can be in any IMG format, and it can be
either a categorical model, where a direct assignation from values to colour
is implied or, a continuous model, where a lineal scale between maximum and
minimum values and the number of symbols are established for the assignment.
If it is a vector, the field through which the colour of the interior is
symbolized and which will rise to the model of temporary raster that will
be equivalent to the one that has to be shadowed, has to be specified. The
rasterization will be completely internal and it will be done in relation to
the scope and the length of the cell of the Digital Elevation Model (or of
the Illumination model if the DEM is not necessary). Whichever it is the
origin, in the present version it is necessary to specify the palette or
table of symbolization that is being used and from which the new range of
colours is being constructed.
The result is an image in JPG format, the quality of which is a
configurable parameter, variable between 5 (minimum quality and maximum
compression) and 95 (maximum quality and minimum compression). If the model
to be shadowed is a raster the result can be added as 3 new bands (one
channel per colour) of a multiband raster.
Shadowed algorithm is based fundamentally on the transformation of RGB
colour (red, green and blue) into its HSI components (main colour, saturation
and intensity), the modulation of the intensity component (illumination)
according to the cosine of the angle of incidence through the zones that
receive direct light and are darkened according to a percentage
(/PERCENT_FOSC=) of the shadowed zones, without altering the other
components, (main colour and saturation) the return to the RGB space. The
user can determine some maximum and minimum percentage values, to limit the
intensity component and to avoid, this way that the colours that are quite
illuminated or not very illuminated, cannot be differentiated. As the
modulation of the illumination based on the cosine of the angle of incidence
represents, in the majority of cases, a diminution of this component, it is
convenient to raise this intensity to a determined level, which will have to
be adjusted in relation to the relief and the solar position.
The blank zones (NODATA), both from the elevation models and derivations and
from the origin file, will not take part in this gradation, and will be
converted into colour white (default colour for NODATA in rasters).
Syntax:
- Ombrejat 1 OriginalFile ResultingImage Quality MinimumIllumination MaximumIllumination IlluminationIncrease [/MDE] [/ILLUM_ORI] [/ILLUM_DEST] [/OMBRA_ORI] [/OMBRA_DEST] [/PAL] [/ELEV] [/AZIMUT] [/PERCENT_FOSC] [/MES_BANDA] [/NO_OMBRES]
- Ombrejat 3 OriginalFile RedOutput Quality MinimumIllumination MaximumIllumination IlluminationIncrease GreenOutput BlueOutput [/MDE] [/ILLUM_ORI] [/ILLUM_DEST] [/OMBRA_ORI] [/OMBRA_DEST] [/PAL] [/ELEV] [/AZIMUT] [/PERCENT_FOSC] [/MES_BANDA] [/NO_OMBRES]
Options:
- 1:
The output is in JPEG format.
- 3:
The output is in RGB format. So, 3 IMG files are created
Parameters:
- OriginalFile
(Original File -
Input parameter): Is the layer to be shadowed and it can be a raster in IMG format or a structured vector of polygons.
- ResultingImage
(Resulting Image -
Output parameter): Is the resulting shadowed model in raster JPG.
- Quality
(Quality -
Input parameter): Quality is a value between 5 (minimum quality and maximum degree of compression) and 95 (maximum quality an minimum degree of compression).
- MinimumIllumination
(Minimum Illumination -
Input parameter): Corresponds to the minimum percentage to which a colour can be darkened in the HSI space. Lower values will be saturated. If an excessively low percentage is allowed, the darkened colours cannot be differentiated. A recommended generic value is 5%, but it will have to be adjusted according to each case.
- MaximumIllumination
(Maximum Illumination -
Input parameter): Corresponds to the maximum percentage of illumination of a colour in the HSI space. Higher values will be saturated. If an excessively high percentage is allowed, light colors cannot be differentiated. A recommended generic value is 95%, but it will have to be adjusted according to each case.
- IlluminationIncrease
(Illumination Increase -
Input parameter): Corresponds to the level of constant increase of illumination of the entire image, to counteract globally the variable diminution of illumination due to the application of the Shadow Model and the Illumination Model. A recommended generic value is 50%, but it will have to be adjusted according to each case.
- RedOutput
(Red Output -
Output parameter): Is the red file in RGB output.
- GreenOutput
(Green Output -
Output parameter): Is the green file in RGB output.
- BlueOutput
(Blue Output -
Output parameter): Is the blue file in RGB output.
Modifiers:
/MDE= (Digital Elevation Model) Digital Elevation Models from which model derivations will be generated. (Input parameter) /ILLUM_ORI= (Original Illuminations) Digital Illumination Model previously generated. (Input parameter) /ILLUM_DEST= (Illuminations Destini) Names where the generated Digital Illumination Model will be kept. If it is not indicated a temporary directory will be generated and it will be deleted when finished. (Input parameter) /OMBRA_ORI= (Original Shadow) Digital Shadowed Model previously generated (whenever the parameter /NO_OMBRES is not activated). (Input parameter) /OMBRA_DEST= (Output shadow) Names where the generated Digital model of shadows will be kept. If it is not indicated a temporary directory will be generated and it will be deleted when finished (whenever the parameter /NO_OMBRES is not activated). (Input parameter) /PAL= (Palette) Name of the palette (p25, pal, p65) or table of symbolization (dbf) that determines the assignation of the colours of the original layer that has to be shadowed. (Input parameter) /ELEV= (Elevation) Angle, in degrees, of the elevation of the sun with respect to the horizon, necessary when the model derivations of DEM have to be generated. (Input parameter) /AZIMUT= (Azimut) Angulo, en grados, respeto al Norte y en sentido horario de posición solar, necessario cuando hace falta generar los modelos derivados del MDE. (Input parameter) /PERCENT_FOSC= (Percent obscuration) Additional shrinkage (in percentage) of shaded areas, this obscuration is not saturated and by default 25%. (Input parameter) /MES_BANDA (Add Bands) Indicates the addition of the resulting JPG channels as bands of the original raster (it is not valid if the original file is a POL). (Input parameter) /NO_OMBRES (No shadows) Parameter that indicates that the shadowed model cannot be used to darken to the minimum illumination the zones that do not receive direct light from the projected shadows. (Input parameter)