# Gmt info extended region is not correctly reported with -C

**URL:** <https://forum.generic-mapping-tools.org/t/gmt-info-extended-region-is-not-correctly-reported-with-c/4744>\
**Category:** Q&A\
**Created:** [March 22, 2024, 1:39pm UTC](https://forum.generic-mapping-tools.org/t/gmt-info-extended-region-is-not-correctly-reported-with-c/4744 "2024-03-22T13:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaltekruse](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jaltekruse/32/1607_2.png) [@jaltekruse](https://forum.generic-mapping-tools.org/u/jaltekruse)\
**Post date:** [March 22, 2024, 1:39pm UTC](https://forum.generic-mapping-tools.org/t/gmt-info-extended-region-is-not-correctly-reported-with-c/4744/1 "2024-03-22T13:39:04Z")

</div>

`gmt info data.txt -I0.5+R1 -C` does not output the extended region as expected, as if the `-C` flag grabs the extent before it is extended. I created a new issue on GitHub: [#8412](https://github.com/GenericMappingTools/gmt/issues/8412)

Expanding the test case from PR [#7460](https://github.com/GenericMappingTools/gmt/pull/7460):

```shell
cat << EOF > data.txt
-125	37.6
-111.1	49.2
-121.49	42.5
EOF
# 0. Exact extent
gmt info data.txt -Ie > result.txt
gmt info data.txt -Ie -C >> result.txt
# 1. Round to nearest 0.5
gmt info data.txt -I0.5 >> result.txt
gmt info data.txt -I0.5 -C >> result.txt
# 2. Extend outward by 1, then round to nearest 0.5
gmt info data.txt -I0.5+R1 >> result.txt
gmt info data.txt -I0.5+R1 -C >> result.txt
# 3. Round to nearest 0.5, then round to nearest 1
gmt info data.txt -I0.5+r1 >> result.txt
gmt info data.txt -I0.5+r1 -C >> result.txt
# 4. Round to nearest 0.5, then extend by 1
gmt info data.txt -I0.5+e1 >> result.txt
gmt info data.txt -I0.5+e1 -C >> result.txt

```

On macOS 13.6.5 with GMT v. 6.5.0 I get the following `result.txt`:

```plaintext
-R-125/-111.1/37.6/49.2
-125	-111.1	37.6	49.2 # <-- match
-R-125/-111/37.5/49.5
-125	-111	37.5	49.5 # <-- match
-R-126/-110/36.5/50.5
-125	-111	37.5	49.5 # <-- mismatch: -I0.5+R1 -C
-R-125/-111/37/50
-125	-111	37.5	49.5 # <-- mismatch: -I0.5+r1 -C
-R-126/-110/37/50
-125	-111	37.5	49.5 # <-- mismatch: -I0.5+e1 -C

```

Thank you

---

<div class="post-metadata">

**Author:** ![jaltekruse](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/jaltekruse/32/1607_2.png) [@jaltekruse](https://forum.generic-mapping-tools.org/u/jaltekruse)\
**Post date:** [March 26, 2024, 2:02pm UTC](https://forum.generic-mapping-tools.org/t/gmt-info-extended-region-is-not-correctly-reported-with-c/4744/2 "2024-03-26T14:02:18Z")

</div>

Fixed by @Joaquim in PR [Option -C was not respecting the rounding set in -I by joa-quim · Pull Request #8416 · GenericMappingTools/gmt · GitHub](https://github.com/GenericMappingTools/gmt/pull/8416)  
Thank you!
