|
|
Spatial datasets make it possible to build operational models of the real world based upon the field and object conceptions discussed in Section 2.2.6 and the use of coordinate geometry to represent the object classes described in Section 2.2.3. These include: discrete sets of point locations; ordered sets of points (open sets forming composite lines or polylines, and closed, non-crossing sets, forming simple polygons); and a variety of representations of continuously varying phenomena, sometimes described as surfaces or fields. The latter are frequently represented as a continuous grid of square cells, each containing a value indicating the (estimated) average height or strength of the field in that cell. In most of the literature and within software packages the points/ lines/ areas model is described as vector data, whilst the grid model is described as raster (or image) data.
Longley et al. (2005) provide a summary of spatial data models used in GIS and example applications (Table 4‑1). The distinctions are not as clear-cut as they may appear, however. For example, vector data may be converted (or transformed) into a raster representation, and vice versa. Transformation in most cases will result in a loss of information (e.g. resolution, topological structure) and thus such transformation may not be reversible. For example, suppose we have a raster map containing a number of distinct zones (groups of adjacent cells) representing soil type. To convert this map to vector form you will need to specify the target vector form you wish to end up with (polygon in this example) and then apply a conversion operation that will locate the boundaries of the zones and replace these with a complex jagged set of polygons following the outline of the grid form. These polygons may then be automatically or selectively smoothed to provide a simplified and more acceptable vector representation of the data. Reversing this process, by taking the smoothed vector map and generating a raster output, will generally result in a slightly different output file from the one we started with, for various reasons including: the degree of boundary detection and simplification undertaken during vectorisation; the precise nature of the boundary detection and conversion algorithms applied both when vectorising and rasterising; and the way in which special cases are handled, e.g. edges of the map, “open zones”, isolated cells or cells with missing values.
Table 4‑1 Geographic data models
|
Data model |
Example application |
|
Computer-aided design (CAD) |
Automated engineering design and drafting |
|
Graphical (non-topological) |
Simple mapping |
|
Image |
Image processing and simple grid analysis |
|
Raster/grid |
Spatial analysis and modelling, especially in environmental and natural resource applications |
|
Vector/Geo-relational topological |
Many operations on vector geometric features in cartography, socio-economic and resource analysis, and modelling |
|
Network |
|
|
Surface/terrain visualisation |
|
|
Object |
Many operations on all types of entities (raster/vector/TIN etc.) in all types of application |
Similar issues arise when vector or raster datasets are manipulated and/or combined in various ways (e.g. filtering, resampling). In the following sections we describe a large variety of such operations that are provided in many of the leading software packages. We concentrate on those operations which directly or indirectly form part of analysis and/or modelling procedures, rather than those relating to data collection, referencing and management. These processes include the various “methods” that form part of the OGC simple “feature specifications” (Table 4‑2) and test protocols, including the procedures for determining convex hulls, buffering, distances, set-like operators (e.g. spatial intersection, union etc.) and similar spatial operations. In each case it is important to be aware that data manipulation will almost always alter the data in both expected and unexpected ways, in many instances resulting in some loss of information. For this reason it is usual for new map layers and associated tables, and/or output files, to be created or augmented rather than source datasets modified. In many cases these procedures are closely related to the discipline known as Computational Geometry.
Table 4‑2 OGC OpenGIS Simple Features Specification — Methods
|
Method |
Description |
|
Note: a and b are two geometries (one or more geometric objects or features — points, line objects, polygons, surfaces including their boundaries); I(x) is the interior of x; dim(x) is the dimension of x, or maximum dimension if x is the result of a relational operation |
|
|
Spatial relations |
|
|
Equals |
spatially equal to: a=b |
|
Disjoint |
spatial disjoint: equivalent to |
|
Intersects |
spatially intersects: [ |
|
Touches |
spatially touches: equivalent to [ |
|
Crosses |
spatially crosses: equivalent to [dim(I(a) |
|
Within |
spatially within: within(b) is equivalent to [ |
|
Contains |
spatially contains: [a contains(b)] is equivalent to [b within(a)] |
|
Overlaps |
spatially overlaps: equivalent to [dim(I(a) |
|
Relate |
spatially relates, tested by checking for intersections between the interior, boundary and exterior of the two components |
|
Spatial analysis |
|
|
Distance |
the shortest distance between any two points in the two geometries as calculated in the spatial reference system of this geometry |
|
Buffer |
all points whose distance from this geometry is less than or equal to a specified distance value |
|
Convex Hull |
the convex hull of this geometry (see further, Section 4.2.13.1) |
|
Intersection |
the point set intersection of the current geometry with another selected geometry |
|
Union |
the point set union of the current geometry with another selected geometry |
|
Difference |
the point set difference of the current geometry with another selected geometry |
|
the point set symmetric difference of the current geometry with another selected geometry (logical XOR) |
|
|
|