vbaexcelcoordinateswgs84

WGS84 coordinates convert to Lambert72 coordinates


I'm writing a macro in VBA excel. I have two sorts of data types:

The Lambert72 coordinates are more accurate then the WGS84 coordinates. I have to find which WGS84 coordinate is the closest to the lambert72 coordinate (for each lambert72 coordinate) OR which Lambert72 coordinate is the closest to the WGS84 coordinate (for eacht WGS84 coordinate)

So i have to convert the wgs84 to lambert72 format, or vice versa. Someone who has a formula for this? On the internet I found some online converters, but I didn't find any formula.

And then I have to find a method to find the distance between two wgs84 coordinates or two lambert72 coordinates. For lambert72 i know how to do this, these are normally in meter, and is easy to calculate. But wgs84 are in degrees and I am not used to work with these.

Thank you in advance!


Solution

  • The formulas are a bit complicated, but this is what used to construct an excel sheet for those conversions: IGN - Services géodésiques

    Exploring these pages you'll find the informations needed (web pages and PDF).

    In short, this is the path to follow:

    [BD72 datum] Lambert 72 coordinates

    -> [BD72 datum] Geographic coordinates (Lat, Lon) (in decimal degrees)

    -> [BD72 datum] Geocentric coordinates (X,Y,Z)

    -> [WGS84 datum] Geocentric coordinates (X,Y,Z)

    -> [WGS84 datum] Geographic coordinates (Lat, Lon) (in decimal degrees)

    -> [WGS84 datum] Geographic coordinates (Lat, Lon) (in sexagesimal degrees) (i.e. "GPS")

    (in reverse order to find Lambert 72 coordinates)