Usage:Yamar

From Geoqo
Revision as of 17:58, 6 January 2007 by 168.150.236.43 (Talk)
Jump to: navigation, search

I am, as you will see, truly insane. Warning: I'm not sure if this condition is contagious. It may be. We'll find out together.

Contents

My requirements (or: why I do this)

Much of what I need was actually the reason I started creating geoqo in the first place. I wanted to do things I doubt anything could handle (and if it did, I'm sure it didn't run natively on linux which I use the most).

Output Needs: Where my data ends up

One of the issues is that I have multiple places where my caching data goes to:

  • My Garmin Etrex Vista (B/W)
    • limit of 1000 waypoints (ARG!!!)
    • I don't want anything in it but geocaches because of the limited memory size
  • My TomTom Palm Application
    • this requires each Point of Interest to be in individual files
    • I have a lot of memory in this, so I want everything in it (including waymarking data points)
  • My CacheMate database
    • This needs everything but I separate out different regions into different files
  • My GeoNiche program
    • I rarely use it, but when I'm with people without a GPS I do.
    • Also can take everything on my palm card, but I do it in different regions to keep the "current" memory footprint small.

All of the above requirements makes me do some insane things.

Input Sources

  • geocaches
  • extra waypoints for geocaches (parking, trail heads, multi-steps)
  • waymarking (wifi hot spots alone is worth it)
  • geodining? (soon)
  • my own data points (home, etc)

My description breakdown

First, my search criteria

My pocket queries are already named, so I use those names to search by using geoqo's Sets that are automatically given to you when you import a gpx file. The extra waypoint data (E.G. parking) are also in a set.

But, I don't want puzzles I haven't solved.

So first, I have a mem: definition for standard search criteria I use when about to export stuff to all my devices:

 (
 # only
 #   anything that isn't a geocache
 #   or the subtype is not "Unknown"  (IE, exclude puzzles)
 #   or the puzn (north puzzle answer) attribute is set:
 #   or unless the "infield" attribute is set
 # or anything that isn't a geocache
 (waypoint:type<>Geocache
  ||cache:subtype<>Unknown
  ||attr:puzn<=>0
  ||attr:infield=1)
  
 # but restrict the above results to exclude events
 #   XXX: need to fix this actually; I do want them in my palm
 &&(waypoint:type<>Geocache||cache:subtype<>Event)
  
 # exclude things that I've found (marked with the found attribute)
 #  found=- means the attribute doesn't exist
 #  found=0 means it exists, but is 0 (so I've explicitly marked it not found)
 &&(attr:found=-||attr:found==0)
 )

That file is placed in $HOME/.geoqo/mem/search/stdfilter.

Then I can use that when doing more specific types of searches. For example, I have a "set1" mem: definition as well that calls the above definition:

 (set:import:%[set1/near me]
 ||set:import:%[set1/near me]:waypoints
 ||set:import:%[set1/near me]:waymark1
 ||set:import:%[set1/near me]:waymark2
 ||set:import:%[set1/near me]:waymark3
 )
 &&mem:stdfilter

(when I import a waymarking .loc, I specifically set the name to a normal set name but with :waymark1 (...) on the end)

Finally with all of the above in place, I can do this:

 geoqo -s mem:set1,set1=hawaii

to get all the caches (and waymarks) in hawaii matching my search requirements into my search results.

My export process

To get everything out in the list I have at the start of this page, I use a script. The script does various different types of searches followed by various different types of output to different files, etc.

The script

It's big. It's long. But it has comments.

 ##################### garmin ####################
 #
 # first search to include recent PQs but limit by my "findable"
 # criteria
 #
 %search
 (set:import:near me||set:import:fairfield)
   &&mem:findable
 
 %display
 count:Findable Geocaches    :
 
 #
 # export it to a garmin compatible file (.loc)
 #
 %export
 mem:garmin,prefix=nearme
 
 #################### geoniche ##################
 #
 # export to geoniche...  similar to that of garmin
 #
 %export
 mem:geoniche,prefix=nearme
 
 ##################### tomtom ####################
 #
 # find all stuff in recent PQs and is findable
 #
 
 # geocaches
 %search
 (set:import:near me||set:import:fairfield)
   &&mem:findable
 
 %export
 mem:palm-geocaches
 
 # all extra waypoints in the extra wayspoints set
 %search
 (set:import:near me:waypoints||set:import:fairfield:waypoints)
 
 %export
 mem:palm-extra-points
 
 %display
 count:Extra Waypoints       :
 
 
 # all waymarks (I don't have that many loaded)
 %search
 waypoint:type==Waymark
 
 %export
 mem:waymarking
 
 %display
 count:Waymarks              :
 
 
 #################### cachemate ##################
 #
 # cachemate is similar, but I also want:
 #  - all caches (including unsolved)
 #  - waymarks
 %search
 (set:import:near me||set:import:fairfield)
   ||waypoint:type=Waymark
 
 %export
 mem:cachemate
 
 %display
 count:Total Cachemate       :

I can then call this script like:

 geoqo -x all

The scripts callable sub-pieces

As you can see, the above script calls a number of mem: modules in order to achieve it's goal. I do this rather than putting the data in the script directly so that I can do pieces of the script by hand on the command line instead if I need it. (ie, if I want just my garmin data for some reason I can run:

 geoqo -s "set:import:near me&&mem:findable" -e mem:garmin

Without having to run the rest of the script.

Below are the breakdown of the other mem components in the above script.

mem:findable

This mem file (stored in $HOME/.geoqo/mem/search/findable) limits a search to just findable geocaches (IE, it ignores puzzles that haven't been solved or marked as "infield" (ie, it's an offset not a puzzle to solve ahead of time):

 (
 # only geocaches where the subtype is not "Unknown"      (IE, exclude puzzles)
 #   or the puzn (north puzzle answer) attribute is set:  (I've solved it)
 #   or unless the "infield" attribute is set             (it's a offset puz)
 (cache:subtype<>Unknown
  ||attr:puzn<=>0
  ||attr:infield=1)
 
 # but restrict the above results to exclude events
 &&cache:subtype<>Event
 
 # exclude things that I've found (marked with the found attribute)
 #  found=- means the attribute doesn't exist
 #  found=0 means it exists, but is 0 (so I've explicitly marked it not found)
 &&(attr:found=-||attr:found==0)
 )

mem:garmin

My garmin mem: file (stored in $HOME/.geoqo/mem/export/garmin) knows how to export to just what I want for my garmin including how to change all my symbols to something that indicates what type of cache it is. A screenshot can be seen on this page.

 # change the GC prefix to diff/terrain ratings
 gctodiff:
 # drop anything not a geocache (normally shouldn't be needed if the search wasn't already just caches)
 +drop:type<>Geocache
 # replace puzzle coordinates with stored puzn/puzw attributes
 +solved:
 # change the symbols to things that look kinda like the caches I'm searching for.  The symbols were picked by looking at my garmin symbol list.  On my dad's garmin, they don't look as good...  pick your own that make sense.
 +symbol:
   subtype=Multi-cache=Fitness Center,
   subtype=Unknown Cache=Information,
   subtype=Webcam Cache=Shower,
   groundspeak_container=Micro=Cemetery,
   groundspeak_container=Small=Tunnel,
   groundspeak_container=Large=Geocache Found,
   subtype=Virtual Cache=Ultralight Area
 # store results in a .loc file with an optional settable filename prefix or "garmin" if not otherwise specified.
 +loc:%[prefix/garmin].loc

mem:geoniche

Similar to garmin, but with a couple of tweaks:

 gctodiff:
 +solved:
 # this rewrites the desc field to be longer to include the GCidentifier (modified to include difficulty/terrain) and cache subtype in the name so when I click on it the name will be as descriptive as possible.
 +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 # calls GPS babel on a created .loc file
 +system:cmd=gpsbabel -i geo -f %{file:loc} -o geoniche -F %[prefix/geoniche]-gn.pdb
Personal tools