[Geoserver-users] coordinate filter

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Hi Chris,

Thanks for all your help!! The thing I want to do is to check when the map shown is not between the coordinates. The following code throws a "gml not bound prefix element for Box" and when i remove the prefix i get a "Invalid content was found starting with element 'Filter'" error. I use the "Filter Encoding Implementation Specification" documentation version 1.0.0.

<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
  <Not>
    <Within>
      <PropertyName>the_geom</PropertyName>
      <gml:Box>
        <gml:coordinates>100,150 -10,10</gml:coordinates>
      </gml:Box>
    </Within>
  </Not>
</Filter>
...

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Mon, 22 May 2006 12:42:46 -0400

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

You need to define the namespace for your gml. xmlns:gml="http://www.opengis.net/gml&quot;

You can put it just where you bind the gml:

> <Rule>
> <Name>land</Name>
> <MaxScaleDenominator>5000000</MaxScaleDenominator>
> <Filter>
> <Not>
> <Within>
> <PropertyName>the_geom</PropertyName>
> <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <gml:coordinates>100,150 -10,10</gml:coordinates>
> </gml:Box>
> </Within>
> </Not>
> </Filter>

Or you can put it at the root SLD element:

<StyledLayerDescriptor version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
  xmlns="http://www.opengis.net/sld&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:xlink="http://www.w3.org/1999/xlink&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <NamedLayer>
           <Name>Simple Roads</Name>
              ....

Which puts it global, so you only have to put it in once.

best regards,

Chris

Mad Cloud wrote:

Hi Chris,

Thanks for all your help!! The thing I want to do is to check when the map shown is not between the coordinates. The following code throws a "gml not bound prefix element for Box" and when i remove the prefix i get a "Invalid content was found starting with element 'Filter'" error. I use the "Filter Encoding Implementation Specification" documentation version 1.0.0.

<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
    <Not>
        <Within>
            <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>100,150 -10,10</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
...

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Mon, 22 May 2006 12:42:46 -0400

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

I have done that but i get the following error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/sld&quot;:Symbolizer\}' is expected.
I take the same error if i use <Filter> instead of <ogc:Filter> Next are both ways I have tried among athers.

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
   <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
   <Not>
  <Within>
    <PropertyName>the_geom</PropertyName>
      <gml:Box>
        <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
      </gml:Box>
    </Within>
  </Not>
</Filter>
....

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
   <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
     <ogc:Filter>
  <ogc:Not>
    <ogc:Within>
      <ogc:PropertyName>the_geom</ogc:PropertyName>
      <gml:Box>
        <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
      </gml:Box>
    </ogc:Within>
  </ogc:Not>
</ogc:Filter>
...

I have also tried adding and removing some different namespaces in the root without any success.

Regards

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Tue, 23 May 2006 14:06:54 -0400

You need to define the namespace for your gml. xmlns:gml="http://www.opengis.net/gml&quot;

You can put it just where you bind the gml:

> <Rule>
> <Name>land</Name>
> <MaxScaleDenominator>5000000</MaxScaleDenominator>
> <Filter>
> <Not>
> <Within>
> <PropertyName>the_geom</PropertyName>
> <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <gml:coordinates>100,150 -10,10</gml:coordinates>
> </gml:Box>
> </Within>
> </Not>
> </Filter>

Or you can put it at the root SLD element:

<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
          <Name>Simple Roads</Name>
             ....

Which puts it global, so you only have to put it in once.

best regards,

Chris

Mad Cloud wrote:

Hi Chris,

Thanks for all your help!! The thing I want to do is to check when the map shown is not between the coordinates. The following code throws a "gml not bound prefix element for Box" and when i remove the prefix i get a "Invalid content was found starting with element 'Filter'" error. I use the "Filter Encoding Implementation Specification" documentation version 1.0.0.

<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
    <Not>
        <Within>
            <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>100,150 -10,10</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
...

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Mon, 22 May 2006 12:42:46 -0400

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/

Well, that's saying that you don't have the elements in the right order. You might get a validating xml program like XMLSpy, which will tell you when these things are out of order. In this case I think Filter is supposed to come before MaxScaleDenominator, as per the definition of a Rule:

<xsd:sequence>
  <xsd:element ref="sld:Name" minOccurs="0"/>
  <xsd:element ref="sld:Title" minOccurs="0"/>
  <xsd:element ref="sld:Abstract" minOccurs="0"/>
  <xsd:element ref="sld:LegendGraphic" minOccurs="0"/>
  <xsd:choice minOccurs="0">
    <xsd:element ref="ogc:Filter"/>
    <xsd:element ref="sld:ElseFilter"/>
  </xsd:choice>
  <xsd:element ref="sld:MinScaleDenominator" minOccurs="0"/>
  <xsd:element ref="sld:MaxScaleDenominator" minOccurs="0"/>
  <xsd:element ref="sld:Symbolizer" maxOccurs="unbounded"/>
</xsd:sequence>

Chris

Mad Cloud wrote:

I have done that but i get the following error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/sld&quot;:Symbolizer\}' is expected.
I take the same error if i use <Filter> instead of <ogc:Filter> Next are both ways I have tried among athers.

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
  <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
  <Not>
    <Within>
        <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
....

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
  <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
    <ogc:Filter>
    <ogc:Not>
        <ogc:Within>
            <ogc:PropertyName>the_geom</ogc:PropertyName>
            <gml:Box>
                <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
            </gml:Box>
        </ogc:Within>
    </ogc:Not>
</ogc:Filter>
...

I have also tried adding and removing some different namespaces in the root without any success.

Regards

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Tue, 23 May 2006 14:06:54 -0400

You need to define the namespace for your gml. xmlns:gml="http://www.opengis.net/gml&quot;

You can put it just where you bind the gml:

> <Rule>
> <Name>land</Name>
> <MaxScaleDenominator>5000000</MaxScaleDenominator>
> <Filter>
> <Not>
> <Within>
> <PropertyName>the_geom</PropertyName>
> <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <gml:coordinates>100,150 -10,10</gml:coordinates>
> </gml:Box>
> </Within>
> </Not>
> </Filter>

Or you can put it at the root SLD element:

<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    xmlns="http://www.opengis.net/sld&quot;
    xmlns:ogc="http://www.opengis.net/ogc&quot;
    xmlns:xlink="http://www.w3.org/1999/xlink&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
    <NamedLayer>
          <Name>Simple Roads</Name>
             ....

Which puts it global, so you only have to put it in once.

best regards,

Chris

Mad Cloud wrote:

Hi Chris,

Thanks for all your help!! The thing I want to do is to check when the map shown is not between the coordinates. The following code throws a "gml not bound prefix element for Box" and when i remove the prefix i get a "Invalid content was found starting with element 'Filter'" error. I use the "Filter Encoding Implementation Specification" documentation version 1.0.0.

<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
    <Not>
        <Within>
            <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>100,150 -10,10</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
...

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Mon, 22 May 2006 12:42:46 -0400

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

For once again you were right Chris. I m sure I have tried to put them in that order but I must had been doing some other mistake as well. Anyways it works now! Thanks alot!
Here is another question: how can I pass the coordinates of the currently viewable map to the sld filter? Is there a variable name for that? The thing I want to do is to view only the components that interact with the current map.

<ogc:Filter>
  <ogc:Not>
    <ogc:Disjoint>
      <ogc:PropertyName>the_geom</ogc:PropertyName>
      <gml:Box>
        <gml:coordinates>X1,Y1 X2,Y2</gml:coordinates>
      </gml:Box>
    </ogc:Disjoint>
  </ogc:Not>
</ogc:Filter>

where X1, Y1 the start of the current viewble area and X2,Y2 the end. Is this possible?

Regards,

George

p.s. Not sure if it matters but I use mapbuilder to view the map.

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Wed, 24 May 2006 12:16:25 -0400

Well, that's saying that you don't have the elements in the right order. You might get a validating xml program like XMLSpy, which will tell you when these things are out of order. In this case I think Filter is supposed to come before MaxScaleDenominator, as per the definition of a Rule:

<xsd:sequence>
<xsd:element ref="sld:Name" minOccurs="0"/>
<xsd:element ref="sld:Title" minOccurs="0"/>
<xsd:element ref="sld:Abstract" minOccurs="0"/>
<xsd:element ref="sld:LegendGraphic" minOccurs="0"/>
<xsd:choice minOccurs="0">
  <xsd:element ref="ogc:Filter"/>
  <xsd:element ref="sld:ElseFilter"/>
</xsd:choice>
<xsd:element ref="sld:MinScaleDenominator" minOccurs="0"/>
<xsd:element ref="sld:MaxScaleDenominator" minOccurs="0"/>
<xsd:element ref="sld:Symbolizer" maxOccurs="unbounded"/>
</xsd:sequence>

Chris

Mad Cloud wrote:

I have done that but i get the following error:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/sld&quot;:Symbolizer\}' is expected.
I take the same error if i use <Filter> instead of <ogc:Filter> Next are both ways I have tried among athers.

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
  <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
  <Not>
    <Within>
        <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
....

<?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&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
<NamedLayer>
<Name>land</Name>
<UserStyle>
<FeatureTypeStyle>
  <FeatureTypeName>Feature</FeatureTypeName>
<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
    <ogc:Filter>
    <ogc:Not>
        <ogc:Within>
            <ogc:PropertyName>the_geom</ogc:PropertyName>
            <gml:Box>
                <gml:coordinates>18.25,25 26.2,39.54</gml:coordinates>
            </gml:Box>
        </ogc:Within>
    </ogc:Not>
</ogc:Filter>
...

I have also tried adding and removing some different namespaces in the root without any success.

Regards

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Tue, 23 May 2006 14:06:54 -0400

You need to define the namespace for your gml. xmlns:gml="http://www.opengis.net/gml&quot;

You can put it just where you bind the gml:

> <Rule>
> <Name>land</Name>
> <MaxScaleDenominator>5000000</MaxScaleDenominator>
> <Filter>
> <Not>
> <Within>
> <PropertyName>the_geom</PropertyName>
> <gml:Box xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <gml:coordinates>100,150 -10,10</gml:coordinates>
> </gml:Box>
> </Within>
> </Not>
> </Filter>

Or you can put it at the root SLD element:

<StyledLayerDescriptor version="1.0.0"
    xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
    xmlns="http://www.opengis.net/sld&quot;
    xmlns:ogc="http://www.opengis.net/ogc&quot;
    xmlns:xlink="http://www.w3.org/1999/xlink&quot;
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
    <NamedLayer>
          <Name>Simple Roads</Name>
             ....

Which puts it global, so you only have to put it in once.

best regards,

Chris

Mad Cloud wrote:

Hi Chris,

Thanks for all your help!! The thing I want to do is to check when the map shown is not between the coordinates. The following code throws a "gml not bound prefix element for Box" and when i remove the prefix i get a "Invalid content was found starting with element 'Filter'" error. I use the "Filter Encoding Implementation Specification" documentation version 1.0.0.

<Rule>
<Name>land</Name>
<MaxScaleDenominator>5000000</MaxScaleDenominator>
<Filter>
    <Not>
        <Within>
            <PropertyName>the_geom</PropertyName>
            <gml:Box>
                <gml:coordinates>100,150 -10,10</gml:coordinates>
            </gml:Box>
        </Within>
    </Not>
</Filter>
...

George

From: Chris Holmes <cholmes@anonymised.com>
To: Mad Cloud <mad_cloud@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] coordinate filter
Date: Mon, 22 May 2006 12:42:46 -0400

There's a whole set of geometry filters, that probably does most everything you need to based on a set of coordinates. It's unclear in your examples a) what GreaterThan means and b) how the coordinates should be interpreted - are they a line, a box, ect? If you read the Filter specification it will tell you all about the various operations on geometries. You can pass in full geometry objects as literals, and compare them against attributes.

Chris

Mad Cloud wrote:

Hello!

Is there a way to filter depending on the coordinates? What I mean is something like the following:

<ogc:Filter>
<ogc:PropertyIsGreaterThan>
<gml:coord>
<gml:X>100</gml:X>
<gml:X>150</gml:X>
<gml:Y>-10</gml:Y>
<gml:Y>10</gml:Y>
</gml:coord>
</ogc:PropertyIsGreaterThan>
</ogc:Filter>

Regards
GK

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/

-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

<< cholmes.vcf >>

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/