CPSC 335 - PowerPoint PPT Presentation

1 / 67
About This Presentation
Title:

CPSC 335

Description:

CPSC 335 – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 68
Provided by: Dima164
Category:
Tags: cpsc | a2m | aapc

less

Transcript and Presenter's Notes

Title: CPSC 335


1
CPSC 335
  • Representation and algorithms on spatial data.
  • Dr. M. Gavrilova

2
Presentation outline
  • Types of spatial data
  • Data representation
  • Spatial data processing
  • Algorithm design techniques
  • Applications in GIS, modelling, computer
    graphics, compression and visualization

3
Spatial data
  • GIS (Geographic Information Systems)
  • CAD (Computer Aided Design)
  • VLSI (Very Large Scale Integration, IBM)
  • Robotics
  • Image Processing

4
Spatial objects
  • Stored
  • Displayed
  • Manipulated
  • Queried

5
Digital maps
  • Geographical object
  • spatial, or geometric attribute (shape, location,
    orientation, size) in 2D or 3D
  • non-spatial attribute (descriptive) statistic,
    population, force, velocity, etc.

6
Population Map
7
Pollutants map
8
Terrain map
9
Data collection
  • from GPS (Global Positioning Systems) BMP, GIF,
    GPEG, etc
  • from existing maps, geometric (vector)
    representation
  • from experiments (physical, biological,
    mechanical) - attributes
  • generated for experiments data files, text,
    images)

10
Spatial databases
  • Spatial simulation systems (models of natural
    phenomena)
  • Specific object representation, query languages,
    data formats.

11
DBMS
  • Any software system or DBMS

User-visible layer (interface)
Logical layer (internal language, net language)
Physical layer (files, ASCII, )
12
Data representation
  • Euclidean Space
  • Other metrics
  • Geometric entities
  • Data types

13
Geometric space
  • Bounded Embedded space within some region
  • Unbounded

14
Euclidean d-dimensional space
  • in d dimensions.
  • Euclidean metric L2

15
Other metrics
  • Minkovski metric
  • Manhattan metric
  • Supremum metric

L1
L1
L?
16
Metric spaces in 2d
L1
L2
L?
17
Geometric objects
  • point
  • segment
  • line
  • circle
  • sphere
  • polygon
  • Convex, concave
  • Simple, Non-simple
  • With holes, without holes
  • polyhedron

18
Polyline
  • Polyline
  • closed if 2 extreme points are identical
  • simple if no pair of edges intersect
  • monotone order of projections corresponds to
    the order of vertices

19
Polygon
  • Polygon is a region bounded by a closed polyline.
  • Polygon is simple of its boundary is simple
  • Polygon P is convex if for any 2 points A and B
    inside the polygon, the segment AB is fully
    enclosed in P. A non-convex polygon is concave.
  • Polygon is monotone if it is simple and its
    bounds can be split into 2 monotone polylines.

20
Planar subdivisions
  • A straight-line planar embedding of a planar
    graph determines a partitioning of the plane
    called a planar subdivision.
  • A planar subdivision is a triangulation if all
    its bounded regions are triangles.
  • A triangulation of a finite set of points S is a
    planar graph with maximum number of edges and
    with nodes located at the points of S.

21
Geometric data structures
  • Regular grid (mesh)
  • Grid file
  • Quad tree
  • k-d tree
  • Interval tree
  • Voronoi diagram and Delaunay triangulation

22
Commonly used data structures
  • Space partitioning
  • Planar subdivisions (regular and irregular)
  • Tree-based data structure (segment trees, k-d
    trees, hierarchical octrees)
  • Voronoi diagrams
  • Triangulations

23
Algorithmic Strategies
  • Transformation
  • Incremental
  • Divide-and-conquer
  • Sweep-line/plane
  • Dimension reduction
  • Geometric decomposition

24
Common Algorithm Techniques
  • Transformation
  • Problem A you know a lower bound
  • Problem B it is unknown.
  • If we transform A to B by a transformation step
    that costs less than solving A, then B has the
    same lower bound as A

25
Convex Hull problem
  • Convex Hull ? Sorting
  • Sorting is O(n log n)
  • Let x1,x2,,xn be a set of numbers (any order)
  • Compute in linear time set of points O(xi,xi2)
  • Build the convex hull of these points
  • By scanning points from left to right obtain
    sorted array.
  • Convex hull is O(n log n)

26
Incremental Convex Hull
  • Let Sp1,p2,,pn denote the set of points of
    CH.
  • First, construct a triangle p1,p2, p3
  • Add point pi to CHi-1 (existing)
  • Two cases are possible
  • pi ? CHi-1 detected in linear time by scanning
    the points of CHi-1 in clockwise order, pi is
    always on the right side
  • pi ? CHi-1 add pi to CH in linear time, by
    scanning points of CHi-1, finding 2 tangential
    lines from pi to CH.
  • Analysis O(n2)

27
Convex Hull optimization
  • Algorithm can be improved to O(n lg n) by
    presorting the input according to abscissas of
    points.
  • Every time a point pi is added
  • No need to check CHi-1, it is always outside
  • To find the upper tangent, scan the upper chain,
    removing points that we scanned
  • Lower tangent same
  • Linear time to construct CH sorting O(nlg n)

28
Convex Hull optimization
Algorithm can be improved using the property that
the list of points is sorted. If line through Pi
intersects CH, the vertex is discarded. Each
vertex is discarded only once.
Pi
  • Pi-1

29
Divide-and-conquer
  • The half-plane intersection example result
    convex polygon
  • Recursive
  • Top-down subdivision to a smaller problem
  • Bottom-up recursively merging the solution
  • Similar to merge-sort, quick-sort

30
Divide-and-conquer
  • Create binary tree of half-planes
  • Intersect each half-plane, starting from the
    leaves, with rectangle R, which contains the
    resulting polygon (by assumption) ? obtain convex
    polygons
  • Compute intersection of convex polygons, bottom
    up on the tree

31
Divide-and-conquer
32
Divide-and-conquer complexity
  • Convex polygon intersection is O(n)
  • T(n) 2 T(n/2) cn
  • i is of steps ? T(n) 2i T(n/2i)cniT(n)
    2lg n T(n/2lg n) c n lg n
  • Assume T(n/2lg n) is O(1), when the size of the
    problem is small
  • T(n) O(n lg n)

33
Sweep-line (plane-sweep)
  • Decompose the input into vertical strips
  • Vertical line (sweep-line) allows to
    compute/maintain some information
  • Sweep-line goes through a number of events
  • Event list is usually represented by the queue
  • The state of the sweep-line is also maintained.

34
Sweep-line example
  • Given a set S of rectangles with sides parallel
    to the axes, report all their pair-wise
    intersections
  • O(n2) for each rectangle, test intersections
    with others
  • This is worst-case optimal, because there can be
    that many intersections. However, lets try to
    design an output-sensitive algorithm.

35
Sweep-line example
  • Observations
  • Sweep-line undergoes changes in its status when
    it reaches left/right side of a rectangle (along
    X coordinate)
  • If X projections intersect does not mean that
    rectangles intersect. When left endpoint reached
    add rectangle.
  • When the sweep-line intersects the rectangles, Y
    projections of rectangles should be checked for
    intersection. If they too intersect, then
    rectangles intersect.
  • When right endpoint is added remove rectangle.
  • All events can be scheduled in advance!

36
Sweep line complexity
  • Initial sorting of interval endpoints O(n lg n)
  • of events in the queue is 2n
  • Time to process one event check for Y
    intersections is O(1)
  • If the total of intersections is k, then the
    total complexity is O(n lg n k)

37
Sweep-plane algorithm
  • Algorithm description
  • Throw pebbles in the water
  • Intersection of waves gives the lines equidistant
    from the point where pebble touched the water
    (i.e. a edge of the Voronoi diagram)
  • Add time as 3rd dimension waves transform to
    pyramids.
  • Sweep pyramids with the sweep-plane to get the
    Voronoi diagram

38
Sweep-plane algorithm
  • Properties
  • The complexity of the sweep-plane algorithm in
    generalized Manhattan metric is O(n log n).
  • Sweep-plane method is not applicable to the power
    diagram construction.

39
Sweep-plane algorithm
  • An example of a sweep-plane construction of a
    Voronoi diagram in L1 metric

40
Sweep-plane algorithm
Cones in L1
41
Sweep-plane algorithm
Sweeping the cones
42
Sweep-plane algorithm
sweep direction
Parabolas
43
Sweep-plane algorithm
Site event
44
Sweep-plane algorithm
Site event
45
Sweep-plane algorithm
two half-bisectors are created one is growing
46
Sweep-plane algorithm
The half-bisector changes its direction
47
Sweep-plane algorithm
Site event 2 half-bisectors created
48
Sweep-plane algorithm
The half-bisector Changes its direction
49
Sweep-plane algorithm
Circle event Triangle added to DT 2
half-bisectors deleted 1 half-bisector created
50
Sweep-plane algorithm
Half-bisector changes its direction
51
Sweep-plane algorithm
No more events
52
Sweep-plane algorithm
Resulting Voronoi diagram and Delaunay
triangulation
53
Dimension reduction
  • Typical problem build a VD for a set of points
    in the plane.
  • Consider 3D, build a paraboloid, lift/project
    points (sites) onto the paraboloid
  • Construct half-spaces tangent to paraboloid at
    those points.
  • Construct intersection of these half-spaces
  • Projection of these intersections down on the
    plane gives the VD of initial sites.

54
Applications
  • GIS terrain modeling
  • Climate control weather patterns
  • Environment study of migration, species
  • City planning - maps
  • Computer graphics filtering, multilevel
    resolution
  • Computer vision - CAVE

55
Digital Elevation Model (DEM)
Ariel photo (left), triangulated surface in 3D
(right)
56
DEM
Terrain reconstructed using Delaunay Triangulation
57
ArcView and Geology
58
Digital Atmosphere 2000
59
DA2000 Digital Satellite Photos
60
AutoDesk Map 2002
61
City planning
  • This focuses on visualizing man-made structures
    such as roads.
  • Used in a variety of areas such as urban
    development, residential planning, and GPS
    Navigation.
  • Courtesy of http//ca.maps.yahoo.com/

62
Multiresolution images
  • Traditionally stacks of images
  • 2n by 2n, 2n-1 by 2n-1, , 2 by 2, 1 by 1
  • Does not have to be image data

63
Simple Pyramid Example
  • Lena, the typical example

64
Divide and Conquer
  • Creating a pyramid is a variation of the
    principle of divide and conquer
  • Any point at a certain level is calculated from a
    small number of point on the previous level.

65
Image Compression
  • Usage Smaller images, especially useful for
    satellite or airphotos in GIS.
  • Example .ecw (enchanced compressed wavelet)

66
GIS LOD (Level of Detail)
  • Usage A detail-in-context technique for GIS.
  • Example The TerraVisionTM System

67
Working Towards the Future
  • Terrain model a CAVE Perspective _at_ the
    University of Illinois Urbana, Champagne
Write a Comment
User Comments (0)
About PowerShow.com