CQL wildcards & filtering WMS GetFeatureInfo

View: New views
9 Messages — Rating Filter:   Alert me  

CQL wildcards & filtering WMS GetFeatureInfo

by Josh Marcus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey folks,

I have two separate questions, related to my goal of presenting a map with a filter and then obtaining information about features through WMS's GetFeatureInfo.

#1 -- Does Geoserver support wildcards in CQL?  For example, if I'm using the topp:states openlayers map preview, I can't get a query like:

STATE_NAME="Ut*"

to work, even though * and ? are in the CQL specification.

#2 -- I am trying to generate a map using a filter, and then use WMS's GetFeatureInfo to get information about features.  I don't want features to be included that were excluded by the filter.

2a) Will GetFeatureInfo respect SLDs, in particular the filter in an external SLD?  I've tried this but it doesn't seem to work.
2b) GetFeatureInfo seems to be crashing when I try to use an OGC Filter.

For example, if I use the topp:states open layers preview/demo, and enter:

<PropertyIsEqualTo><PropertyName>STATE_NAME</PropertyName><Literal>Utah</Literal></PropertyIsEqualTo>

or

<Filter><PropertyIsEqualTo><PropertyName>STATE_NAME</PropertyName><Literal>Utah</Literal></PropertyIsEqualTo></Filter>

for an OGC filter, and then click Utah (the only visible state),

I get ...

org.geoserver.platform.ServiceException: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. XML document structures must start and end within the same entity.

--j

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by Josh Marcus-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After looking at the geotools source, I've figured out that the CQL syntax in geotools for wildcard searches is SQL-like: ATTRIBUTE LIKE '%foo'.  But I'm still curious about my second question.

Thanks,
--j



On Mon, Jul 21, 2008 at 1:42 PM, Josh Marcus <jmarcus@...> wrote:
Hey folks,

I have two separate questions, related to my goal of presenting a map with a filter and then obtaining information about features through WMS's GetFeatureInfo.

#1 -- Does Geoserver support wildcards in CQL?  For example, if I'm using the topp:states openlayers map preview, I can't get a query like:

STATE_NAME="Ut*"

to work, even though * and ? are in the CQL specification.

#2 -- I am trying to generate a map using a filter, and then use WMS's GetFeatureInfo to get information about features.  I don't want features to be included that were excluded by the filter.

2a) Will GetFeatureInfo respect SLDs, in particular the filter in an external SLD?  I've tried this but it doesn't seem to work.
2b) GetFeatureInfo seems to be crashing when I try to use an OGC Filter.

For example, if I use the topp:states open layers preview/demo, and enter:

<PropertyIsEqualTo><PropertyName>STATE_NAME</PropertyName><Literal>Utah</Literal></PropertyIsEqualTo>

or

<Filter><PropertyIsEqualTo><PropertyName>STATE_NAME</PropertyName><Literal>Utah</Literal></PropertyIsEqualTo></Filter>

for an OGC filter, and then click Utah (the only visible state),

I get ...

org.geoserver.platform.ServiceException: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. XML document structures must start and end within the same entity.

--j


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

SLD for RASTER (Mosaic - SHP) - RasterSymbolizer

by Daniel Gorni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

My name is Daniel, from Brazil. We are using GeoServer 1.6.2 and OpenLayers. We build a mosaic with 142 images and a SHP contructed from these 142 images.

I would like just to know how to put blank in the backgournd of this mosaic. I have read the SLD docs from OGC (Styled Layer Descriptor Implementation Specification - OGC 02-070) but I can´t find how to do it. If I change the opacity, all images change too, and I don´t want to do this. I would like to put opacity 0.0 just in background of my mosaic.

Could anyone help me please?

Thanks in advance.


Regards,

Daniel

My SLD:

<?xml version="1.0" encoding="UTF-8"?>
<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" xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" version="1.0.0">
<UserLayer>
  <Name>raster_layer</Name>
        <LayerFeatureConstraints>
            <FeatureTypeConstraint/>
        </LayerFeatureConstraints>
  <UserStyle>
    <Name>raster</Name>
    <Title>A boring default style</Title>
    <Abstract>A sample style for rasters</Abstract>

    <FeatureTypeStyle>
          <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
        <RasterSymbolizer>
        <Opacity>1.0</Opacity>
            <OverlapBehavior>
               <AVERAGE/>
            </OverlapBehavior>
            <ShadedRelief/>
        </RasterSymbolizer>
      </Rule>
    </FeatureTypeStyle>
  </UserStyle>
</UserLayer>
</StyledLayerDescriptor>




Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: SLD for RASTER (Mosaic - SHP) - RasterSymbolizer

by Hudson-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Assuming you mean PNG og GIF output through WMS, append transparent=true
to the URL.

In OpenLayers this is an option you pass to the constructor of the WMSLayer.

-Arne


Daniel Gorni wrote:

> Hi all,
>
> My name is Daniel, from Brazil. We are using GeoServer 1.6.2 and
> OpenLayers. We build a mosaic with 142 images and a SHP contructed
> from these 142 images.
>
> I would like just to know how to put blank in the backgournd of this
> mosaic. I have read the SLD docs from OGC (Styled Layer Descriptor
> Implementation Specification - OGC 02-070) but I can´t find how to do
> it. If I change the opacity, all images change too, and I don´t want
> to do this. I would like to put opacity 0.0 just in background of my
> mosaic.
>
> Could anyone help me please?
>
> Thanks in advance.
>
>
> Regards,
>
> Daniel
>
> My SLD:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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"
> xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
> version="1.0.0">
> <UserLayer>
>   <Name>raster_layer</Name>
>         <LayerFeatureConstraints>
>             <FeatureTypeConstraint/>
>         </LayerFeatureConstraints>
>   <UserStyle>
>     <Name>raster</Name>
>     <Title>A boring default style</Title>
>     <Abstract>A sample style for rasters</Abstract>
>
>     <FeatureTypeStyle>
>           <FeatureTypeName>Feature</FeatureTypeName>
>       <Rule>
>         <RasterSymbolizer>
>         <Opacity>1.0</Opacity>
>             <OverlapBehavior>
>                <AVERAGE/>
>             </OverlapBehavior>
>             <ShadedRelief/>
>         </RasterSymbolizer>
>       </Rule>
>     </FeatureTypeStyle>
>   </UserStyle>
> </UserLayer>
> </StyledLayerDescriptor>
>
>
>
> ------------------------------------------------------------------------
> Novos endereços, o Yahoo! que você conhece. Crie um email novo
> <http://br.rd.yahoo.com/mail/taglines/mail/*http://br.new.mail.yahoo.com/addresses>
> com a sua cara @ymail.com ou @rocketmail.com.
> !DSPAM:4038,48866a36201246491211187!
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> !DSPAM:4038,48866a36201246491211187!
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@...
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> !DSPAM:4038,48866a36201246491211187!
>  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Josh Marcus ha scritto:

> #1 -- Does Geoserver support wildcards in CQL?  For example, if I'm using the topp:states openlayers map preview, I can't get a query like:
>
> STATE_NAME="Ut*"
>
> to work, even though * and ? are in the CQL specification.

Mumble, interesting, I thought the parser was completely CQL compliant.
Mauricio, cc'ed, is the developer of the CQL parser. Mauricio, can you
shed some light on this mystery?

> 2a) Will GetFeatureInfo respect SLDs, in particular the filter in an
> external SLD?  I've tried this but it doesn't seem to work.

Nope, it won't. We have a Jira issue open to track this:
http://jira.codehaus.org/browse/GEOS-1008
but there has been no push to actually solve it since the full solution
(one that takes into account the symbolizer size and not only the
filters) is not trivial to implement.

> 2b) GetFeatureInfo seems to be crashing when I try to use an OGC Filter.

Hum... which version of GeoServer are you using and what error message
are you getting?
I've tried the following request (properly url-encoded):

http://localhost:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&Format=image/png&request=GetMap&layers=topp:states&width=550&height=250&srs=EPSG:4326&filter=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3ESTATE_NAME%3C/PropertyName%3E%3CLiteral%3EUtah%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E

and it works fine on both a GeoServer 1.6.2 and a GeoServer 1.7.0-beta1.

Let me know
Cheers
Andrea

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by Mauricio Pazos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 July 2008 11:31:35 Andrea Aime wrote:

> > #1 -- Does Geoserver support wildcards in CQL?  For example, if I'm using
> > the topp:states openlayers map preview, I can't get a query like:
> >
> > STATE_NAME="Ut*"
> >
> > to work, even though * and ? are in the CQL specification.
>
> Mumble, interesting, I thought the parser was completely CQL compliant.
> Mauricio, cc'ed, is the developer of the CQL parser. Mauricio, can you
> shed some light on this mystery?
Yes I can. You should use the like sentence

        STATE_NAME LIKE 'Ut*'

cheers
--

Mauricio Pazos
www.axios.es
Tel.: +34 94 682 42 86


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by aaime :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mauricio Pazos ha scritto:

> On Monday 28 July 2008 11:31:35 Andrea Aime wrote:
>>> #1 -- Does Geoserver support wildcards in CQL?  For example, if I'm using
>>> the topp:states openlayers map preview, I can't get a query like:
>>>
>>> STATE_NAME="Ut*"
>>>
>>> to work, even though * and ? are in the CQL specification.
>> Mumble, interesting, I thought the parser was completely CQL compliant.
>> Mauricio, cc'ed, is the developer of the CQL parser. Mauricio, can you
>> shed some light on this mystery?
> Yes I can. You should use the like sentence
>
> STATE_NAME LIKE 'Ut*'

Yes yes, that I understand, what I'm wondering about is if
STATE_NAME='Ut*' is a valid CQL statement to be used as an alternative
to LIKE and if so, if there's a reason why we don't support that syntax.
The user seemed to expect that expression to act as a LIKE.

Cheers
Andrea

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by Mauricio Pazos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 July 2008 12:20:44 Mauricio Pazos wrote:
> Yes I can. You should use the like sentence
>
>         STATE_NAME LIKE 'Ut*'
>
> cheers
Sorry, the statement sould be
 
STATE_NAME LIKE 'Ut%'

cheers
--

Mauricio Pazos
www.axios.es
Tel.: +34 94 682 42 86


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Re: CQL wildcards & filtering WMS GetFeatureInfo

by Mauricio Pazos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Monday 28 July 2008 13:03:53 Andrea Aime wrote:
> Yes yes, that I understand, what I'm wondering about is if
> STATE_NAME='Ut*' is a valid CQL statement to be used as an alternative
> to LIKE and if so, if there's a reason why we don't support that syntax.
> The user seemed to expect that expression to act as a LIKE.
>
> Cheers
> Andrea
the lexical analyser require different context to distinguish if that token is
an *string* or a *text pattern*. String and text patterns are similar:
quote ,  characters, .. quote. So, the way used by the parser to know what is
the rule to use is looking lthe prefix “=” or  “like”.

cheers
--

Mauricio Pazos
www.axios.es
Tel.: +34 94 682 42 86


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@...
https://lists.sourceforge.net/lists/listinfo/geoserver-users
LightInTheBox - Buy quality products at wholesale price