Skip to content

Natural Earth background ref data

IanMayo edited this page Dec 16, 2014 · 6 revisions

Natural Earth

Introduction

There are two areas in which background context is of value to Debrief users:

  • an introductory “where in the world” view prior to viewing more zoomed-in views (nearby coastline / country names)
  • giving an analyst a further understanding of the context in which the track plots are displayed (depth data, shipping lanes, ports)

These capabilities are currently met by the VPF dataset. But, the VPF dataset has these shortcomings:

  • is very large (4 * CD-Roms)
  • all data requires formatting (data is formatted by default as a white line - which the user must format)
  • there is relevant and irrelevant data in the dataset - which the user must navigate through

The Natural Earth (NE) dataset provides vector data in 3 different resolutions.

Requirements

  1. Way of packaging the NE data into two libraries (small and large) to be optionally downloaded/installed with Debrief
  2. Ability for Debrief to look in default location for NE datasets
  3. Ability for user to configure Debrief to specify location of NE datasets
  4. Ability for Debrief to decide whether to render low-res or high-res NE datasets depending on current zoom level
  5. Ability for Debrief to have pre-configured rendering settings for NE data
  6. Ability for user to override:
    1. which layers are shown
    2. colors to use for each layer
  7. Ability for user to make user customisations in this plot persistent (in .dpf file)
  8. Ability for user to copy/paste rendering customisations between plots
  9. Ability for user to make rendering customisations persistent defaults
  10. Ability for user to reset to default rendering defaults

Implementation

  1. Decide on dataset(s) to use
  2. Download datasets
  3. Get someone to produce default style/presentation for these datasets (probably as QGis stylesheets)
  4. Package up datasets (two zips, one for 110M, the other with all three)
  5. Produce architecture for implementation (class diags)
  6. Produce design for persistent rendering settings
  7. Implement reading/displaying NE data (see Managing NE data)
  8. Encode default rendering (designed above) in persistent rendering format
  9. Implement user-control of NE rendering
  10. Add other rendering capabilities as listed above
  11. Introduce NE into Cheat sheets
  12. Document NE implementation in User Guide & Reference Manual

Architecture

The following diagram shows the data-structures we’ll use:

data structures

The following diagram shows the various NE related processes: flows

Here is how users interact with style when a plot is open: Outline view

NE Preferences dialog

Here is a mockup for the preferences dialog: Prefs page

Managing NE data

Debrief already reads and parses Natural Earth data, here: https://github.com/debrief/debrief/blob/d5d40393e2cbd4a6f64c2ab0ba7099aff329c46f/org.mwc.cmap.gt2Plot/src/org/mwc/cmap/gt2plot/data/WorldImageLayer.java#L172

But, Debrief only currently extracts (and plots) geometries (shapes) and name. To support this more advanced processing, we’ll have to know how to extract empty and filled polygons, and use a range of other metadata from the files.

I suspect our processing will be something like this: When our Natural Earth layer is plotted:

  • see if the data is already loaded, if it isn’t:
    • get the Natural Earth data folder from preferences, if it’s empty:
      • show warning
      • drop out
  • determine the resolution currently required
  • work through our list of “known datafiles” for this resolution
    • try to load this file, if it’s not found:
      • show message
      • move to next datafile
    • parse the data-file into tidy structures
    • apply our default styling to those structures
    • plot the polygons, lines, labels, symbols