I'm running a simple python script to transform longlat Nad83 to Ky State Plane South Nad83 (epsg 4269 to 6474). When I set the input Projection to:
inProj = pyproj.Proj(proj='longlat', datum ='NAD83')
I get one answer (which appears to be correct). When I set the input projection :
inProj = pyproj.Proj('epsg:4269')
I get a different answer. I print out inProj both times and both appear to be the same.
Run 1:
import pyproj
import numpy as np
# nad 83 latt and longs
inProj = pyproj.Proj('epsg:4269')
# KY State Nad83 Meter (2011)
outProj = pyproj.Proj("epsg:6474") # KY State South Nad83 Meter (2011)
long = np.array([-83.88259259,-83.88259259,-83.55083333,-83.55083333])
latt = np.array([ 36.49333333, 36.79203704, 36.79203704, 36.49333333])
x,y = pyproj.transform(inProj, outProj ,long ,latt)
print('\ninProj = ',inProj,'\n\noutProj = ',outProj,'\n')
for i in range(len(long)):
print('long = ',long[i],'latt = ',latt[i],
'x = ',x[i],'y = ',y[i])
Output:
inProj = Proj('+proj=longlat +datum=NAD83 +no_defs', preserve_units=True)
outProj = Proj('+proj=lcc +lat_0=36.3333333333333 +lon_0=-85.75 +lat_1=37.9333333333333 +lat_2=36.7333333333333 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs', preserve_units=True)
long = -83.88259259 latt = 36.49333333 x = 72927331.14729036 y = -11599224.291812904
long = -83.88259259 latt = 36.79203704 x = 72992044.27873956 y = -11370127.68625123
long = -83.55083333 latt = 36.79203704 x = 70702668.24198839 y = -10727351.707669286
long = -83.55083333 latt = 36.49333333 x = 70639998.82021627 y = -10949213.198204307
Run2:
import pyproj
import numpy as np
# nad 83 latt and longs
inProj = pyproj.Proj(proj='longlat', datum ='NAD83')
# KY State Nad83 Meter (2011)
outProj = pyproj.Proj("epsg:6474") # KY State South Nad83 Meter (2011)
long = np.array([-83.88259259,-83.88259259,-83.55083333,-83.55083333])
latt = np.array([ 36.49333333, 36.79203704, 36.79203704, 36.49333333])
x,y = pyproj.transform(inProj, outProj ,long ,latt)
print('\ninProj = ',inProj,'\n\noutProj = ',outProj,'\n')
for i in range(len(long)):
print('long = ',long[i],'latt = ',latt[i],
'x = ',x[i],'y = ',y[i]
Output:
inProj = Proj('+proj=longlat +datum=NAD83 +no_defs', preserve_units=True)
outProj = Proj('+proj=lcc +lat_0=36.3333333333333 +lon_0=-85.75 +lat_1=37.9333333333333 +lat_2=36.7333333333333 +x_0=500000 +y_0=500000 +ellps=GRS80 +units=m +no_defs', preserve_units=True)
long = -83.88259259 latt = 36.49333333 x = 667315.2681430576 y = 519409.6151513982
long = -83.88259259 latt = 36.79203704 x = 666660.1039730347 y = 552551.2004212044
long = -83.55083333 latt = 36.79203704 x = 696263.6061808041 y = 553188.4213983886
long = -83.55083333 latt = 36.49333333 x = 697035.1458569702 y = 520049.34113333403
Pyproj appears to be treating the input parameters as the same but the results are much different.