Raster versus vector
- a raster model tells what occurs everywhere ("sequential" access)
- a vector model tells where everything occurs ("random" access)
- raster = "layer based" model
- vector = "object based" model
Raster is Mozart, Beethoven is Vector
- vectors = bold, leaping strikes, going from place to place with rapid efficiency
Basic differences
1. Coordinate precision
2. Speed of analytical processing
3. Mass storage requirements
4. Characteristics of phenomena
1. Coordinate precision - rasters
- locational precision is limited by the size of cells
- all linear features are represented as cell-wide strips
- point features occupy one cell
- what about using smaller cells?
- what/where are the coordinates of a raster cell?
1. Coordinate precision - vectors
- can be encoded with any conceivable degree of precision
- precision is limited by the internal representation of coordinates
- typically 8 or 16 decimal digits are used ("single" or "double" precision)
- this limits precision to 1/1e8 or 1/1e16 of the size of the study area
respectively
- for equivalent raster precision, would need 1e8 by 1e8, or 1e16 by 1e16
cells
- however, real vector data accuracy may be much worse than one line width
Data precision
- vector precision is true for certain classes of data
- data captured from precision survey, GPS
- maps created from land surveyors' coordinates
- political boundaries defined by accurate survey
- few natural phenomena have true e.g.,s which can be accurately represented as
mathematical lines
- soils, vegetation types, slopes, wildlife habitats, all have fuzzy boundaries
due to the methods used to record the spatial information, due to the
transitional nature of variation in the phenomenon
Data precision
true comparison in terms of precision is between:
- the raster cell size, and
- the positional uncertainty of a vector object
2. Speed of computing - raster
- with raster data, overlay, proximity and Boolean queries are simple
operations
- no calculations are required to determine relative positions between layers
- raster systems are popular for small computing systems
2. Speed of computing - vector
- the same operations require considerable computation in vector systems
- vector topology is complex
- complex geometrical problems must be solved, e.g., to find line intersection
points
- complex geometrical algorithms are needed in polygon overlay to avoid
generating spurious polygons
- calculation of distances may be complex depending on the
projection/coordinate system used
3. Mass storage - rasters
- simplest raster data storage method requires one memory location per cell
- this is not efficient, but is used by several systems
- such systems severely limit the maximum numbers of rows and columns that can
be used
- file compression is possible through a variety of approaches
- most common are forms of run le.g.,h encoding
- degree of compression depends on spatial variability of data
3. Mass storage - vectors
- memory requirements depend on complexity of objects
- use very little storage for simple polygons
- volume also depends on which relationships between objects are stored in the
database
- some systems store few relationships, require small amount of storage,
compute other relationships
- other systems offer more elaborate database models, store more relationships,
require larger storage
- generally, vector systems use less storage than raster based systems of high
enough resolution to emulate the vectors
4. Characteristics of phenomena - raster sampling
- a raster is a regularly spaced sampling of phenomena
- this reflects a lack of knowle.g., of the inherent spatial variation
- the raster model is appropriate for remote sensing as the satellite is not
intelligent enough to vary its sampling in response to variation on the earth's
surface
4. Characteristics of phenomena - vector sampling
- vector representation permits more spatial variability in some areas than in
others
- there is rapid variation at the e.g., of area objects, none in the middle
- census tracts are small in urban areas and large in rural
some objects are vector by definition
- variation in ownership is instantaneous at e.g., of lot
- variation in county is instantaneous at boundary
Features, entities and objects
- raster "sees" the world as populated by cells of uniform size
- raster arranges ge.g.,aphy in fixed sequence
- gives "sequential access" to data
- vector "sees" the world as populated by entities, represented in the database
model as objects
- vector arranges ge.g.,aphy in any sequence
- gives "random access" to data
- operations on objects are easier in vector, e.g., analysis on a network
The Object/Layer debate
- object-structured databases and layer-structured databases both
contain points, lines and areas to describe.g.,ographic variation
- the difference is in how the contents of the database represent the real
world
- is one part of a much larger set of issues concerned with how to represent
the world in spatial databases in meaningful ways
The Layer View
- the real world is continuous
- an infinite number of places exist in the world
- locations are specified by some system of coordinates
- the conditions at any place can be described using a number of variables
- each variable can be conceptualized as a layer
- each layer captures the variation of one variable over the surface of the
earth
- the database can be interrogated to determine the value of any variable at
any place
- the result can be checked by visiting the specified place (ground truth)
Data structures for layers
are several data structures for representing the layer view of the world:
- grids
- polygons
- TINs
- each uses objects - points, lines, areas, or cells
- but the objects exist in the database, for the purpose of describing
variation, not in the real world
- e.g., contours are line objects, but exist to capture varying elevation
- common idea is that humans see the world as an empty space littered with
various types of objects
- objects are used in speaking, writing and thinking about the world
- is more convenient to describe places in relation to objects of known
location, rather than using coordinates
- objects are not artificial constructs used in describing variation (as in the
layer view) but fundamental to our understanding of the world
- any place can be occupied by any number of objects or can be empty
Objects and different scales
- the same object can be different things
e.g., "San Francisco" might be:
- a city with legal geographic limits
- the entire metropolitan area of San Francisco Bay
- the same object can be represented in different ways at different scales:
multiple representation
Objects and changes through time
- the object view has obvious advantages when well-defined objects move through
time, e.g., people, vehicles
- on the other hand, there are problems with poorly-defined objects, such as
clouds
- how to track the movement of clouds through time from one image to another
when they are changing form, splitting and merging
Object orientation
- is a set of concepts originating in Computer Science
- based on the assumption that it is artificial and confusing to separate the
definition of objects from the operations performed on them
- allows a more direct representation of the real world in the program code
- makes the transformation to program code more efficient
- has stimulated debate within GIS about the nature and role of geographical
objects
Object orientation (OO)
refers to several different aspects of computing:
- OO databases
- OO programming
- OO user interfaces
Fundamental concepts in Object Orientation
Identity
Inheritance
Encapsulation
1. Identity
- objects have an identity which persists through various kinds of processing
- e.g., "Indian Ocean" is an identifiable and persistent geographical concept,
even though it is not possible to delimit it precisely at any scale
- in GIS, object identity can persist through scale change and also change of
graphic representation
2. Inheritance
- when new objects are created they can inherit the properties of their
parents
- e.g., when a land parcel is created from survey records, it should inherit
properties of those records, including the name of the surveyor and the date of
the survey
3. Encapsulation
- OO couples objects with the operations which can be performed on them
- e.g.,, a "line" may be part of a county boundary, a river network, a highway
or a contour
- each object type has its own set of appropriate operations and
relationships
Object oriented programming languages
- LISP and Ada were early programming languages with OO concepts
- developed for artificial intelligence applications
- Simula and, later, Smalltalk evolved as the first OO languages
- currently the most popular OO language is C++
Object orientation in GIS
- in GIS, the term is often used incorrectly
- OO GIS - used to show that it is a vector-based database, not true OO
- is at least one GIS, SmallWorld, which uses a OO principles in its
fundamental coding and data storage
Counter-arguments for the Layer View
Do objects really exist?
- some objects clearly exist: houses, streets, Northern Hemisphere
- other objects are only constructs and poorly defined: meadow, Indian Ocean
- in the layer view, ge.g.,aphical objects generally do not exist
- what objects exist in temperature?
Layers for environmental modeling
- with the layer view these theories model fields
- is a continuous variable which exists everywhere
- e.g., temperature, wind speed and direction, atmospheric pressure
- much data for environmental modeling comes from remote sensing
- the object view of the world is incompatible with continuous ge.g.,aphical
change
- e.g., gradients, transition zones, zones of uncertainty, fuzziness, slopes,
ecotones, clines
Objects versus Layers in applications
Resource management - layer view
- conceptualization does not change radically from one scale to another
- variation is continuous, change is rarely abrupt
Utilities - object view
- empty space is littered with well-defined objects
- two objects may occupy the same location, but be separated vertically
- the notion of a variable which can be measured everywhere has little
relevance
Objects versus Layers in applications
Hydrology - mixed view
- streams are well-defined line objects
- however, some types of hydrologic modeling, such as overland and subsurface
flow, require a layer view