GIS CUP 2013. Geo - Fencing ● Virtual perimeter for a real world geographic area ● Widely used in location based services ● Location based advertisements.

Slides:



Advertisements
Similar presentations
Computer Graphics- SCC 342
Advertisements

Computational Geometry
SPHERICAL MIRRORS Free powerpoints at
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
9-2 Polygons  More About Polygons  Congruent Segments and Angles  Regular Polygons  Triangles and Quadrilaterals  Hierarchy Among Polygons.
 3.3: Angles of Polygons. What is a Polygon?  A polygon is a closed plane figure made up of three or more line segments that intersect only at their.
Convex Hull Problem Presented By Erion Lin. Outline Convex Hull Problem Voronoi Diagram Fermat Point.
Two- and Three-Dimensional Figures
Different types of Polygons Simple Convex Simple Concave Non-simple : self-intersecting With holes ConvexConcaveSelf-intersecting.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Vocabulary 2.2 – Curves and two dimensional figures (part 1) MA418 Spring 2010 McAllister.
1.4 Perimeter and Area in the Coordinate Plane
Graphics Pipeline Clipping CMSC 435/634. Graphics Pipeline Object-order approach to rendering Sequence of operations – Vertex processing – Transforms.
Proving Properties of Parallelograms
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
Computational Geometry Convex Hulls Robust Geometric Primitives Degeneracy and Stability Nick Pilkington.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
CGMB 314 Intro to Computer Graphics Fill Area Primitives.
Faculty of Civil Engineering Institute of Construction Informatics, Prof. Dr.-Ing. Scherer Institute of Construction Informatics, Prof. Dr.-Ing. Scherer.
Vertex – A point at which two or more edges meet Edge – A line segment at which two faces intersect Face – A flat surface Vertices, Edges, Faces.
Part 6: Graphics Output Primitives (4) 1.  Another useful construct,besides points, straight line segments, and curves for describing components of a.
GIS CUP 13 – Team Project. Introduction GIS-focused algorithm competition The 2013 contest is about geo-fencing location-based advertisements child location.
Prime numbers Jordi Cortadella Department of Computer Science.
A little bit of geometry Jordi Cortadella Department of Computer Science.
Created by: Cathy and Jim Carroll. Convex or Concave? A Polygon is a plane figure formed by three or more segments. A Polygon can either be convex or.
Perimeter, Circumference, and Area 1.7 Ms. Verdino.
CH. 8: GEOMETRY 8.1- PERIMETER AND CIRCUMFERENCE.
L4-Vector Algorithms L4 – Vector Algorithms NGEN06(TEK230) – Algorithms in Geographical Information Systems Abdulghani Hasan.
Nets Nets A net is a pattern that you cut out and fold to form a 3 - dimensional figure.
1 Computer Graphics Clipping Fall FCC Line Clipping What happens when one or both endpoints of a line segment are not inside the specified drawing.
1 11. Polygons Polygons 2D polygons ( 다각형 ) –Polygon sides are all straight lines lying in the same plane 3D polyhedra ( 다면체 )  chap. 12 –Polyhedra.
12.1 Exploring Solids.
Computer Graphics Filling. Filling Polygons So we can figure out how to draw lines and circles How do we go about drawing polygons? We use an incremental.
Chapter 1-6 (Classify Polygons)  What is a polygon?  A closed plane figure formed by 3 or more line segments, with no two sides being collinear.
Iterative Structures (Loops) CS 1401 Spring 2013 Shirley Moore, Instructor February 28, 2013.
CLASSIFYING POLYGONS UNIT 1 LESSON 6. Classifying Polygons In geometry, a figure that lies in a plane is called a plane figure. A polygon is a closed.
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
Special Angle Pairs. Definitions Adjacent Angles: Angles that have a common ray or side and a common vertex, but points inside either one of the angles.
The Coordinate Plane 101 ALGEBRA 11/16/15. The coordinate plane is a set of axis on which ordered pairs of input and output values can be plotted.
Section 12-1 Exploring Solids. Polyhedron Three dimensional closed figure formed by joining three or more polygons at their side. Plural: polyhedra.
Intro. To GIS Pre-Lab Spatial Analysis April 1 st, 2013.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
Computer Graphics CC416 Week 14 Filling Algorithms.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
Quadrilaterals Jacob, Allie, and Jesenia. Definition ★ Quadrilateral means “4 sides ★ “Quad” means 4 and “lateral” means sides.
Clipping.
Computer Graphics Filling.
Introduction to Polygons
Computer Graphics CC416 Week 13 Clipping.
Transformations contd.
Polygons.
Computer Graphics Filled Area Primitives II Lecture 09 Taqdees A
CSCE 441 Computer Graphics: Clipping Polygons Jinxiang Chai
Fill Area Algorithms Jan
Concepts, algorithms for clipping
Exterior Angles.
© University of Wisconsin, CS559 Fall 2004
Polygon Definition: A closed figure.
Agenda Polygon Terminology Types of polygons Inside Test
R F Z D W X C E Y M S V N G T I A L H Q P J O U
Convex Sets & Concave Sets
Agenda Polygon Terminology Types of polygons Inside Test
I. The Problem of Molding
2- and 3-Dimensional Figures
Clipping Polygons Dr. Scott Schaefer.
A little bit of geometry
IST256 : Applications Programming for Information Systems
Computational Geometry
Polygons.
Given a list of n  8 integers, what is the runtime bound on the optimal algorithm that sorts the first eight? O(1) O(log n) O(n) O(n log n) O(n2)
Presentation transcript:

GIS CUP 2013

Geo - Fencing ● Virtual perimeter for a real world geographic area ● Widely used in location based services ● Location based advertisements ● Child Location services

Problem Definition ● Input : Set of Regions ( May be overlapping) ● Set of Points ( ID and Sequence) ● Output : Pair each input point with one or more regions on the satisfaction of spatial condition between them ● Spatial conditions ● INSIDE ● WITH IN

INSIDE ● TRUE - if a point is inside the polygon ● The point can be associated with one or more polygons ● A point can be INSIDE any polygon with a sequence number (i.e., timestamp) less than the sequence number of the point where only the latest position of each polygon (up to that sequence number) is considered.

Point in Polygon Algorithm ● Compare each side of the polygon to the Y (vertical) coordinate of the test point, and compile a list of nodes, where each node is a point where one side crosses the Y threshold of the test point ● Arbitrarily decide that points on the Y threshold will belong to the “above” side of the threshold ● In Above figure, eight sides of the polygon cross the Y threshold, while the other six sides do not ● Odd number of nodes on each side of the test point - inside the polygon ● Even number - outside the polygon.

● Polygon Crosses itself ● The effect is much like “exclusive or”. The portions of the polygon which overlap cancel each other out. ● So, the test point is outside the polygon ● Even number of nodes (two and two) on either side of it.

● The six-sided polygon does not overlap itself, but it does have lines that cross. ● Not a problem; the algorithm still works fine.

● A vertex of the polygon falls directly on the Y threshold (fig 1) ● One of its sides lies entirely on the threshold ( fig 2) ● Not a problem; the algorithm still works fine.

PIP Variables ● Global Variables ● int polysides; ● float polyX[]; ● float polyY[]; ● float x,y;

PIP Algorithm bool pointInPolygon() { int i, j=polySides-1 ; bool oddNodes=NO ; for (i=0; i<polySides; i++) { if ((polyY[i] =y || polyY[j] =y) && (polyX[i]<=x || polyX[j]<=x)) { oddNodes^=(polyX[i]+(y-polyY[i])/(polyY[j]-polyY[i])*(polyX[j]-polyX[i])<x); } j=i; } return oddNodes; }

Within ● True – if the point is at less than 1000 units distance from the polygon ● Each point may be associated with one or more of the polygons, as the same point can be within 1000 units distance from several polygons.

With in Algorithm ● Finding the distance between every polygon edge and test point ● Check If there exists any polygon edge with 1000 units distance from test point ● Distance calculation

Algorithm ● Start ● Read Predicate value from user ● For every test Point { ● { For every Polygon, ● If( Point sequence> Polygon sequence) ● PIP algorithm or With in Algorithm ● } ● Return point id sequence with their associating polygon or YES/ NO if point with in 1000 units ● Stop ●

Cost analysis ● Time complexity ● Pre processing – O(N) ● Processing – May be O(Log N) ● Accuracy – works well with convex/ concave polygons. ● Not sure for points on the polygons ● Still working on that!

Thank you!!!