[Geoserver-users] SLD spatial filtering issue

Hi,

We are having problems with spatial filtering in in SLD used for WMS requests. The request below using the SLD that follows displays point features fine without the filter. The BBOX used in the spatial filter is the same as in the request for testing purposes but for some reason it seems like the spatial filter does not return any features.

Note that we use postgis and data using reference system EPSG:2400. Geoserver version is 1.6.2

http://wsmlm562:8080/geoserver_sweco/wms?SLD=http://pc-mlm-5517:8080/TAGG/output/b9353824-cbfd-478f-9107-ffacc28440f2.xml&HEIGHT=500&WIDTH=500&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/jpeg&BBOX=1380855.0,6191346.0,1382455.0,6192946.0&SRS=EPSG:2400

<?xml version="1.0" encoding="UTF-8"?> sydvedbg:STORATAT sydvedbg:VATTEN sydvedbs:FASTIGHET_PKT geom 1380855,6191346 1382455,6192946 circle #ffff00 8

We have tried to understand why by looking at geoserver logs also… which seem to indicate that the spatial operation isn’t correctly translated. The snippet below shows this:

2008-04-25 10:26:57,136 DEBUG [data.jdbc] - calling sql builder with filter [[ geom bbox POLYGON ((1380829.4 6191320.4, 1380829.4 6192971.6, 1382480.6 6192971.6, 1382480.6 6191320.4, 1380829.4 6191320.4)) ] AND [ geom bbox POLYGON ((0 0, 0 0, 0 0, 0 0, 0 0)) ]]

The bbox that is zeroed is what we think is wrong, but we don’t understand why this is included in the postgis request.

With regards

/Björn Harrtell

I believe this was fixed after 1.6.2, so try 1.6.3.

See:
http://jira.codehaus.org/browse/GEOS-1811

Best regards,
Bart

Björn Harrtell wrote:

Hi,

We are having problems with spatial filtering in in SLD used for WMS requests. The request below using the SLD that follows displays point features fine without the filter. The BBOX used in the spatial filter is the same as in the request for testing purposes but for some reason it seems like the spatial filter does not return any features.

Note that we use postgis and data using reference system EPSG:2400. Geoserver version is 1.6.2

http://wsmlm562:8080/geoserver_sweco/wms?SLD=http://pc-mlm-5517:8080/TAGG/output/b9353824-cbfd-478f-9107-ffacc28440f2.xml&HEIGHT=500&WIDTH=500&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/jpeg&BBOX=1380855.0,6191346.0,1382455.0,6192946.0&SRS=EPSG:2400

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns:gml="http://www.opengis.net/gml&quot; version="1.0.0">
    <NamedLayer>
        <Name>sydvedbg:STORATAT</Name>
    </NamedLayer>
    <NamedLayer>
        <Name>sydvedbg:VATTEN</Name>
    </NamedLayer>
    <NamedLayer>
        <Name>sydvedbs:FASTIGHET_PKT</Name>
        <UserStyle>
            <FeatureTypeStyle>
                <Rule>
                    <Filter>
                        <BBOX>
                            <PropertyName>geom</PropertyName>
                            <gml:Box>
                                <gml:coordinates>1380855,6191346 1382455,6192946</gml:coordinates>
                            </gml:Box>
                        </BBOX>
                    </Filter>
                    <PointSymbolizer>
                        <Graphic>
                            <Mark>
                                <WellKnownName>circle</WellKnownName>
                                <Fill>
                                    <CssParameter name="fill">#ffff00</CssParameter>
                                </Fill>
                            </Mark>
                            <Size>8</Size>
                        </Graphic>
                    </PointSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>

We have tried to understand why by looking at geoserver logs also.. which seem to indicate that the spatial operation isn't correctly translated. The snippet below shows this:

2008-04-25 10:26:57,136 DEBUG [data.jdbc] - calling sql builder with filter [[ geom bbox POLYGON ((1380829.4 6191320.4, 1380829.4 6192971.6, 1382480.6 6192971.6, 1382480.6 6191320.4, 1380829.4 6191320.4)) ] AND [ geom bbox POLYGON ((0 0, 0 0, 0 0, 0 0, 0 0)) ]]

The bbox that is zeroed is what we think is wrong, but we don't understand why this is included in the postgis request.

With regards

/Björn Harrtell

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  
--
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde@anonymised.com
http://www.osgis.nl