Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 How robust is your spatial query ? A formal taxonomy to express spatial intersections Yao Cui and Michael Ross Integrated Land Management Bureau Victoria,

Similar presentations


Presentation on theme: "1 How robust is your spatial query ? A formal taxonomy to express spatial intersections Yao Cui and Michael Ross Integrated Land Management Bureau Victoria,"— Presentation transcript:

1 1 How robust is your spatial query ? A formal taxonomy to express spatial intersections Yao Cui and Michael Ross Integrated Land Management Bureau Victoria, BC Martin Davis Refractions Research Inc. Victoria, BC FOSS4G 2007, Victoria, BC, Canada

2 2 1. What is an intersection taxonomy? 2. Why do we need this taxonomy? 3. How was the taxonomy created? 4. How was the taxonomy validated

3 3 Why do we need a taxonomy?  Started when the first version of Java Topology Suite (JTS) was developed by Martin Davis right here in Victoria, BC, back in 2001…  One of the objectives: to test JTS binary predicates

4 4 A list of binary predicates  Equal  Disjoint  Intersects  Touches  Crosses  Within  Contain  Overlap

5 5 Java Topology Suite Test Builder

6 6 Adding another test case

7 7

8 8 Adding more cases …

9 9 Now the questions:  How many more test cases?  How do we know if we have enough test cases?  How do we know if important representative test cases are not missing?  How are we going to define the different categories of spatial intersects?  How to organize these test cases?

10 10 We need four things  Taxonomy to define and express intersection components  Taxonomy to express intersections  Taxonomy to help organizing the test cases  A grammar to define the taxonomy

11 11 How was the taxonomy created? To search and define a path to decompose a geometry

12 12 Geometry Object Model (as defined by OGC SFS)

13 13 Combinations of Geometric Subtypes between Geometry A and B Geometry B PmPLLRnsLmLAmA C Geometry A P P/PP/mPP/LP/LRP/nsLP/mLP/AP/mAP/C mP mP/mPmP/LmP/LRmP/nsLmP/mLmP/AmP/mAmP/C L L/LL/LRL/nsLL/mLL/AL/mAL/C LR LR/LRLR/nsLLR/mLLR/ALR/mALR/C nsL nsL/nsLnsL/mLnsL/AnsL/mAnsL/C mL mL/mLmL/AmL/mAmL/C A A/AA/mAA/C mA mA/mAmA/C CC/C

14 14 Dimensionally Extended Nine-Intersection Model (DE-9IM) InteriorBoundaryExterior Interior dim(I(a)∩I(b))dim(I(a)∩B(b))dim(I(a)∩E(b)) Boundary dim(B(a)∩I(b))dim(B(a)∩B(b))dim(B(a)∩E(b)) Exterior dim(E(a)∩I(b))dim(E(a)∩B(b))dim(E(a)∩E(b)) Source: Egenhofer and Clementini B

15 15 InteriorBoundaryExterior Interior102 Boundary01 Exterior102 ABBAEqualFF DisjointFF IntersectsTT TouchesFF CrossesTT WithinFF ContainsFF OverlapsFF A B A B

16 16 Geometry Geometry Decomposing Dimensions Instantiable Geometry Types BoundaryInteriorExterior Intersection Component

17 17 Intersection components in BNF ::= | ::= |

18 18 Examples of Interior Intersection Components in BNF ::= | ::= | ::= |

19 19 Examples of boundary intersection components in BNF ::= | ::= |

20 20 Examples of polygon boundary intersection component in BNF ::= | ::= ; touch_point: at the connecting point between polygon boundaries ::= | | touch_point> | | touch_point> ……

21 21 Terminal Definitions ::=Bdy ::=“b” ::=“}” ::=“)” ::=CP ::=“x” ::=EP ::=Ext ::=“h” ::=iBdy ::=Int ::=“=” ::=LR ::=“L” ::=mP ::=mL ::=mA ::=nsL ::=NV ::=“{”

22 22 Examples of Intersection Components Dimensions of Intersection Components 012 PointLinePolygonLinePolygonPointLinePolygon Interior Int Int.CP Int.V Int.NV Int.CPx Int.Vx …….. Int.EP-SP Int.EP-V Int.EP-NV Int.V-NV Int.CP-V …….. Int Boundary Bdy.EP Bdy.EPx Bdy.EPo Bdy.EPb Bdy.CP Bdy.V Bdy.NV Bdy.TP oBdy.CP oBdy.V oBdy.NV iBdy.CP iBdy.V …………. Bdy.EP-SP Bdy.EP-V Bdy.EP-NV Bdy.EP-TP Bdy.V-NV Bdy.TP-EP Bdy.TP-V oBdy.EP-SP oBdy.EP-V ……….. Exterior Ext Ext.h

23 23 Hierarchy of taxonomy intersection components Geometry Intersection Components Decomposing

24 24 Examples of Intersection Components GeometryExpressionDescription Interior intersection components in zero dimension A.P.Int The interior a Point A.L.Int.V The interior of a LineString at a vertex A.L.Int.NV The interior of a LineString at a non-vertex

25 25 Examples of Intersection Components in one dimension Interior intersection components in one dimension A.L.Int.SP-EP A Line: from the start point to the end point A.L.Int.EP-V A LineString: from the end point to a vertex A.L.Int.EP-NV A LineString: from the end point to a non-vertex A.LR.Int.EP-NV A closed LineString: from the closing point to a non- vertex A.L.Int.V-NV A LineString: from a vertex to a non-vertex A.L.Int.NV-NV A LineString: from a non-vertex to a non-vertex Interior intersection component in two dimension A.A.Int A Polygon: in the interior

26 26 Taxonomy examples on Intersections Geometry IntersectionExpression AB dim(0){A.P.Int ∩ B.P.Int} dim(0){A.P.Int ∩ B.L.Bdy.EP} dim(0){A.L.Int.NV ∩ B.L.Int.VN} dim(0){A.P.Int ∩ B.A.Ext.h} dim(1){A.L.Int.EP-SP ∩ B.L.Int.EP-NV} dim(1){A.L.Int.SP-EP ∩ B.A.Bdy.NV-NV} dim(2){A.A.Int ∩ B.A.Int}

27 27 In summary  Defined an intersection taxonomy and equivalent formal language with a validator  Generated a list of over 60,000 potential test cases by enumerating through intersection components  Compiled 400 representative test cases and organized them by following the taxonomy

28 28 IntersectionTalk Validator  Built a parser to validate the grammar of the predicate taxonomy  Written in GNU SmallEiffel usingGobo Eiffel Yacc and Gobo Eiffel Lex Yacc takes a BNF grammar as input and generates a parser Yacc takes a BNF grammar as input and generates a parser  Took only two hours to build Most of that time was spent typing in the grammar Most of that time was spent typing in the grammar

29 29 Yacc Input Grammar Format Very Similar to EBNF Intersection_Component: Interior_Component | Boundary_Component | Exterior_Component ; Interior_Component: Interior_Component_0D | Interior_Component_1D | Interior_Component_1D SEPARATOR REVERSE | INTERIOR ; Interior_Component_0D: INTERIOR SEPARATOR CLOSE_POINT | INTERIOR SEPARATOR Vertex_Choice | INTERIOR SEPARATOR CLOSE_POINT Multipass | INTERIOR SEPARATOR Vertex_Choice Multipass ; Interior_Component_1D: INTERIOR SEPARATOR START_POINT TO END_POINT | INTERIOR SEPARATOR END_POINT TO Vertex_Choice | INTERIOR SEPARATOR CLOSE_POINT TO Vertex_Choice | INTERIOR SEPARATOR Vertex_Choice TO Vertex_Choice | INTERIOR SEPARATOR END_POINT TO Vertex_Choice Multipass | INTERIOR SEPARATOR CLOSE_POINT TO Vertex_Choice Multipass | INTERIOR SEPARATOR Vertex_Choice TO Vertex_Choice Multipass | INTERIOR SEPARATOR END_POINT Multipass TO Vertex_Choice | INTERIOR SEPARATOR CLOSE_POINT Multipass TO Vertex_Choice | INTERIOR SEPARATOR Vertex_Choice Multipass TO Vertex_Choice | INTERIOR SEPARATOR END_POINT Multipass TO Vertex_Choice Multipass | INTERIOR SEPARATOR CLOSE_POINT Multipass TO Vertex_Choice Multipass | INTERIOR SEPARATOR Vertex_Choice Multipass TO Vertex_Choice Multipass ; ……

30 30 Future work and the challenge  More rigorous decomposing of intersection components?  Adding taxonomy for spatial operations and functions?  Automatically “grow” specific geometries: taxonomy grammar, rewriting rules (Koch and Mandelbrot), Chomsky grammars, L- systems (Lindenmayer), …?

31 31 Thank you! Fore more information, contact Yao Cui E-mail: yao.cui@gov.bc.cayao.cui@gov.bc.ca Telephone: (250) 387-9310 Link to JTS and JTS Validation Suite: http://www.vividsolutions.com/jts/jtshome.htm


Download ppt "1 How robust is your spatial query ? A formal taxonomy to express spatial intersections Yao Cui and Michael Ross Integrated Land Management Bureau Victoria,"

Similar presentations


Ads by Google