I am trying to display vector data of state borders, downloaded from GeoServer as GeoTiff, in QGIS. By default downloaded raster looks like this: image with NoData Value

After disabling NoData value in raster->Properties->(uncheck)NoData Value: image without NoData Value

Current SDL code is:

                        <CssParameter name="fill">#FFFFFF</CssParameter>
                        <CssParameter name="fill-opacity">0.1</CssParameter>
                        <CssParameter name="stroke">#000000</CssParameter>
                        <CssParameter name="stroke-width">0</CssParameter>
                        <ogc:Function name="centroid">
                        <CssParameter name="font-family">Verdana, Geneva, sans-serif</CssParameter>
                        <CssParameter name="font-size">16</CssParameter>
                        <CssParameter name="font-weight">bold</CssParameter>
                    <VendorOption name="autoWrap">80</VendorOption>
                    <VendorOption name="maxDisplacement">20</VendorOption>

Is there any way to disable NoData Value in Geoserver?

  • 2
    I honestly don't understand the question. This no data is applied on the QGIS side not by GeoServer, correct? If so, GeoServer has nothing to do with it. – simogeo Aug 3 '15 at 9:51

First of all, you are using a Polygon symbolizer (for vector data) on a GeoTiff (raster data), which won't work. On the raster data, if it is a single channel raster, you GeoTiff will have a value that represents NoData (usually a very large negative value like -9999 - QGIS can tell you what it is). From your pictures, I believe you want NoData to appear black, so just add a ColorMapEntry in a suitable RasterSymbolizer and set the numeric value of NoData to black. See here for more information on the RasterSymbolizer.

Alternatively, if you are doing this in QGIS (your question is a little ambiguous), you can use an SLD but you may just want to set the appearance of NoData in the layer properties style tab (or possibly set it to transparent in the transparancy tab.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.