A GeoTIFF image reprojected from one CRS to another is rendered as it has value of “0” outside of original image boundary (see ).
Steps to reproduce:
-
Define custom CRS in Geoserver:
100101=PROJCS["UM PL",GEOGCS["UM PL GeogCS", DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Longitude", EAST],AXIS["Latitude", NORTH]],PROJECTION["General_Oblique"],PARAMETER["central_meridian", 19.3],PARAMETER["latitude_of_origin", 37.5],PARAMETER["scale_factor", 1.0],PARAMETER["false_easting", 0.0],PARAMETER["false_northing", 0.0], UNIT["degree",1.0,AUTHORITY["EPSG","9108"]]]
-
Define simple style:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>gtopo</Name>
<UserStyle>
<Name>dem</Name>
<Title>Simple DEM style</Title>
<FeatureTypeStyle>
<Rule>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ColorMap>
<ColorMapEntry color="#000000" quantity="-1000" opacity="0"/>
<ColorMapEntry color="#AA0000" quantity="0"/>
<ColorMapEntry color="#00FF00" quantity="10"/>
</ColorMap>
</RasterSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
-
Import attached GeoTIFF file ( ) and force CRS to above mentioned
-
Display image as EPSG:3857 or EPSG:4326
|