I have to apologize for the naive question -- it's my first encounter with projections and this software package, and I intend to use it for a non-geographical application (hence I work on a unit sphere) -
when using the transverse mercator transformation, I find that it is not defined for latitude values between pi/2 and 3*pi/2, as well as -pi/2 and -3*pi/2 and thus discontinuous - why should that be, and how do I make this compatible with "my definition" of spherical coordinates, as (r,theta,phi) with -pi<=theta<=pi and -pi/2<=phi<=pi/2? It's easy to see that for phi I can just substract pi/2 (thus set the equator to 0), but what about theta?
Thanks a lot, Ben
import matplotlib.pyplot as plt import numpy as np from pyproj import Proj pi=np.pi tmerc = Proj("+proj=tmerc +a=1") def f(a,b): return tmerc(a,b,radians=True,errcheck=True) nice = naughty= for i in np.arange(-2*pi,2*pi,.2): for j in np.arange(-2*pi,2*pi,.2): try: a,b=f(i,j) ; nice.append((i,j)) except: naughty.append((i,j)) plt.plot(np.array(nice )[:,0],np.array(nice )[:,1],color='green',marker='o',markeredgewidth=0.,linestyle='None') plt.plot(np.array(naughty)[:,0],np.array(naughty)[:,1],color='red' ,marker='o',markeredgewidth=0.,linestyle='None')