<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — GeoPoint.Distance : result is not in meters ?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2392&amp;type=atom" />
	<updated>2025-10-20T07:36:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2392</id>
		<entry>
			<title type="html"><![CDATA[Re: GeoPoint.Distance : result is not in meters ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9904#p9904" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Thanks a lot, indeed for my tests that was wrong and that confused for the rest. Now I get it.</p><p>But I&#039;ll say this though, the distance is indeed not in meters, but in kilometers. Since with the correct order, I do not get ~161.0151 but ~0.1610151.</p><p>Thanks for your help though, have a great day.</p>]]></content>
			<author>
				<name><![CDATA[matteo_enki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=23288</uri>
			</author>
			<updated>2025-10-20T07:36:59Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9904#p9904</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: GeoPoint.Distance : result is not in meters ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9902#p9902" />
			<content type="html"><![CDATA[<p>Hello.</p><p>The problem is in the order of the values in your coordinates.<br />They are in the Indian Ocean instead of France.</p><p>In Online Maps API, longitude comes first, then latitude.<br /><a href="https://infinity-code.com/documentation/online-maps-v4.html#api---basic">https://infinity-code.com/documentation … pi---basic</a><br />Reverse the order of values and you get ~164 meters.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2025-10-17T09:42:09Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9902#p9902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[GeoPoint.Distance : result is not in meters ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9901#p9901" />
			<content type="html"><![CDATA[<p>Hello,</p><p>I&#039;m trying to do something where if the distance is lower than some threshold, I do stuff. I&#039;m trying to use GeoPoint.Distance(), but it seems that the results are not in meters, contrary to what the documentation says ?</p><p>Here&#039;s a little test I did. Google Maps calculates ~161 meters, but the result I get is 0.2453885.<br />Here&#039;s the code :<br /></p><div class="codebox"><pre><code>GeoPoint p1 = new GeoPoint(48.114779, -1.670222);
GeoPoint p2 = new GeoPoint(48.114819, -1.668018);
Debug.Log($&quot;Expected ~161 meters. Got {GeoPoint.Distance(p1, p2)}&quot;);</code></pre></div><p>Maybe there&#039;s something I&#039;m missing ?</p><p>Thanks in advance for your help !</p>]]></content>
			<author>
				<name><![CDATA[matteo_enki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=23288</uri>
			</author>
			<updated>2025-10-17T09:24:39Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9901#p9901</id>
		</entry>
</feed>
