Web Mercator Projection & Raster Tile Maps Annual Conference 2017 Ottawa May 31- June 2, 2017 Two cornerstones of Online Map Service Providers Emmanuel Stefanakis Dept. of Geodesy & Geomatics Engineering University of New Brunswick estef@unb.ca
Online Map Service Providers O Available for ~12 years O Well established (difficult to remember how life was without them) 2
Online Map Service Providers 3
Online Map Service Providers Challenges? Technological Cartographical 4
Online Map Service Providers Framework Request (where/what/resolution) CLIENT HTTP Map Product SERVER Map Service End-users Map Repository (Data+Images) 5
Technological Challenges O High and steadily increasing demand O Voluminous data (vectors and images) O Bandwidth limitations O Concurrent access O Security issues O Data protection 6
Cartographical Challenges O Visualize the map on Web browser O flat/rectangular monitor O Multi-resolution representation O various zoom levels O Multi-theme mapping O various themes (layers) O Multi-language mapping O various languages 7
Online Map Service Providers Web Mercator Projection Raster Tile Maps 8
Map Product Flat Monitor Request (where/what/resolution) CLIENT HTTP Map Product SERVER Map Service Map Repository (Data+Images) 9
Map Projection O A function f... φ λ (Χ,Υ) ƒ(φ, λ) Y X 10
Choose a Map Projection 11
Choose a Cylindrical O Best fit O Rectangular grid 12
Conical Projection? 13
Conical Projection? 14
Cylindrical Projection? 15
Cylindrical Projection O Simulation of a cylindrical projection 16
Cylindrical Projection O Simulation of a cylindrical projection 17
Which Cylindrical? Plate Carree Miller s Mercator 18
Mercator Projection O Most popular O Conformal O Easy math (low complexity) O to serve high demand 19
Mercator Projection O Conformal O Support navigation in Seas 1512-1594 2πRcos(φ) < 2πR 2πR φ 2πR 2πR λ Y X 20
Mercator Projection 2πR 2πR 21
Mercator Projection Scale factor on horizontal (along parallels at φ): 2πRcos(φ) 2πR Mercator s goal preserve shapes/directions 22
Mercator Projection Scale factor on horizontal (along parallels at φ): 2πRcos(φ) 2πR Mercator applied Scale factor on vertical (along meridians at φ): 2πRcos(φ) 2πR 23
Mercator Projection All parallels have the same length = equator (2πR) φ At latitude φ the scale factor on the parallel is equal to: 2π R 2π Rcosφ secφ 24
Mercator Projection φ 2 dn φ 1 Mercator applied the same factor on the parallels The actual distance between two parallels at latitude φ is equal to: dn = R dφ He made it equal to: dn = R secφ dφ 25
Mercator Projection By integrating the last formula we get: (sphere) N φ o φ R secφ dφ Rlntan 45 2 0 North pole N φ equator South pole 2π R 26
Mercator Projection O Spherical Formulas Easting P(φ s, λ s ) Northing P(E s, N s ) Spherical Formulas Sphere 27
Mercator Projection O Ellipsoidal Formulas Easting Northing P(φ e, λ e ) P(E e, N e ) Ellipsoidal Formulas WGS 84 28
Mercator Projection O Spherical Formulas Easting Northing Easting O Ellipsoidal Formulas Northing 29
Adopt Mercator Projection Request (where/what/resolution) CLIENT HTTP SERVER Map Product Map Service O O Ellipsoid Coordinates Mercator Projection Map Repository (Data+Images) 30
Web Mercator O Make it even less computational expensive O P(φ e, λ e ) Ellipsoid Coordinates Spherical Formulas P(E, N) P(φ s, λ s ) WGS 84 Spherical Formulas Web Mercator Sphere 31
Online Map Service Providers Web Mercator Projection 32
Web Mercator (vs) Mercator O Mercator basic properties are lost O Non-Conformal O Loxodromes Not straight lines O Rationale (Google) O Simpler calculations O Map to be projected on a computer monitor O No body can notice the differences 33
34
Criticism O Geodesy Subcommittee of the Oil and Gas Producers (aka EPSG) rejected it in 2008 as technically flawed & an inappropriate geodesy and cartography O National Geospatial-Intelligence Agency of the US Department of Defense declared it as unacceptable for any official use, because a general lack of understanding of its properties has caused considerable confusion and misuse 35
A Code for Web Mercator O An unofficial code 900913 (GOOGLE spelled with numbers) was initially assigned O Later, EPSG introduced an official identifier: EPSG:3857 -- WGS84 Web Mercator (Auxiliary Sphere) 36
40,075,017.25 Web Mercator Map of the World O Absolute square 85.051129 North O Very convenient in panning, tiling, and indexing 85.051129 South 40,075,017.25 37
Online Map Service Providers Challenges? Technological Cartographical 38
How to deliver the map product? Request (where/what/resolution) CLIENT HTTP Map Product SERVER Map Service Map Repository (Data+Images) 39
How to deliver the map product? One map? SERVER Map Service Map Repository (Data+Images) Web Mercator 40
How to deliver the map product? One map? SERVER Map Service Map Repository (Data+Images) Web Mercator Map product: Various areas 41
How to deliver the map product? One map? SERVER Map Service Map Repository (Data+Images) Web Mercator Map product: Various resolution 42
How to deliver the map product? One map? SERVER Map Service Web Mercator Map Repository (Data+Images) Map product: Various theme Various language 43
One map? Multiple themes Multiple Languages SERVER On-the-fly rendering? Map Service Map Repository (Data+Images) 44
On-the-fly generalization? 45
Use of Map Tiles Request (where/what/resolution) CLIENT One map not an option HTTP Map Product SERVER Map Service Preprocessing generation of map tiles Map Repository (Data+Images) 46
Online Map Service Providers Raster Tile Maps 47
Use of Map Tiles Request (where/what/resolution) CLIENT HTTP SERVER Map Product Preprocessing generation of tiles Map Service Map Repository (Data+Images) 48
Tiled maps O A series of precompiled maps O for various areas O in various resolutions Map Repository (Data+Images) 49
Tiled maps An old practice O Old practice O Sheet Division and Organization of Topographic maps Map Repository (Data+Images) 50
Sheet Division & Organization O Topographic Maps 51
Sheet Division & Organization O NRCan: National Topographic Map Index 52
Web Mapping Tiled Maps O Web mapping O rapid growth of map data availability O rapid growth of demand O Use of map tiles (slippy maps) O pre-computation and caching of map image tiles O map servers use far fewer resources than maps rendered on demand O delivery only limited by the bandwidth of the connection with the map server 53
Tiled Maps O Google O was the first major mapping provider to adopt the tiled web maps O Others followed O Bing and OpenStreetMap, Esri and Oracle O provide functionality for map tiling and caching of vector layers and/or raster images 54
Google Maps O Conventions O All map tiles O Square-shaped and equal-sized O 256x256 pixels O World rendered in a single tile at the outer most zoom level: 0 O Projection: Web Mercator O latitude values [-85.0511, +85.0511] degrees 55
Google Maps column row x y 0,0 0,0 1,0 0,0 1,0 0,1 1,1 2,0 3,0 2,1 3,1 0,1 1,1 0,2 1,2 2,2 3,2 0,3 1,3 2,3 3,3 Zoom Level: 0 Number of Tiles: 1 Zoom Level: 1 Number of Tiles: 4 Zoom Level: 2 Number of Tiles: 16 56
Bing Maps O Quadtree encoding: Quadkeys 57
Google Maps Zoom Level [0-24] 58
59
to Zoom Level 23 http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/ 60
#Tiles & Pixel size / Zoom Level Each tile: 256x256 pixels LEVEL TILES/LEVEL Pixel Size (m) 0 1 156,543.034 1 4 78,271.517 2 16 39,135.758 3 64 19,567.879 4 256 9,783.940 5 1,024 4,891.970 6 4,096 2,445.985 7 16,384 1,222.992 8 65,536 611.496 9 262,144 305.748 10 1,048,576 152.874 11 4,194,304 76.437 12 16,777,216 38.219 13 67,108,864 19.109 14 268,435,456 9.555 15 1,073,741,824 4.777 16 4,294,967,296 2.389 17 17,179,869,184 1.194 18 68,719,476,736 0.597 19 274,877,906,944 0.299 20 1,099,511,627,776 0.149 21 4,398,046,511,104 0.075 22 17,592,186,044,416 0.037 23 70,368,744,177,664 0.019 24 281,474,976,710,656 0.009 4 ^ LEVEL 2πR/(256*2^LEVEL) GRS80 (eq) Circumference (2πR) 6,378,137.00 m 40,075,016.69 m 61
Map Tile Management Kotsollaris, M., 2017. A Scalable Web Tiled Map Management System. MScE Thesis. University of New Brunswick. 62
Interoperability across multiple Map Providers http://docs.opengeospatial.org/wp/16-019r4/16-019r4.html 63
Online Map Service Providers Web Mercator Projection Raster Tile Maps 64
References O O O O Stefanakis, E., 2015. Web Mercator: the de facto standard, the controversy, and the opportunity. GoGeomatics. Magazine of GoGeomatics Canada. October 2015. Stefanakis, E., 2015. Map Tiles and Cached Map Services. GoGeomatics. Magazine of GoGeomatics Canada. December 2015. MapTiler. Tiles à la Google Maps: Coordinates, Tile Bounds and Projection. http://www.maptiler.org/google-maps-coordinates-tilebounds-projection/ Tilesets: Google Maps Structure MicroImages. http://www.microimages.com/documentation/techguides/78goo glemapsstruc.pdf 65