Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Fix content scaling #10

Closed
david-rhodes opened this issue Oct 17, 2017 · 2 comments
Closed

Fix content scaling #10

david-rhodes opened this issue Oct 17, 2017 · 2 comments
Assignees

Comments

@david-rhodes
Copy link
Contributor

For example, the map is currently being scaled according to latitude (which is a hack). This scaling should be done with a more "robust" method. For inspiration/reference: https://forum.unity.com/threads/scaled-content.500620/

@david-rhodes david-rhodes self-assigned this Oct 17, 2017
@MiroMuse MiroMuse modified the milestone: S17.4.3 Oct 26, 2017
@wilhelmberg
Copy link
Contributor

wilhelmberg commented Nov 6, 2017

For example, the map is currently being scaled according to latitude (which is a hack).

Adding a bit of background information as this is not a hack per se, but common practice in GIS because of the distortions of the WebMercator projection and its inability to be useful for any type of measurement (distance, direction, area).

Unfortunately that implementation doesn't seem to play well with our SDK, Unity or AR.

Not tested:
A quick fix/workaround/hack for the SDK might be to always scale as if the current tile (data) were positioned at the equator, passing 0 for latitude.


GIS StackExchange: What's the accuracy of Web Mercator EPSG:3857?

As a first step, you could look at the distortions of the Mercator projection, which is a conformal projection. Distance with this projection is only correct along the equator, then the error increase with the latitude. Indeed, as you can see on a global view, the parallels keep the same legnth on the maps. For example, the horizontal scale factor, which is 1 at the equator, is equal to 1.15 at a latitude of 30° (15% error), 2 at a latitude of 60° (200% error) and 11.5 at a latitude of 85° (11,500% error) (scale factor 1/cos(latitude) )


Wikipedia: Mercator projection

Web Mercator distortion shown via Tissot's indicatrices:
image

The Mercator projection portrays Greenland as larger than Australia; in actuality, Australia is more than three and a half times as large as Greenland.

image


Geospatiality: The Web Mercator Visual and Data Analysis Fallacy

Cylindrical Projection: The Cause for Distortion in a Web Mercator:
image


ESRI: Why are my map, distance and area measurements wrong when using WGS 1984 Web Mercator?

Aitoff projection ("realistic" shape and area, poles are points):
image

Web Mercator (extreme distortion, poles cannot even be displayed, Antarctica appears larger than the land masses of the other six continents combined):
image

@david-rhodes
Copy link
Contributor Author

Current map scaling is done with MapAtWorldScale component. Note that RelativeScale needs to be checked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants