Other Catalog Files

<< Previous: Catalog List Catalog

Next: Scripting Overview >>

Cosmographia can load the following additional kinds of catalogs:
This section does not attempt to describe all of these catalogs in detail, simply providing an example for some of them. ([4.0+] and [4.1+] indicate features available starting with Cosmographia 4.0 and 4.1 correspondingly.)

Annotations Catalogs

The Annotations Catalogs define time-dependent messages that are displayed at the top of the Cosmographia window. This is an example of an Annotations Catalog:
{
   "version": "1.0",
   "name": "Cosmographia CASSINI Example",
   "items": [
      {
         "name": "CASSINI RADAR Annotations",
         "type": "AnnotationScript",
         "textSize": "small",
         "relativeTextSize": false,
         "color": "white",
         "textPosition": [ 0.05, 0.7 ],
         "textAlignment": "left",
         "script": [
            {
               "startTime": "2004-10-26 15:23",
               "endTime": "2004-10-26 15:55",
               "text": "RADAR Observation Progress:",
               "lineIndex": 1
            },
            { 
               "startTime": "2004-10-26 15:23", 
               "endTime": "2004-10-26 15:25", 
               "text": "   Preparing for observation ...",
               "lineIndex": 2,
               "color": [ 0.5, 0, 0 ] 
            },
            {
               "startTime": "2004-10-26 15:26",
               "endTime": "2004-10-26 15:49",
               "text": "   Sending radar pulses ...",
               "lineIndex": 2,
               "color": [ 1, 0, 0 ]                
            },
            {
               "startTime": "2004-10-26 15:50 UTC",
               "endTime": "2004-10-26 15:55 UTC",
               "text": "   Finishing up ...",
               "lineIndex": 2,
               "color": [ 0.5, 0, 0 ] 
            }
         ]
      }
   ]
}
This catalog makes a two line annotation block appear between “2004-10-26 15:23” and “2004-10-26 15:55”, with the first (top) line, shown in white, being constant and the second (bottom) line, shown in two different shades of red, changing its text as time progresses. The annotation lines appear left-justified below a point that is 5% to the left from the left edge of and 70% down from the top edge of the program window.
[4.0+] The textPosition, textAlignment, lineIndex, and individual annotation color attributes controlling the annotation block position and its text alignment, and setting a specific line’s color and its index in the block are optional.
[4.1+] The textSize and relativeTextSize attributes are optional and can be used at the top level globally applying to all items in the annotation list to set their text size to xsmall, small, medium, large, or xlarge using textSize, and to indicate if this size is relative to the current global text size (relativeTextSize set to true or omitted), or if it is absolute (relativeTextSize set to false). When the annotation text size is relative, it will decrease or increase as the global text size is decreased or increased by the user until reaching xsmall or xlarge sizes.

Visualizers Catalogs

The Visualizers Catalogs define graphical primitives (visualizers). Planes are the only visualizers that can be currently defined using these catalogs. This is an example of a Visualizers Catalog defining the XY and XZ planes of the Titan body-fixed frame (SPICE name ‘IAU_TITAN’) centered at Titan:
{
   "version": "1.0",
   "name": "Plane Visualizer Example",
   "items": [
      {
         "type": "Visualizer",
         "tag": "Titan XY plane",
         "body": "Titan",
         "style": {
            "type": "Plane",
            "frame": {
               "type": "Spice",
               "name": "IAU_TITAN"
            },
            "size": 5000,
            "gridSubdivision": 20,
            "color": [ 1, 1, 0 ],
            "opacity": 0.1
         }
      },
      {
         "type": "Visualizer",
         "tag": "Titan XZ plane",
         "body": "Titan",
         "style": {
            "type": "Plane",
            "frame": {
               "type": "TwoVector",
               "primaryAxis": "z",
               "primary": {
                  "type": "ConstantVector",
                  "direction": [ 0, 1, 0 ],
                  "frame": {
                     "type": "Spice",
                     "name": "IAU_TITAN"
                  }
               },
               "secondaryAxis": "x",
               "secondary": {
                  "type": "ConstantVector",
                  "direction": [ 1, 0, 0 ],
                  "frame": {
                     "type": "Spice",
                     "name": "IAU_TITAN"
                  }
               }
            },
            "size": 5000,
            "gridSubdivision": 20,
            "color": [ 1, 0, 1 ],
            "opacity": 0.1
         }
      }
   ]
}
Note that a plane is always defined to be aligned with the XY plane of the frame specified in the definition (see XY plane in the example above). To define a plane at a different orientation a special frame should be defined such that its XY plane is aligned with the desired orientation, for example using the “TwoVector” frame style (see XZ plane in the example above).

Surface Features Catalogs

The Surface Features Catalogs define names and locations of features on surfaces of natural bodies. A few such catalogs named “[body]-features.json” are included in the Cosmographia package. This is the top portion of the “mars-features.json” catalog:
{
  "version": "1.0",
  "name": "Martian Surface Features",

  "items":
  [
    {
      "type": "FeatureLabels",
      "name": "Mars Surface Features",
      "body": "Mars",

      "features": [
        {
          "origin": "American colonial town (North Carolina).", 
          "diameter": 1.72692, 
          "code": "AA", 
          "name": "New Bern", 
          "longitude": 310.8478007026, 
          "link": "http://planetarynames.wr.usgs.gov/Feature/4229", 
          "latitude": 21.5334358064
        }, 
        {
          "origin": "Town in Italy.", 
          "diameter": 86.982, 
          "code": "AA", 
          "name": "Novara", 
          "longitude": 349.3122103786, 
          "link": "http://planetarynames.wr.usgs.gov/Feature/4347", 
          "latitude": -24.8979410153
        }, 
...
      ]
    }
  ]
}

View Point Catalog

The View Point Catalog defines the initial view point of the camera when the program is launched without any command line arguments. A single View Point Catalog named “start-viewpoints.json” is included in the Cosmographia package. This is the top portion of this catalog defining the starting view point:
{
    "version": "1.0",
    "name": "Starting Viewpoints",
    "items": [
        {
          "type": "Viewpoint",
          "name": "Default Start",
          "center": "Sun",
          "altitude": 1.5e9,
          "reference": "Earth",
          "azimuth": -60.0,
          "elevation": 30.0,
          "up": "EclipticNorth"
        },
...
    ]
}

Add-ons Catalog

The Add-ons Catalog defines add-ons that appear in the Visualization Setting Add-ons panel. A single Add-ons Catalog named “addons.js” is included in the Cosmographia package. This is the top portion of this catalog:
var InstalledAddons =
[
    {
    name: "ISS and Hubble",
    description: "View the International Space Station and the Hubble Space Telescope",
    source: "earthorbiting.json"
    },
    {
    name: "Aurora Borealis",
    description: "A curtain of aurora above the Earth's arctic region",
    source: "addons/aurora.json"
    },
...
];