Need to convert coordinates from lat/long to EPSG 3857 x/y
Example, using online converters
latlon = {33.971722106263044, -84.45613689691451};
epsgConverter[{lat_String, lon_String}, from_ : "4326",
to_ : "3857"] := {"x", "y"} /.
Import["https://epsg.io/trans?x=" <> lon <> "&y=" <> lat <>
"&s_srs=" <> from <> "&t_srs=" <> to]
epsgConverter[latlon]
(*{"-9401610.05", "4025002.66"}*)
What is the appropriate Wolfram Mathematica Function to provide this functionality? GeoPositionXYZ provides a different set of numbers. Tried all the datums with no avail.
GeoPositionXYZ[GeoPosition[latlon]][[1, 2 ;;]]
(*{-5.27024*10^6, 3.54385*10^6}*)
GeodesyData["Datum"]gives the possible formats{"BTS84", "BTS85", "BTS86", "BTS87", "ETRF00", "ETRF05", "ETRF14", "ETRF89", "ETRF90", "ETRF91", "ETRF92", "ETRF93", "ETRF94", "ETRF96", "ETRF97", "ETRS89", "EURM", "GDA94", "IGS2000", "ITRF0", "ITRF00", "ITRF05", "ITRF08", "ITRF14", "ITRF88", "ITRF89", "ITRF90", "ITRF91", "ITRF92", "ITRF93", "ITRF94", "ITRF96", "ITRF97", "NAD27", "NAD831986", "NAD83CORS93", "NAD83CORS94", "NAD83CORS96", "NAD83HARN", "OGB7", "PZ9002", "PZ90Original", "SIRGAS", "WGS72", "WGS84G730", "WGS84G873", "WGS84Original"}. – Roman Feb 11 '22 at 17:15Predicton lists of coordinates and correctly projected variants and saving thePredictorFunctionrather than painstakingly constructing the projection.) – Carl Lange Feb 11 '22 at 18:29GeoGridPosition[GeoPosition@latlon, {"Mercator", {"Centering" -> {0, 0}, "CentralScaleFactor" -> 1, "GridOrigin" -> {0, 0}, "ReferenceModel" -> "WGS84"}}]is very close – Carl Lange Feb 11 '22 at 18:47