Hi,

sorry for the delay. Many thanks for the hints and instructions, they 
helped me a lot.

Am Mittwoch, 27. März 2019 13:42:48 UTC+1 schrieb sid...@gmail.com:
>
> Thank you, Andreas. Pointers were really helpful. 
>
> I need a quicker & easier, even if bit approximate, way of scanning 
> through several thousands of points than a more accurate comparison. 
>
> OLC gives that with the prefix comparison. Taking the approach Andreas 
> outlined seems to be a fairly easy way of handling my use-case.
>
> Thanks guys!
> Sidd
>
> PS: Stephan - hope your query got resolved too :-)
>
>
> On Wednesday, 27 March 2019 00:49:57 UTC+5:30, Andreas B wrote:
>>
>> Yes, that is an important concession to make - sometimes, it is easier to 
>> deal with the underlying coordinates directly than it would be to handle 
>> OLCs or any other representation. :)
>> The process I outlined above can still be useful to trim a dataset by an 
>> order of magnitude or two, before a more exact calculation is performed on 
>> the remaining candidates.
>>
>> On Tuesday, March 26, 2019 at 8:02:26 PM UTC+1, Rasťo Šrámek wrote:
>>>
>>> I'd simply decode the plus codes into lat/longs and then calculate the 
>>> distance between the center point and all points, sort by that distance, 
>>> and cut off. As Andreas points out, you need to worry about latitude: the 
>>> distance from (a, b) to (c, d) is roughly sqrt((|a-c|*111.12)^2 + 
>>> (|b-d|*cos((a-c)/2)*111.12)^2) if you (a,b) and (c,d) are close enough. If 
>>> not, you can use a library such as S2 <http://s2geometry.io/> to do the 
>>> calculations on a sphere/geoid.
>>>
>>  
>>
>

-- 
Public site: http://www.openlocationcode.com/
Github project: https://github.com/google/open-location-code
Demo site: http://plus.codes/
--- 
You received this message because you are subscribed to the Google Groups "Plus 
Codes Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to open-location-code+unsubscr...@googlegroups.com.
To post to this group, send an email to open-location-code@googlegroups.com.
Visit this group at https://groups.google.com/group/open-location-code.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/open-location-code/db7ae612-e7a6-4e4b-b2b2-01601235e304%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to