# The decimal degree latitude value you provided was out of range

**URL:** <https://community.thinkgeo.com/t/the-decimal-degree-latitude-value-you-provided-was-out-of-range/9163>\
**Category:** Android\
**Created:** [June 15, 2018, 4:17pm UTC](https://community.thinkgeo.com/t/the-decimal-degree-latitude-value-you-provided-was-out-of-range/9163 "2018-06-15T16:17:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![judicael\_ribault](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/bb73d2/32.png) [@judicael\_ribault](https://community.thinkgeo.com/u/judicael_ribault)\
**Post date:** [June 15, 2018, 4:17pm UTC](https://community.thinkgeo.com/t/the-decimal-degree-latitude-value-you-provided-was-out-of-range/9163/1 "2018-06-15T16:17:44Z")

</div>

Hi,

I have a problem computing a big distance such as the one bellow. What did I do wrong ?

Thanks, Judicael.

BaseShape point1 = new PointShape(44.8, -0.6);  
BaseShape point2 = new PointShape(23.3, 120.3);  
var distance = point1.GetDistanceTo(point2, GeographyUnit.DecimalDegree, DistanceUnit.Meter);

System.ArgumentOutOfRangeException: The decimal degree latitude value you provided was out of range.  
Parameter name: toPoint.Y

---

<div class="post-metadata">

**Author:** ![judicael\_ribault](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/bb73d2/32.png) [@judicael\_ribault](https://community.thinkgeo.com/u/judicael_ribault)\
**Post date:** [June 16, 2018, 7:23am UTC](https://community.thinkgeo.com/t/the-decimal-degree-latitude-value-you-provided-was-out-of-range/9163/2 "2018-06-16T07:23:58Z")

</div>

Found my error, I just invert lat and lon. The error message was clear enough ! Hope it might help someone someday 😉

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [June 19, 2018, 5:07am UTC](https://community.thinkgeo.com/t/the-decimal-degree-latitude-value-you-provided-was-out-of-range/9163/3 "2018-06-19T05:07:51Z")

</div>

Hi judicael\_ribault,

Thanks for your share, that should be helpful if someone else find your topic if they met same problem.

Regards,

Ethan
