From Geo Hashing
Jump to: navigation, search


Have you wondered what historical Geohashes have occurred in your graticule? Have you wanted to see them all at once, instead of typing each date in via peeron? Well this script might help you out here.


I've submitted a script to the Perforce Public Depot:

Kudos to Psud for providing the Geohashing historical coordinates.

See discussion page for to-do's.


Usage: ./ -g <graticule[:<graticule>]> [-i <input file>] [-n <name>] [-l] [-v]
	-g: graticule of interest (format: "<latitude>,<longitude>")
		add more with colon separator
	-i: input file to use (file format: "YYYY-MM-DD,<DOW>,<LAT>,<LON>")
		default: '-' for standard input
	-n: name of top-level KML folder holding place markers
		default: "Geohash History for {graticule}"
		"{graticule}" is replaced with actual graticule(s) supplied
	-l: generate a label for each place marker corresponding to its date
		default is to suppress a label for the place marker
	-v: enable verbose logging

* You can get *all* retro Geohash data from:
* Resulting KML file is displayed to standard out.
* The resulting KML file will organize the place markers into folders by:
  Graticule -> Year -> Year-Month


* You can choose to generate a resulting KML file from the source data all
  in one command, like this:
   $ wget -O - |
     bzip2 -d | -g 49,-123 > Van_all.kml

  ...or first stage the data to a local file:
   $ wget -O - |
     bzip2 -d > allcoords.csv

  ...and then generate the KML file from the local file:
   $ -g 48,-123:49,-123 -i allcoords.csv > VicVan_all.kml

* You may wish to pre-process the source file to only show dates of interest:
   $ grep "^2009" allcoords.csv | -g 49,-123:49,-122:48,-122 > VanSurBham_2009.kml

* Use of -l and -n flag:
   $ sed -nre '/-(07-01|12-25)/p' allcoords.csv | \
     -g 48,-123 -l -n "Canada/Xmas Day in {graticule}" > Vic_7.1_12.25.kml

* Multiple graticules since a particular date:
   $ sed -ne '/^2008-05-21/,$p' allcoords.csv | \
     -g 49,-123:48,-123:49,-122:48,-122 > VanVicSurBham_since_2008-05-21.kml