You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
Someone on here must know about this...
So, I'm not a GIS person but end up dealing with a lot of GIS data. Normally it's all WGS84 lat and lon and I can cope with that. However, I've been sent a Map of Malta in ED50 which I have now figured out how to convert using Global Mapper, but I was wondering how would I do it manually (code it up).
After lots of googling I feel I have all the jigsaw pieces but don't quite see how they fit together...
This is what I want to do...
[url= https://farm8.staticflickr.com/7870/32130016307_e3d8c28002.jp g" target="_blank">https://farm8.staticflickr.com/7870/32130016307_e3d8c28002.jp g"/> [/img][/url][url= https://flic.kr/p/QXdJsp ]ED50 to WGS84 conv[/url] by [url= https://www.flickr.com/photos/brf/ ]Ben Freeman[/url], on Flickr
I can find the specs for each coordinate system (or is it projection)?
[url= https://farm8.staticflickr.com/7904/33196545808_26cda32b02.jp g" target="_blank">https://farm8.staticflickr.com/7904/33196545808_26cda32b02.jp g"/> [/img][/url][url= https://flic.kr/p/SzsYw5 ]EPSG4326[/url] by [url= https://www.flickr.com/photos/brf/ ]Ben Freeman[/url], on Flickr
[url= https://farm8.staticflickr.com/7861/32130029727_666299ed9e.jp g" target="_blank">https://farm8.staticflickr.com/7861/32130029727_666299ed9e.jp g"/> [/img][/url][url= https://flic.kr/p/QXdNrM ]EPSG23033[/url] by [url= https://www.flickr.com/photos/brf/ ]Ben Freeman[/url], on Flickr
So I've got a weird datum (Potsdam), the conversion between Lat/lon and metres (that bit I can do) and possibly two different elipsoids to deal with (no idea what to do about them).
ArcGIS manuals seem to suggest I need a three parameter method:
[url= https://farm8.staticflickr.com/7885/47019549652_be8105c41b.jp g" target="_blank">https://farm8.staticflickr.com/7885/47019549652_be8105c41b.jp g"/> [/img][/url][url= https://flic.kr/p/2eCXtYy ]3 param method[/url] by [url= https://www.flickr.com/photos/brf/ ]Ben Freeman[/url], on Flickr
and have a table of magic values...
[url= https://farm8.staticflickr.com/7903/33196588988_c598cc5955.jp g" target="_blank">https://farm8.staticflickr.com/7903/33196588988_c598cc5955.jp g"/> [/img][/url][url= https://flic.kr/p/Sztcmy ]ArcGiS conversion numbers[/url] by [url= https://www.flickr.com/photos/brf/ ]Ben Freeman[/url], on Flickr
However I'm not quite sure what to do with the three values..
Surely someone in Oil and Gas must have done all this at University and can point me in the right direction....
What are you coding in? There are definitely C libraries which can deal with the tricky bits. (I hate the term 'heavy lifting')
I want to understand the maths / methodology rather than just crib a library.
Plus I'm coding in either Bash or VBA, neither of which has extensive GIS support!
i've used this library but there are some good explanations in the docs.
https://proj4.org/geodesic.html
WGS84 describes both a datum and a geodesic coordinate reference system (CRS). It's basically an ellipsoid, so can be described by semi-major, semi-minor axes and hence a flattening value. ED50 is also a vertical datum, for a particular bit of Europe. Your screenshot suggests it aligns with the UTM 33N projection (going from 3D ellipsoid to a 2D flat representation) and since you suggest your conversion goes from lat-lon to metres, then you need to confirm what the projection is... they will all distort the true length / areal scale and so they are 'optimised' depending on what you re trying to do. UTM 33N is Universal Tranverse Mercator, zone 33, Northern Hemisphere, but the horizontal datum ('zero' x,y-coordinate) for UTM 33N will be on the equator whereas the zero x-y coordinates for the ED50 will almost certainly be different.
Map projections: http://geoawesomeness.com/5-tools-will-let-master-map-projections/
That geodesic link tells you how far a lat-lon-height moves between two different coordinate reference systems and datums based on the ellipsoid geometry, returning a new lat-lon-height. You then need the projection: https://proj4.org/operations/projections/utm.html
To convert your ED50 data to lat-lon, determine the transformation to UTM 33N (shift in metres to the horizontal datum) and then use proj in bash to re-project back to WGS84 ellipsoid lat-lon.
Be very careful as getting this wrong can be very expensive - I work in O & G and we have professionals that do this for a living. I know enough to know I look to the experts.
Thanks konagirl, I will have a go....
I'm sure I will be back with questions tomorrow.....
Be very careful as getting this wrong can be very expensive – I work in O & G and we have professionals that do this for a living. I know enough to know I look to the experts.
Luckily no one is drilling for oil on the basis of my calculations (or at least not that I know of)....
Although if you read in the news that Malta has just discovered a massive oil reservoir just off their coast, you heard it here first...
Yes, to be fair I would do this in a package / library that handles it all for you.
Yes, to be fair I would do this in a package / library that handles it all for you.
But where is the fun in that?
Plus I really don't like using a tool if I don't understand what it's doing under the hood...
You should be able to find a stackexchange page or website about how to do it in code. If the result has any kind of importance I would double check against the result derived from an established method of transformation though!
You'll also need to find out which transformation to use for that part of the world. Eg in North Sea UKCS I generally used to use ED50 to WGS 84 (18) https://epsg.io/1311 which iirc is a seven parameter transformation not three. You can consult the EPSG registry https://www.epsg-registry.org/ or look for OGP guidance documents to see which is best for your area of interest.
The OS have a good guide to coordinate systems used in the UK, A guide to coordinate systems in Great Britain
Thanks for the link to the photos Ben, just a shame that the former Prem A gk that was playing wouldn't put the pads on to help us out ☹️
Yes, I coded that one up many years ago. We had a UK customer who could only provide site coordinates in OSGB grid, so I had to convert them all to lat/lon.
http://www.epsg.org A handy reference. Like some fella above, test coordinates are important to make sure the transformation is working properly.
Plus I’m coding in either Bash or VBA, neither of which has extensive GIS support!
Nasty....a bit of python would go down smoother.