Ok, let me get this straight. I may have some time to debug it for you,
which should go a bit faster than you doing it yourself.
1) A WFS Filter works fine against shapefile and postgis.
2) The same Filter embedded in a rule works fine against Shapefile
3) The same filter embedded in a rule does not work against PostGIS?
And what version of java are you working against? I ask because the sld
filter parser is weak (yes, we use different parsers, and are not proud
of it - it's because SLD people used DOM, we used SAX, and both use
filters), and can function differently depending on the DOM parser
being used. I'm positive SLD with Filters have worked in the past - we
had some problems against spatial filters, but those should be resolved
now as well.
Chris
Quoting rong@anonymised.com:
I tested all latest version(1.30-beta3, 1.3.0-beta4,1.3.0-RC1). I'll
report this as bug. Then I'll also setup the development and try to
debug
it by myself. By the way, Is it possible for me to send wfs request
with
the filter using the sld file for wms? Is this a work-around way for
this
problem? Because I don't have enough time, I have to figure out it
ASAP.
Thank you very much.
> What version are you working against? Go ahead and report it as a
bug?
> http://jira.codehaus.org/secure/BrowseProject.jspa?id=10311 And
it's
> just postgis? With Shapefiles SLD+Filters work fine? But with
PostGIS
> they don't? That seems odd. We'll look into it.
>
> Chris
>
> Quoting rong@anonymised.com:
>
>> Hi,Chris,
>> I did more tests.I found the wfs fileter is OK. The wms with sld
is
>> not
>> OK.The wfs can attache the filter as a "where" condition for the
sql
>> statement. But the sld cannot.
>> > Hi,
>> > Below is the log for one request.
>> > 611079 [FINE]
>> org.vfny.geoserver.util.requests.readers.KvpRequestReader -
>> > clean request is
>> >
>>
>
bbox=219638.0,3655299.0,285173.0,3720834.0&styles=yield_db&Format=image/png&request=GetMap&layers=topp:yield&width=2200&height=1000&srs=EPSG:26914
>> > 611079 [FINE]
>> org.vfny.geoserver.util.requests.readers.KvpRequestReader -
>> > returning parsed {SRS=EPSG:26914, LAYERS=topp:yield,
>> > BBOX=219638.0,3655299.0,285173.0,3720834.0, HEIGHT=1000,
>> REQUEST=GetMap,
>> > STYLES=yield_db, WIDTH=2200, FORMAT=image/png}
>> > 611094 [INFO] org.vfny.geoserver.servlets.AbstractService -
>> Looking for
>> > configured service responses' strategy
>> > 611110 [INFO] org.vfny.geoserver.servlets.AbstractService -
>> Looking for
>> > configured service strategy SPEED
>> > 611110 [FINE] org.vfny.geoserver.servlets.AbstractService -
>> verifying
>> > configured strategy
>> > 611125 [INFO] org.vfny.geoserver.servlets.AbstractService -
Using
>> service
>> > strategy class org.vfny.geoserver.servlets.SpeedStrategy
>> > 611125 [FINE] org.vfny.geoserver.servlets.AbstractService -
>> reading
>> > request:
>> >
>>
>
bbox=219638.0,3655299.0,285173.0,3720834.0&styles=yield_db&Format=image/png&request=GetMap&layers=topp:yield&width=2200&height=1000&srs=EPSG:26914
>> > 611141 [FINE] org.vfny.geoserver.global.Data - getting type
>> topp:yield
>> > 611157 [FINE] org.geotools.data.postgis.PostgisDataStore - get
>> Feature
>> > source called on yield
>> > 611157 [FINE] org.geotools.data.postgis.PostgisDataStore -
>> returning pg
>> > feature locking
>> > 611157 [FINE] org.geotools.styling.StyleImpl - number of fts
set 1
>> > 611172 [FINE] org.vfny.geoserver.wms.requests.GetMapKvpReader -
>> > establishing yield_db style for topp:yield
>> > 611172 [INFO] org.vfny.geoserver.servlets.AbstractService -
>> handling
>> > request: org.vfny.geoserver.wms.requests.GetMapRequest@anonymised.com
>> > 611188 [FINE] org.vfny.geoserver.servlets.AbstractService -
>> strategy is:
>> > org.vfny.geoserver.servlets.SpeedStrategy@anonymised.com
>> > 611219 [FINE] org.vfny.geoserver.wms.responses.GetMapResponse -
>> setting
>> > up map
>> > 611235 [FINE] org.geotools.data.postgis.PostgisDataStore - get
>> Feature
>> > source called on yield
>> > 611235 [FINE] org.geotools.data.postgis.PostgisDataStore -
>> returning pg
>> > feature locking
>> > 611250 [FINE]
>> org.vfny.geoserver.wms.responses.DefaultRasterMapProducer -
>> > setting up 2200x1000 image
>> > 611344 [FINE]
>> org.vfny.geoserver.wms.responses.DefaultRasterMapProducer -
>> > calling renderer
>> > 611360 [FINE] org.geotools.renderer.lite.LiteRenderer2 - Affine
>> Transform
>> > is AffineTransform[[0.033569848172732, 0.0, -7373.214312962539],
>> [0.0,
>> > -0.015259021896696, 56776.28747997254]]
>> > 611375 [FINE] org.geotools.styling.StyleImpl - number of fts
set 1
>> > 611375 [FINE] org.geotools.renderer.lite.LiteRenderer2 - added
>> attribute
>> > plant_key
>> > 611391 [FINE] org.geotools.renderer.lite.LiteRenderer2 - added
>> attribute
>> > the_geom
>> > 611391 [FINE] org.geotools.styling.StyleImpl - number of fts
set 1
>> > 611407 [FINE] org.geotools.renderer.lite.LiteRenderer2 -
>> processing 1
>> > stylers
>> > 611407 [FINE] org.geotools.renderer.lite.LiteRenderer2 -
>> processing style
>> > 0
>> > 611422 [FINE] org.geotools.renderer.lite.LiteRenderer2 -
>> processing rule
>> > 0
>> > 611422 [FINE] org.geotools.data.jdbc.JDBCDataStore - calling
sql
>> builder
>> > with filter [ the_geom bbox POLYGON ((219638 3655299, 219638
>> 3720834,
>> > 285173 3720834, 285173 3655299, 219638 3655299)) ]
>> > 611438 [FINE] org.geotools.data.jdbc.JDBCDataStore - sql is
SELECT
>> "oid",
>> > "the_yield", "plant_key", bytea(AsBinary(force_2d("the_geom"),
>> 'XDR'))
>> > FROM "yield" WHERE "the_geom" && GeometryFromText('POLYGON
((219638
>> > 3655299, 219638 3720834, 285173 3720834, 285173 3655299, 219638
>> > 3655299))', 26914)
>> > 611454 [FINE] org.geotools.data.jdbc.JDBCDataStore - About to
>> execute
>> > query: SELECT "oid", "the_yield", "plant_key",
>> > bytea(AsBinary(force_2d("the_geom"), 'XDR')) FROM "yield" WHERE
>> > "the_geom" && GeometryFromText('POLYGON ((219638 3655299,219638
>> 3720834,
>> > 285173 3720834, 285173 3655299, 219638 3655299))', 26914)
>> > 611469 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting
>> available
>> > connection.
>> > 623532 [FINE]
>> org.geotools.data.jdbc.ConnectionPool$ConnectionListManager
>> > - Connection closed - adding to available connections.
>> > 623548 [FINE] org.geotools.renderer.lite.LiteRenderer2 - Style
>> cache hit
>> > ratio: 0.9998779315501167 , hits 65529, requests 65537
>> > 623563 [FINE] org.vfny.geoserver.servlets.AbstractService -
mime
>> type is:
>> > image/png
>> > 628017 [INFO] org.vfny.geoserver.servlets.AbstractService -
>> Service
>> > handled
>> >
>> >
>> > And my Rule is as below:
>> >
>> >
>> > <ogc:Filter xmlns:gml="http://www.opengis.net/gml">
>> >
>> > <ogc:PropertyIsLessThan>
>> >
>> > <ogc:PropertyName>the_yield</ogc:PropertyName>
>> >
>> > <ogc:Literal>100</ogc:Literal>
>> > </ogc:PropertyIsLessThan>
>> >
>> > </ogc:Filter>
>> >
>> >
>> >
>> >
>> >
>> >
>> >> OK, I'll try to get logs and see what actually happened. Thanks
>> and Good
>> >> night.
>> >>> Could you set the logging to at least fine and get at the
logs?
>> Then
>> >>> we
>> >>> can look at what is actually being sent to the postgis (also
I'm
>> going
>> >>> to bed right now, so I probably won't answer for awhile).
>> >>>
>> >>> Chris
>> >>>
>> >>> Quoting rong@anonymised.com:
>> >>>
>> >>>> Yes. I tried the lower case for POstGIS table.It doesn't
work.
>> The
>> >>>> upper
>> >>>> case is for the shape file. The SLD files are the same for
the
>> db
>> >>>> table
>> >>>> and shapefile except this little difference.(lower case for
db
>> table
>> >>>> and
>> >>>> upper case for shapefile).
>> >>>> > Sounds like it could be case sensitivity, try lower cases
for
>> your
>> >>>> > property names.
>> >>>> >
>> >>>> > Chris
>> >>>> >
>> >>>> > Quoting rong@anonymised.com:
>> >>>> >
>> >>>> >> Hi,
>> >>>> >> Is anybody get the filter work with the PostGIS table?I
>> seems
>> >>>> not
>> >>>> >> work
>> >>>> >> with me. I use the same SLD file test with the shapefile.
It
>> >>>> works.
>> >>>> >> But
>> >>>> >> not work with PostGIS tables. Any suggestions to me?
>> >>>> >> Thank you very much.
>> >>>> >> Rong.
>> >>>> >> Below the SLD with filter inside.
>> >>>> >> <?xml version="1.0" encoding="ISO-8859-1"?>
>> >>>> >> <StyledLayerDescriptor version="1.0.0"
>> >>>> >> xsi:schemaLocation="http://www.opengis.net/sld
>> >>>> >> StyledLayerDescriptor.xsd"
>> >>>> >> 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">
>> >>>> >> <!-- a named layer is the basic building block of an sld
>> document
>> >>>> -->
>> >>>> >> <NamedLayer>
>> >>>> >> <Name>A Test Layer</Name>
>> >>>> >>
>> >>>> >> <!-- with in a layer you have Named Styles -->
>> >>>> >> <UserStyle>
>> >>>> >> <!-- again they have names, titles and abstracts -->
>> >>>> >> <Name>population</Name>
>> >>>> >> <Title>Population in the United States</Title>
>> >>>> >> <Abstract>A sample filter that filters the United States
>> into
>> >>>> three
>> >>>> >> categories of population, drawn in different
>> >>>> >> colors</Abstract>
>> >>>> >> <FeatureTypeStyle>
>> >>>> >> <Rule>
>> >>>> >> <!-- like a linesymbolizer but with a fill too -->
>> >>>> >> <ogc:Filter
xmlns:gml="http://www.opengis.net/gml">
>> >>>> >> <ogc:PropertyIsBetween>
>> >>>> >> <ogc:PropertyName>PERSONS</ogc:PropertyName>
>> >>>> >> <ogc:LowerBoundary>
>> >>>> >> <ogc:Literal>2000000</ogc:Literal>
>> >>>> >> </ogc:LowerBoundary>
>> >>>> >> <ogc:UpperBoundary>
>> >>>> >> <ogc:Literal>4000000</ogc:Literal>
>> >>>> >> </ogc:UpperBoundary>
>> >>>> >> </ogc:PropertyIsBetween>
>> >>>> >> </ogc:Filter>
>> >>>> >> <PolygonSymbolizer>
>> >>>> >> <Fill>
>> >>>> >> <!-- CssParameters allowed are fill (the
color)
>> and
>> >>>> >> fill-opacity -->
>> >>>> >> <CssParameter
>> name="fill">#FF0000</CssParameter>
>> >>>> >> </Fill>
>> >>>> >> </PolygonSymbolizer>
>> >>>> >> </Rule>
>> >>>> >> <Rule>
>> >>>> >> <!-- like a linesymbolizer but with a fill too -->
>> >>>> >> <ogc:Filter
xmlns:gml="http://www.opengis.net/gml">
>> >>>> >> <ogc:PropertyIsLessThan>
>> >>>> >> <ogc:PropertyName>PERSONS</ogc:PropertyName>
>> >>>> >> <ogc:Literal>2000000</ogc:Literal>
>> >>>> >> </ogc:PropertyIsLessThan>
>> >>>> >> </ogc:Filter>
>> >>>> >> <PolygonSymbolizer>
>> >>>> >> <Fill>
>> >>>> >> <!-- CssParameters allowed are fill (the
color)
>> and
>> >>>> >> fill-opacity -->
>> >>>> >> <CssParameter
>> name="fill">#00FF00</CssParameter>
>> >>>> >> </Fill>
>> >>>> >> </PolygonSymbolizer>
>> >>>> >> </Rule>
>> >>>> >> <Rule>
>> >>>> >> <!-- like a linesymbolizer but with a fill too -->
>> >>>> >> <ogc:Filter
xmlns:gml="http://www.opengis.net/gml">
>> >>>> >> <ogc:PropertyIsGreaterThan>
>> >>>> >> <ogc:PropertyName>PERSONS</ogc:PropertyName>
>> >>>> >> <ogc:Literal>4000000</ogc:Literal>
>> >>>> >> </ogc:PropertyIsGreaterThan>
>> >>>> >> </ogc:Filter>
>> >>>> >> <PolygonSymbolizer>
>> >>>> >> <Fill>
>> >>>> >> <!-- CssParameters allowed are fill (the
color)
>> and
>> >>>> >> fill-opacity -->
>> >>>> >> <CssParameter
>> name="fill">#0000FF</CssParameter>
>> >>>> >> </Fill>
>> >>>> >> </PolygonSymbolizer>
>> >>>> >> </Rule>
>> >>>> >> <Rule>
>> >>>> >> <LineSymbolizer>
>> >>>> >> <Stroke/>
>> >>>> >> </LineSymbolizer>
>> >>>> >> </Rule>
>> >>>> >> </FeatureTypeStyle>
>> >>>> >> </UserStyle>
>> >>>> >> </NamedLayer>
>> >>>> >> </StyledLayerDescriptor>
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> -------------------------------------------------------
>> >>>> >> SF.Net email is sponsored by: Discover Easy Linux
Migration
>> >>>> >> Strategies
>> >>>> >> from IBM. Find simple to follow Roadmaps, straightforward
>> >>>> articles,
>> >>>> >> informative Webcasts and more! Get everything you need to
get
>> up
>> >>>> to
>> >>>> >> speed, fast.
>> http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>> >>>> >> _______________________________________________
>> >>>> >> Geoserver-devel mailing list
>> >>>> >> Geoserver-devel@lists.sourceforge.net
>> >>>> >>
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>> >>>> >>
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> >
>> >>>> > ----------------------------------------------------------
>> >>>> > This mail sent through IMP: https://webmail.limegroup.com/
>> >>>> >
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ----------------------------------------------------------
>> >>> This mail sent through IMP: https://webmail.limegroup.com/
>> >>>
>> >>>
>> >>> -------------------------------------------------------
>> >>> SF.Net email is sponsored by: Discover Easy Linux Migration
>> Strategies
>> >>> from IBM. Find simple to follow Roadmaps, straightforward
>> articles,
>> >>> informative Webcasts and more! Get everything you need to get
up
>> to
>> >>> speed, fast.
>> http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>> >>> _______________________________________________
>> >>> Geoserver-devel mailing list
>> >>> Geoserver-devel@lists.sourceforge.net
>> >>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>> >>>
>> >>
>> >>
>> >>
>> >> -------------------------------------------------------
>> >> SF.Net email is sponsored by: Discover Easy Linux Migration
>> Strategies
>> >> from IBM. Find simple to follow Roadmaps, straightforward
>> articles,
>> >> informative Webcasts and more! Get everything you need to get
up
>> to
>> >> speed, fast.
http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>> >> _______________________________________________
>> >> Geoserver-devel mailing list
>> >> Geoserver-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>> >>
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > SF.Net email is sponsored by: Discover Easy Linux Migration
>> Strategies
>> > from IBM. Find simple to follow Roadmaps, straightforward
articles,
>> > informative Webcasts and more! Get everything you need to get up
to
>> > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>> > _______________________________________________
>> > Geoserver-devel mailing list
>> > Geoserver-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>> >
>>
>>
>>
>> -------------------------------------------------------
>> SF.Net email is sponsored by: Discover Easy Linux Migration
>> Strategies
>> from IBM. Find simple to follow Roadmaps, straightforward
articles,
>> informative Webcasts and more! Get everything you need to get up
to
>> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
>> _______________________________________________
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
>
>
>
>
> ----------------------------------------------------------
> This mail sent through IMP: https://webmail.limegroup.com/
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration
Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast.
http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/