# Questions about the location coordinate units in spatial database files

**URL:** <https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912>\
**Category:** PyLith\
**Created:** [July 19, 2021, 3:48am UTC](https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912 "2021-07-19T03:48:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luxiaokong](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@luxiaokong](https://community.geodynamics.org/u/luxiaokong)\
**Post date:** [July 19, 2021, 3:48am UTC](https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912/1 "2021-07-19T03:48:48Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/eee46b7a3844e5d88707c49b307a87c7e308a7a1.png)  
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.

---

<div class="post-metadata">

**Author:** ![willic3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/willic3/32/598_2.png) [@willic3](https://community.geodynamics.org/u/willic3)\
**Post date:** [July 19, 2021, 4:16am UTC](https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912/2 "2021-07-19T04:16:57Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![luxiaokong](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@luxiaokong](https://community.geodynamics.org/u/luxiaokong)\
**Post date:** [July 19, 2021, 7:50am UTC](https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912/4 "2021-07-19T07:50:14Z")

</div>

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？

---

<div class="post-metadata">

**Author:** ![willic3](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/willic3/32/598_2.png) [@willic3](https://community.geodynamics.org/u/willic3)\
**Post date:** [July 19, 2021, 8:08am UTC](https://community.geodynamics.org/t/questions-about-the-location-coordinate-units-in-spatial-database-files/1912/5 "2021-07-19T08:08:18Z")

</div>

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

Cheers,  
Charles
