Geographic Information Systems Asked by OMRY VOLK on April 9, 2021
I’m using pyproj to do some conversions:
import pyproj
myprojection=pyproj.Proj('+proj=gnom +lat_0=1 +lon_0=1 +R=1.')
print myprojection(30,30)
Out:
(0.5480783303637778, 0.6353400942474053)
Now I know it’s possible to give myprojection
values in radians with:
myprojection(0.52359877559829882,0.52359877559829882,radians=True)
Is it possible to do the same when declaring the projection with pyproj.Proj
i.e. can I specify the lat_0
and lon_0
in radians?
I could not find good documentation on how to write those projection declaration strings.
You can do the conversion from radians to degrees in python. If you combine that with the keyword argument abilities in Proj, then you can do it like so:
import math
import pyproj
myprojection = pyproj.Proj(
proj="gnom",
lat_0=math.degrees(0.017453292519943295),
lon_0=math.degrees(0.017453292519943295),
R=1.,
)
Answered by snowman2 on April 9, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP