Thursday, 14 September 2017

gdal - How can I convert points in EPSG:2956 to EPSG:4326 with pyproj?


I have some points in EPSG:4326


-110.28879750 64.46310187 405.49938863
-110.28879359 64.46310086 405.45967110

-110.28880175 64.46310446 405.93823604
-110.28880245 64.46310258 405.48060850
-110.28880636 64.46310359 405.52032604
-110.28880940 64.46310630 405.84055342
-110.29016983 64.46359000 397.06282465
-110.29016273 64.46359705 397.17277374
-110.29016977 64.46359475 397.00624992
-110.29016760 64.46359646 397.05006178

and corresponding points in EPSG:2956



534209.97079435 7148811.23661946 405.66139508
534210.15978267 7148811.12655780 405.62167763
534209.76281723 7148811.52287611 406.10024237
534209.73147933 7148811.31341930 405.64261487
534209.54249101 7148811.42348096 405.68233234
534209.39265980 7148811.72409217 406.00255961
534143.35502320 7148864.89322788 397.22480162
534143.68792246 7148865.68172274 397.33475061
534143.35204638 7148865.42154142 397.16822677
534143.45456271 7148865.61384061 397.21203861


but if I convert an EPSG:4326 to a EPSG:2956 poing using pyproj I get a different result?


import pyproj

p1 = pyproj.Proj("+init=EPSG:4326")
p2 = pyproj.Proj("+init=EPSG:2956")

# first points
epsg4326_point = (-110.28879750,64.46310187,405.49938863)
epsg2956_point = (534209.97079435,7148811.23661946,405.66139508)


print "Source point", epsg4326_point
print "Target point", epsg2956_point
print 'Manually converted result (different): ', pyproj.transform(p1, p2, *epsg4326_point)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...