problem with WFS DWithin

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with WFS DWithin

Bart van den Eijnden (OSGIS)-2
Hi list,

I can't get a DWithin filter containing a LineString to work. I am using a
polygon layer. It doesn't select anything. Using 5.0.2.

A DWithin containing a Polygon works fine.

Any ideas what could be causing this?

Did anybody else experience the same thing?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl





_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: problem with WFS DWithin

Bart van den Eijnden (OSGIS)-2
Okay, it seems it only returns features if they are totally contained within
the searchshape + distance (the buffered linestring).

Is this the way DWithin is supposed to behave? I am not a geometry operator
specialist unfortunately, but my expectation was to get any of the polygons
containing the buffered linestring.

A small buffer (500 m) selects nothing:
http://www.osgis.nl/download/umn/dwithin1.png

A bigger buffer (2500 m) only selects 3 polygons:
http://www.osgis.nl/download/umn/dwithin2.png

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: Bart van den Eijnden OSGIS <[hidden email]>
Naar: [hidden email] <[hidden email]>
Onderwerp: problem with WFS DWithin
Datum: 27/03/08 14:59

>
> Hi list,
>
> I can't get a DWithin filter containing a LineString to work. I am using a
> polygon layer. It doesn't select anything. Using 5.0.2.
>
> A DWithin containing a Polygon works fine.
>
> Any ideas what could be causing this?
>
> Did anybody else experience the same thing?
>
> Best regards,
> Bart
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
>
>
>
>



_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Paul Ramsey
DWIthin(A, B, D)

should be functionally identical to

Distance(A, B) < D

so no, what you describe doesn't sound like a correct DWithin, Bart.
BTW, if it's implemented as

Intersects(A, Buffer(B, D))

it's incredibly inefficient.

P.

On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
<[hidden email]> wrote:

> Okay, it seems it only returns features if they are totally contained within
>  the searchshape + distance (the buffered linestring).
>
>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>  specialist unfortunately, but my expectation was to get any of the polygons
>  containing the buffered linestring.
>
>  A small buffer (500 m) selects nothing:
>  http://www.osgis.nl/download/umn/dwithin1.png
>
>  A bigger buffer (2500 m) only selects 3 polygons:
>  http://www.osgis.nl/download/umn/dwithin2.png
>
>  Best regards,
>  Bart
>
>  --
>  Bart van den Eijnden
>  OSGIS, Open Source GIS
>  http://www.osgis.nl
>
>
>  --------- Oorspronkelijk bericht --------
>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>  Naar: [hidden email] <[hidden email]>
>  Onderwerp: problem with WFS DWithin
>  Datum: 27/03/08 14:59
>
>  >
>  > Hi list,
>  >
>  > I can't get a DWithin filter containing a LineString to work. I am using a
>  > polygon layer. It doesn't select anything. Using 5.0.2.
>  >
>  > A DWithin containing a Polygon works fine.
>  >
>  > Any ideas what could be causing this?
>  >
>  > Did anybody else experience the same thing?
>  >
>  > Best regards,
>  > Bart
>  >
>  > --
>  > Bart van den Eijnden
>  > OSGIS, Open Source GIS
>  > http://www.osgis.nl
>  >
>  >
>  >
>  >
>
>
>
>  _______________________________________________
>  mapserver-dev mailing list
>  [hidden email]
>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Yewondwossen Assefa
Hi There,

It is implemented using geos within functionality where the query shape
is a buffered copy of the original shape.  Same for within.
My interpretation of the within/dwithin  operator looking at the specs
"simple feature specification for sql" was that the feature should be
totally contained. If that is not the case, It can easily be changes to
use the distance geos operator.

Best Regards

Paul Ramsey wrote:

> DWIthin(A, B, D)
>
> should be functionally identical to
>
> Distance(A, B) < D
>
> so no, what you describe doesn't sound like a correct DWithin, Bart.
> BTW, if it's implemented as
>
> Intersects(A, Buffer(B, D))
>
> it's incredibly inefficient.
>
> P.
>
> On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
> <[hidden email]> wrote:
>> Okay, it seems it only returns features if they are totally contained within
>>  the searchshape + distance (the buffered linestring).
>>
>>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>>  specialist unfortunately, but my expectation was to get any of the polygons
>>  containing the buffered linestring.
>>
>>  A small buffer (500 m) selects nothing:
>>  http://www.osgis.nl/download/umn/dwithin1.png
>>
>>  A bigger buffer (2500 m) only selects 3 polygons:
>>  http://www.osgis.nl/download/umn/dwithin2.png
>>
>>  Best regards,
>>  Bart
>>
>>  --
>>  Bart van den Eijnden
>>  OSGIS, Open Source GIS
>>  http://www.osgis.nl
>>
>>
>>  --------- Oorspronkelijk bericht --------
>>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>>  Naar: [hidden email] <[hidden email]>
>>  Onderwerp: problem with WFS DWithin
>>  Datum: 27/03/08 14:59
>>
>>  >
>>  > Hi list,
>>  >
>>  > I can't get a DWithin filter containing a LineString to work. I am using a
>>  > polygon layer. It doesn't select anything. Using 5.0.2.
>>  >
>>  > A DWithin containing a Polygon works fine.
>>  >
>>  > Any ideas what could be causing this?
>>  >
>>  > Did anybody else experience the same thing?
>>  >
>>  > Best regards,
>>  > Bart
>>  >
>>  > --
>>  > Bart van den Eijnden
>>  > OSGIS, Open Source GIS
>>  > http://www.osgis.nl
>>  >
>>  >
>>  >
>>  >
>>
>>
>>
>>  _______________________________________________
>>  mapserver-dev mailing list
>>  [hidden email]
>>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: [hidden email]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Paul Ramsey
Assefa,

I can't see DWithin in SFSQL.

In OGC Filter, the "definition" is useless!  "The spatial operators
DWithin and Beyond test whether the value of a geometric property is
within or beyond a specified distance of the specified literal
geometric value."

The Javadoc from GeoAPI is clear and fits my personal understanding:
http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/filter/spatial/DWithin.html

There is surprisingly little clarity in the stuff I netted from
Google. When I get home to my SQL/MM file I'll see if ISO is clearer.

Paul


On Thu, Mar 27, 2008 at 9:07 AM, Yewondwossen Assefa
<[hidden email]> wrote:

> Hi There,
>
>  It is implemented using geos within functionality where the query shape
>  is a buffered copy of the original shape.  Same for within.
>  My interpretation of the within/dwithin  operator looking at the specs
>  "simple feature specification for sql" was that the feature should be
>  totally contained. If that is not the case, It can easily be changes to
>  use the distance geos operator.
>
>  Best Regards
>
>
>
>  Paul Ramsey wrote:
>  > DWIthin(A, B, D)
>  >
>  > should be functionally identical to
>  >
>  > Distance(A, B) < D
>  >
>  > so no, what you describe doesn't sound like a correct DWithin, Bart.
>  > BTW, if it's implemented as
>  >
>  > Intersects(A, Buffer(B, D))
>  >
>  > it's incredibly inefficient.
>  >
>  > P.
>  >
>  > On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
>  > <[hidden email]> wrote:
>  >> Okay, it seems it only returns features if they are totally contained within
>  >>  the searchshape + distance (the buffered linestring).
>  >>
>  >>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>  >>  specialist unfortunately, but my expectation was to get any of the polygons
>  >>  containing the buffered linestring.
>  >>
>  >>  A small buffer (500 m) selects nothing:
>  >>  http://www.osgis.nl/download/umn/dwithin1.png
>  >>
>  >>  A bigger buffer (2500 m) only selects 3 polygons:
>  >>  http://www.osgis.nl/download/umn/dwithin2.png
>  >>
>  >>  Best regards,
>  >>  Bart
>  >>
>  >>  --
>  >>  Bart van den Eijnden
>  >>  OSGIS, Open Source GIS
>  >>  http://www.osgis.nl
>  >>
>  >>
>  >>  --------- Oorspronkelijk bericht --------
>  >>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>  >>  Naar: [hidden email] <[hidden email]>
>  >>  Onderwerp: problem with WFS DWithin
>  >>  Datum: 27/03/08 14:59
>  >>
>  >>  >
>  >>  > Hi list,
>  >>  >
>  >>  > I can't get a DWithin filter containing a LineString to work. I am using a
>  >>  > polygon layer. It doesn't select anything. Using 5.0.2.
>  >>  >
>  >>  > A DWithin containing a Polygon works fine.
>  >>  >
>  >>  > Any ideas what could be causing this?
>  >>  >
>  >>  > Did anybody else experience the same thing?
>  >>  >
>  >>  > Best regards,
>  >>  > Bart
>  >>  >
>  >>  > --
>  >>  > Bart van den Eijnden
>  >>  > OSGIS, Open Source GIS
>  >>  > http://www.osgis.nl
>  >>  >
>  >>  >
>  >>  >
>  >>  >
>  >>
>  >>
>  >>
>  >>  _______________________________________________
>  >>  mapserver-dev mailing list
>  >>  [hidden email]
>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >>
>  > _______________________________________________
>  > mapserver-dev mailing list
>  > [hidden email]
>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >
>  >
>
>
>  --
>  ----------------------------------------------------------------
>  Assefa Yewondwossen
>  Software Analyst
>
>  Email: [hidden email]
>  http://www.dmsolutions.ca/
>
>  Phone: (613) 565-5056 (ext 14)
>  Fax:   (613) 565-0925
>  ----------------------------------------------------------------
>
>
_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Yewondwossen Assefa
Paul Ramsey wrote:
> Assefa,
>
> I can't see DWithin in SFSQL.
>
  You are right. Within is defined in SFSQL. I meant that I interpreted
DWithin using the same definition as Within.

> In OGC Filter, the "definition" is useless!  "The spatial operators
> DWithin and Beyond test whether the value of a geometric property is
> within or beyond a specified distance of the specified literal
> geometric value."
>
  True :)

> The Javadoc from GeoAPI is clear and fits my personal understanding:
> http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/filter/spatial/DWithin.html
>
> There is surprisingly little clarity in the stuff I netted from
> Google. When I get home to my SQL/MM file I'll see if ISO is clearer.
>

If there is some clear definition/consensus on this, I see no problem
changing it to fit the GeoAPI way, although I think Within and DWithin
should behave similarly.

Best Regards,

> Paul
>
>
> On Thu, Mar 27, 2008 at 9:07 AM, Yewondwossen Assefa
> <[hidden email]> wrote:
>> Hi There,
>>
>>  It is implemented using geos within functionality where the query shape
>>  is a buffered copy of the original shape.  Same for within.
>>  My interpretation of the within/dwithin  operator looking at the specs
>>  "simple feature specification for sql" was that the feature should be
>>  totally contained. If that is not the case, It can easily be changes to
>>  use the distance geos operator.
>>
>>  Best Regards
>>
>>
>>
>>  Paul Ramsey wrote:
>>  > DWIthin(A, B, D)
>>  >
>>  > should be functionally identical to
>>  >
>>  > Distance(A, B) < D
>>  >
>>  > so no, what you describe doesn't sound like a correct DWithin, Bart.
>>  > BTW, if it's implemented as
>>  >
>>  > Intersects(A, Buffer(B, D))
>>  >
>>  > it's incredibly inefficient.
>>  >
>>  > P.
>>  >
>>  > On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
>>  > <[hidden email]> wrote:
>>  >> Okay, it seems it only returns features if they are totally contained within
>>  >>  the searchshape + distance (the buffered linestring).
>>  >>
>>  >>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>>  >>  specialist unfortunately, but my expectation was to get any of the polygons
>>  >>  containing the buffered linestring.
>>  >>
>>  >>  A small buffer (500 m) selects nothing:
>>  >>  http://www.osgis.nl/download/umn/dwithin1.png
>>  >>
>>  >>  A bigger buffer (2500 m) only selects 3 polygons:
>>  >>  http://www.osgis.nl/download/umn/dwithin2.png
>>  >>
>>  >>  Best regards,
>>  >>  Bart
>>  >>
>>  >>  --
>>  >>  Bart van den Eijnden
>>  >>  OSGIS, Open Source GIS
>>  >>  http://www.osgis.nl
>>  >>
>>  >>
>>  >>  --------- Oorspronkelijk bericht --------
>>  >>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>>  >>  Naar: [hidden email] <[hidden email]>
>>  >>  Onderwerp: problem with WFS DWithin
>>  >>  Datum: 27/03/08 14:59
>>  >>
>>  >>  >
>>  >>  > Hi list,
>>  >>  >
>>  >>  > I can't get a DWithin filter containing a LineString to work. I am using a
>>  >>  > polygon layer. It doesn't select anything. Using 5.0.2.
>>  >>  >
>>  >>  > A DWithin containing a Polygon works fine.
>>  >>  >
>>  >>  > Any ideas what could be causing this?
>>  >>  >
>>  >>  > Did anybody else experience the same thing?
>>  >>  >
>>  >>  > Best regards,
>>  >>  > Bart
>>  >>  >
>>  >>  > --
>>  >>  > Bart van den Eijnden
>>  >>  > OSGIS, Open Source GIS
>>  >>  > http://www.osgis.nl
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>  >
>>  >>
>>  >>
>>  >>
>>  >>  _______________________________________________
>>  >>  mapserver-dev mailing list
>>  >>  [hidden email]
>>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>  >>
>>  > _______________________________________________
>>  > mapserver-dev mailing list
>>  > [hidden email]
>>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>  >
>>  >
>>
>>
>>  --
>>  ----------------------------------------------------------------
>>  Assefa Yewondwossen
>>  Software Analyst
>>
>>  Email: [hidden email]
>>  http://www.dmsolutions.ca/
>>
>>  Phone: (613) 565-5056 (ext 14)
>>  Fax:   (613) 565-0925
>>  ----------------------------------------------------------------
>>
>>
>
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: [hidden email]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Paul Ramsey
SQL/MM is not helpful, there's no DWithin in the draft I have
available. All I have left is to appeal to Oracle's
SDO.WITHIN_DISTANCE and note that it also shares the GeoAPI
definition: http://download.oracle.com/docs/html/A85337_01/sdo_objg.htm#854615

Whether WITHIN_DISTANCE is semantically equivalent to DWITHIN is left
as an exercise for the pub after work.

P.

On Thu, Mar 27, 2008 at 11:23 AM, Yewondwossen Assefa
<[hidden email]> wrote:

> Paul Ramsey wrote:
>  > Assefa,
>  >
>  > I can't see DWithin in SFSQL.
>  >
>   You are right. Within is defined in SFSQL. I meant that I interpreted
>  DWithin using the same definition as Within.
>
>
>  > In OGC Filter, the "definition" is useless!  "The spatial operators
>  > DWithin and Beyond test whether the value of a geometric property is
>  > within or beyond a specified distance of the specified literal
>  > geometric value."
>  >
>   True :)
>
>
>  > The Javadoc from GeoAPI is clear and fits my personal understanding:
>  > http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/filter/spatial/DWithin.html
>  >
>  > There is surprisingly little clarity in the stuff I netted from
>  > Google. When I get home to my SQL/MM file I'll see if ISO is clearer.
>  >
>
>  If there is some clear definition/consensus on this, I see no problem
>  changing it to fit the GeoAPI way, although I think Within and DWithin
>  should behave similarly.
>
>  Best Regards,
>
>
>
>  > Paul
>  >
>  >
>  > On Thu, Mar 27, 2008 at 9:07 AM, Yewondwossen Assefa
>  > <[hidden email]> wrote:
>  >> Hi There,
>  >>
>  >>  It is implemented using geos within functionality where the query shape
>  >>  is a buffered copy of the original shape.  Same for within.
>  >>  My interpretation of the within/dwithin  operator looking at the specs
>  >>  "simple feature specification for sql" was that the feature should be
>  >>  totally contained. If that is not the case, It can easily be changes to
>  >>  use the distance geos operator.
>  >>
>  >>  Best Regards
>  >>
>  >>
>  >>
>  >>  Paul Ramsey wrote:
>  >>  > DWIthin(A, B, D)
>  >>  >
>  >>  > should be functionally identical to
>  >>  >
>  >>  > Distance(A, B) < D
>  >>  >
>  >>  > so no, what you describe doesn't sound like a correct DWithin, Bart.
>  >>  > BTW, if it's implemented as
>  >>  >
>  >>  > Intersects(A, Buffer(B, D))
>  >>  >
>  >>  > it's incredibly inefficient.
>  >>  >
>  >>  > P.
>  >>  >
>  >>  > On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
>  >>  > <[hidden email]> wrote:
>  >>  >> Okay, it seems it only returns features if they are totally contained within
>  >>  >>  the searchshape + distance (the buffered linestring).
>  >>  >>
>  >>  >>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>  >>  >>  specialist unfortunately, but my expectation was to get any of the polygons
>  >>  >>  containing the buffered linestring.
>  >>  >>
>  >>  >>  A small buffer (500 m) selects nothing:
>  >>  >>  http://www.osgis.nl/download/umn/dwithin1.png
>  >>  >>
>  >>  >>  A bigger buffer (2500 m) only selects 3 polygons:
>  >>  >>  http://www.osgis.nl/download/umn/dwithin2.png
>  >>  >>
>  >>  >>  Best regards,
>  >>  >>  Bart
>  >>  >>
>  >>  >>  --
>  >>  >>  Bart van den Eijnden
>  >>  >>  OSGIS, Open Source GIS
>  >>  >>  http://www.osgis.nl
>  >>  >>
>  >>  >>
>  >>  >>  --------- Oorspronkelijk bericht --------
>  >>  >>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>  >>  >>  Naar: [hidden email] <[hidden email]>
>  >>  >>  Onderwerp: problem with WFS DWithin
>  >>  >>  Datum: 27/03/08 14:59
>  >>  >>
>  >>  >>  >
>  >>  >>  > Hi list,
>  >>  >>  >
>  >>  >>  > I can't get a DWithin filter containing a LineString to work. I am using a
>  >>  >>  > polygon layer. It doesn't select anything. Using 5.0.2.
>  >>  >>  >
>  >>  >>  > A DWithin containing a Polygon works fine.
>  >>  >>  >
>  >>  >>  > Any ideas what could be causing this?
>  >>  >>  >
>  >>  >>  > Did anybody else experience the same thing?
>  >>  >>  >
>  >>  >>  > Best regards,
>  >>  >>  > Bart
>  >>  >>  >
>  >>  >>  > --
>  >>  >>  > Bart van den Eijnden
>  >>  >>  > OSGIS, Open Source GIS
>  >>  >>  > http://www.osgis.nl
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >
>  >>  >>  >
>  >>  >>
>  >>  >>
>  >>  >>
>  >>  >>  _______________________________________________
>  >>  >>  mapserver-dev mailing list
>  >>  >>  [hidden email]
>  >>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >>  >>
>  >>  > _______________________________________________
>  >>  > mapserver-dev mailing list
>  >>  > [hidden email]
>  >>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >>  >
>  >>  >
>  >>
>  >>
>  >>  --
>  >>  ----------------------------------------------------------------
>  >>  Assefa Yewondwossen
>  >>  Software Analyst
>  >>
>  >>  Email: [hidden email]
>  >>  http://www.dmsolutions.ca/
>  >>
>  >>  Phone: (613) 565-5056 (ext 14)
>  >>  Fax:   (613) 565-0925
>  >>  ----------------------------------------------------------------
>  >>
>  >>
>  >
>  >
>
>
>  --
>
>
> ----------------------------------------------------------------
>  Assefa Yewondwossen
>  Software Analyst
>
>  Email: [hidden email]
>  http://www.dmsolutions.ca/
>
>  Phone: (613) 565-5056 (ext 14)
>  Fax:   (613) 565-0925
>  ----------------------------------------------------------------
>
>
_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Paul Ramsey
Ok, one last kick:

"The spatial operators DWithin and Beyond test whether the value of a
geometric property is within or beyond a specified distance of the
specified literal geometric value."

If we use Assefa's definition, then there is a case missing... an
object is either DWithin, DBeyond, or DOnTheLine.  If we use the
GeoAPI definition, then the Within/Beyond duality is complete: an
object is either within or beyond, there is no third state.

P.

On Thu, Mar 27, 2008 at 1:04 PM, Paul Ramsey <[hidden email]> wrote:

> SQL/MM is not helpful, there's no DWithin in the draft I have
>  available. All I have left is to appeal to Oracle's
>  SDO.WITHIN_DISTANCE and note that it also shares the GeoAPI
>  definition: http://download.oracle.com/docs/html/A85337_01/sdo_objg.htm#854615
>
>  Whether WITHIN_DISTANCE is semantically equivalent to DWITHIN is left
>  as an exercise for the pub after work.
>
>  P.
>
>  On Thu, Mar 27, 2008 at 11:23 AM, Yewondwossen Assefa
>
>
> <[hidden email]> wrote:
>  > Paul Ramsey wrote:
>  >  > Assefa,
>  >  >
>  >  > I can't see DWithin in SFSQL.
>  >  >
>  >   You are right. Within is defined in SFSQL. I meant that I interpreted
>  >  DWithin using the same definition as Within.
>  >
>  >
>  >  > In OGC Filter, the "definition" is useless!  "The spatial operators
>  >  > DWithin and Beyond test whether the value of a geometric property is
>  >  > within or beyond a specified distance of the specified literal
>  >  > geometric value."
>  >  >
>  >   True :)
>  >
>  >
>  >  > The Javadoc from GeoAPI is clear and fits my personal understanding:
>  >  > http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/filter/spatial/DWithin.html
>  >  >
>  >  > There is surprisingly little clarity in the stuff I netted from
>  >  > Google. When I get home to my SQL/MM file I'll see if ISO is clearer.
>  >  >
>  >
>  >  If there is some clear definition/consensus on this, I see no problem
>  >  changing it to fit the GeoAPI way, although I think Within and DWithin
>  >  should behave similarly.
>  >
>  >  Best Regards,
>  >
>  >
>  >
>  >  > Paul
>  >  >
>  >  >
>  >  > On Thu, Mar 27, 2008 at 9:07 AM, Yewondwossen Assefa
>  >  > <[hidden email]> wrote:
>  >  >> Hi There,
>  >  >>
>  >  >>  It is implemented using geos within functionality where the query shape
>  >  >>  is a buffered copy of the original shape.  Same for within.
>  >  >>  My interpretation of the within/dwithin  operator looking at the specs
>  >  >>  "simple feature specification for sql" was that the feature should be
>  >  >>  totally contained. If that is not the case, It can easily be changes to
>  >  >>  use the distance geos operator.
>  >  >>
>  >  >>  Best Regards
>  >  >>
>  >  >>
>  >  >>
>  >  >>  Paul Ramsey wrote:
>  >  >>  > DWIthin(A, B, D)
>  >  >>  >
>  >  >>  > should be functionally identical to
>  >  >>  >
>  >  >>  > Distance(A, B) < D
>  >  >>  >
>  >  >>  > so no, what you describe doesn't sound like a correct DWithin, Bart.
>  >  >>  > BTW, if it's implemented as
>  >  >>  >
>  >  >>  > Intersects(A, Buffer(B, D))
>  >  >>  >
>  >  >>  > it's incredibly inefficient.
>  >  >>  >
>  >  >>  > P.
>  >  >>  >
>  >  >>  > On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
>  >  >>  > <[hidden email]> wrote:
>  >  >>  >> Okay, it seems it only returns features if they are totally contained within
>  >  >>  >>  the searchshape + distance (the buffered linestring).
>  >  >>  >>
>  >  >>  >>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>  >  >>  >>  specialist unfortunately, but my expectation was to get any of the polygons
>  >  >>  >>  containing the buffered linestring.
>  >  >>  >>
>  >  >>  >>  A small buffer (500 m) selects nothing:
>  >  >>  >>  http://www.osgis.nl/download/umn/dwithin1.png
>  >  >>  >>
>  >  >>  >>  A bigger buffer (2500 m) only selects 3 polygons:
>  >  >>  >>  http://www.osgis.nl/download/umn/dwithin2.png
>  >  >>  >>
>  >  >>  >>  Best regards,
>  >  >>  >>  Bart
>  >  >>  >>
>  >  >>  >>  --
>  >  >>  >>  Bart van den Eijnden
>  >  >>  >>  OSGIS, Open Source GIS
>  >  >>  >>  http://www.osgis.nl
>  >  >>  >>
>  >  >>  >>
>  >  >>  >>  --------- Oorspronkelijk bericht --------
>  >  >>  >>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>  >  >>  >>  Naar: [hidden email] <[hidden email]>
>  >  >>  >>  Onderwerp: problem with WFS DWithin
>  >  >>  >>  Datum: 27/03/08 14:59
>  >  >>  >>
>  >  >>  >>  >
>  >  >>  >>  > Hi list,
>  >  >>  >>  >
>  >  >>  >>  > I can't get a DWithin filter containing a LineString to work. I am using a
>  >  >>  >>  > polygon layer. It doesn't select anything. Using 5.0.2.
>  >  >>  >>  >
>  >  >>  >>  > A DWithin containing a Polygon works fine.
>  >  >>  >>  >
>  >  >>  >>  > Any ideas what could be causing this?
>  >  >>  >>  >
>  >  >>  >>  > Did anybody else experience the same thing?
>  >  >>  >>  >
>  >  >>  >>  > Best regards,
>  >  >>  >>  > Bart
>  >  >>  >>  >
>  >  >>  >>  > --
>  >  >>  >>  > Bart van den Eijnden
>  >  >>  >>  > OSGIS, Open Source GIS
>  >  >>  >>  > http://www.osgis.nl
>  >  >>  >>  >
>  >  >>  >>  >
>  >  >>  >>  >
>  >  >>  >>  >
>  >  >>  >>
>  >  >>  >>
>  >  >>  >>
>  >  >>  >>  _______________________________________________
>  >  >>  >>  mapserver-dev mailing list
>  >  >>  >>  [hidden email]
>  >  >>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >  >>  >>
>  >  >>  > _______________________________________________
>  >  >>  > mapserver-dev mailing list
>  >  >>  > [hidden email]
>  >  >>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >  >>  >
>  >  >>  >
>  >  >>
>  >  >>
>  >  >>  --
>  >  >>  ----------------------------------------------------------------
>  >  >>  Assefa Yewondwossen
>  >  >>  Software Analyst
>  >  >>
>  >  >>  Email: [hidden email]
>  >  >>  http://www.dmsolutions.ca/
>  >  >>
>  >  >>  Phone: (613) 565-5056 (ext 14)
>  >  >>  Fax:   (613) 565-0925
>  >  >>  ----------------------------------------------------------------
>  >  >>
>  >  >>
>  >  >
>  >  >
>  >
>  >
>  >  --
>  >
>  >
>  > ----------------------------------------------------------------
>  >  Assefa Yewondwossen
>  >  Software Analyst
>  >
>  >  Email: [hidden email]
>  >  http://www.dmsolutions.ca/
>  >
>  >  Phone: (613) 565-5056 (ext 14)
>  >  Fax:   (613) 565-0925
>  >  ----------------------------------------------------------------
>  >
>  >
>
_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: problem with WFS DWithin

Yewondwossen Assefa
Paul,

   I have opened a ticket on this
http://trac.osgeo.org/mapserver/ticket/2564.

  Also note that we had this similar  discussion on DWithin and Beyond
in bug http://trac.osgeo.org/mapserver/ticket/2105#comment:6

Best Regards,

Paul Ramsey wrote:

> Ok, one last kick:
>
> "The spatial operators DWithin and Beyond test whether the value of a
> geometric property is within or beyond a specified distance of the
> specified literal geometric value."
>
> If we use Assefa's definition, then there is a case missing... an
> object is either DWithin, DBeyond, or DOnTheLine.  If we use the
> GeoAPI definition, then the Within/Beyond duality is complete: an
> object is either within or beyond, there is no third state.
>
> P.
>
> On Thu, Mar 27, 2008 at 1:04 PM, Paul Ramsey <[hidden email]> wrote:
>> SQL/MM is not helpful, there's no DWithin in the draft I have
>>  available. All I have left is to appeal to Oracle's
>>  SDO.WITHIN_DISTANCE and note that it also shares the GeoAPI
>>  definition: http://download.oracle.com/docs/html/A85337_01/sdo_objg.htm#854615
>>
>>  Whether WITHIN_DISTANCE is semantically equivalent to DWITHIN is left
>>  as an exercise for the pub after work.
>>
>>  P.
>>
>>  On Thu, Mar 27, 2008 at 11:23 AM, Yewondwossen Assefa
>>
>>
>> <[hidden email]> wrote:
>>  > Paul Ramsey wrote:
>>  >  > Assefa,
>>  >  >
>>  >  > I can't see DWithin in SFSQL.
>>  >  >
>>  >   You are right. Within is defined in SFSQL. I meant that I interpreted
>>  >  DWithin using the same definition as Within.
>>  >
>>  >
>>  >  > In OGC Filter, the "definition" is useless!  "The spatial operators
>>  >  > DWithin and Beyond test whether the value of a geometric property is
>>  >  > within or beyond a specified distance of the specified literal
>>  >  > geometric value."
>>  >  >
>>  >   True :)
>>  >
>>  >
>>  >  > The Javadoc from GeoAPI is clear and fits my personal understanding:
>>  >  > http://geoapi.sourceforge.net/2.0/javadoc/org/opengis/filter/spatial/DWithin.html
>>  >  >
>>  >  > There is surprisingly little clarity in the stuff I netted from
>>  >  > Google. When I get home to my SQL/MM file I'll see if ISO is clearer.
>>  >  >
>>  >
>>  >  If there is some clear definition/consensus on this, I see no problem
>>  >  changing it to fit the GeoAPI way, although I think Within and DWithin
>>  >  should behave similarly.
>>  >
>>  >  Best Regards,
>>  >
>>  >
>>  >
>>  >  > Paul
>>  >  >
>>  >  >
>>  >  > On Thu, Mar 27, 2008 at 9:07 AM, Yewondwossen Assefa
>>  >  > <[hidden email]> wrote:
>>  >  >> Hi There,
>>  >  >>
>>  >  >>  It is implemented using geos within functionality where the query shape
>>  >  >>  is a buffered copy of the original shape.  Same for within.
>>  >  >>  My interpretation of the within/dwithin  operator looking at the specs
>>  >  >>  "simple feature specification for sql" was that the feature should be
>>  >  >>  totally contained. If that is not the case, It can easily be changes to
>>  >  >>  use the distance geos operator.
>>  >  >>
>>  >  >>  Best Regards
>>  >  >>
>>  >  >>
>>  >  >>
>>  >  >>  Paul Ramsey wrote:
>>  >  >>  > DWIthin(A, B, D)
>>  >  >>  >
>>  >  >>  > should be functionally identical to
>>  >  >>  >
>>  >  >>  > Distance(A, B) < D
>>  >  >>  >
>>  >  >>  > so no, what you describe doesn't sound like a correct DWithin, Bart.
>>  >  >>  > BTW, if it's implemented as
>>  >  >>  >
>>  >  >>  > Intersects(A, Buffer(B, D))
>>  >  >>  >
>>  >  >>  > it's incredibly inefficient.
>>  >  >>  >
>>  >  >>  > P.
>>  >  >>  >
>>  >  >>  > On Thu, Mar 27, 2008 at 8:19 AM, Bart van den Eijnden (OSGIS)
>>  >  >>  > <[hidden email]> wrote:
>>  >  >>  >> Okay, it seems it only returns features if they are totally contained within
>>  >  >>  >>  the searchshape + distance (the buffered linestring).
>>  >  >>  >>
>>  >  >>  >>  Is this the way DWithin is supposed to behave? I am not a geometry operator
>>  >  >>  >>  specialist unfortunately, but my expectation was to get any of the polygons
>>  >  >>  >>  containing the buffered linestring.
>>  >  >>  >>
>>  >  >>  >>  A small buffer (500 m) selects nothing:
>>  >  >>  >>  http://www.osgis.nl/download/umn/dwithin1.png
>>  >  >>  >>
>>  >  >>  >>  A bigger buffer (2500 m) only selects 3 polygons:
>>  >  >>  >>  http://www.osgis.nl/download/umn/dwithin2.png
>>  >  >>  >>
>>  >  >>  >>  Best regards,
>>  >  >>  >>  Bart
>>  >  >>  >>
>>  >  >>  >>  --
>>  >  >>  >>  Bart van den Eijnden
>>  >  >>  >>  OSGIS, Open Source GIS
>>  >  >>  >>  http://www.osgis.nl
>>  >  >>  >>
>>  >  >>  >>
>>  >  >>  >>  --------- Oorspronkelijk bericht --------
>>  >  >>  >>  Van: Bart van den Eijnden OSGIS <[hidden email]>
>>  >  >>  >>  Naar: [hidden email] <[hidden email]>
>>  >  >>  >>  Onderwerp: problem with WFS DWithin
>>  >  >>  >>  Datum: 27/03/08 14:59
>>  >  >>  >>
>>  >  >>  >>  >
>>  >  >>  >>  > Hi list,
>>  >  >>  >>  >
>>  >  >>  >>  > I can't get a DWithin filter containing a LineString to work. I am using a
>>  >  >>  >>  > polygon layer. It doesn't select anything. Using 5.0.2.
>>  >  >>  >>  >
>>  >  >>  >>  > A DWithin containing a Polygon works fine.
>>  >  >>  >>  >
>>  >  >>  >>  > Any ideas what could be causing this?
>>  >  >>  >>  >
>>  >  >>  >>  > Did anybody else experience the same thing?
>>  >  >>  >>  >
>>  >  >>  >>  > Best regards,
>>  >  >>  >>  > Bart
>>  >  >>  >>  >
>>  >  >>  >>  > --
>>  >  >>  >>  > Bart van den Eijnden
>>  >  >>  >>  > OSGIS, Open Source GIS
>>  >  >>  >>  > http://www.osgis.nl
>>  >  >>  >>  >
>>  >  >>  >>  >
>>  >  >>  >>  >
>>  >  >>  >>  >
>>  >  >>  >>
>>  >  >>  >>
>>  >  >>  >>
>>  >  >>  >>  _______________________________________________
>>  >  >>  >>  mapserver-dev mailing list
>>  >  >>  >>  [hidden email]
>>  >  >>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>  >  >>  >>
>>  >  >>  > _______________________________________________
>>  >  >>  > mapserver-dev mailing list
>>  >  >>  > [hidden email]
>>  >  >>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>  >  >>  >
>>  >  >>  >
>>  >  >>
>>  >  >>
>>  >  >>  --
>>  >  >>  ----------------------------------------------------------------
>>  >  >>  Assefa Yewondwossen
>>  >  >>  Software Analyst
>>  >  >>
>>  >  >>  Email: [hidden email]
>>  >  >>  http://www.dmsolutions.ca/
>>  >  >>
>>  >  >>  Phone: (613) 565-5056 (ext 14)
>>  >  >>  Fax:   (613) 565-0925
>>  >  >>  ----------------------------------------------------------------
>>  >  >>
>>  >  >>
>>  >  >
>>  >  >
>>  >
>>  >
>>  >  --
>>  >
>>  >
>>  > ----------------------------------------------------------------
>>  >  Assefa Yewondwossen
>>  >  Software Analyst
>>  >
>>  >  Email: [hidden email]
>>  >  http://www.dmsolutions.ca/
>>  >
>>  >  Phone: (613) 565-5056 (ext 14)
>>  >  Fax:   (613) 565-0925
>>  >  ----------------------------------------------------------------
>>  >
>>  >
>>
> _______________________________________________
> mapserver-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: [hidden email]
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------

_______________________________________________
mapserver-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapserver-dev