--
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-c...@googlegroups.com.
To post to this group, send email to open-loca...@googlegroups.com.
Visit this group at http://groups.google.com/group/open-location-code.
To view this discussion on the web, visit https://groups.google.com/d/msgid/open-location-code/3881b1e3-db5e-48a9-a4da-c98df507ae36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This isn't something that I've done yet, but I'll describe the broad approach that I've been thinking about.Let's say you have a database of codes, and a point, and you want everything from your database that is "close" to that point.Basically, you're going to compute a list of OLC prefixes, and then select all the entries in your database that start with the prefix.You can do it crudely - just pick a couple of areas that look promising (for example this area and this area, 8FVC9GCV+ and 8FVC9G9V+) and then take all codes that start with either of those codes. For example, if I want everything within about 100km of Zurich, and I'm not too fussy, I can just use 8FVC as a prefix and get all my entries that start with that.If you care about the accuracy, you could draw a shape around the point of interest, and then compute a list of all the OLC codes that fit within the shape. Once you have the list of codes, you match the entries in your database in the same way.This is possible because the code 8FVC9GCV+2J falls within 8FVC9GCV+, which falls within 8FVC9G, which falls within 8FVC, which falls within 8F.This is appealing to me, because it means that instead of a complicated calculation for every entry in the db, I have to do some moderately complicated computations up front, and then it's just a string matching routine for the db selection.If someone wants to do a library to compute coverings, it's probably worth looking at the S2 library (also on github) for a similar kind of thing.
Doug RinckesTechnical Program ManagerGoogle Switzerland
On Sat, May 9, 2015 at 11:15 AM, <wilson.da...@gmail.com> wrote:
Hi,I'm particularly interested in this benefit of your new codes format"Codes that are similar are located closer together than codes that are different"I have a database of existing locations for which i have lats and longs. what would be the best way to search for results in my databased on sub-codes ?
--
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+unsub...@googlegroups.com.
--
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-c...@googlegroups.com.
To post to this group, send email to open-loca...@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/f783fbe0-e460-43a4-9d17-98418aa64ba2%40googlegroups.com.