Re: [open-location-code] Best way to determine adjacency and overlap?

2018-01-24 Thread 'Doug Rinckes' via open-location-code
The height and width *in degrees* of a code depends only on the number of digits, and it's constant. A 10 digit code (like 8FW4V75V+8Q) is exactly 1/8000th of a degree high and 1/8000th of a degree wide. If you want to get say the neighbour to the east, then you get the center latitude and longitu

Re: [open-location-code] Best way to determine adjacency and overlap?

2018-01-23 Thread Andreas B
Hi Tony, a simple way to achieve something like this would be to use prefixes and neighbors. For example, if the "exact" plus code of a location is *8FW4V75V+8Q*, then *8FW4V75V+* *8FW4V700+* *8FW4+* *8F00+* are near-rectangular surface area "tiles" that contain this location. This simp

Re: [open-location-code] Best way to determine adjacency and overlap?

2018-01-23 Thread Tony B
Hi all Additional functionality that would be very useful in my view is the creation of a buffer zone around a code or a collection of codes, according to an inputted distance. This could be used for geofencing, for example. Tony On Friday, 17 November 2017 12:41:13 UTC+2, Andreas B wrote: > >

Re: [open-location-code] Best way to determine adjacency and overlap?

2018-01-09 Thread Наташа Савенкова
среда, 15 ноября 2017 г., 15:53:03 UTC+3 пользователь Andreas B написал: > Doug, > > > those are exactly the functions I'm already using: > > > getNeighbors(olc) - returns 8 codes of the same length as the input for > "tiles" that are adjacent to it > isNeighbor(olcA, olcB) - returns true iff

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-17 Thread Andreas B
A link from the wiki would be great, thanks for that! -- 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" gr

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-17 Thread 'Doug Rinckes' via open-location-code
That's fine - I think a separate library makes sense, and I really like the functions you've implemented. I'll add a wiki page and add a pointer to your project if that's ok? Doug Rinckes, Technical Program Manager, Google Switzerland GmbH; 9GHJ+P88 Z ürich

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-15 Thread Andreas B
Hi Doug, I just did - although currently just for the mentioned functions, not yet the "Area" implementation (which is still somewhat messy and all over the place). I would add that to the same repository when done. I wasn't completely sure how to best integrate this additional functionality wi

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-15 Thread 'Doug Rinckes' via open-location-code
Wow - that's really cool Andreas, I can imagine those functions would be useful to other people too. Can you / have you open sourced them? I'm happy to provide a link from the OLC github project. Doug Rinckes, Technical Program Manager, Google Switzerland GmbH; 9GHJ+P88 Z ürich

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-15 Thread Andreas B
Doug, those are exactly the functions I'm already using: *getNeighbors(olc)* - returns 8 codes of the same length as the input for "tiles" that are adjacent to it *isNeighbor(olcA, olcB)* - returns true iff the "tiles" of olcA and olcB share a "side", independent of their code length *contains(

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-10 Thread Dustin Suchter
"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

Re: [open-location-code] Best way to determine adjacency and overlap?

2017-11-08 Thread 'Doug Rinckes' via open-location-code
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. F