Hi
We have a customer who has eastings and northings location information stored in their data, is anyone aware of how to display this on CA maps?
Maybe a formula to convert to latitude and longitude.
Thanks
Jason
I'm not sure exactly what type of data you're dealing with (datum, EPSG code,...) but this may help:
From a lengthy document explaining GIS (which, of course, I can't find right now) I came up with this:
lat = (180/pi()) * ((PI() / 2) - (2 * atan(exp(-[Web Mercator Y]/6378137))))
lon = (180/pi()) * [Web Mercator X] / 6378137
It's not exact because Earth is not a sphere, it's a spheroid. The diameter through the equator is larger than pole to pole. The math is way more complicated if you need to account for that. But I've found that these expressions are pretty good.
Depending on what your data is, you may need to reproject from your Eastings and Northings to Web Mercator first. Also, I'm pretty sure the expression works for U.S. feet, so pay attention to your units.
Hi DougP,
UK maps are marked based on an offset from a point off the south west cost of the UK, it is based on metric I think. So this will give me a good starter.
Many thanks
There may be other methods. I'm surprised nobody else has weighed in yet.
You can also develop a custom control that uses a JavaScript mapping framework (ArcGIS Online, Leaflet, OpenLayers, Google Maps, etc.) and your favorite base map (ArcGIS, OpenStreetMap, etc.). Some are open and some require free or paid licensing depending on who you are and who you are/are not sharing with. At that point, you can handle reprojecting yourself using proj4js. I built an example using 2 services and 2 base maps. It's fairly involved (500+ lines, depends on 3 open source libraries and one external custom script) and maybe too custom to share openly. But, once built, something like this enables your report developer to add a custom control using the appropriate module path, set the configuration in JSON (based on an example you provide them), and away they go.
Also...
The document I referred to may be: http://www.mygeodesy.id.au/documents/A%20GUIDE%20TO%20MAP%20PROJECTIONS%20V3.pdf
QuoteI'm pretty sure the expression works for U.S. feet
It looks like Web Mercator is in meters.
https://www.vcalc.com/wiki/vCalc/WGS-84+Earth+equatorial+radius+(meters)
radius = 6378137m