0

I am trying to convert some data in x,y,z (ECEF) to Georgia state plane. First I convert x,y,z to lat,lon,alt and then try to convert it into Georgia state plane. When I look at the data, the numbers don't seem right (looking at converted data that I have from others).

from pyproj import Proj, transform, CRS, Transformer
import pyproj as pyproj


x = 685204; y = -4557333; z = 2766371;
ecef = pyproj.Proj(proj='geocent', ellps='WGS84', datum='WGS84')
lla  = pyproj.Proj(proj='latlong', ellps='WGS84', datum='WGS84')
lon, lat, alt = pyproj.transform(ecef, lla, x, y, z, radians=False)

inProj  = CRS.from_epsg(4326)
outProj = CRS.from_epsg(2239)

proj  = Transformer.from_crs(inProj, outProj)
x2,y2 = proj.transform(lon,lat,radians=False)
2
  • Maybe you really want EPSG:2240 NAD/83 Georgia West (ftUS)?
    – GBG
    Aug 2, 2022 at 17:58
  • 1
    "the numbers don't seem right". Can you elaborate a little on this, maybe show us some data and why you think it's not right?
    – Pointdump
    Aug 2, 2022 at 18:06

1 Answer 1

0

You seem to have several problems:

  1. Your lat/lon position is in the Carolinas not Georgia so that would be the wrong state plane
  2. you are passing lon,lat in and transform seems to expect lat,lon.
    x2,y2 = proj.transform(lon,lat,radians=False)
    print(lon,lat)
    -84.3859862 33.751748
    print(x2,y2)
    2508079.5486572017 -44604571.2905585
    x2,y2 = proj.transform(lat,lon, radians=False)
    print(x2,y2)
    -18455.16714831327 1371990.553063654

Which agrees with epsg.io's answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.