Usage:Yamar

From Geoqo
(Difference between revisions)
Jump to: navigation, search
(The scripts callable sub-pieces)
(mem:findable)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
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.
 
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.
 +
 +
'''<font color="red" size="+2">Warning: Out of date; I now use a script which makes this simplier</font>'''
  
 
== My requirements (or: why I do this) ==
 
== My requirements (or: why I do this) ==
Line 31: Line 33:
 
* my own data points (home, etc)
 
* 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 ==
 
== My export process ==
Line 172: Line 124:
 
=== The scripts callable sub-pieces ===
 
=== 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:
+
As you can see, the above script calls a number of [[Saved_Specifications | 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
 
   geoqo -s "set:import:near me&&mem:findable" -e mem:garmin
Line 182: Line 134:
 
==== mem:findable ====
 
==== 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):
+
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):
  
 
   (
 
   (
Line 233: Line 185:
 
   # calls GPS babel on a created .loc file
 
   # calls GPS babel on a created .loc file
 
   +system:cmd=gpsbabel -i geo -f %{file:loc} -o geoniche -F %[prefix/geoniche]-gn.pdb
 
   +system:cmd=gpsbabel -i geo -f %{file:loc} -o geoniche -F %[prefix/geoniche]-gn.pdb
 +
 +
==== mem:palm ====
 +
 +
This is by far one of the most complex things I do.  That's because the tomtom export files '''must''' have each POI in separate files, which is a real pain.  The result is that I create '''a looootttt''' of files so that each cache type ends up in their own file with a different icon.  I won't go through it completely here, but it functionally boils down to pieces like this:
 +
 +
  #################### micros ####################
 +
  # drop anything that isn't a geocache
 +
  # or isn't a traditional cache
 +
  only:type=Geocache,subtype=Traditional Cache,groundspeak_container=Micro
 +
 
 +
  # replace the GC prefix with a difficulty/terrain rating.
 +
  +gctodiff:
 +
 
 +
  # Rewrite the description field to include the identifier and cache
 +
  # type in the description field (becomes:  "GC1234/Trad: description")
 +
  +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 +
 
 +
  # finally, write out the contents to a .ov2 file with a suffix
 +
  # Note: I could use the same 'size' option name as above, but I use
 +
  # two different names for flexibility.
 +
  +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-micro.ov2
 +
 +
  #################### small ####################
 +
  # drop anything that isn't a geocache
 +
  # or isn't a traditional cache
 +
  only:type=Geocache,subtype=Traditional Cache,groundspeak_container=Small
 +
 
 +
  # replace the GC prefix with a difficulty/terrain rating.
 +
  +gctodiff:
 +
 
 +
  # Rewrite the description field to include the identifier and cache
 +
  # type in the description field (becomes:  "GC1234/Trad: description")
 +
  +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 +
 
 +
  # finally, write out the contents to a .ov2 file with a suffix
 +
  # Note: I could use the same 'size' option name as above, but I use
 +
  # two different names for flexibility.
 +
  +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-small.ov2
 +
 +
The above exports micros and smalls to different tomtom.ov2 files.  I actually do this using a bunch of repeatable mem: files, but it's expanded above for your reading enjoyment.
 +
 +
To ensure I don't miss anything with my specific filters, I have a "catch all" that catches anything not included by the "only:" filters above:
 +
 +
  #
 +
  # traditional caches: all others (includes unspecified or future new sizes)
 +
  #
 +
  # only keep traditional geocaches, but drop anything we did above
 +
  ;only:type=Geocache
 +
  +only:subtype=Traditional Cache
 +
  +drop:groundspeak_container=Large
 +
  +drop:groundspeak_container=Small
 +
  +drop:groundspeak_container=Micro
 +
  +gctodiff:
 +
  +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 +
  +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-regular.ov2
 +
 +
 +
The final results of all of this are a whole bunch of files and growing.  I'm slowly creating .ov2 files for a bunch of interesting waymarking.com data as well (water fountains being one, since my son lives for them).  The results of what my tomtom screen looks like can be seen on the [http://www.geoqo.org/screenshots.html screenshots] page.
 +
 +
==== mem:cachemate ====
 +
 +
Finally, I put just about everything in cachemate including unsolved puzzles (so, you know, I can solve them!):
 +
 +
  solved:
 +
  +system:cmd=cmconvert -S -B -O -C -d -D -N 25 -o %[prefix/cachemate].pdb %{file:gpx}
 +
 +
== The results! ==
 +
 +
After all that pain, I'm rewarded with many files to put on many devices:
 +
(unix file list...)
 +
 +
  -rw------- 1 hardaker wheel 2167734 Jan  6 09:34 cachemate.pdb
 +
  -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-earth.ov2
 +
  -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-event.ov2
 +
  -rw-r--r-- 1 hardaker wheel    174 Jan  6 09:29 geocaches-large.ov2
 +
  -rw-r--r-- 1 hardaker wheel  13090 Jan  6 09:29 geocaches-micro.ov2
 +
  -rw-r--r-- 1 hardaker wheel    2589 Jan  6 09:29 geocaches-multi.ov2
 +
  -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:30 geocaches-multipoints.ov2
 +
  -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-other.ov2
 +
  -rw-r--r-- 1 hardaker wheel    100 Jan  6 09:30 geocaches-parking.ov2
 +
  -rw-r--r-- 1 hardaker wheel      69 Jan  6 09:30 geocaches-reference.ov2
 +
  -rw-r--r-- 1 hardaker wheel    6263 Jan  6 09:29 geocaches-regular.ov2
 +
  -rw-r--r-- 1 hardaker wheel    4916 Jan  6 09:29 geocaches-small.ov2
 +
  -rw-r--r-- 1 hardaker wheel      89 Jan  6 09:29 geocaches-solved.ov2
 +
  -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:30 geocaches-trailhead.ov2
 +
  -rw-r--r-- 1 hardaker wheel    308 Jan  6 09:29 geocaches-unknown.ov2
 +
  -rw-r--r-- 1 hardaker wheel    450 Jan  6 09:29 geocaches-virtual.ov2
 +
  -rw-r--r-- 1 hardaker wheel    176 Jan  6 09:29 geocaches-webcam.ov2
 +
  -rw-r--r-- 1 hardaker wheel  88952 Jan  6 09:29 nearme-gn.pdb
 +
  -rw-r--r-- 1 hardaker wheel  194237 Jan  6 09:29 nearme.loc
 +
  -rw-r--r-- 1 hardaker wheel    289 Jan  6 09:30 waymarks-fountains.ov2
 +
  -rw-r--r-- 1 hardaker wheel    8696 Jan  6 09:30 waymarks-others.ov2
 +
  -rw-r--r-- 1 hardaker wheel    112 Jan  6 09:30 waymarks-wifi.ov2
 +
 +
It also displays some helpful "counts" as well of things it did (that's what the %display parts do):
 +
 +
  Findable Geocaches    :608
 +
  Extra Waypoints      :3
 +
  Waymarks              :130

Latest revision as of 21:36, 2 April 2007

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.

Warning: Out of date; I now use a script which makes this simplier

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 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

mem:palm

This is by far one of the most complex things I do. That's because the tomtom export files must have each POI in separate files, which is a real pain. The result is that I create a looootttt of files so that each cache type ends up in their own file with a different icon. I won't go through it completely here, but it functionally boils down to pieces like this:

 #################### micros ####################
 # drop anything that isn't a geocache
 # or isn't a traditional cache
 only:type=Geocache,subtype=Traditional Cache,groundspeak_container=Micro
 
 # replace the GC prefix with a difficulty/terrain rating.
 +gctodiff:
 
 # Rewrite the description field to include the identifier and cache
 # type in the description field (becomes:  "GC1234/Trad: description")
 +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 
 # finally, write out the contents to a .ov2 file with a suffix
 # Note: I could use the same 'size' option name as above, but I use
 # two different names for flexibility.
 +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-micro.ov2
 #################### small ####################
 # drop anything that isn't a geocache
 # or isn't a traditional cache
 only:type=Geocache,subtype=Traditional Cache,groundspeak_container=Small
 
 # replace the GC prefix with a difficulty/terrain rating.
 +gctodiff:
 
 # Rewrite the description field to include the identifier and cache
 # type in the description field (becomes:  "GC1234/Trad: description")
 +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 
 # finally, write out the contents to a .ov2 file with a suffix
 # Note: I could use the same 'size' option name as above, but I use
 # two different names for flexibility.
 +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-small.ov2

The above exports micros and smalls to different tomtom.ov2 files. I actually do this using a bunch of repeatable mem: files, but it's expanded above for your reading enjoyment.

To ensure I don't miss anything with my specific filters, I have a "catch all" that catches anything not included by the "only:" filters above:

 #
 # traditional caches: all others (includes unspecified or future new sizes)
 #
 # only keep traditional geocaches, but drop anything we did above
 ;only:type=Geocache
 +only:subtype=Traditional Cache
 +drop:groundspeak_container=Large
 +drop:groundspeak_container=Small
 +drop:groundspeak_container=Micro
 +gctodiff:
 +rewrite:desc=%{newident}/%{4:subtype}: %{groundspeak_name}
 +system:cmd=gpsbabel -i geo -f %{file:loc} -o tomtom -F geocaches-regular.ov2


The final results of all of this are a whole bunch of files and growing. I'm slowly creating .ov2 files for a bunch of interesting waymarking.com data as well (water fountains being one, since my son lives for them). The results of what my tomtom screen looks like can be seen on the screenshots page.

mem:cachemate

Finally, I put just about everything in cachemate including unsolved puzzles (so, you know, I can solve them!):

 solved:
 +system:cmd=cmconvert -S -B -O -C -d -D -N 25 -o %[prefix/cachemate].pdb %{file:gpx}

The results!

After all that pain, I'm rewarded with many files to put on many devices: (unix file list...)

 -rw------- 1 hardaker wheel 2167734 Jan  6 09:34 cachemate.pdb
 -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-earth.ov2
 -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-event.ov2
 -rw-r--r-- 1 hardaker wheel     174 Jan  6 09:29 geocaches-large.ov2
 -rw-r--r-- 1 hardaker wheel   13090 Jan  6 09:29 geocaches-micro.ov2
 -rw-r--r-- 1 hardaker wheel    2589 Jan  6 09:29 geocaches-multi.ov2
 -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:30 geocaches-multipoints.ov2
 -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:29 geocaches-other.ov2
 -rw-r--r-- 1 hardaker wheel     100 Jan  6 09:30 geocaches-parking.ov2
 -rw-r--r-- 1 hardaker wheel      69 Jan  6 09:30 geocaches-reference.ov2
 -rw-r--r-- 1 hardaker wheel    6263 Jan  6 09:29 geocaches-regular.ov2
 -rw-r--r-- 1 hardaker wheel    4916 Jan  6 09:29 geocaches-small.ov2
 -rw-r--r-- 1 hardaker wheel      89 Jan  6 09:29 geocaches-solved.ov2
 -rw-r--r-- 1 hardaker wheel      21 Jan  6 09:30 geocaches-trailhead.ov2
 -rw-r--r-- 1 hardaker wheel     308 Jan  6 09:29 geocaches-unknown.ov2
 -rw-r--r-- 1 hardaker wheel     450 Jan  6 09:29 geocaches-virtual.ov2
 -rw-r--r-- 1 hardaker wheel     176 Jan  6 09:29 geocaches-webcam.ov2
 -rw-r--r-- 1 hardaker wheel   88952 Jan  6 09:29 nearme-gn.pdb
 -rw-r--r-- 1 hardaker wheel  194237 Jan  6 09:29 nearme.loc
 -rw-r--r-- 1 hardaker wheel     289 Jan  6 09:30 waymarks-fountains.ov2
 -rw-r--r-- 1 hardaker wheel    8696 Jan  6 09:30 waymarks-others.ov2
 -rw-r--r-- 1 hardaker wheel     112 Jan  6 09:30 waymarks-wifi.ov2

It also displays some helpful "counts" as well of things it did (that's what the %display parts do):

 Findable Geocaches    :608
 Extra Waypoints       :3
 Waymarks              :130
Personal tools