43

Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

1011© Wageningen UR

Data Handling II - transformation

Page 2: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

2/41

How to make different datasets comparable?

TransformationSynonymsThematicGeometric

• Vector – vector• Vector – raster• Raster – vector

Geo-data cycle

Page 3: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

3/41

Transformation - definitionQuery a data handling class of operators

which doesn’t change the thematic and geometric meaning of the original geo-datawhich doesn’t change the (geo-)reference or data structureit only selects a subset out of the whole data set

Transform a data handling class of operators

which doesn’t change the thematic and geometric meaning of the original geo-datawhich changes the (geo-)reference or data structure

Alter/Process a data handling class of operators

which changes the thematic and geometric meaning of the original geo-datawhich doesn’t change the (geo-)reference and data structure

Page 4: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

4/41

Transformation - synonyms

Conversionfrom analogue into digitalfrom data structure (.txt into .doc)from carrying medium (tape to CD)

Projection3D into 2D2D into another 2D 2D into 3D

RectifyingGeometrically wrong into geometrically correct

Page 5: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

5/41

Thematic transformationsNominal

TranslationExample:

• aardappelen = potatoes = kartoffeln• You to = U2, For you = 4U (SMS language)

OrdinalOther codingExample:

• 1 = bad / 2 = ok / 3 = good

Interval / ratioOther unitExample:

• Inch into cm• Joule into Kcal

Page 6: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

6/41

Geometric transformations

3D into 2D2D into 2D

Map to Map transformationSketch to Map transformationImage to Map transformation

2D into 3D

Data structurevector – vector raster – raster vector – rasterraster – vector

Page 7: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

7/41

Raster or Vector?VectorAdvantages

Compact data structureExplicit description of topologyCoordinate transformation Accurate graphic presentation

DisadvantagesComplex data structureCombining data setsSpatial analysis within basic units

Burrough, McDonnel, 1986/1998

RasterAdvantages

Location specific manipulationSimple data structureMathematical modeling is easy

DisadvantagesLarge data volumesCoordinate transformation Spatial resolution

Page 8: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

8/41

Exercise vector - raster: 1

cityhighwayforest

lake

Legend:

Page 9: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

9/41

Exercise vector - raster: 2

cityhighwayforest

lake

Page 10: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

10/41

Exercise vector - raster: 3

Cell_id Village Road Forest Lake7 0 0 0 08 0 0 1 09 0 1 1 0

10 1 1 1 011 0 1 1 012 0 0 1 013 0 0 0 0

7 8 9 10 11 1213

cityhighwayforest

lake

Page 11: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

11/41

Vector - raster: point 1

Page 12: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

12/41

Vector - raster: point 2

?

Page 13: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

13/41

Vector - raster: lines 1

Page 14: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

14/41

Vector - raster: lines 2

Page 15: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

15/41

Vector - raster: polygon 1

Page 16: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

16/41

Vector - raster: polygon 2

Page 17: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

17/41

Vector- raster: summaryObject/Feature selection

Priority rulesPoint-, Line- Or Area-

objectsOr Weighted

Allocation ruleseg. - Feature area % in cell- Shortest path OR

real geometry

BEWARE!!!

PointsPoint extension: area sizeNr. of points in one cell

LinesLine widening: area sizeNr. of lines in one cell

PolygonsBoundary extension: area changeNr. of polygons in one cell

Page 18: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

18/41

Vector raster conversion

Page 19: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

19/41

Grid Topology

1 2

6

3

45

7

8

Page 20: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

20/41

How many objects ?2 0

0

10

0 2

2

0

2

1

3

0

1

0

1

3

3

Page 21: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

21/41

Raster – Vector: 1

Object / Feature approach

1. Object / Feature type - point, line or area

2. Object / Feature construction rules - thematic classes (grid value)- topology (side / corner connection)

3. Transformation into data structure (with topology)

4. Geometric cosmetics

Page 22: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

22/41

Raster- vector: 2

1

2

3

4

1. Object / Feature type

2. Construction rules

3. Transformation

4. Geometric cosmetics

Page 23: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

23/41

Raster - vector: 3

21

3 4

Page 24: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

24/41

Summary:

Vector - Raster (priority rules, allocation rules)Raster - Vector (object definition based on topology/thematic rules)

Page 25: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

25/41

Page 26: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

26/41

Exercise

Page 27: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

27/41

2D-2D: Geometric Transformation

Process of image registration- using a set of control points –, geometric transformation- equations to estimate coordinates of a sketch, digitized map, (satellite) image or photograph –

onto a projected Cartesian coordinate system by determined transformation coefficients

and validation

Page 28: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

28/41

2D into 2D - coefficients

Definition of a 2D coordinate system

Position of the origin (X+, Y+)Orientation of the system (Xo, Yo)Units of the axes (Xm, Yn)

Page 29: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

29/41

Vector-Vector example

s o

r

Page 30: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

30/41

Vector-Vector: coordinate transformation

s [scaling] (X * m, Y * n){ m eq n OR m neq N} o [orienting /translating] (X+s, Y+t){ x eq y OR x neq y} r [rotating] (X+uo, Y+vo){ u eq v OR u neq v}

Formal description:• X’ = srX + srY + s• Y’ = srX + srY + t

• X’ = AX + BX + C• Y’ = DX + EY + F

Page 31: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

31/41

Vector - vector transformations 1

Equal area

Similarity (equal shape)

Affine (parallelism )

Projective

Page 32: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

32/41

Similarity transformation 1

Page 33: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

33/41

Similarity transformation 2

• constraints• axis perpendicular • axis with equal units

• transformations• orienting/translate: X and Y differ { s neq t }• scaling: X and Y equal { m eq n }• rotating (inc skew): X and Y equal { u eq v }

• procedure• 4 parameters (unknown) • 2 tic points• extension of tic points

Page 34: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

34/41

Vector - vector: operators

• X’ = Ax + By + C Y’ = Dx + Ey + F

SkewnessAffine transformation most general used

Rotate (incl skew), scale

Translate

• procedure• 6 parameters (unknown) • >= 4 tic points

[See: Chang, 7.1.3-7.2 / 6.1.3 – 6.2 : Affine transformation]

Formal description:• X’ = srX + srY + s• Y’ = srX + srY + t

• X’ = AX + BX + C• Y’ = DX + EY + F

A= Sx cos (t)B= Sy [k cos (t) – sin (t) ]D= Sx Sx sin (t)E= Sy [k sin (t) – cos (t) ]

Sx, Sy (scaling)t (rotation angle)k (shear factor)

Page 35: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

35/41

Vector – vector: step 1

1 image registrationground control / tic / reference points in FROM - and TO – geodata set

Page 36: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

36/41

Example – image registration

Control or Tic points

a measure pair of coordinates of unprojected sketch, scan (FROM)

b measure related pair of coordinates of projected (TO)

c connect

FROM TO

Page 37: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

37/41

Vector – vector: step 2

1 image registrationground control / tic / reference points in FROM - and TO – geodata set

2 geometric transformationrun transformation on tic points and

Error validation by Root Mean SquareI/O Error for control point = √ ( XFROM (act) – XTO (est) ) 2 + (YFROM (act) -YTO (est) ) 2

Page 38: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

38/41

Error validation

FROM TO

Page 39: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

39/41

Vector – vector: step 3

1 image registrationground control / tic / reference points in FROM - and TO – geodata set

2 geometric transformationrun transformation on tic points and

Error validation by Root Mean Square

If RMS is acceptable then continue with 3if RMS is not acceptable then repeat 1

3 apply transformation on to FROM geodata set

I/O Error for control point = √ ( XFROM (act) – XTO (est) ) 2 + (YFROM (act) -YTO (est) ) 2

Page 40: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

40/41

Positional Accuracy

Page 41: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

41/41

Summary – geometric transformation

2D (sketch, images) into projected geodataimage registrationgeometric transformation- similarity - affinepositional error

Page 42: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

Study materials:

2007© Wageningen UR

Theory Chang, 2006 - 2008 [ 5th ]

Chapter 5.5:‘Data Conversion’ [ 4.5 ]

Chapter 7: ‘Geometric transformations’ [ 6 ]

(except 7.4 [ 6.1.4 and 6.3])

Practical: GRS-10306 practical manual, 2006Module 6: ‘Transformations’ Part 2

Page 43: Data Handling II - transformation · 3/41 Transformation - definition Query a data handling class of operators zwhich doesn’t change the thematic and geometric meaning of the original

43/41

Vector – vector transformations 2type

equi area

similarity

affine

projective

non-linear

Accepted Not-Accepted