Lecture 3: Spatial Data Modelling

J Mwaura

Introduction

Spatial object/Geoobject: element to model real world data in geographic information system

Are described by spatial data (geodata)

Spatial information: custom-designed spatial data

The difference is?

  1. Geometry
  2. Topology

Spatial Objects - Discrete

  • Well defined, enclosed by a visible boundary
  • Object surface, dissemination area, reference surface
  • Examples: districts, river, building, wood, industrial real estate, lake, parcel border point, marsh, sports field, swamp, pont, tower, forest, way, residential building area
diagram

https://www.intelligence-airbusds.com/imagery/constellation/pleiades-neo/

Spatial Objects - Continuous

Exists everywhere, without boundaries

Complete

Collectable only on distinct points

Examples: ground level, temperature, precipitation, air pressure, accessibility

sample points

www.wetteronline.de

contours

https://stackoverflow.com

Models of Space

Object-based

  • Space is populated by discrete, identifiable entities each with a geospatial reference (point, line, surface)
  • Particularly suitable for discrete objects

Field-based

  • Geographic information is regarded as collections of field spatial distributions
  • Each distribution may be formalized as a mathematical function from a spatial framework to an attribute domain
  • Particularly suitable for continua

Models of Space

map

Object-based

diagram

Field-based

Properties of Fields

Continuous

Differentiable

Isotropic - Independent of direction

Anisotropic - Properties vary with direction

Fields - Representation

Spatial framework: a partition of a region of space

  • Forming a finite tesselation of spatial objects
  • In the plane the elements of a spatial framework will be polygons
  • Regular and irregular tesselations

visualization tool: [Lu13]

Fields - Representation

Layer

  • Combination of the spatial framework and the field that assigns values for each location in the framework

http://worboys.duckham.org/

https://www.fao.org/3/y4816e/y4816e0g.htm

Fields - Representation

In the special case where - the spatial framework is a Euclidian plane and

The attribute domain is a subset of the set of real numbers then

A field may be represented as a surface in a natural way

Author: H.Bucher

Objects - Representation

Object-based models decompose an information space into objects or entities

  • An entity must be; Identifiable, Relevant, Describable
  • Entities are spatially referenced
diagram

http://worboys.duckham.org/

Objects - Representation

Geometry

  • Describes the (absolute) spatial location of an object in a 2- or 3-dimensional (metric) space
  • Information about the position and extent based on a spatial reference system
  • Implemented by geometrical data types, based on
    • Vector data model
    • Raster data model

http://upload.wikimedia.org/

Objects - Representation

Topology

  • This is spatial relations between spatial objects
  • Geometry of the relative position
  • Is independent of extent and shape

http://www.openstreetmap.de/

Objects - Representation

Topological transformations - Invertible, bijective, and continous (homeomorphism, elastic deformation)

• Translation • Rotation • Stretching • Reflection • Distortion

Objects - Representation

Topological properties (invariants):

  • neighbourhood
  • connectedness
  • containedness

The result of applying a topological transformation to a point-set is a topologically equivalent point-set

Authors: K.Splekermann, M.Wegener

Point-set Topology (Analytic Topology)

Focus on sets of points, the concepts of neighbourhood, nearness, and open set

All topological properties are definable in terms of the single concept of neighbourhood

Topological Space

A topological space is a collection of subsets of a given set of points S, called neighbourhoods, that satisfy the following conditions

  • Every point in S is in some neighbourhood (N1)
  • The intersection of any two neighbourhoods of any point p in S contains a neighbourhood of p (N2)

Intersections

Formal description of binary topological relations: 9-intersection model

Intersections between interior, boundary and exterior of objects

512 possible, 8 reasonable matrices (for polygons)

Themes

Levels or scales of measurement

Level of measurement refers to the relationship among the values that are assigned to the attributes for a variable

Theme Representation

Layer concept

  • Different characteristics of spatial objects are separated in different layers
  • Separation based on objects or single attributes
  • No hierarchy
  • Layers can be analysed and presented separately
  • Aggregation and overlay of layers possible
  • Deduced from the principle data of separating map layers for printing (classical cartography)

Theme Representation

Class concept

  • A class comprises objects belonging to the same theme
  • Hierarchical classification with subset relation between classes

Geometry - Raster data model

  • Covering of a surface with an arrangement of non-overlapping polygons most often squares (pixel)
  • Discrete space, pixel is indivisible
  • Areal model
  • Defined by
    • Origin of the raster
    • Orientation of the raster
    • Cell width
    • Raster width and height

Geometry - neighbourhood

The entries of the matrix (numerical values representing the object identifier or attribute values) are interpreted as grey scale values

Euclidian distance is not defined

  • City block metric (4 neighbours)
  • Chessboard distance (8 neighbours)

Geometry - Raster data model

Points can only be represented by approximation

  • Lines - Connected sequence of pixels
  • Areal objects - Connected area of pixels

Basic morphological operations: • Dilatation • Erosion

diagram

Geometry - Raster data model

Particularly suited to describe continuous and areal themes

Refined raster: representation of objects is more accurate but also higher memory requirements and computing time

Guideline: raster width half as wide as the smallest element/distance which should be represented

Geometry - Raster data model

Lossless compression techniques

  • Chain code/Crack code - Stores the direction in which pixels with the same value are
  • diagram
  • Run length encoding - Stores the number of adjacent pixels with the same value in a row
  • diagram

Geometry - Raster data model

Lossless compression techniques

  • Block code - Decomposition into squares which are as big as possible. Only the position and size of the squares has to be stored
  • diagram
  • Block code - Three examples (Greedy approach)
  • diagram

Geometry - Vector data model

Requisite: two or three dimensional cartesian coordinate system with euclidian metric

Line based model (edge representation)

Basic element: point

  • Given by a vector of coordinates
  • 0-dimensional

Line segment • Defined by two points

diagram

Geometry - Vector data model

Line: adjacent line segments

  • Defined by a sequence of points
  • Linear interpolation
  • 1-dimensional

Surface or polygon: closed line

  • Defined by an outer boundary (ring) and any number of inner boundaries
  • Boundaries do not intersect
  • 2-dimensional
diagram diagram

Geometry - Vector data model

Multiple elements as one geometry

    diagram

Geometry classes

    diagram

Geometry - Vector data model

Particularly suited to represent discrete objects

Relatively little memory requirements

Potentially infinite amount of precision

Discretization

  • Move intersection point to the nearest grid point
  • Split lines so as to join at the moved intersection point
  • Problem: Shift of the lines is not constricted
diagram

Rasterization

Loss of information

Point • Pixel whose center is closest to the original point

Line • Pixels intersecting the original line • Bresenham algorithm (1962)

Polygon

  • Determine for every pixel if it is inside the polygon
  • Polygon based fill algorithm
diagram

Rasterization

Point-in-polygon

Semi-line algorithm

  • Draw a ray out from the point
  • Count the number of times that the ray intersects with the boundary of the polygon

Winding number algorithm

  • Consider the triangles which are defined by a line segment of the boundary and the point
diagram

Rasterization

  • Sum the angles
  • Angular sum = 0 - point outside
  • Angular sum = 360 - point inside
diagram
diagram

Rasterization

Polygon based fill algorithm

For each grid row

  • Calculate the intersection points between the row and the edges of the polygon
  • Sort the intersection points with respect to the x-axis
  • All pixel between an intersection point with odd position and his successor belong to the polygon
diagram

Vectorization

Ambiguous, manually control necessary

Input: binary image

Outline extraction for polygons

  • Determine all edge pixels
  • Line following over the edge pixels and transformation of their center into a cartesian coordinate system
diagram

Vectorization

Topological thinning

  • Consider all 256 relations between a pixel and his 8 neighbours
diagram

Vectorization

  • Dropping all symmetric configurations leads to 51 basic patterns
diagram

Vectorization

Classification of basic patterns results in 6 classes

  • Isolated point: no black neighbour
  • Inner point: all neighbours sharing an edge with the pixel are black
  • Insignificant: all black neighbours are adjacent
diagram

diagram

Vectorization

  • Start point: exactly one black neighbour
  • Line point: two black neighbours that are not adjacent
  • Node: more than two black neighbours which are not all adjacent
diagram diagram
diagram

Vectorization

Centerline extraction for lines

  • Determine the distance between the pixels which belong to the line and the closest pixel which does not
  • Topological thinning:
    • Classify all pixels ordered by this distance (pixel close to the border first), delete insignificant pixel immediately
    • Classify remaining pixels again
    • Extraction of nodes: calculate the center of gravity for connected nodes
    • Line following (chessboard metric)

Vectorization

Deficiencies

  • Bumpy lines
  • Corner arcs
  • Displacement of nodes
  • Isles
  • Stubble
diagram
diagram

Topology

Raster topology

  • Implicit contained, easy to calculate
  • Problems occurring when using chessboard metric
    • Lines can intersect without having an intersection point
    • Polygons can overlap, although their boundaries do not intersect
diagram

Topology

Metric space implies topological space, i.e. it is possible to determine the topological relations between objects if their geometries are known

Access and computations are normally more efficient if the topology is given explicitly

Basic elements of topological data models:

  • Vertex (V)
  • Edge (E)
  • Face (F)
diagram

Topology

Relations

  • Same kind of elements: Adjacency
  • diagram
  • Different kind of elements: Incidence
  • diagram

Topology

Spaghetti data structure

  • Set of lists of points
  • Redundant duplication of data
  • Inefficient in space utilization
  • Difficult to guarantee consistency
  • Improvement: list of nodes
diagram

http://www.ikg.uni-hannover.de/lehre/katalog/gis/gisII_uebung

Topology

Spaghetti data structure

diagram
diagram

http://www.ikg.uni-hannover.de/lehre/katalog/gis/gisII_uebung

Topology

Edge list

  • Topological relations between points and lines are stored explicitly
diagram

http://www.ikg.uni-hannover.de/lehre/katalog/gis/gisII_uebung

Topology

Winged edge (doubly connected edge list)

  • For every edge the successor and predecessor w.r.t the right and left face are added
  • Topological relations between lines are stored explicitly
  • The sequence of arcs that bound an area is easily determined
diagram
diagram

Topology

Network represented as weighted graph

  • Set of edges: {(ab,20), (ag,15), (bc,8), (bd,9), (cd,6), (ce,15), (ch,10), (de,7), (ef,22), (eg,18)}
  • Adjacency matrix
diagram
diagram

Topology

Adjacency list

diagram
diagram

Fields

Field-based models

  • Raw data: measurements, often irregularly distributed

Primary models

  • Original data
  • Usually vector data

Derivative models

  • Interpolated values
  • Regular grid
  • Usually raster data
diagram

www.daserste.de/wetter/wetterstationen.asp

Fields

Display formats

  • Scatterplot
  • Wireframe
  • Isoline
  • 2.5d representation: functional surface in space
diagram

diagram

Fields

Isoline

  • Lines connecting points with the same numerical values or the same properties
  • Are neither borders nor edges
  • Are closed
  • Do not intersect or touch each other
  • Areas are often filled
  • Examples: isobar, contour line, isochron
diagram

http://www.bbc.co.uk

Fields

Interpolation

diagram

Fields

Nearest neighbour

  • Every point gets the value of the nearest measurement
  • Properties; • Exact • Local • Deterministic • Abrupt • Suitable for nominal attributes
diagram

http://skagit.meas.ncsu.edu/~helena/gmslab/interp/F1a.gif

Fields

Surface constructed of triangular faces

  • Triangulation of reading points
  • Rendering of the triangles

Properties

  • Exact
  • Local
  • Deterministic (depends on the triangulation)
  • Gradual
diagram

http://skagit.meas.ncsu.edu/~helena/gmslab/interp/F1b.gif

Assignment

Discuss voronoi diagram?. 1page

End of Lecture

Geographic Information Systems

That's it!

Queries about this Session, please send them to: jmwaura@jkuat.ac.ke

*References*

  • Geographic Information System Basics, 2012 J.E.Campbell & M. Shin
  • Fundamentals of GIS, 2017 Girmay Kindaya
  • GIS Applications for Water, Wastewater, and Stormwater Systems, 2005 U.M. Shamsi
  • Analytical and Computer Cartography, 2nd ed. Keith C. Claike
  • Geographic Information Systems: The Microcomputer and Modern Cartography, 1st ed. Fraser Taylor
Courtesy of Open School