[mapserver-dev] Re: problem with WFS DWithin

Paul Ramsey pramsey at cleverelephant.ca
Thu Mar 27 16:14:44 EDT 2008


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 <pramsey at cleverelephant.ca> 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
>
>
> <yassefa at dmsolutions.ca> 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
>  >  > <yassefa at dmsolutions.ca> 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)
>  >  >>  > <bartvde at osgis.nl> 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 <bartvde at osgis.nl>
>  >  >>  >>  Naar: mapserver-dev at lists.osgeo.org <mapserver-dev at lists.osgeo.org>
>  >  >>  >>  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
>  >  >>  >>  mapserver-dev at lists.osgeo.org
>  >  >>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >  >>  >>
>  >  >>  > _______________________________________________
>  >  >>  > mapserver-dev mailing list
>  >  >>  > mapserver-dev at lists.osgeo.org
>  >  >>  > http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>  >  >>  >
>  >  >>  >
>  >  >>
>  >  >>
>  >  >>  --
>  >  >>  ----------------------------------------------------------------
>  >  >>  Assefa Yewondwossen
>  >  >>  Software Analyst
>  >  >>
>  >  >>  Email: assefa at dmsolutions.ca
>  >  >>  http://www.dmsolutions.ca/
>  >  >>
>  >  >>  Phone: (613) 565-5056 (ext 14)
>  >  >>  Fax:   (613) 565-0925
>  >  >>  ----------------------------------------------------------------
>  >  >>
>  >  >>
>  >  >
>  >  >
>  >
>  >
>  >  --
>  >
>  >
>  > ----------------------------------------------------------------
>  >  Assefa Yewondwossen
>  >  Software Analyst
>  >
>  >  Email: assefa at dmsolutions.ca
>  >  http://www.dmsolutions.ca/
>  >
>  >  Phone: (613) 565-5056 (ext 14)
>  >  Fax:   (613) 565-0925
>  >  ----------------------------------------------------------------
>  >
>  >
>


More information about the mapserver-dev mailing list