I am working with an ESRI stack, storing my layers in a sql-spatial-enabled-SDE- geodatabase (Geometry type, Web Mercator-3857).
I am building a web mapping application, so by default, the tiles are also in web mercator, 3857.
Via stored procs, i use STDistance to query distances from a user's location (Coordinates also in web mercator) to the various layers.
Problem is, due to the distortion of web mercator, my distance calcs are increasingly off, the further from the equator they are made.
I've thought of storing my layers in sql-spatial-geography (rather than geometry) type, but:
- I imagine my distance queries will take much longer (distance calcs on spherical surface)
- i will need to reimport a lot of data
- arcgis services won't be as fast as they will need to project on the fly
If I go to Google maps, and do a distance calc, the distance returned is much more accurate, even in Nortern/southern regions, so I assume Google must be correcting for distortion caused by the web mercator projection.
My question then: Is there a simple factor value that can be applied to distance calcs done in web mercator projection to get the "correct" distance?