Unclos Tutorial D. Import / Export

Geocap can be used to generate accurate distance lines computed by algorithms following the earth curvature. The same operation is used when calculating distances from the base line (200M and 350M), the depth constraint (2500m depth + 100M) and the Foot of slope + 60M.

Before we can start generating a distance line, we need something to generate the distance line from. This tutorial will start by importing a coast line within your area of interest.

National Geophysical Data Center (NGDC) provides coast lines covering the entire world in a data set they call GSHHS (Global Self-consistent, Hierarchical, High-resolution Shoreline Database). Geocap can read both the raw data format (the files gshhs_*.b files), and the shape files directly.

Exercise: Download coast line files

Download coastline files from the internet.

Exercise: Import coast line into the Geocap project

Import the coastline into the Coastline folder in the project, and convert to the right projection.

  • Locate the folder called “Coast Lines” in your Geocap project under “1. Maritime Lines”
  • Right click the folder and select “Import -> Generic…”
  • The format should be set to “Automatic”
  • Click the browse button: and locate the files you downloaded in the previous exercise.
  • Select the file called “gshhs_h.b” (this is a high resolution, but not the full resolution), and click
    “Open”
  • Click the Area of Interest tab
  • Check the “Import Area” check box.
  • Type in the minimum and maximum latitude and longitude in decimal degrees.

    Max Y = Northern boundary of import area
    Min X = Western boundary of import area
    Max X = Eastern boundary of import area
    Min Y = Southern boundary of import area

  • Click execute
  • Geocap does not recognize the datum and coordinate system of the file,and will ask you to specify this.

    Select datum: World Geodetic System 1984 and coordinate system : Geodetic

    Click OK

    Geocap will confirm that the file has been read.
  • After the file has been read, click the “Close” button in the Generic reader dialog
  • Observe that the imported dataset is stored in the “Coast lines” folder
  • Right click the dataset and select “Scale window to data”
  • Right click the dataset and select “Display”

The data is imported in Geodetic, with latitudes as Y coordinates and longitudes as X coordinates. In order to view the data in a proper projection, we convert the data to Mercator coordinates.

  • Right click the dataset and select “shared commands-> convert to Mercator”
  • Change the result combo box to “Replace input”
  • Click execute

The data is now converted. Let us re-display in new coordinate system:

  • Right click the dataset and select “Scale window to data”
  • Right click the dataset and select “Display”

If you have a data set with the base line of your country you can import it and use that as a base for the distance lines. If you do not have such a base line, skip this exercise and generate a false base line in the next exercise instead.

Exercise: Import Base line ASCII lat-lon format

Import a column based ASCII file from disk, and convert to the right projection.

  • Locate the folder called “Base Lines” in your Geocap project under “1. Maritime Lines”
  • Right click the folder and select “Import -> ASCII Column…” and the ASCII Column import dialog will appear.
  • Click the browse button , and select your base line file.
  • Adjust the number of header lines in your file with the “Adjust header” Spin box. The header lines should be displayed in the top part of the file preview, while the bottom part of the file preview should hold the coordinates.
  • If the columns are delimited by space or tab characters, you should keep the column separator at white space. If the file uses a special character, change the combo box to ‘c’, and change the value by typing in the separator directly in the combo box.
  • Select coordinate format

    Deg = decimal degrees
    Deg min = degrees, and decimal minutes
    Deg min sec = degrees, minutes, decimal seconds
    Hemi = hemisphere (N/S for north or south, E/W for east or west)

  • Set the correct file columns for each data column. You see the first lines in the table. On top of each table is a spin box with the file column number. Adjust the file column by clicking the spin boxes so that the file columns are interpreted correctly.
  • All other parameters should be OK with the default settings, click “Execute”
  • The file has now been imported. Click the “Close” button in order to close the ASCII Column import dialog

The data is imported in Geodetic, with latitudes as Y coordinates and longitudes as X coordinates. In order to view the data with the coast line, we convert the data to Mercator coordinates.

  • Right click the dataset and select “shared commands-> convert to Mercator”
  • Change the result combo box to “Replace input”
  • Click execute

The data is now converted. Let us display the data:

  • Right click the dataset and select “Scale window to data”
  • Right click the dataset and select “Display”