{"id":2319,"date":"2013-10-11T22:08:10","date_gmt":"2013-10-11T13:08:10","guid":{"rendered":"https:\/\/regex.info\/blog\/2013-10-11\/2319"},"modified":"2013-10-11T22:08:10","modified_gmt":"2013-10-11T13:08:10","slug":"the-joy-of-a-fast-photo-proximity-search-in-lightroom","status":"publish","type":"post","link":"https:\/\/regex.info\/blog\/2013-10-11\/2319","title":{"rendered":"The Joy of a Fast Photo Proximity Search in Lightroom"},"content":{"rendered":"\n\n<div class='ic'><a name=\"040208\" href='\/i\/JF4_040208.jpg'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF4_040208_sm.jpg\" width=\"689\" height=\"381\"\nalt=\"Boring Sunset Over Kyoto the Shogunzuka overlook (\u5c06\u8ecd\u585a) &amp;mdash; Today &amp;mdash; -- Shogunzuka Overlook (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2013 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 3.0 Unported License http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\nid=\"i040208\"\ntitle=\"Boring Sunset Over Kyoto the Shogunzuka overlook (\u5c06\u8ecd\u585a) &amp;mdash; Today &amp;mdash; -- Shogunzuka Overlook (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2013 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 3.0 Unported License http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D4 + Nikkor 24-70mm f\/2.8 @ 31mm &mdash; <sup>1<\/sup><big>\/<\/big>60 sec, <span class='f'>f<\/span>\/3.5, ISO 6400 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF4_040208.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF4_040208.jpg'>nearby photos<\/a><\/span>\n<br\/><span class='caption'>Boring Sunset Over Kyoto<\/span>\n<br\/>the Shogunzuka overlook (\u5c06\u8ecd\u585a)\n<br\/>&mdash; Today &mdash;\n<\/div>\n\n<p>I popped up to Kyoto's Shogunzuka Overlook <span class='nobr'>(\u5c06\u8ecd\u585a)<\/span> today for the first time\n<a href='\/blog\/2013-04-02\/2239'>since March<\/a>, hoping\nfor <span class='nobr'>a nice<\/span> sunset.<\/p>\n\n<p>As you can see above, I didn't get it.<\/p>\n\n<p>However, due to <a href='\/blog\/proximity\/'>my blog's\nproximity search<\/a> feature, we can follow the <span class='QO'>&#8220;<\/span><a\nhref='\/blog\/proximity\/i\/JF4_040208.jpg'>nearby photos<\/a><span class='QC'>&#8221;<\/span>\nlink under the photo to see other shots from Shogunzuka that I've posted over the years, including:<\/p>\n\n<div class='ic'><a name=\"116909\" href='\/blog\/2012-06-21\/2029#116909'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF7_116909_sm.jpg\" width=\"690\" height=\"431\"\nalt=\"June 2012 -- Shogunzuka (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2012 Jeffrey Friedl, https:\/\/regex.info\/blog\/\"\nid=\"i116909\"\ntitle=\"a dynamic sunset over Kyoto, Japan, as seen from the Shogunzuka overlook (\u5c06\u8ecd\u585a\u304b\u3089\u306e\u4eac\u90fd\u306e\u5915\u713c\u3051)\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D700 + Nikkor 70-200mm f\/2.8 @ 70mm &mdash; <sup>1<\/sup><big>\/<\/big>320 sec, <span class='f'>f<\/span>\/6.3, ISO 5000 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF7_116909.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF7_116909.jpg'>nearby photos<\/a><\/span>\n<br\/>June 2012\n<\/div>\n\n<div class='ic'><a name=\"101729\" href='\/blog\/2011-11-15\/1884#101729'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF7_101729_sm.jpg\" width=\"690\" height=\"431\"\nalt=\"November 2011 -- Shogunzuka (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2011 Jeffrey Friedl, https:\/\/regex.info\/blog\/\"\nid=\"i101729\"\ntitle=\"November 2011 -- Shogunzuka (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2011 Jeffrey Friedl, https:\/\/regex.info\/blog\/\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D700 + Voigtl\u00e4nder 125mm f\/2.5 &mdash; <sup>1<\/sup><big>\/<\/big>320 sec, <span class='f'>f<\/span>\/11, ISO 320 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF7_101729.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF7_101729.jpg'>nearby photos<\/a><\/span>\n<br\/>November 2011\n<\/div>\n\n<div class='ic'><a name='033821' href=\"\/blog\/2007-07-16\/522#033821\"\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JEF_033821_sm.jpg\" width=\"690\" height=\"462\"\nalt=\"July 2007 -- Kyoto, Japan -- Copyright 2007 Jeffrey Eric Francis Friedl, https:\/\/regex.info\/blog\/\"\nid=\"i033821\"\ntitle=\"Sunlight streaming through the clouds onto Kyoto Japan, as seen from Shougun-zuka (\u5c06\u8ecd\u585a)\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D200 + Nikkor 70-200mm f\/2.8 @ 70mm &mdash; <sup>1<\/sup><big>\/<\/big>1500 sec, f\/3.2, ISO 640 &mdash;\n<a  href=\"\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJEF_033821.jpg\">map &amp; image data<\/a> &mdash; <a href=\"\/blog\/proximity\/i\/JEF_033821.jpg\">nearby photos<\/a><\/span>\n<br\/>July 2007\n<\/div>\n\n\n\n<div class='ic tight'><a name=\"101628\" href='\/blog\/2011-11-17\/1885#101628'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF7_101628_sm.jpg\" width=\"690\" height=\"459\"\nalt=\"November 2011 -- Shogunzuka (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2011 Jeffrey Friedl, https:\/\/regex.info\/blog\/\"\ntitle=\"November 2011 -- Shogunzuka (\u5c06\u8ecd\u585a) -- Kyoto, Japan -- Copyright 2011 Jeffrey Friedl, https:\/\/regex.info\/blog\/\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D700 + Voigtl\u00e4nder 125mm f\/2.5 &mdash; <sup>1<\/sup><big>\/<\/big>8000 sec, <span class='f'>f<\/span>\/2.5, ISO 200 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF7_101628.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF7_101628.jpg'>nearby photos<\/a><\/span>\n<br\/>November 2011\n<\/div>\n\n\n\n<div class='ic'><a name=\"004911\" href='\/blog\/2013-02-08\/2202#004911'\n><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/JF7_004911_sm.jpg\" width=\"690\" height=\"401\"\nalt=\"November 2008 -- Shogunzuka (\u5c06\u8ecd\u5bb6) -- Copyright 2008 Jeffrey Friedl, https:\/\/regex.info\/blog\/ -- This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 3.0 Unported License http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\nid=\"i004911\"\ntitle=\"Soothing Sunset from the same outing as the photo that leads this post  --  Shogunzuka (\u5c06\u8ecd\u5bb6)  --  Kyoto, Japan  --  Copyright 2008 Jeffrey Friedl, https:\/\/regex.info\/blog\/  --  This photo is licensed to the public under the Creative Commons Attribution-NonCommercial 3.0 Unported License http:\/\/creativecommons.org\/licenses\/by-nc\/3.0\/ (non-commercial use is freely allowed if proper attribution is given, including a link back to this page on http:\/\/regex.info\/ when used online)\"\/><\/a>\n<br\/><span class=\"camera-info robots-nocontent\">Nikon D700 + Nikkor 24-70 mm f\/2.8 @ 70mm &mdash; <sup>1<\/sup><big>\/<\/big>200 sec, <span class='f'>f<\/span>\/2.8, ISO 3200 &mdash;\n<a href='\/imageinfo.cgi?url=http%3A%2F%2Fregex.info%2Fi%2FJF7_004911.jpg'>map &amp; image data<\/a> &mdash; <a href='\/blog\/proximity\/i\/JF7_004911.jpg'>nearby photos<\/a><\/span>\n<br\/>November 2008\n<\/div>\n\n<p>I added the proximity-search feature to my blog <a\nhref='\/blog\/2009-11-01\/1346'>several years ago<\/a>, and <span class='nobr'>I\nuse<\/span> it often in various ways because proximity search can be extremely\nuseful, but my blog proximity search is obviously limited to photos I've\nactually published on my blog. <span class='nobr'>My full catalog<\/span> of photos in Adobe Lightroom\nis much, much bigger.<\/p>\n\n<p>Over the years I've written a bazillion (~45) <a\nhref='\/blog\/lightroom-goodies\/'>plugins for Lightroom<\/a>\nthat supports <span class='nobr'>a photographer<\/span> in all kinds of helpful ways,\nbut one of the first (already five\nyears ago!) was my <a\nhref='\/blog\/lightroom-goodies\/gps-proximity'>Lightroom catalog Proximity\nSearch plugin<\/a>.<\/p>\n\n<p>To take advantage of proximity search, your photos have to be geoencoded to begin\nwith (that is, each photo must be associated with latitude\/longitude\ncoordinates of where it was shot). <span class='nobr'>At the time<\/span> <span class='nobr'>I first<\/span> released the plugin,\nthere was no way to geoencode photos within Lightroom, so one had\nto somehow take care of it before importing photos into your catalog. <span class='nobr'>It was a<\/span> pain.<\/p>\n\n<p>But, while working on that plugin <span class='nobr'>I figured<\/span>\nout <span class='nobr'>a tricky<\/span> way to build another plugin that\nallows you to geoencode within Lightroom, and <a\nhref='\/blog\/lightroom-goodies\/gps'>my Geoencoding Support\nplugin<\/a> was released <span class='nobr'>a couple<\/span> of weeks later;\nit remained the only way to geoencode within Lightroom until Adobe\nintroduced the Map Module last year. (My Geoencoding Support plugin is all\nthe more useful now that Lightroom supports location editing, because it\nextends the usefulness of location information far beyond what Lightroom\nprovides.)<\/p>\n\n<p>Anyway, I was happy that I could do <span class='nobr'>a\nproximity<\/span> search on my photos, but the unfortunate reality was that\nLightroom's catalog interface for plugins was simply too slow, creating\n<span class='nobr'>a high<\/span> barrier to use: I'd use it sparingly, only\nwhen it was worth the several-<i>minute<\/i> wait for <span class='nobr'>a\nresult.<\/span><\/p>\n\n<p>Still, even today it's better than what Lightroom itself now supplies,\nat least on my machine. <span class='nobr'>If I set<\/span> Lightroom's Map\nModule to an area I'm interested in, then switch to Library and select\n<span class='QO'>&#8220;<\/span>All Photographs<span\nclass='QC'>&#8221;<\/span>, then go back to Map to see which ones show up,\nLightroom completely locks up for eight minutes. Locks up. Eight minutes. Painful.<\/p>\n\n<p>(I hear that Lightroom is faster in this respect on Windows; someone who\ntested my catalog said the lockup was only two minutes there.)<\/p>\n\n<p>I don't understand why plugin access to the Lightroom catalog is so\nslow, but to gain some insight <span class='nobr'>I tried<\/span> accessing the Lightroom-catalog\nSQLite database directly. The results? <span class='nobr'>The same search<\/span> that locked up\nLightroom for eight <i>minutes<\/i> took 0.6 <i>seconds<\/i>.<\/p>\n\n<p>Even though the very first Lightroom-related article on my blog was <span class='nobr'>a\npost<\/span> in 2006 about <a\nhref='\/blog\/2006-07-29\/221'>accessing the Lightroom\ndatabase directly<\/a>, I've purposefully stayed away from doing so within\nmy plugins as <span class='nobr'>a matter<\/span> of principle, keeping instead to the official plugin infrastructure.<\/p>\n\n<p>But come on, an 800-fold speedup is just too much to pass up, especially\nfor <span class='nobr'>a feature<\/span> that blooms in usefulness when you can use it on the spur of\nthe moment with little friction. <span class='nobr'>So for the<\/span> first time in my\nplugin-development life, <span class='nobr'>I did an<\/span> end around Lightroom's interface, adding\na <span class='QO'>&#8220;<\/span>Fast Full-Catalog Proximity Search<span class='QC'>&#8221;<\/span> plugin-extra feature to my Proximity\nSearch and Geoencoding Support plugins last week. This is the fast search\nthat <span class='nobr'>I mentioned<\/span> <a href='\/blog\/2013-10-03\/2318'>on my\nprevious post<\/a>.<\/p>\n\n<p>The search is nominally invoked from the <span class='QO'>&#8220;<\/span>File &gt; Plugin Extras &gt;\nGeoencoding Support &gt; Fast Full-Catalog Proximity Search<span class='QC'>&#8221;<\/span> menu, but on my system <span class='nobr'>I mapped<\/span> it to <span class='nobr'>a keyboard<\/span>\nshortcut, so while looking at an image that's geoencoded, <span class='nobr'>a quick<\/span> tap\nbrings up this dialog:<\/p>\n\n<div class='ic'><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/lr\/fast-proximity-search-dialog.png\" width=\"690\" height=\"363\"\nclass=\"raw\"\nid=\"ifast_proximity_search_dialog\"\/><\/div>\n\n<p>Upon activation, the plugin goes outside of Lightroom to grab the data,\nthen import just those results back in, creating <span class='nobr'>a collection<\/span> with them. <span class='nobr'>It took just<\/span> <span class='nobr'>a few<\/span> seconds to isolate the 548 photos from that general area over the years.<\/p>\n\n<div class='ic'><img loading=\"lazy\" decoding=\"async\" src=\"\/i\/lr\/fast-proximity-search-results.png\" width=\"690\" height=\"518\"\nclass=\"raw\"\nid=\"ifast_proximity_search_results\"\/><\/div>\n\n<p>(Update: in modern versions, it works on Windows as well.)\n<br\/>\n<strike>One bummer about the workaround that achieves this: it doesn't work on\nWindows, nor on Lr4 or earlier, so in those situations the <span class='QO'>&#8220;<\/span>Fast\nFull-Catalog Proximity Search<span class='QC'>&#8221;<\/span> plugin-extra item reverts to the slower,\nofficial, much-less-compelling method. )-:<\/strike><\/p>\n\n<p>Still, if you're using Lr5 on <span class='nobr'>a Mac<\/span> and find this useful, please let\nAdobe know; perhaps they'll add this kind of thing directly into Lightroom.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>I popped up to Kyoto's Shogunzuka Overlook (\u5c06\u8ecd\u585a) today for the first time since March, hoping for a nice sunset.<\/p> <p>As you can see above, I didn't get it.<\/p> <p>However, due to my blog's proximity search feature, we can follow the \"nearby photos\" link under the photo to see other shots from Shogunzuka that I've posted over the years, including:<\/p> <p>I added the proximity-search feature to my blog several years ago, and I use it often in various ways because proximity search can be extremely useful, but my blog proximity search is obviously limited to photos I've actually published on [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,1,13,6,4],"tags":[],"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/2319"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=2319"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/2319\/revisions"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=2319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/categories?post=2319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/tags?post=2319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}