3

I am new to the GeoServer and want to use it for plotting wind barbs based on a GRIB file over land data.

The wind barbs are properly created but nothing is shown on coordinates x < 0. The map data has bounds (for x) of -180 - 180 whereas the grib data contains values between 0 - 360. Shouldn't the Geoserver be able to handle the wrapping? At least for the land data it works...

Here is an image of the results I get:

enter image description here

The strange thing is, that when I zoom out completely, the wrapping seems to work fine: enter image description here

Can you hint me in any direction whether my data is wrong, the layer is not defined correctly or if it is an issue with the style declaration?

EDIT:

In my style definition for the wind barbs, I specify the spatial resolution for different zoom levels for the raster as follows:

<ogc:Function name="parameter">
    <ogc:Literal>scale</ogc:Literal>
    <ogc:Function name="Categorize">
        <ogc:Function name="env">
            <ogc:Literal>wms_scale_denominator</ogc:Literal>
        </ogc:Function>
        <ogc:Literal>64</ogc:Literal>
        <ogc:Literal>100000</ogc:Literal>

        <ogc:Literal>32</ogc:Literal>
        <ogc:Literal>500000</ogc:Literal>

        <ogc:Literal>8</ogc:Literal>
        <ogc:Literal>1000000</ogc:Literal>

        <ogc:Literal>2.0</ogc:Literal>
        <ogc:Literal>5000000</ogc:Literal>

        <ogc:Literal>0.8</ogc:Literal>
        <ogc:Literal>10000000</ogc:Literal>

        <ogc:Literal>0.4</ogc:Literal>
        <ogc:Literal>20000000</ogc:Literal>

        <ogc:Literal>0.3</ogc:Literal>
        <ogc:Literal>60000000</ogc:Literal>


        <ogc:Literal>0.1</ogc:Literal>
        <ogc:Literal>70000000</ogc:Literal>

        <ogc:Literal>0.07</ogc:Literal>
        <ogc:Literal>140000000</ogc:Literal>

        <ogc:Literal>0.05</ogc:Literal>
    </ogc:Function>
</ogc:Function>

Also I found out, that when I convert the grib file into a geoTiff with

gdalwarp -t_srs EPSG:4326  inputGrib.grb output.tif --config CENTER_LONG 0 -wo SOURCE_EXTRA=100

everything works as expected.

Your Answer

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

Browse other questions tagged or ask your own question.