1

Does GeoServer have the ability to query and return footprints for an ImageMosaic? Usually the sidecar vector files defining the clipping boundary are available...so I was hoping to be able to render image footprints or an outline of some sort without creating another layer.

The purpose would be to show the presence of a raster layer without actually showing the raster data itself.

3
  • Add the index as a layer
    – Ian Turton
    Jun 17, 2022 at 18:30
  • @IanTurton This is what I was hoping to not have to do ("render image footprints or an outline of some sort without creating another layer.")
    – WolfOdrade
    Jun 17, 2022 at 18:45
  • GeoServer can only display layers so if you want to see it then it has to be a layer
    – Ian Turton
    Jun 18, 2022 at 7:27

1 Answer 1

3

Yes, there is a rendering transformation that will do that for you, but with a couple of limitations:

  • It's going to display the rectangular footprint of your images, not the eventual clipping boundary
  • Needs at least GeoServer 2.21.0 to be used.

If you are satisfied with the above, this style is an example of using the transformation, that switches from a footprint to a raster visualization as you zoom in and out:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor 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" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
    <NamedLayer>
        <Name>test_layer</Name>
        <UserStyle>
            <FeatureTypeStyle>
                <Transformation>
                    <ogc:Function name="footprints"/>
                </Transformation>
                <Rule>
                    <MinScaleDenominator>100000</MinScaleDenominator>
                    <PolygonSymbolizer>
                        <Stroke>
                            <CssParameter name="stroke">#000000</CssParameter>
                            <CssParameter name="stroke-width">1</CssParameter>
                        </Stroke>
                        <Fill>
                            <CssParameter name="fill">#AAAAAA</CssParameter>
                            <CssParameter name="fill-opacity">0.5</CssParameter>
                        </Fill>
                    </PolygonSymbolizer>
                </Rule>
            </FeatureTypeStyle>
            <FeatureTypeStyle>
                <Rule>
                    <MaxScaleDenominator>100000</MaxScaleDenominator>
                    <RasterSymbolizer/>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>
1
  • That's really cool, I'll test this and get back.
    – WolfOdrade
    Jun 20, 2022 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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