[Geoserver-users] RE: <ogc:Touches> tag

Hmmm... I've never seen that error. Could you turn on Config -> Server -> Verbose Exceptions and set the log level to FINE? And send me the logs of the request and the error you get?

And what datastore are you using? I think the problem might be that the backend request isn't getting the geometry to do the filtering against. I thought we'd fix it to deal with such things. And actually I just tested this against shapefile and it worked fine. What version of GeoServer are you using?

Chris

Chris Holmes wrote:

Lee Wai See wrote:

Hi Chris,

Thanks to your suggestion, I tried the following WFS request:

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:prrm="http://www.openplans.org/prrm&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="prrm:road">
    <wfs:PropertyName>prrm:road_name</wfs:PropertyName>
    <ogc:Filter>
      <ogc:DWithin>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;&lt;gml:coordinates&gt;103\.

86225677490186,1.301676523353803</gml:coordinates>
        </gml:Point>
        <Distance unit="m">0.00001</Distance>
      </ogc:DWithin>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

However, I got this exception when the request is submitted:

<?xml version="1.0" ?> <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:8080/geoserver/data/capabilities//wfs/1.0.0/OGC-
exception.xsd">
      <ServiceException>java.lang.IllegalArgumentException: FeatureReader
allready produces contents with the correct schema</ServiceException> </ServiceExceptionReport>

As you can see, what I am trying to do filter out all the name of the roads
within certain distance from the given point with the line
<wfs:PropertyName>prrm:road_name</wfs:PropertyName>. But if I remove this
line, the request works but returns me all the properties of the features.

Thus, my question is, can I just filter out the name of the features for a
DWithin filter? I have tested filtering out certain properties of features
in a same manner with tags such as Intersects and I thought it should be
possible too for DWithin. If it is possible, then any idea what should be
the right way of doing it?

Would appreciate a lot for your reply. Thanks.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com] Sent: Thursday, May 25, 2006 12:11 AM
To: Lee Wai See
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

The OGC filter specification: http://portal.opengeospatial.org/files/?artifact_id=8340

The filter is called DWithin. You put in the geometry and the distance that should match.

Lee Wai See wrote:

Hi Chris,

Thanks for replying.

You also could do a distance filter with a small amount of give, which would give you some margin for if the point isn't precisely touching.

How can I go about doing this? Is there any reference for me? Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Wednesday, May 24, 2006 1:36 AM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

Apologies for missing this earlier.

Yes, the touches tag is supported.

I'm pretty positive that result means nothing was returned.

Note that touches is super exact, you may try using intersects. I'm not sure if it's actually different for points, but it may get you better results. You also could do a distance filter with a small amount of give, which would give you some margin for if the point isn't precisely touching.

Chris

Lee Wai See wrote:

Hi,

Could anyone kindly help me on this below (as sent to the list

previously)?

Once again, thank you very much.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd
_____ From: Lee Wai See [mailto:leewse@anonymised.com] Sent: Wednesday, May 17, 2006 2:35 PM
To: 'geoserver-users@lists.sourceforge.net'
Subject: <ogc:Touches> tag

Hi,

I am wondering whether the <ogc:Touches> tag is supported by GeoServer. I
have been trying to use this tag to filter out some features that touches

a

given point. My query is as such:

<wfs:Query typeName="prrm:road">

  <wfs:PropertyName>prrm:road_name</wfs:PropertyName>

  <ogc:Filter>

    <ogc:Touches>

      <ogc:PropertyName>the_geom</ogc:PropertyName>

      <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;

         <gml:coordinates>103.82110722,1.38459521</gml:coordinates>

      </gml:Point>

    </ogc:Touches>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

This is the result I got after submitting the request to the server:

<gml:boundedBy>

<gml:null>unknown</gml:null>
</gml:boundedBy>

I am wondering what this means. Does it mean that there is no feature that
the point touches, or is there an error in my request? If the problem lies
with my request, please tell me where I went wrong and how I should
construct a correct one. Would really appreciate if someone could give me
some pointers. Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the

message

from your system; please do not copy or use it for any purpose, nor

disclose

its contents to any other person. Thank you.]
---ST Electronics Group---

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

Hi Chris,

Thanks for the reply.

Could you turn on Config -> Server -> Verbose Exceptions and set the log
level to FINE? And send me the logs of the request and the error you get?

I have set the log level to FINE and please find attached a copy of the logs
of the request and error. If you need more logs information, please let me
know.

And what datastore are you using?

PostgreSQL 8.0

What version of GeoServer are you using?

GeoServer 1.3.0-RC2

Regards,
Lee Wai See
ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Wednesday, May 31, 2006 12:49 AM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

Hmmm... I've never seen that error. Could you turn on Config -> Server
-> Verbose Exceptions and set the log level to FINE? And send me the
logs of the request and the error you get?

And what datastore are you using? I think the problem might be that the
backend request isn't getting the geometry to do the filtering against.
  I thought we'd fix it to deal with such things. And actually I just
tested this against shapefile and it worked fine. What version of
GeoServer are you using?

Chris

Chris Holmes wrote:

Lee Wai See wrote:

Hi Chris,

Thanks to your suggestion, I tried the following WFS request:

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:prrm="http://www.openplans.org/prrm&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="prrm:road">
    <wfs:PropertyName>prrm:road_name</wfs:PropertyName>
    <ogc:Filter>
      <ogc:DWithin>
        <ogc:PropertyName>the_geom</ogc:PropertyName>
        <gml:Point

srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;&lt;gml:coordinates&gt;103\.

86225677490186,1.301676523353803</gml:coordinates>
        </gml:Point>
        <Distance unit="m">0.00001</Distance>
      </ogc:DWithin>
   </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

However, I got this exception when the request is submitted:

<?xml version="1.0" ?> <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:8080/geoserver/data/capabilities//wfs/1.0.0/OGC-
exception.xsd">
      <ServiceException>java.lang.IllegalArgumentException: FeatureReader
allready produces contents with the correct schema</ServiceException>
</ServiceExceptionReport>

As you can see, what I am trying to do filter out all the name of the
roads
within certain distance from the given point with the line
<wfs:PropertyName>prrm:road_name</wfs:PropertyName>. But if I remove this
line, the request works but returns me all the properties of the
features.

Thus, my question is, can I just filter out the name of the features
for a
DWithin filter? I have tested filtering out certain properties of
features
in a same manner with tags such as Intersects and I thought it should be
possible too for DWithin. If it is possible, then any idea what should be
the right way of doing it?

Would appreciate a lot for your reply. Thanks.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com] Sent: Thursday, May
25, 2006 12:11 AM
To: Lee Wai See
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

The OGC filter specification:
http://portal.opengeospatial.org/files/?artifact_id=8340

The filter is called DWithin. You put in the geometry and the
distance that should match.

Lee Wai See wrote:

Hi Chris,

Thanks for replying.

You also could do a distance filter with a small amount of give,
which would give you some margin for if the point isn't precisely
touching.

How can I go about doing this? Is there any reference for me? Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Wednesday, May 24, 2006 1:36 AM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

Apologies for missing this earlier.

Yes, the touches tag is supported.

I'm pretty positive that result means nothing was returned.

Note that touches is super exact, you may try using intersects. I'm
not sure if it's actually different for points, but it may get you
better results. You also could do a distance filter with a small
amount of give, which would give you some margin for if the point
isn't precisely touching.

Chris

Lee Wai See wrote:

Hi,

Could anyone kindly help me on this below (as sent to the list

previously)?

Once again, thank you very much.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd
_____
From: Lee Wai See [mailto:leewse@anonymised.com] Sent: Wednesday,
May 17, 2006 2:35 PM
To: 'geoserver-users@lists.sourceforge.net'
Subject: <ogc:Touches> tag

Hi,

I am wondering whether the <ogc:Touches> tag is supported by
GeoServer. I
have been trying to use this tag to filter out some features that
touches

a

given point. My query is as such:

<wfs:Query typeName="prrm:road">

  <wfs:PropertyName>prrm:road_name</wfs:PropertyName>

  <ogc:Filter>

    <ogc:Touches>

      <ogc:PropertyName>the_geom</ogc:PropertyName>

      <gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;

         <gml:coordinates>103.82110722,1.38459521</gml:coordinates>

      </gml:Point>

    </ogc:Touches>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

This is the result I got after submitting the request to the server:

<gml:boundedBy>

<gml:null>unknown</gml:null>
</gml:boundedBy>

I am wondering what this means. Does it mean that there is no
feature that
the point touches, or is there an error in my request? If the
problem lies
with my request, please tell me where I went wrong and how I should
construct a correct one. Would really appreciate if someone could
give me
some pointers. Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the

message

from your system; please do not copy or use it for any purpose, nor

disclose

its contents to any other person. Thank you.]
---ST Electronics Group---

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

logs.log (14.7 KB)

Could you upgrade to 1.3.0 and see if that fixes your problems? There's a decent chance your bug was just fixed, and if not it's much easier for us to debug right.

best regards,

Chris

Lee Wai See wrote:

Hi Chris,

Thanks for the reply.

Could you turn on Config -> Server -> Verbose Exceptions and set the log
level to FINE? And send me the logs of the request and the error you get?

I have set the log level to FINE and please find attached a copy of the logs
of the request and error. If you need more logs information, please let me
know.

And what datastore are you using?

PostgreSQL 8.0

What version of GeoServer are you using?

GeoServer 1.3.0-RC2

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Wednesday, May 31, 2006 12:49 AM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

Hmmm... I've never seen that error. Could you turn on Config -> Server -> Verbose Exceptions and set the log level to FINE? And send me the logs of the request and the error you get?

And what datastore are you using? I think the problem might be that the backend request isn't getting the geometry to do the filtering against. I thought we'd fix it to deal with such things. And actually I just tested this against shapefile and it worked fine. What version of GeoServer are you using?

Chris

Chris Holmes wrote:

Lee Wai See wrote:

Hi Chris,

Thanks to your suggestion, I tried the following WFS request:

<wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="GML2"
xmlns:prrm="http://www.openplans.org/prrm&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/wfs
                     http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
<wfs:Query typeName="prrm:road">
   <wfs:PropertyName>prrm:road_name</wfs:PropertyName>
   <ogc:Filter>
     <ogc:DWithin>
       <ogc:PropertyName>the_geom</ogc:PropertyName>
       <gml:Point

srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;&lt;gml:coordinates&gt;103\.

86225677490186,1.301676523353803</gml:coordinates>
       </gml:Point>
       <Distance unit="m">0.00001</Distance>
     </ogc:DWithin>
  </ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

However, I got this exception when the request is submitted:

<?xml version="1.0" ?> <ServiceExceptionReport version="1.2.0" xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost:8080/geoserver/data/capabilities//wfs/1.0.0/OGC-
exception.xsd">
     <ServiceException>java.lang.IllegalArgumentException: FeatureReader
allready produces contents with the correct schema</ServiceException> </ServiceExceptionReport>

As you can see, what I am trying to do filter out all the name of the roads
within certain distance from the given point with the line
<wfs:PropertyName>prrm:road_name</wfs:PropertyName>. But if I remove this
line, the request works but returns me all the properties of the features.

Thus, my question is, can I just filter out the name of the features for a
DWithin filter? I have tested filtering out certain properties of features
in a same manner with tags such as Intersects and I thought it should be
possible too for DWithin. If it is possible, then any idea what should be
the right way of doing it?

Would appreciate a lot for your reply. Thanks.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com] Sent: Thursday, May 25, 2006 12:11 AM
To: Lee Wai See
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

The OGC filter specification: http://portal.opengeospatial.org/files/?artifact_id=8340

The filter is called DWithin. You put in the geometry and the distance that should match.

Lee Wai See wrote:

Hi Chris,

Thanks for replying.

You also could do a distance filter with a small amount of give, which would give you some margin for if the point isn't precisely touching.

How can I go about doing this? Is there any reference for me? Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of Chris
Holmes
Sent: Wednesday, May 24, 2006 1:36 AM
To: Lee Wai See
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] RE: <ogc:Touches> tag

Apologies for missing this earlier.

Yes, the touches tag is supported.

I'm pretty positive that result means nothing was returned.

Note that touches is super exact, you may try using intersects. I'm not sure if it's actually different for points, but it may get you better results. You also could do a distance filter with a small amount of give, which would give you some margin for if the point isn't precisely touching.

Chris

Lee Wai See wrote:

Hi,

Could anyone kindly help me on this below (as sent to the list

previously)?

Once again, thank you very much.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd
_____ From: Lee Wai See [mailto:leewse@anonymised.com] Sent: Wednesday, May 17, 2006 2:35 PM
To: 'geoserver-users@lists.sourceforge.net'
Subject: <ogc:Touches> tag

Hi,

I am wondering whether the <ogc:Touches> tag is supported by GeoServer. I
have been trying to use this tag to filter out some features that touches

a

given point. My query is as such:

<wfs:Query typeName="prrm:road">

<wfs:PropertyName>prrm:road_name</wfs:PropertyName>

<ogc:Filter>

   <ogc:Touches>

     <ogc:PropertyName>the_geom</ogc:PropertyName>

     <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;

        <gml:coordinates>103.82110722,1.38459521</gml:coordinates>

     </gml:Point>

   </ogc:Touches>

</ogc:Filter>

</wfs:Query>

</wfs:GetFeature>

This is the result I got after submitting the request to the server:

<gml:boundedBy>

<gml:null>unknown</gml:null>
</gml:boundedBy>

I am wondering what this means. Does it mean that there is no feature that
the point touches, or is there an error in my request? If the problem lies
with my request, please tell me where I went wrong and how I should
construct a correct one. Would really appreciate if someone could give me
some pointers. Thank you.

Regards, Lee Wai See ST Electronics (Info-Software Systems) Pte Ltd

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the

message

from your system; please do not copy or use it for any purpose, nor

disclose

its contents to any other person. Thank you.]
---ST Electronics Group---

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