Sunday, March 18, 2012

Creating Pocket Queries Along A Route

pq1

Most geocachers will be familiar with the concept of pocket queries.  This feature on the Geocaching website allows premium members of the site to download a large number of caches based on certain criteria (location, type, difficulty, etc.).  If you have been geocaching for some time and have premium membership it’s likely you will be well-versed in creating them.  However,  they are more flexible than you might initially imagine.

When you create a pocket query you will, most likely, do a search radiating out from a particular cache or location.  That’s usually good enough to ensure that it captures all the caches you intend to do for the day.  But what happens if you‘re intending to travel from A to B grabbing all the caches along the way?  What if the distance between those two points means that creating a radius big enough for the pocket query to contain all those caches gives more results than a pocket query allows or your GPS will hold?

Geocaching.com has a solution to this in the form of “Creating a Pocket Query along a route”.  Instead of radiating out from a central location or cache, this radiates out along the road you intend to travel.  However, doing this is not a simple process and involves creating a KML file of your intended route to upload to the Geocaching website.

There are a number of ways of creating a KML file and if you have your own specific methods or tips, I’d welcome them in the comments.  However, I produce mine using Google Maps.

Google Maps’ interface constantly changes and it appears to vary depending on the browser but  what you need to do is access “my places”.  This will require you having a google account and being logged in.  If you have trouble finding the option inside Google Maps I suggest an online search for your specific browser and version number.

Accessing “my places” should give you the option to create your own map.  This will open Google’s Map Engine.  This allows you to place markers and lines that will form the basis of your route.

In a separate tab I open the Geocaching.com Map page showing the area I wish to create a Pocket Query for.  You want to be zoomed in enough that you can see the roads you’ll be travelling but zoomed out enough that you won’t have to keep scrolling the map.  A bit of practice will give you an idea of your own personal preference.

Now on the Google Maps screen, start placing markers down along your proposed route.  You want to place one at every turning or significant change of direction in the road.  This is purely to help guide us for when we create our line(s).  A bit of practice will tell you just how many you want to place but the idea is that when you join the markers together with a line, that line won’t deviate too far from the road you’ll be travelling.  Don’t worry about being absolutely precise though as you only need this as an aid for you to draw your line.

This is what my Google Maps route looked like after I marked and made my route.

This is what my Google Maps route looked like after I marked and made my route.

Of course, you’ll need to constantly refer back to the tab with your geocaching.com map on, so expect this activity to take some time.  It can be a little fiddly and frustrating at times, especially if you are trying to match the maps up.  I suggest, if you can, setting the Geocaching.com map to also use Google Maps as it will make the task a little easier.

Now, with all your markers placed, you want to draw a line through each of them.  Again, you don’t need to be precisely accurate – the markers are there just to guide you and allow you to zoom out the map a little further.  It’s also possible that you might need to move the map as you draw your line.  As a result, if you have to stop and create a new line, don’t worry!  You can stitch them together afterwards!

At the end you should have a collection of markers and lines denoting the route you intend to cache along.  There should be an option to export to KML.  Select it and save the file somewhere safe.

gmap2
If you created more than one line then we need to edit the file.  You can do this with any text editor (i.e. Microsoft Word or Notepad) but I personally use a free program called Notepad++ mainly because of the way it formats the file making it easier to manipulate.

Whichever program you use, open the file and scroll toward the bottom.  If you know what XML files or HTML code looks like you should recognize the file content as being very similar – a collection of code with nested open and closing tags.  If you are not, I suggest spending some time understanding how nested tags or html works.

kml1

This is what your KML file should look like

As you look through you will see a number of <placemark> tags.  Nested within them will either be <point> tags (representing your markers) or  <linestring> tags (denoting the lines you drew).  We are only interested in the latter.

If you had to create several lines, here’s where we merge them together.  Carefully cutting and pasting the co-ordinates for all the lines (i.e. copy and pasting the numbers nested under <coordinates> tag ) create a single set of line data.  Keep the order.  Once you have created your ‘superline’ delete the others.   It’s fiddly and incredibly easy to make a mistake but we essentially are merging the co-ordinates for the various lines together.

Save your file.  By this time you are probably cursing and wondering whether there is an easier way to do all this.  Thankfully, the hardest bit is now over.

Go to the Geocaching.com website and go into your pocket queries.  You’ll notice that next to the button to create a Pocket Query is an option to create a query along a route.  Click it and select the ‘Upload A Route’ tab from the resulting page.

pq2

Success! Be sure to save it.

Upload your saved file, select the line and save it with a descriptive name.

You can now go to the ‘Your Created Routes’ tab and create a pocket query from there.  I usually allow a radius of a half mile from my route to counter any inaccuracies or caches that are a quick detour off-route but you may find you adjust based on the number of results your initial pocket query generates.

As you can see, it’s fiddly enough that you won’t want to do it every weekend you go out caching, but for big power trails or long journeys it can be incredibly helpful.

About Adrian Faulkner

Adrian Faulkner is a writer of both fiction and non-fiction. He is an active geocacher with over 9000 finds to his name. You can find more by Adrian at AdrianFaulkner.com and on his Google Plus page.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

*


1 × = three