Noli Turbare Circulos Meos

a GSAK Macro for creating circles and polygons using child waypoints and displaying them in Google Earth or in a browser with Google Earth Plugin.

by Jakob8H

History: Initial release of V1.0 July 7th 2009. v1.1 August 3rd 2009 including paths. Added samples.

Contents

Introduction

I created this function to help me solving some geocaching puzzles, where a graphical solution would greatly simplify locating and finding intersections. Not to spoil any true mystery solving I created this image to exemplify what you could, quite, easily achieve:

 

Image showing Archimedes Circles over Siracusa, Italy

The macro presents a dialog where you can select the colors, fills, and opacities for lines and areas for all the different child types.

Parameter settings for the circles for the different child waypoints. Note that a radius is explicitly given for the original point in the dialog.
The Caption defaults to the name of the currently selected database added with today's date. This is inserted into the KML top node.

Samples

The Archimedes demo can be seen here

Basic Workflow

To create circles and polygons the following procedure is assumed

  1. Select a cache
  2. Add child waypoints, either manually in the child waypoints dialog or by using projections
  3. Open the child waypoints dialog
    1. For each child waypoint to show a circle, add a circle statement in the comment field. See details below.
    2. For each child waypoint to be part of a polygon, add a polygon statement in the comment field. See details below.
  4. Close the child waypoints dialog
  5. Filter out the caches you want to include in the generation/export.
  6. Run the NoliTurbareCirculosMeosV1 macro
    1. Alter parameters as you like
    2. Select if you want the resulting KML file and/or HTML files started (will open the registered application for the extensions)
  7. Press the Run button

Adding Circle Statements

Each child waypoint is colored based on the child waypoint type, this means that you control the color by selecting the type in the child waypoint / edit dialog.

The circle statements are inserted in the comment field for the child waypoint.

You can add any number of circle statements to a child waypoint. However these will be given the same coloring.

The following samples gives the syntax to use:

Ex 1: Adds a circle with radius 40

CIR:ra=40

Ex 2: Adds a circle with radius 40, and a second with radius 80

CIR:ra=40:CIR:ra=80

The cache itself can have one circle, its value is given in the macro dialog and is the same for all caches to be part of the generation.

Polygon statements and Circle statements can be used in any order on any child waypoint.

A child waypoint with several circle and polygon statements. Blurred on purpose.

Adding Polygon Statements

Adding polygons requires a bit more work. Currently you can create 5 polygons for each cache. For each polygon you will have to enumerate the points, this is done by adding polygon enumeration statements to the child waypoints.

A polygon always starts and ends with the cache point. If this is not desirable select the your 2nd point also as the final point, this gives a line to the cache point, making it easier to know what polygon belongs to what cache.

A child waypoint can be part of all polygons, and it can be used several times in the same polygon.

The following samples gives the syntax to use:

Ex 1: Adds the child waypoint as number two in the polygon. The position pn=1 is already set with the cache point for all polygons.

POL:pg=1;pn=2

Ex 2: Adds this child waypoint on position 2 and 5 in polygon 1, and on position 2 in polygon 2

POL:pg=1;pn=2:POL:pg=1;pn=5:POL:pg=2;pn=2

Coloring of polygons reuses styles from the circles.

Polygon statements and Circle statements can be used in any order on any child waypoint.

A child waypoint with multiple polygon statements. Coordinates blurred on purpose.

 

Adding Path Statements

Adding paths are done in the same way as polygons. Currently you can create 5 paths for each cache. For each path you will have to enumerate the points, this is done by adding path enumeration statements to the child waypoints.

A path can start with the cache point, but you can set any child waypoint as the first point of the path .

A child waypoint can be part of all paths, and it can be used several times in the same path.

The following samples gives the syntax to use:

Ex 1: Adds the child waypoint as number two in the path. The position pn=1 is already set with the cache point for all paths.

PTH:pt=1;pn=2

Ex 2: Adds this child waypoint on position 2 and 5 in path 1, and on position 1 in path 2

PTH:pt=1;pn=2:PTH:pt=1;pn=5:PTH:pt=2;pn=1

Coloring of paths reuses styles from the circles.

Path statements, Ploygon and Circle statements can be used in any order on any child waypoint.

A sample showing two paths and gives you an intersection. Cache ID blurred on purpose...

 

Download

The first version of the function is available here. Download and start. GSAK should open and ask if you want to install it.

Additional comments

The files are generated into GSAK temporary folder. These are cleared when GSAK exits.

The HTML file for using the GE Plugin, uses script files located in the GSAK Macro/NoliCirc folder. If you plan to put these onto your website, you will have to copy these files to. AND you will have to acquire a Google API key and modify the HTML source with it to make it work on a web site.

This is the first version and a lot of additional functionality could be imagined. If time allows for it, these functions may be added:

  1. Saving and restoring settings
  2. Overriding circle colors in the different child waypoints
  3. Configuration of polygon colors
  4. More polygons?
  5. child waypoint editing tools?

If you like to give some feedback to this please feel free to do so in