1

I am trying to get the correct meridian_convergence for my given point in EPSG:4326

When I try to run the following code I am getting -0.0 were expecting I 0.6 degrees.

import pyproj


lat, long = 30.2675, -97.74278  # expected Grid North 0.6°
# lat, long = 48.1, -92.61      # expected Grid North 0.3°
# lat, long = 42.0352,-168.2065 # expected Grid North 1.9°

crs_nztm= pyproj.CRS("epsg:4326")
p = pyproj.Proj(crs_nztm)
declination = p.get_factors(long, lat, False, True).meridian_convergence

print(declination)
    

For all 3 examples, I am getting -0.0. I have little experience with pyproj and I wonder if my EPSG set is correct or if maybe it is something to do with pyproj rounding. Did anyone encounter this problem?

1 Answer 1

2

Ok, is actually really simple. I think I can't project from WGS to WGS. I need to pass UTM coordinate system to allow pyproj to do a correct projection for lat long.

eg.

import pyproj


lat, long = 30.2675, -97.74278  # expected Grid North 0.6°
# lat, long = 48.1, -92.61      # expected Grid North 0.3°
# lat, long = 42.0352,-168.2065 # expected Grid North 1.9°

# ESPG: 32614 - the first point intersects with UTM 14R
crs_nztm= pyproj.CRS("epsg:32614")
p = pyproj.Proj(crs_nztm)
declination = p.get_factors(long, lat, False, True).meridian_convergence

print(declination)

This will return the correct degrees of 0.633763421024677

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.