3 Mapping of Spatial Data

3 Mapping of Spatial Data 3.1 Properties of Maps 3.2 Signatures, Text, Color 3.3 Geometric Generalization 3.4 Label and Symbol Placement 3.5 Summary ...
1 downloads 0 Views 6MB Size
3 Mapping of Spatial Data 3.1 Properties of Maps 3.2 Signatures, Text, Color 3.3 Geometric Generalization 3.4 Label and Symbol Placement 3.5 Summary

http://homepage.univie.ac.at/.../Janschitz_Text.pdf Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

214

3 Mapping of Spatial Data • Mapping (visualization) of spatial objects by transforming them into representation objects (map objects) • Map – Generalized model in a reduced scale for representing selected spatial information

http://www.xerokampos.eu/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

215

3 Mapping of Spatial Data • Topographic map – Geometrically and positionally accurate representation of landscape objects drawn to scale (topography, water network, land use, transportation routes) http://www.wiedenbruegge.net/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

216

3 Mapping of Spatial Data – Emphasis is on subjectspecific information (geological map, vegetation map, biotope map)

http://www.lbeg.niedersachsen.de/

• Thematic map

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

217

3 Mapping of Spatial Data • Challenges – Projection of the 3D surface on two dimensions (paper, film, screen) – Selection of the spatial objects and their attributes to be displayed – Generalization of geometric and thematic properties (simplify, omit depending on scale) – Exaggeration and displacement (e.g. river valley with roads and railway lines) http://maps.google.de/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

218

3.1 Properties of Maps • Graticule – Mapping the earth (sphere, ellipsoid) to a plane – Two tasks • Conversion of geographic coordinates (longitude and latitude) to cartesian coordinates (x, y; easting, northing) • Scaling of the map www.klett.de Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

219

3.1 Properties of Maps • Projections on – Cone – Plane (azimuthal projection) – Cylinder

[HGM02] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

220

3.1 Properties of Maps • Desired properties – Length preservation: with plane maps only limitedly attainable (in certain directions or at certain points) – Equivalent (equal area): preserve area measurements shape, angle, and scale may be strongly distorted http://www.informatik.uni-leipzig.de/~sosna/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

221

3.1 Properties of Maps – Conformal: important for navigation in shipping and air transport

http://flightnavigation.de/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

222

3.1 Properties of Maps • Areas and angles can not be preserved at the same time, therefore http://support2.dundas.com/OnlineDocumentation/ WebMap2005/MapProjections.html

– Compromise projections minimize overall distortion

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

223

3.1 Properties of Maps • The Gauss-Krüger coordinate system – Used in Germany and Austria – Cartesian coordinate system to represent small areas – Divides the surface of the earth into zones • Each 3° of longitude in width • The zones are projected onto a cylinder with the earths diameter

www.geogr.uni-jena.de/.../GEO142_3b.ppt

http://homepage.univie.ac.at/.../Janschitz_Text.pdf

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

224

3.1 Properties of Maps – Origin of the coordinate system: intersection point of the central meridian and the equator – X coordinate from the origin positive towards east, y coordinate from the origin positive towards north – X and y values given in meters

http://www.gerhard-tropp.de/Troppo/gauss_krueger.html www.geogr.uni-jena.de/.../GEO142_3b.ppt Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

225

3.1 Properties of Maps – To avoid negative x coordinates the central meridian is set to 500,000 m (false easting) – Each projection zone (3°, 6°, ..., 180°) is identified by a number (1, 2, …, 60) – This number is placed prior to the x value – Example: the Gauss-Krüger coordinates x: 3,567,780.339 and y: 5,929,989.731 refer to the following location x: 67,780.339 m East of the 9° meridian y: 5,929,989.731 m North of the equator Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

226

3.1 Properties of Maps • Transforming geographic coordinates into Gauss-Krüger coordinates – Given geographic coordinates lon, lat (e.g. from GPS, reference ellipsoid: World Geodetic System 1984 (WGS 84)) – Transformation into Cartesian coordinates x, y, z

https://www.univie.ac.at/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

227

3.1 Properties of Maps – 7 parameter Helmert transformation into Cartesian coordinates x’, y’, z’ referring to the Bessel ellipsoid

– Re-transformation into geographic coordinates X Y Z – Transformation WGS84 gc 10.529 52.273 --into Gauss-Krüger cc 3845123.169 714709.117 5021445.455 Bessel cc 3844489.704 714681.311 5020993.750 coordinates gc

Gauss-Krüger

10.531

52.274

---

3604481.733

5794379.689

---

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

228

3.1 Properties of Maps • The UTM coordinate system – Similar to the Gauss-Krüger system – Divides the surface of the earth into 6° zones – Covers the area between 84° North and 80° South

https://www.e-education.psu.edu/

http://earth-info.nga.mil/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

229

3.1 Properties of Maps – The diameter of the transverse cylinder is slightly smaller than the diameter of the Earth  secant projection with two lines of true scale (about 180 km on each side of the central meridian)

https://www.e-education.psu.edu/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

230

3.1 Properties of Maps • Common mapping errors

interchanging of x- and ycoordinates

no transformation into Cartesian coordinates

ignoring the negative direction of the canvas` y-axis

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

231

3.1 Properties of Maps • Structure of maps – Body of the map presentation of the actual map – Map margin contains name, map, scale, legend – Map frame borders map, contains numbering of the respective coordinate system http://www.apat.gov.it/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

232

3.2 Signatures,Text, Color • Graphical design elements of maps are – Symbols (signatures) for • Points • Lines • Areas

– Text

http://lehrer.schule.at/Ecole/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

233

3.2 Signatures,Text, Color • The use of point, line, area symbols depends on – Spatial scale of a map – Purpose of the map – Convention

• Point signatures are (composite) symbols for the representation of spatial objects with point geometry

[HGM02]

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

234

3.2 Signatures,Text, Color • Line signatures represent objects with line geometry [HGM02]

• Area signatures represent objects with area geometry

• Texts are needed in various fonts for the labeling of maps Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

235

– Important design element – Additive mixture • Most relevant for displaying maps on screen • Common color space: RGB

– Subtractive mixture • Most relevant for printing maps • Common color space: CMYK

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

http://www.horrorseek.com/

• Color

http://academic.scranton.edu/

3.2 Signatures,Text, Color

236

3.2 Signatures,Text, Color – There exist various color tables Example: color table for the official German real estate map 1:1000 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

237

3.2 Signatures,Text, Color • For maps and map series the signatures on-hand, fonts, and colors are specified in signature catalogs and color tables – Example: topographical map 1:25.000 (TK25)

http://www.lgn.niedersachsen.de/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

238

3.2 Signatures,Text, Color • Signature catalog "SK25" describes how the TK25 is derived from the "digital landscape model" (digitales Landschaftsmodell 1:25.000, DLM25) • The catalog consists of derivation rules and signatures (about 300 forms) • Some derivation rules:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

239

3.2 Signatures,Text, Color • Some signatures:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

240

3.2 Signatures,Text, Color – Example: real estate map 1:1000 • The ALKIS project (official property cadastre information system, Amtliches Liegenschaftskataster Informationssystem) specifies a signature library and derivation rules • Approximately 670 signatures • Approximately 850 derivation rules

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

241

3.2 Signatures,Text, Color • A signature specification:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

242

3.2 Signatures,Text, Color • Section of a real estate map

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

243

3.3 Geometric Generalization • The direct geometric derivation (coordinate transformation) of map objects from spatial objects works only with large-scale maps (e.g. real estate map) • For small-scale maps there are too many details http://www.geobasis-bb.de/GeoPortal1/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

244

3.3 Geometric Generalization • Generalization simplifies map content for the preservation of readability and comprehensibility • Replacement of scale preserving mappings through simplified mappings, symbols, and signatures • Select and summarize information • Maintain important objects, leave out unimportant ones http://www.kartographie.info/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

245

3.3 Geometric Generalization • Eight elementary operations – To simplify

– To enlarge – To displace – To merge Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

246

3.3 Geometric Generalization – To select

– To symbolize

– To typify

– To classify www.ikg.uni-hannover.de Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

247

3.3 Geometric Generalization Base map 1:5000

Topographical map 1:25.000

[HGM02] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

[HGM02] 248

3.3 Geometric Generalization Topographical map 1:25.000

Topographical map 1:50.000

[HGM02] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

[HGM02] 249

3.3 Geometric Generalization Topographical map 1:50.000

Topographical map 1:100.000

[HGM02]

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

[HGM02]

250

3.3 Geometric Generalization • Typical operations for generalization (alternative view)

[SX08] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

251

3.3 Geometric Generalization • Smoothing of polylines by means of a simple low-pass filter: y(n) = 1/3(x(n)+x(n−1)+x(n−2))

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

252

3.3 Low-pass Filter • Electronic filter that passes low-frequency signals but attenuates high-frequency signals • Further common filter types – High-pass – Band-pass – Band elimination

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

253

3.3 Low-pass Filter • Passive electronic realization – Simple circuit consists of a resistor and a capacitor (RC filter, first order filter) – More advanced circuit with additional inductor (RLC filter, http://upload.wikimedia.org/ second order filter)

http://ecee.colorado.edu/~mathys/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

254

3.3 Low-pass Filter • Active electronic realization – For example RC filter with an operational amplifier – An operational amplifier has a high input impedance and a low output impedance – Voltage gain is determined by resistors R1, R2 http://www.electronics-tutorials.ws/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

255

3.3 Low-pass Filter • Digital filters are realized as – Finite impulse response filter (FIR) • Impulse response lasts for n+1 samples and settles to zero • Output is a weighted sum of the current and a finite number of previous values of the input

– Infinite impulse response filter (IIR) http://upload.wikimedia.org/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

256

3.3 Low-pass Filter • A moving average filter is a very simple FIR filter – All n filter coefficients are set to 1/n – Realization by means of • Delay units • Ring buffer

http://upload.wikimedia.org/

http://blog.avangardo.com/wp-content/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

257

3.3 Low-pass Filter • In offline mode (no real-time constraints) a moving average filter results in a simple loop x[1...n] input values y[1...n] output values for (int i=2; i g then the point is significant, repeat procedure for both sub-lines, otherwise remove all the points between the start and end point of L Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

262

3.3 Geometric Generalization Examples:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

263

3.3 Geometric Generalization

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

264

3.3 Geometric Generalization Properties: + simple base operation: distance measurement − runtime of naive implementation: O(n2) + runtime of optimized implementation: O(n log n), using two convex hulls + good results even with a strong reduction of points + extendable for polygons − "outliers" are not eliminated

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

265

3.3 Geometric Generalization • Polygon to polyline conversion – Presentation of rivers and roads – Text placement within polygons

http://www.almenrausch.at/bergtouren/

http://www.naturathlon2006.de/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

266

3.3 Geometric Generalization • Schoppmeyer/Heisser procedure [SH95] 1. Given: elongate polygon P 2. Determine the longitudinal axis of P 3. Drop the perpendicular from all edge points to the longitudinal axis 4. Determine the intersection points of the extended perpendicular lines 5. Determine the centre of the resulting axes 6. Connect adjacent centers 7. Determine suitable start and end segment Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

267

3.3 Geometric Generalization Example 1. Given: elongate polygon P

2. Determine the longitudinal axis of P

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

268

3.3 Geometric Generalization 3. Drop the perpendicular from all edge points to the longitudinal axis

4. Determine the intersection points of the extended perpendicular lines

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

269

3.3 Geometric Generalization 5. Determine the centre of the resulting axes

6. Connect adjacent centers

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

270

3.3 Geometric Generalization 7. Determine suitable start and end segment

Result

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

271

3.3 Geometric Generalization Using the result for text placement

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

272

3.3 Geometric Generalization Properties: + relatively short runtime + quite good results with "good-natured" polygons − determining the start and end segment − procedure fails for non-elongate polygons

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

273

3.3 Geometric Generalization • Procedure for more polygon classes Petzold/Plümer [PP97] 1. given: Polygon P (set of points S) 2. determine Voronoi diagram of S 3. determine intersection points of the Voronoi edges and the polygon edges 4. consider resulting Voronoi skeleton: 5. choose an appropriate sequence of edges Voronoi diagram: assigns each point Pi ∈ S the points of the plane that are closer to Pi , than to each Pj ∈ S, i≠j Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

274

3.3 Geometric Generalization Example 1. given: Polygon P (set of points S)

2. determine Voronoi diagram of S

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

275

3.3 Geometric Generalization 3. determine intersection points of the Voronoi edges and the polygon edges

4. consider resulting Voronoi skeleton: 5. choose an appropriate sequence of edges

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

276

3.3 Geometric Generalization Properties: − computation of the Voronoi diagram − selection of an appropriate polyline from the skeleton + results for more polygon classes

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

277

3.3 Geometric Generalization Example (polygon with 2000 points):

visualization tool: [Me11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

278

3.3 Geometric Generalization • Procedure with rasterization, thinning, and re-vectorization 1. given: polygon P (set of points S) 2. rasterization of P 3. topological thinning of P (building a skeleton) 4. line following and re-vectorization 5. determine the longest path 6. line simplification

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

279

3.3 Geometric Generalization Example 1. given: polygon P (set of points S)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

280

3.3 Geometric Generalization 2. rasterization of P

visualization tool: [Bu11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

281

3.3 Geometric Generalization 3. topological thinning of P

visualization tool: [Bu11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

282

3.3 Geometric Generalization 4. line following and re-vectorization

visualization tool: [Bu11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

283

3.3 Geometric Generalization 5. determine the longest path

visualization tool: [Bu11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

284

3.3 Geometric Generalization 6. line simplification

visualization tool: [Bu11] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

285

3.3 Geometric Generalization • Simplification of polygons – Low-pass filter • Coordinates are changed • No reduction of points • Shapes might be drastically changed

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

286

3.3 Geometric Generalization – Douglas/Peucker (adapted) • Decompose polygon P into two polylines L1, L2 e.g. at the points PL1, PL2 ∈ P, with maximum distance between each other • Simplify L1 and L2 • Recombine resulting polylines at PL1 and PL2

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

287

3.3 Geometric Generalization • Example

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

288

3.3 Geometric Generalization • Further example

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

289

3.3 Geometric Generalization • Cartographically desired generalization

• Results with Douglas/Peucker (adapted)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

290

3.3 Geometric Generalization • • • •

Douglas/Peucker reduces the number of polygon points Characteristic shapes are preserved (within certain limits) Good results with "natural" geometries (bogs, lakes, forests) Less satisfactory results with polygons with predominantly right angles (buildings), therefore modification to preserve right angles and long edges (e.g. [NSe01])

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

291

3.3 Geometric Generalization • Geometric generalization (and displacement) of building sketches is a challenging task • Convenient results achieved by programs • E.g. CHANGE, PUSH, TYPIFY [Se07]

http://www.ikg.uni-hannover.de/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

292

3.4 Label and Symbol Placement • Placement of all texts (labels) in the same way results with high probability in overlappings (poor readability) • Therefore, it is necessary to move, scale down, rotate, or omit texts • In the general case this is a NP-hard optimization problem http://www.laum.uni-hannover.de/ilr/lehre/Isv/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

293

3.4 Label and Symbol Placement • Objectives of labeling – Easily readable – Unambiguity: each label must be easily identified with exactly one graphical feature – Same facts are represented in the same way – Different facts are represented differently – Important facts are emphasized – Important objects are never covered – No uniform pattern (avoidance of raster effect) http://www.mdc.tu-dresden.de/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

294

3.4 Label and Symbol Placement • Text or label placement is divided into – Point labeling • Positions to the right are preferred to those on the left • Labels above a point are preferred to those below • E.g. cities with a horizontal label

– Line labeling • Labels should be placed as straight as possible • E.g. rivers with names

http://www.sprachkurssprachschule.com/

– Area labeling • It must be clear what the total area is • E.g. forest areas containing their names http://upload.wikimedia.org/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

295

3.4 Label and Symbol Placement • For the three classes there are many specialized algorithms, based on – Greedy algorithm • Labels are placed in sequence • Each position is chosen according to minimal overlapping • Acceptable results only for very simple problems • Very fast

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

296

3.4 Label and Symbol Placement • Example : placement of 75 city names priorities for a single placement:

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

297

3.4 Label and Symbol Placement – Local optimization • The labels are checked several times • On each pass a single label is repositioned and tested • The position is kept, if the overall result improves • Stop, if a local optimum is reached • Suitable only for maps which relatively few labels Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

298

3.4 Label and Symbol Placement – Simulated annealing • Similar to local optimization, however yielding better results • A placement of a label can be kept even though it (initially) downgrades the overall result • At first "high temperature", thus leaving local optima is possible • Later on ("low temperature") only small changes are possible • Challenges: a good evaluation function, and a good annealing schedule

http://www.hs-augsburg.de/informatik/ Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

299

3.4 Simulated Annealing • Name and inspiration from annealing in metallurgy: controlled cooling of a material until it changes from liquid to solid • Structure of the solid depends on „the cooling schedule“ – Fast cooling results in • Unordered solid • Internal stresses

– Slow cooling results in • Ordered solid • Low internal energy • Macroscopic crystal lattice

http://webuser.hs-furtwangen.de/~neutron/

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

300

3.4 Simulated Annealing • Example: SiO2

Si O

– Short range order: tetrahedron – Crystalline form: Cristobalit – Without long range order: Silica glass

http://de.wikipedia.org/wiki/Glas Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

301

3.4 Simulated Annealing • Elements – Initial solution (liquid) – Modifications (vibrations of molecules) – Cooling schedule: change of temperature over time • Initial temperature • Freezing point

– Weighting function (internal energy)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

302

3.4 Simulated Annealing • Pseudocode: T = initialTemperature; currentSolution = InitialSolution; while (T > freezingPoint){ newSolution = CHANGE(currentSolution); if (ACCEPT){ currentSolution = newSolution; } ANNEAL(T); }

– Usually the temperature is decreased after multiple changes Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

303

3.4 Simulated Annealing – Decision if the new solution is accepted ACCEPT{ Δ = EVALUATE(newSolution) – EVALUATE(currentSolution) if((Δ < 0) or RANDOM(0,1) < e-Δ/T)){ return true; } return false; } • A better solution is always accepted • Probability of accepting a worse solution depends on the temperature and its cost • Boltzmann factor: e-E/k*T ; k = 1,3806504(24) · 10−23 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

304

3.4 Simulated Annealing • Example: label placement

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.2327 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

305

3.4 Simulated Annealing • Initial solution: random label placement • Weighting function

6 7

– Number of covered (or deleted) labels – Consideration of cartographic preferences by weighting of possible positions for point labels

2 3

1 4

5

8

• Modifications – Move an arbitrary or covered label to a new position – If cartographic preferences are considered an arbitrary label should be moved Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

306

3.4 Simulated Annealing • Cooling schedule: – Initial temperature ca 2,47 → the probability of accepting that a solution whose cost are 1 higher is accepted is 2/3, i.e.: e-1/T = 2/3 – T = 0,1 * T – T is decreased as soon as more than 5*n new solutions have been accepted (n is the number of objects) – Search ends • As soon as T has been decreased 50 times • If none of 20*n new solutions in a row has been accepted Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

307

3.4 Simulated Annealing • Result

http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.2327 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

308

3.4 Label and Symbol Placement • Symbol placement (point signatures) is just as complex as text placement • In the following two examples for special cases – Displacement and placement of tree symbols in TK25-like presentation graphics [NPW06] – Placement of point signatures in polygons of buildings for real estate maps [NKP08] Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

309

3.4 Label and Symbol Placement • Displacement and placement of tree row symbols – Roads as well as tree rows are given as polylines only – Placement of the tree symbols on the points of the tree rows does not result in an equidistant pattern – The visualization of roads is much wider than the actual street width – The tree symbols are often hidden by the line signatures of the streets – An alternative placement and a displacement is needed Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

310

3.4 Label and Symbol Placement • One single road from the DLM25 (example, XML/GML encoding) Badstrasse 86118065 4437952.9805331812.550 4437960.0705331818.450 4437967.2005331825.410 in Betrieb 2 Strassenverkehr Anliegerverkehr Gemeindestrasse Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

311

3.4 Label and Symbol Placement • A tree row from the DLM25 3524258.1705800238.690 3524256.1905800220.270 3524255.2405800196.070 ... 3524581.6505799674.000 Laubholz Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

312

3.4 Label and Symbol Placement • Direct visualization

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

313

3.4 Label and Symbol Placement • Simple displacement procedure for all t : treeRow do begin if exists s : street (distance(t,s) ≤ minDistance(s.dedication)) then for all p : t.coord do begin r := refSegment(s,p); move(p,r) end do end if end do;

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

314

3.4 Label and Symbol Placement • Visualization with displacement

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

315

3.4 Label and Symbol Placement • Placement procedure for all t : treeRow do begin l := length(t.centerLineOf); n := ⌊l/distanceConst⌋ + 1; t’ : new treeRow; for i=1 to n do begin computePoint (t’.coord[i], t.centerLineOf, distanceConst) end do end do;

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

316

3.4 Label and Symbol Placement • Visualization with displacement and placement

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

317

3.4 Label and Symbol Placement • Placement of point signatures in polygons of buildings – Derivation of the real estate map (1:1.000) from ALKIS inventory data extracts relatively straight forward – No generalization and no displacement is needed – Representation of buildings, parcels, border points, etc., with the given signature library and the derivation rules – E.g. symbolisation of buildings as colored polygons with a boundary line and a typical point signature depending on the attribute building function Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

318

3.4 Label and Symbol Placement • A building from an ALKIS inventory data extract ... ... 3567807.047 5930017.550 3567810.850 5930024.755 ... 3567807.047 5930017.550 ... 2000 1170 2100 1 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

319

3.4 Label and Symbol Placement • For many point signatures which are related to buildings so-called presentation objects are supplied in the inventory data, defining the optimal position of the respective signature (given in "world coordinates") ... ... 000000 3540847.175 5805897.864 3316 67.000 Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

320

3.4 Label and Symbol Placement • But some buildings lack the presentation objects • An obvious, easily determined position for the signature: – Choose the center of the smallest axis parallel rectangle, which encloses the polygon of the building – min(x1, ..., xn)+((max(x1, ..., xn)−min(x1, ..., xn))/2), – min(y1, ..., yn)+((max(y1, ..., yn)−min(y1, ..., yn))/2)

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

321

3.4 Label and Symbol Placement • Unfortunately, the results are not always satisfactory

• Therefore, heuristic procedure, based on – Convexity – (approximate) symmetry points – (approximate) symmetry axis – Various quality criteria – Discrete increments Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

322

3.4 Label and Symbol Placement if polygon of building convex: choose centroid if signature frame fits completely in polygon of building: place there otherwise choose appropriate point with the smallest distance to the centroid else if symmetry point in polygon of building: place there otherwise further procedure with symmetry axes ⇒ generation of a new presentation object with "optimal" positioning coordinates Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

323

3.4 Label and Symbol Placement • The procedure is not suited for the placement of signatures for churches/chapels – Besides the determination of an appropriate position – Also the signatures alignment to the shape of the building’s polygon is needed – An alignment to the north south axis is rarely optimal – Crosses for churches as parallel as possible to the churches naves – Crossbrace of cross should be placed in the transept Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

324

3.4 Label and Symbol Placement • Heuristic procedure – Determine a preferable large cross that just fits in the building’s polygon – Proportions of the large cross and the church signature are the same – If the large cross is found, place the signature just in the intersection point

• For this purpose first simplify the building’s polygon Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

325

3.4 Label and Symbol Placement • In several rotation angles: look for a preferable large, well placed cross – Restriction of the potential rotation angles and positioning points (e.g. consider minimum distance to boundaries of the building’s polygon) – Evaluate all appropriate crosses within a rotation angle – Evaluate all the best crosses (e.g. lengths of the crosses, alignments) Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

326

3.4 Label and Symbol Placement • Placement of the signature in the best cross of all rotation angles

⇒ Generation of a new presentation object with "optimal" positioning coordinates and "optimal" rotation angle Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

327

3.4 Label and Symbol Placement • Both methods applied to inventory data extracts

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

328

3.5 Summary • Mapping of spatial data – Topographic map – Thematic map

• Properties of maps – Graticule – Projections – Gauß-Krüger coordinate system – Body of map, map frame, map margin

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

329

3.5 Summary • Signatures, text, color – Point signatures – Line signatures – Area signatures – Derivation rules – TK25, real estate map

• Geometric generalization – Smoothing of polylines – Simplification of polylines Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

330

3.5 Summary – Douglas/Peucker algorithm – Polygon to polyline conversion – Simplification of polygons – Geometric generalization of building’s ground plans

• Text and symbol placement

6 2 3

1 4

5 – Methods for text placement 8 simulated annealing – Displacement and placement of symbols for tree rows – Placement of point signatures in building’s polygons 7

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

331

3.5 Summary collect manage

graticule

display

GIS

analyse

map topographic

color

design elements

thematic

signatures

text

generalization

polygon → line

placement

building signatures tree rows

simplifying lines

area labelling

as optimization problem

Spatial Databases and GIS – Karl Neumann, Sarah Tauscher– Ifis – TU Braunschweig

332

Suggest Documents