Lecture Notes for Clarke, K. C. Analytical and Computer Cartography
Lecture 12: Map Transformations (Ctd)
Transformations and Algorithms (Review)
- In mathematics, transformations are expressed as equations.
- Solutions, inversion as so forth are by algebra, calculus etc.
- In computer science, a set of transformations defining a process is called
an algorithm.
- Any process that can be reduced to a set of steps can be automated by an
algorithm.
data structures + transformational algorithms = maps
- So Far have covered Point transformations
Transformations Based on Lines
Intersection of two lines
- Absolutely fundamental to many mapping operations, such as overlay and clipping.
- In raster mode can be by layer overlay.
- I vector mode must be solved geometrically.
- Lines (2) to point transformation
Basic Layout
- When using this algorithm, a problem exists when b2 - b1 = 0 (divide by
zero)
- Special case solutions or tests must be used
- These can increase computation time greatly
- Computation time can be reduced by pre-testing, e.g. based on bounding box.
Alternative Forms (See Saalfeld)
1. Point-slope form. y - y1 = b(x - y1)
2. Slope-intercept y = a + bx
3. Two point form (y - y1)/(x - x1) = (y2 - y1)/(x2 - x1)
4. Two Point form (no DBZ) (y - y1)(x2 - x1) = (x - x1)(y2 - y1)
5. Linear equation ax + by + c = 0
6. Point-vector form [x y] = [x1 y1] + [rv1 rv2]
Distance from a Point to a Line
Transformations Based on Areas
- Computing the area of a vector polygon (closed)
- Manually, many methods are used, e.g. cell counts, point grid.
- For a raster, simply count the interior pixels
- Vector Mode more complex
- Worked example
Point-in-Polygon
- Again, a basic and fundamental test, used in many algorithms.
- For raster mode, use overlay.
- For vector mode, many solutions.
- Most commonly used is the Jordan Arc Theorem
- Tests every segment for line intersection.
- Test point selected to be outside polygon.
Theissen Polygons
- Often called proximal regions or voronoi diagrams.
- Possible within Arc/Info
- Often used for contouring terrain, climate, interpolation, etc.
Affine Transformations
- These are transformation of the fundamental geotraic attributes, i.e. location.
- Influence absolute location, not relative or topological
- Necessary for many operations.
- Most critical are digitizing, scanning, georegistration, and display.
- Affine Transformations take place in three steps (TRS) in order
TRANSLATION
Movement of the origin between geocoding systems
ROTATION
- Alignment of coordinate systems
- Rotation of axes by an angle theta, given by georegistration step.
SCALING
- Scale change to bring images into alignment
- Possible to use matric algebra to combine the whole transformation into
one matrix multiplication.
- Step must then be applied to every point.
Statistical Space Transformations
1. Rubber Sheeting
- Select points in two geometries that match.
- Suitable points are targets, road intersections, runways etc.
- Use least squares transformation to fit image to map.
- Involves tolerance and error distribution.
- [x y] = T [u v] then applied to all pixels
- May require resampling to higher or lower density
2. Cartograms
- Deliberate distortion of geometry to new "space"
- Type of non-invertible map projection
Sybolization Transformations
The Normalization Transformation
- Screen coordinates are often reduced to a "satndard" device
- Device display dimensions are (0,0) to (1,1)
- Some vary, e.g. MicroCAM
- Computer graphics Model is
- World Coordinates->NDC-> Device Coordinates
- Also need to track Windows for multiple displays etc.
Drawing Objects
- Accomplished using graphics standards
- Many e.g. PHIGS, Xwindows, GKS etc.
- Obvious advantage of standards
- Most use model of primitives and attributes
- GKS has six primives, each has multiple attributes.
- Most software uses some version of the approach
Keith Clarke Last Change 5/12/97 Copyright Prentice Hall, 1995