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

Slides:



Advertisements
Similar presentations
Chapter 4 Part C: Queries, Computations & Map Algebra.
Advertisements

Topological Reasoning between Complex Regions in Databases with Frequent Updates Arif Khan & Markus Schneider Department of Computer and Information Science.
Department of Geoinformation Science Technische Universität Berlin Geo-Databases: lecture 8 Management of Spatial Data Prof. Dr. Thomas H. Kolbe Institute.
Natural Language Processing - Formal Language - (formal) Language (formal) Grammar.
Object Relational Model Spatial Queries. Query Model Spatial Layer Data Table where coordinates are stored Primary Filter Spatial Index Index retrieves.
Conflation with JCS Automated and Human-Assisted Conflation Using the JCS Conflation Suite Presented at GeoTec 2003 Vancouver, BC Martin Davis, Technical.
THE WORLD OF POLYGONS LESSON 4.
Spatial Data Mining. 2 Introduction Spatial data mining is the process of discovering interesting, useful, non-trivial patterns from large spatial datasets.
176 Formal Languages and Applications: We know that Pascal programming language is defined in terms of a CFG. All the other programming languages are context-free.
Motion Planning. Basic Topology Definitions  Open set / closed set  Boundary point / interior point / closure  Continuous function  Parametric curve.
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
Geographic Information Systems
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
Chapter 3: Formal Translation Models
COP4020 Programming Languages
(2.1) Grammars  Definitions  Grammars  Backus-Naur Form  Derivation – terminology – trees  Grammars and ambiguity  Simple example  Grammar hierarchies.
University of California , San Diego (UCSD)
JTS Topology Suite JTS Topology Suite An API for Processing Linear Geometry Martin Davis, Senior Technical Architect
Lee CSCE 314 TAMU 1 CSCE 314 Programming Languages Syntactic Analysis Dr. Hyunyoung Lee.
Spatial Database Souhad Daraghma.
GeoUML a conceptual data model for geographical data conformant to ISO TC 211 Main GeoUML constructs Alberto BelussiNovembre 2004.
 Trace the incremental algorithm for constructing convex data on the sample point data given below. Intermediate steps should be shown First, two steps.
6. Simple Features Specification Background information UML overview Simple features geometry.
How to Spatially Enable Your IBM Informix Database Chris Bosch.
6-1 Properties and Attributes of Polygons Warm Up Lesson Presentation
Syntax Specification and BNF © Allan C. Milne Abertay University v
Syntax: 10/18/2015IT 3271 Semantics: Describe the structures of programs Describe the meaning of programs Programming Languages (formal languages) -- How.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 2 Syntax A language that is simple to parse.
University of L’Aquila, Department of Electrical and Information Engineering
Lexical and Syntax Analysis
Copyright © by Curt Hill Grammar Types The Chomsky Hierarchy BNF and Derivation Trees.
1 Syntax In Text: Chapter 3. 2 Chapter 3: Syntax and Semantics Outline Syntax: Recognizer vs. generator BNF EBNF.
11-1 Angle Measures in Polygons Warm Up Lesson Presentation
Polygons What are properties (rules) of the different types of Quadrilaterals?
Copyright © 2009 Pearson Education, Inc. Chapter 9 Section 1 – Slide 1 AND.
Prof. Fateman CS 164 Lecture 111 Syntax  Simple Semantics Lecture 11.
1 Spatio-Temporal Predicates Martin Erwig and Markus Schneider IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING Presented by Mamadou Hassimiou Diallo.
CPS 506 Comparative Programming Languages Syntax Specification.
Introduction to Yacc Ying-Hung Jiang
Lex & Yacc By Hathal Alwageed & Ahmad Almadhor. References *Tom Niemann. “A Compact Guide to Lex & Yacc ”. Portland, Oregon. 18 April 2010 *Levine, John.
Start Geometry I Lines, Rays and Angles. What is a Line? An angle that measures more than 90 o A part of a line that has only one endpoint and extends.
Syntax and Semantics Form and Meaning of Programming Languages Copyright © by Curt Hill.
1 k Jarek Rossignac,  2008 Practice  Quiz next time –Geometry –Topology  One quiz will not count towards your grade –The one.
U.S. Census Data & TIGER/Line Files
Holt McDougal Geometry 6-1 Properties and Attributes of Polygons 6-1 Properties and Attributes of Polygons Holt Geometry Warm Up Warm Up Lesson Presentation.
Programming Languages and Design Lecture 2 Syntax Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
Chapter 4: Syntax analysis Syntax analysis is done by the parser. –Detects whether the program is written following the grammar rules and reports syntax.
Copyright © 2009 Pearson Education, Inc. Chapter 9 Section 1 – Slide 1 AND.
Computer Programming – Grammar – data types – Variables – Keywords – Operators – decision making – Loops – Arrays – Functions – files Programming Environment.
Chapter 3 – Describing Syntax CSCE 343. Syntax vs. Semantics Syntax: The form or structure of the expressions, statements, and program units. Semantics:
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 9.1 Points, Lines, Planes, and Angles
Chapter 4 - Parsing CSCE 343.
Compiler Baojian Hua LR Parsing Compiler Baojian Hua
Automata and Languages What do these have in common?
Natural Language Processing - Formal Language -
Formal Language Theory
Parser and Scanner Generation: An Introduction
Geographic Information Systems
Formal Language.
Introdução to Geoinformatics: vector geometries
Regular Grammar.
Geometry – Pre-requisite Skills Mr. Rosilez
JTS Topology Suite An API for Processing Linear Geometry
CS 3304 Comparative Languages
Introduction to Geoinformatics: Topology
Section 9.1 Points, Lines, Planes, and Angles
Identify Points Lines and Planes
Math 132 Day 2 (2/1/18) CCBC Dundalk.
Faculty of Computer Science and Information System
Presentation transcript:

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 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 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 A list of binary predicates  Equal  Disjoint  Intersects  Touches  Crosses  Within  Contain  Overlap

5 Java Topology Suite Test Builder

6 Adding another test case

7

8 Adding more cases …

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 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 How was the taxonomy created? To search and define a path to decompose a geometry

12 Geometry Object Model (as defined by OGC SFS)

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 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 InteriorBoundaryExterior Interior102 Boundary01 Exterior102 ABBAEqualFF DisjointFF IntersectsTT TouchesFF CrossesTT WithinFF ContainsFF OverlapsFF A B A B

16 Geometry Geometry Decomposing Dimensions Instantiable Geometry Types BoundaryInteriorExterior Intersection Component

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

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

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

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

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

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 Hierarchy of taxonomy intersection components Geometry Intersection Components Decomposing

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 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 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 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 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 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 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 Thank you! Fore more information, contact Yao Cui Telephone: (250) Link to JTS and JTS Validation Suite: