"contained" is a much more precise word, yeah, sorry about that. Of course
individual *codes* don't "intersect" in the "partly overlapped, partly not"
sense, so just for clarity I want to explain that I was envisioning rooftop
traces, which in my case often a cluster of OLCs. This is meaningful to
mention because it would be neat for a function to also take an array of
OLCs and determine overlap (<- using my original sense of the word that
translates to "at least one OLC is the same or fully contained within
another").

Yes, what you propose is also quite useful! Even doing functions that
simply check for one code contained within another, which is trivial once
you understand OLC, is still useful in perpetuity because it makes code
more readable (in my opinion).

On Wed, Nov 8, 2017 at 11:28 PM, Doug Rinckes <drinc...@google.com> wrote:

> Adjacency is a good question - I don't have an answer for you.
>
> Codes don't overlap - but one code may be contained within another. The
> way to check is that the containing code will be a prefix of the contained
> code, because (for example) the area of 8FVC contains all codes that start
> with 8FVC.
>
> For a long time I've been thinking about a geometry library that does:
>
>    - For a polygon of lat/lngs, compute the codes that fill that polygon.
>    The codes should be normalised (i.e. it might return some 6 digit codes
>    with some 8 and 10 digit codes to fill the corners)
>       - This will make "is this code inside the polygon" easy
>    - For one code, return the 8 adjacent codes
>       - This will make "are these two codes adjacent"
>
> Are there any other functions that would be useful?
>
>
>
> Doug Rinckes, Technical Program Manager, Google Switzerland GmbH; 9GHJ+P88
>  Zürich <https://www.google.com/maps/search/9GHJ%2BP88%20Zürich>
>
> On Wed, Nov 8, 2017 at 10:29 PM, seklncknsekjn <dus...@srax.com> wrote:
>
>> Is there a built-in way to determine if two codes are exactly adjacent?
>>
>> Similarly, is there an easy way to determine if two codes overlap?
>>
>> Hopefully any solutions exist for dissimilar length codes... that'd be
>> super cool!
>>
>> --
>> 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
>> "open-location-code" 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 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/ms
>> gid/open-location-code/8fc6cc55-fcb6-475c-b242-5ee241a7808b%
>> 40googlegroups.com
>> <https://groups.google.com/d/msgid/open-location-code/8fc6cc55-fcb6-475c-b242-5ee241a7808b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>


-- 
[image: srax_105x50px_nb.png] <http://www.srax.com>
*(Nasdaq: SRAX)*
*Dustin Suchter*  CTO, SRAX
srax.com <http://www.srax.com>
+1 (415) 504-3556

-- 
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 
"open-location-code" 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/CAPtomYuwaXC0xJXneDUUY-a1CJoPqXzkNqPh5yCWWib9bz_Rrw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to