Spatial Information Systems (SIS) COMP 30110 Raster-based structures (2) Data conversion.

Slides:



Advertisements
Similar presentations
Computer Graphics - Rasterization -
Advertisements

Computer Graphics CLIPPING.
Nearest Neighbor Search
CMU SCS : Multimedia Databases and Data Mining Lecture#5: Multi-key and Spatial Access Methods - II C. Faloutsos.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
電腦視覺 Computer and Robot Vision I
Searching on Multi-Dimensional Data
Spatial Information Systems (SIS) COMP Formats and Standards.
Quadtrees Raster and vector.
CS447/ Realistic Rendering -- Solids Modeling -- Introduction to 2D and 3D Computer Graphics.
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
TERMS, CONCEPTS and DATA TYPES IN GIS Orhan Gündüz.
Spatial indexing PAMs (II).
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Cartographic and GIS Data Structures
CS 128/ES Lecture 5b1 Vector Based Data. CS 128/ES Lecture 5b2 Spatial data models 1.Raster 2.Vector 3.Object-oriented Spatial data formats:
CS485/685 Computer Vision Prof. George Bebis
Spatial Information Systems (SIS) COMP Raster-based structures (1)
Lecture 06: Map Data Structures Geography 128 Analytical and Computer Cartography Spring 2007 Department of Geography University of California, Santa Barbara.
Spatial Indexing I Point Access Methods.
PROCESS IN DATA SYSTEMS PLANNING DATA INPUT DATA STORAGE DATA ANALYSIS DATA OUTPUT ACTIVITIES USER NEEDS.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Clipping.
Quadtrees and Mesh Generation Student Lecture in course MATH/CSC 870 Philipp Richter Thursday, April 19 th, 2007.
Spatial Information Systems (SIS) COMP Spatial access methods: Indexing (part 2)
GI Systems and Science January 23, Points to Cover  What is spatial data modeling?  Entity definition  Topology  Spatial data models Raster.
Raster and Vector 2 Major GIS Data Models. Raster and Vector 2 Major GIS Data Models.
Vector vs. Bitmap SciVis V
V Obtained from a summer workshop in Guildford County July, 2014
Spatial data Visualization spatial data Ruslan Bobov
Image processing Lecture 4.
Spatial data models (types)
SPATIAL DATA STRUCTURES
1 Bitmap Graphics It is represented by a dot pattern in which each dot is called a pixel. Each pixel can be in any one of the colors available and the.
Computer Systems Nat 4.5 Computing Science Data Representation Lesson 4: Storing Graphics EXTENSION.
CGMB214: Introduction to Computer Graphics
Vector vs. Bitmap
Tessellation Data Structures
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
GUS: 0262 Fundamentals of GIS Lecture Presentation 6: Raster Data Model Jeremy Mennis Department of Geography and Urban Studies Temple University.
CS 6825: Binary Image Processing – binary blob metrics
Chapter 3 Digital Representation of Geographic Data.
8. Geographic Data Modeling. Outline Definitions Data models / modeling GIS data models – Topology.
Raster Data Model.
HOUGH TRANSFORM Presentation by Sumit Tandon
Cartographic and GIS Data Structures Dr. Ahmad BinTouq URL:
1 Data models Vector data model Raster data model.
Image Representation. Objectives  Bitmaps: resolution, colour depth and simple bitmap file calculations.  Vector graphics: drawing list – objects and.
3. Image Sampling & Quantisation 3.1 Basic Concepts To create a digital image, we need to convert continuous sensed data into digital form. This involves.
Raster data models Rasters can be different types of tesselations SquaresTrianglesHexagons Regular tesselations.
1 Spatial Data Models and Structure. 2 Part 1: Basic Geographic Concepts Real world -> Digital Environment –GIS data represent a simplified view of physical.
Spatial Indexing Techniques Introduction to Spatial Computing CSE 5ISC Some slides adapted from Spatial Databases: A Tour by Shashi Shekhar Prentice Hall.
COMPUTER GRAPHICS. Can refer to the number of pixels in a bitmapped image Can refer to the number of pixels in a bitmapped image The amount of space it.
What is GIS? “A powerful set of tools for collecting, storing, retrieving, transforming and displaying spatial data”
Raster Data Models: Data Compression Why? –Save disk space by reducing information content –Methods Run-length codes Raster chain codes Block codes Quadtrees.
Spatial Data Models Geography is concerned with many aspects of our environment. From a GIS perspective, we can identify two aspects which are of particular.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
Guilford County SciVis V104.03
Digital Image Processing CCS331 Relationships of Pixel 1.
Lecture 9 From Vertices to Fragments. Objectives Introduce basic implementation strategies Clipping Rasterization hidden-surface removal.
Bitmap Image Vectorization using Potrace Algorithm
The Quad tree The index is represented as a quaternary tree
Mean Shift Segmentation
Spatial Data Models Raster uses individual cells in a matrix, or grid, format to represent real world entities Vector uses coordinates to store the shape.
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Representing Images 2.6 – Data Representation.
Cartographic and GIS Data Structures
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
Computer Systems Nat 4.5 Computing Science Data Representation
Spatial Databases - Representation
Spatial Databases - Representation
Presentation transcript:

Spatial Information Systems (SIS) COMP Raster-based structures (2) Data conversion

Efficiency issues The simple raster-based structure of the example is inefficient in terms of data storage: regardless of the data distribution it uses the same amount of disk space This can also degrade data processing This can also degrade data processing Two issues: Two issues: – compression methods (efficiently store data) – scan order (how to scan the data in the array)

Scan-order methods Mainly concerned with performance in terms of data processing They define a total order on the cells of a 2D grid: assign numbers to They define a total order on the cells of a 2D grid: assign numbers to the cells the cells Also called Space-filling curves Also called Space-filling curves Some methods partially preserve proximity: Some methods partially preserve proximity: two cells that are close in space are likely to be close in the total order In our examples, we consider space-filling curves on an underlying In our examples, we consider space-filling curves on an underlying N X N array of cells (grid), where N = 2 d (i.e., a complete quadtree with depth d)

Space-filling curves They define a total order (i.e., a linear order) on the cells of a 2D grid: assign numbers to the cells They define a total order (i.e., a linear order) on the cells of a 2D grid: assign numbers to the cells In other words we embed a 2-dimensional space into a 1-dimensional space In other words we embed a 2-dimensional space into a 1-dimensional space Cell numbers should be easy to compute Cell numbers should be easy to compute

Row method Scans one row at a time

Row-prime method Scans one row at a time but reverses every second row

Morton scan method Morton curve (it orders the quadrants of a quadtree as SW, SE, NW, NE) This method preserves spatial proximity relatively well

Morton scan method (cont.d) Also called Z-buffering:Also called Z-buffering: when the reverse order NW,NE, SW, SE is considered this method repeats a Z-like shape with four neighboring cells as a unit and repeats the shape at all levels Other variants are used too Other variants are used too NWNE SWSE

Z-order and Z-values Coding of cells: Coding of cells: – Partition the space recursively into two halves (alternating X and Y dimension) – Left and bottom parts are assigned code 0 – Right and top parts are assigned code 1

Z-order and Z-values (cont.d) Example: Example: Z-value: (n,l) Z-value: (n,l) n = decimal value of the bit code l = level, i.e., number of bits (7) 10 (2) (16)

Peano-Hilbert curve Use of a U-like shape that repeats at all levels

Remarks Vector data: focus on spatial objects Raster data: focus on the underlying space Vector data: objects are explicitly stored Raster data: objects must be “extracted”

Remarks (cont.d) We have seen data structures for vector data and raster data In vector data structures, topology is explicit: a subset of the topological/connectivity relations is explicitly stored In raster data structures, topology is implicit: topological relations must be calculated (generally, use of MBRs)

Data conversion Intra-format conversion: – raster-to-raster – vector-to-vector Inter-format conversion: – raster-to-vector – vector-to-raster

Raster-to-raster Raster formats differ in the way they are stored: – different layers in different files with same resolution – pixels stored sequentially with all data values (corresponding to different layers) stored after each pixel – etc. Conversion between raster formats requires reorganisation of the raster cells and their corresponding data values (relatively simple operation)

Vector-to-vector Different vector formats are based on different data structures Converting from one format to another requires converting from one data structure to another (more tricky)

Raster-to-vector This type of conversion must start with assumptions about the raster and vector representation of data For example, in a binary image, if a point occurs inside a cell, the cell value is 1, otherwise is 0 (interior black, exterior white) Connectivity: two different ways to connect adjoining pixels – only orthogonally (4-connected) – orthogonally and diagonally (8-connected)

Raster-to-vector (cont.d) 4-connected neighborhood: only pixels located in one of the four positions with respect to a given pixel are considered connected to it: immediately above, below, left, right

Raster-to-vector (cont.d) 8-connected neighborhood: adjoining cells that are diagonally located are also considered connected to the pixel

Raster-to-vector (cont.d) Other assumptions must be made in relation to the orientation of the resulting vector and its thickness An orthogonal vector (vector parallel to either x or y axis) with unit width can be converted from its raster structure using the 4-connected approach simply by joining adjacent pixels by unit vectors Orthogonal polygons can similarly be constructed

Raster-to-vector (cont.d) To extract a non-orthogonal vector with unit width from the corresponding raster structure, the 4-connected approach results in distortion because such a vector can only be represented by horizontal and vertical line segments, which lie in the general direction of the vector as fragmented segments

Raster-to-vector (cont.d) Consequently a polygon with several non-orthogonal vectors results in a high degree of distortion 8-connected approach results in a less distorted image Extracting correctly polygons and lines from a raster images is still a semi-automatic process

Vector-to-raster Converting a vector to a raster representation involves overlaying the vector to a raster array and identifying the pixels that the vector intersects This approach often produces a stair-step distortion (aliasing) Antialiasing: gray scale pixels according to coverage measures of the pixel by the vector (e.g., length of the intersection)