[CIG-SHORT] 答复: question about coordinate transform

tu xiang tuxiang2016 at outlook.com
Thu Aug 17 16:25:44 PDT 2017


tu xiang 已与你共享 OneDrive 文件。若要查看,请单击下面的链接。


<https://1drv.ms/u/s!Autbw8xEBBUzhDlqJxg4NPuNCjtf>
[https://r1.res.office365.com/owa/prem/images/dc-generic_20.png]<https://1drv.ms/u/s!Autbw8xEBBUzhDlqJxg4NPuNCjtf>

3d.rar<https://1drv.ms/u/s!Autbw8xEBBUzhDlqJxg4NPuNCjtf>




Thank you for your help about coordinate transform.

But I have another two questions.

question 1

Yes, I am importing the coordsys.py from the example, the question is z-coordinates are greater than zero. I want to bury the fault into the mesh,  but z-coordinates of the mesh are smaller than zero. What do I need to do?


change the cs.inventory.datumVert = "mean sea level" or the cs.inventory.projector.inventory.projOptions = "+lat_0=45.5231 +lon_0=-122.6765 +k=0.9996"

and how to change?

question2
I have construct a very simple 3D demo mesh, and I want to do dynamic simulation with pylith 1.9.0 version, then I set all the configure file. but it output errors. I attach the demo. Hope someone would like to help me check the demo.

output errors
Traceback (most recent call last):
  File "/home/xzhou/pylith-1.9.0-linux-x86_64/bin/pylith", line 39, in <module>
    start(applicationClass=PyLithApp)
  File "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/__init__.py", line 41, in start
    shell.run(**kwds)
  File "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/applications/Shell.py", line 125, in run
    app.applyConfiguration(context)
  File "/home/xzhou/pylith-1.9.0-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.14-py2.7.egg/pyre/inventory/Configurable.py", line 84, in applyConfiguration
    raise ValueError("%s\nBacktrace - Component %s" % (err.message, aliases))
ValueError: Error while configuring spatial database reader (simpleioascii, iohandler):
Filename for spatial database not specified.
Backtrace - Component simpleioascii, iohandler
Backtrace - Component simpledb, slip
Backtrace - Component stepslipfn, slip_function
Backtrace - Component eqkinsrc, rupture
Backtrace - Component singlerupture, eq_srcs
Backtrace - Component faultcohesivekin, demo_fault
Backtrace - Component interfaces
Backtrace - Component timedependent, problem
Backtrace - Component pylithapp










________________________________
发件人: tu xiang
发送时间: 2017年8月15日 10:59:45
收件人: cig-short at geodynamics.org
主题: question about coordinate transform


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/20170817/25a5c8aa/attachment.html>


More information about the CIG-SHORT mailing list