[CIG-SHORT] question about coordinate transform
tu xiang
tuxiang2016 at outlook.com
Mon Aug 14 19:59:45 PDT 2017
Hello, everyone
Does the geographical coordinates (+lat_0=45.5231 +lon_0=-122.6765 +k=0.9996) correspond to the origin of Cartesian coordinates for mesh in the 3D subduction example?
I want to try to transform some geographical coordinates, then, I write next code:
#!/usr/bin/env nemesis
import coordsys
import numpy as np
point=np.array([[45.5231,-122.6765,0.9996],[46.0,-122.0,1.0],[45.0,-122.0,0.5]])
print point
print type(point)
coordsys.geoToMesh(point)
But it output errors!
Traceback (most recent call last):
File "demo.py", line 9, in <module>
coordsys.geoToMesh(point)
File "/home/bxu/covert/coordsys.py", line 54, in geoToMesh
convert(xyz, cs_mesh(), cs_geo3D())
File "/home/bxu/pylith/pylith-2.2.1rc1-linux-x86_64/lib/python2.7/site-packages/spatialdata/geocoords/Converter.py", line 33, in convert
geocoords.Converter.convert(coords, csDest, csSrc)
RuntimeError: Error while projecting location.
latitude or longitude exceeded limits
projection: tmerc
units: m
proj options: +lat_0=45.5231 +lon_0=-122.6765 +k=0.9996
lon: 0.794528
lat: -2.14111
It said the latitude or longitude exceeded limits, I do not know what does it mean?
Looking forward to your reply.
Best regards,
Tu Xiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20170815/3bf43fb2/attachment.html>
More information about the CIG-SHORT
mailing list