Questions about the location coordinate units in spatial database files


Dear Pylith team,
I want to know how the units of location coordinates are defined. I noticed that sometimes it is in kilometers and sometimes in meters. I checked the instructions and did not find the relevant instructions.
Thanks in advance for your reply.

PyLith uses SI units (e.g., meters). As a convenience feature, you can set up a SimpleDB to use other units instead. This is done by adjusting the to-meters parameter. For example, in your spatial database you could have:

cs-data = cartesian {
  to-meters = 1000.0
  space-dim = 3
}

This would multiply all of your coordinate units by 1000.0, which would allow you to specify coordinates in km.

Cheers,
Charles

Dear Chales,
Thank you for your fast response.
If the unit wants to be set to meters, then do you still need a “to-meters = 1” statement?

Yes, I believe so. If you look at the examples, I believe they all have a statement like that.

Cheers,
Charles