# Gmt spatial -Q\[unit\]

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-spatial-q-unit/2420>\
**Category:** Q&A\
**Created:** [December 7, 2021, 12:44pm UTC](https://forum.generic-mapping-tools.org/t/gmt-spatial-q-unit/2420 "2021-12-07T12:44:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmerry](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@tmerry](https://forum.generic-mapping-tools.org/u/tmerry)\
**Post date:** [December 7, 2021, 12:44pm UTC](https://forum.generic-mapping-tools.org/t/gmt-spatial-q-unit/2420/1 "2021-12-07T12:44:59Z")

</div>

Hi,

I’ve noticed that when I use `gmt spatial -Q[unit]`, it seems to give me the area in km^2 (I think?) no matter what unit I choose. I’m wondering what the expected behaviour is supposed to be? If I use `gmt spatial -Qd`, I’m not sure I should expect an answer in degrees squared, should I?

```auto
cat << EOF > poly.tmp
0 0
0 1
1 1
1 0
0 0
EOF

gmt spatial poly.tmp -Q
gmt spatial poly.tmp -Qk
gmt spatial poly.tmp -Qe
gmt spatial poly.tmp -Qd

```

Gives the results

```auto
0.5	0.5	1
0.5	0.50000702007	12281.2810988
0.5	0.50000702007	12281.2810988
0.5	0.50000702007	12281.2810988

```

I’m using gmt v6.2.0.

Is this expected?

---

<div class="post-metadata">

**Author:** ![Esteban82](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/esteban82/32/54_2.png) [@Esteban82](https://forum.generic-mapping-tools.org/u/Esteban82)\
**Post date:** [December 7, 2021, 1:34pm UTC](https://forum.generic-mapping-tools.org/t/gmt-spatial-q-unit/2420/2 "2021-12-07T13:34:23Z")

</div>

Hi tmerry. Yes, you are right. It is a [bug](https://github.com/GenericMappingTools/gmt/pull/6060) and it was fixed 10 days ago. You should use the dev version (GMT 6.4)

---

<div class="post-metadata">

**Author:** ![tmerry](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@tmerry](https://forum.generic-mapping-tools.org/u/tmerry)\
**Post date:** [December 7, 2021, 1:48pm UTC](https://forum.generic-mapping-tools.org/t/gmt-spatial-q-unit/2420/3 "2021-12-07T13:48:45Z")

</div>

Ah okay, thanks! I didn’t think to check pull requests!
