Well Unknown ID AKA EPSG: 3857 Pamela Kanu November 2016
WGS 1984 WEB MERCATOR ALIASES: AUXILIARY SPHERE, WKID: 3857, WKID: 102100, WKID: 102113, SHERICAL MERCATOR, WGS 84/PSEUDO-MERCATOR, OPEN LAYERS: 900913, WKID: 3785, OSGEO: 41001, GOOGLE WEB MERCATOR, 54001 2
ORIGIN ORIGIN GOOGLE MAPS FIRST USED THE COORDINATE SYSTEM IN 2006. ORIGINALLY DEFINED BY CHRSTOPHER SCHMIDT IN A TECHNICAL RAMBLINGS BLOG. POPULARLY USED IN WEB MAPPING APPLICATIONS (GOOGLE MAPS /BING/OPEN STREET MAP/ARCGIS) 3
European Petroleum Survey Group Publish a database of coordinate system information in addition to related documents on map projections and datums. ESRI s Projection Engine is a developer's library that provides map projection and datum transformation support. The data model is derived from a modified version of the original European Petroleum Survey Group's (EPSG) coordinate system model. 4
GEODESY The projection is neither strictly ellipsoidal nor strictly spherical. EPSG's definition says the projection "uses spherical development of ellipsoidal coordinates. Or in other words: the input is based on the WGS84 ellipsoid, the output spatial reference system is based on the sphere. 5
GEODESY Formulas for the Web Mercator are fundamentally the same as for the standard spherical Mercator, but before applying zoom, the "world coordinates" are adjusted such that the upper left corner is (0, 0) and the lower right corner is (256, 256): where λ is the longitude in radians and φ is geodetic latitude in radians. Because the Mercator projects the poles at infinity, Google Maps cannot show the poles. Instead it cuts off coverage at 85.051129 north and south. This is not considered a limitation, given the purpose of the service. The value 85.051129 is the latitude at which the full map becomes a square, and is computed as φ given y = 0: 6
GEODESY According to Google Maps APIs 7
CAUTIONS The projected coordinate reference system originally lacked an official spatial reference identifier (SRID), and the Geodesy subcommittee of the OGP s Geomatics committee (also known as EPSG) refused to provide it with one, declaring We have reviewed the coordinate reference system used by Microsoft, Google, etc. and believe that it is technically flawed. We will not devalue the EPSG dataset by including such inappropriate geodesy and cartography. 8
ADVISORY NOTICE UNITED STATES DEPARTMENT OF DEFENSE & NATIONAL GEOSPATIAL-INTELLIGENCE AGENCY HAS DELCARED WEB MERCATOR UNACCEPTABLE FOR ANY OFFICIAL USE. 9
ADVISORY NOTICE NGA warns about positional accuracy issues with Web Mercator, especially at higher latitudes, and reminds the community to use DoD approved World Geodetic System 1984 (WGS 84) applications for all mission critical activities. The Earth is actually flattened toward the poles (ellipsoidal), the positional accuracy of latitudes in Web Mercator decline with distance away from the equator, relative to an ellipsoidal projection. Web Mercator suffers from the drawback shared by other Mercator projections of scale distortion near the poles. Fortunately, applications built with ArcGIS can be transformed or projected on the fly. WEB MERCATOR HAS BECOME THE MOST COMMONLY USED COORDINATE SYSTEM FOR WEB MAPPING APPLICATIONS 10
ADVISORY NOTICE SHOULD BE USED FOR VISUALIZATION PURPOSES, NOT NAVIGATIONAL PURPOSES NOT RECOGNIZED AS GEODETIC SYSTEM ERRORS OF 0.7 PERCENT IN SCALE AND DIFFERENCES IN NORTHING OF UP TO 43 km IN THE MAP (21 km ON THE GROUND) NOT ALL PROJECTIONS CAN CONFORM TO WGS 84 SOMETIMES NO TRANSFORMATION EXISTS, OR YOU HAVE TO USE A THIRD GCS LIKE THE WORLD GEODETIC SYSTEM 1984 AND COMBINE TWO TRANSFORMATIONS. 11
WEB MAPS Maps for use on the Web Often, web maps define the coordinate system that will be used for making GIS mashups. You'll need to match the coordinate system of the base map you choose to use, whether it is ArcGIS Online, Microsoft Bing Maps, or Google Maps. All of these online maps are stored with a continuous tiling system to support the seamless display of map data for large scale subareas (e.g., imagery and streets within a city). This requires a single map projection for the world, or the Web Mercator projection. 12
ADVANTAGES The benefit is that the spherical form is much simpler to calculate, saving many computing cycles. Rhumb lines, or loxodromic lines are not straight (arc crossing all meridians of longitude at the same angle). AJAX (Asynchronous JavaScript and XML) a new web-programming technique that uses various web technologies (JavaScript, the DOM, XML, and HTML/XHTML, most notably) to provide a more responsive user experience by passing tiles of map data from the Google server as XML and translated into imagery on the user s machine. Easily calculated. One projection of the entire world so that the map can be panned and zoomed without having to change the projection and without favoring any one part. Suitable for large-scale maps that is, maps of small areas like cities or blocks within cities. The projection is near-conformal, meaning no matter where you look, it will appear correct. Directions are always the same regardless of what portion you look at because you won t necessarily have a graticule to inform you. 13
SOLUTION - CREATE YOUR OWN BASEMAP Create a Tile Mapping Layer OR vector tile layers* (Only available through application developed with JavaScript ) Hosted by ArcGIS Online, ArcGIS for Server/Portal, Other web mapping services 14
CREATE YOUR OWN BASEMAP TOGGLE BETWEEN BASEMAPS A basemap needs to be defined, which is why the option is grayed out. Move a tiled layer into basemap, Then remove existing basemap 15
CREATE YOUR OWN BASEMAP USE SERVICES HOSTED BY ALTERNATE SOURCES USE OTHER TILED MAPS AS A BASEMAP, BUT THE COORDINATE SYSTEM NEEDS TO BE THE SAME PROJECTION 16
CREATE YOUR OWN BASEMAP CAN USE A BASEMAP FROM OTHER MAPPING SERVICES BY ADDING LAYERS FROM WEB OGC Web Feature Service (WFS) is a dynamic feature service that follows the specifications of OGC. You can add OGC WFS layers to maps you create with the map viewer. OGC Web Map Service (WMS) is a dynamic map service that follows the specifications of OGC. You can add OGC WMS layers to maps you create with the map viewer. OGC Web Tile Map Service (WMTS) is a set of cached image tiles that follows the specifications of OGC. You can add OGC WMTS layers to maps you create with the map viewer. 17
CREATE YOUR OWN BASEMAP Create a vector tile layers (Vector Basemap) Application developed with JavaScript Other APIs are discouraged because they may not natively support the editing of ArcGIS Server feature services; you would have to do a fair amount of programming in order to edit the services. ArcGIS Viewer for Silverlight ArcGIS Viewer for Flex ArcGIS API for Flex & ArcGIS API for Silverlight have been retired ArcGIS API for JavaScript 18
EDIT WEB APPLICATIONS Using the Spatial Reference parameter, you can programmatically edit the map s spatial reference system. Through JavaScript for web mapping applications such as ArcGIS API for JavaScript or Google Maps JavaScript API: require(["esri/geometry/spatialreference"], function(spatialreference) { /* code goes here */ }); Editing in SQL Note: Different from Set_SRID() SELECT ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450, 743265 2967450,743265.625 2967416,743238 2967416))',2249),4326)) As wgs_geom; Or by editing the mapconfig.xml file. If the spatial reference of layers in a map are different to the spatial reference of the map, the layers must be reprojected to the spatial reference of the map before displaying. Some layer types cannot be re-projected, for example, tiled map layer services draw and cache on a server, and cannot be changed on the client. 19
EDIT WEB APPLICATIONS Careful when transforming in web applications! Due to the many codes, some outdated applications are still using them. Ensure you are using WKID: 3857 Developers with little or no spatial/gis knowledge fail to understand datums, coordinate systems, projections Since the input varies from the output. the return values are different. Projection libraries assume the input is used on the output, a hack is needed to override this SOLUTION: Edit the projection parameters Specify a null grid shift using the +nadgrids=@null to the spherical projection definition in Proj4 Add an additional semi_minor projection parameter 20
CREATE A CUSTOM TRANSFORMATION USING A BIT OF SPHERICAL TRIGONOMETRY YOU CAN PROGRAM CUSTOM TRANSFORMATION TO CONVERT BETWEEN GOOGLE / BING MAPS AND WGS84: double[] WGS84toGoogleBing(double lon, double lat) { double x = lon * 20037508.34 / 180; double y = Math.Log(Math.Tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); y = y * 20037508.34 / 180; return new double[] {x, y}; } double[] GoogleBingtoWGS84Mercator (double x, double y) { double lon = (x / 20037508.34) * 180; double lat = (y / 20037508.34) * 180; lat = 180/Math.PI * (2 * Math.Atan(Math.Exp(lat * Math.PI / 180)) - Math.PI / 2); return new double[] {lon, lat}; } Luckily, ArcGIS can do the math for us You are responsible for the input parameters, which vary depending on the Transformation Method and Area of Use. 21
FINDING MAP SERVICES SPATIAL REFERENCE http://server.arcgisonline.com/arcgis/rest/services/reference/world_boundaries_and_places_alternate/ MapServer http://spatialreference.org Provides source code parameters for the programming languages/software 22
PROJECT ON THE FLY NOTE: ArcMap data frames only support one transformation for each geographic coordinate system of the layer to the data frame geographic coordinate system. Multiple transformations are used in the event that no Transformation exists. http://downloads2.esri.com/support/techarticles/geographic_transformations_1040.pdf 23
EDITING DATA WHILE PROJECTING ON THE FLY Although it is possible to edit data that is in a different coordinate system from the data frame, when high levels of accuracy are critical, it is better to project the data to a common coordinate system before editing. If you attempt to edit on the fly you will be prompted with 2 options: Continue with your edit session and start editing features in projected space. Choose not to continue editing if you want to change the coordinate system used by the data frame to match the native coordinate system of the layer or layers you want to edit. Your edits will be projected according to the on the fly transformation and pushed back to it s native projection. Be aware of: Editing beyond the edge of the coordinate system Changing the shapes of features, snapping to the edge or boundary of features, or extending and trimming features Transformations in the MXD only hold 1 per datum. Differences in tolerances These factors may produce unexpected alignment or accuracy problems, depending on the coordinate system being used. 24
PROJECT ON THE FLY 25
PROJECTING WHILE PROJECTING ON THE FLY BUG NO. 000096495 The Project Raster Tool won t project a custom transformation in ArcGIS 10.4, but is successfully in earlier versions. You can project while projecting on the fly 1. Set Transformation 2. Export Data 3. Choose the Data Frame 26
WEB MERCATOR TEST TOOL https://github.com/bobbooth/webmercator-test Tools for finding feature classes or maps that use the Web Mercator coordinate system 27
WHAT GIS PROFESSIONALS NEED TO DO 28