0% found this document useful (0 votes)
42 views17 pages

EC2007 ECDIS Kernel Example Programs

The document provides an overview of example programs and data for the EC2007 ECDIS Kernel SDK developed by SevenCs GmbH. It includes detailed descriptions of various example applications, their functionalities, and usage instructions aimed at programmers developing chart display systems. Additionally, the document contains information about trademarks, copyright, and disclaimers regarding the content provided.

Uploaded by

Trung Tran Manh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views17 pages

EC2007 ECDIS Kernel Example Programs

The document provides an overview of example programs and data for the EC2007 ECDIS Kernel SDK developed by SevenCs GmbH. It includes detailed descriptions of various example applications, their functionalities, and usage instructions aimed at programmers developing chart display systems. Additionally, the document contains information about trademarks, copyright, and disclaimers regarding the content provided.

Uploaded by

Trung Tran Manh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SevenCs ECDIS Kernel EC2007

Version 5.20

Example Programs

SevenCs GmbH, Hamburg Germany


EC2007 ECDIS Kernel - Example Programs and Data

SevenCs GmbH
Atlantic Haus
Zirkusweg1
D-20359 Hamburg
Tel. +49 (0)40/851 72 40
FAX +49 (0)40/851 72 4-79
[Link]

Copyright:
All rights reserved. No part of this document may be reproduced, in any form or by any
means, disclosed or used by any person who has not received prior written authorization
from SevenCs GmbH.
Brand names:
Brand names, logos and trademarks used in this document remain the property of their
respective owners.
Referrals and links:
SevenCs does not assume any liability for any external content linked to our site / to this
document, including links provided in our website. SevenCs has no influence on the
content of such sites. The owners of such linked websites take sole responsibility for their
content.
Disclaimer:
SevenCs does not guarantee any actuality, correctness, completeness or quality of the
information provided. Claims of liability referring to material or ideal damages, due to the use or
non-use of the information or due to the use of wrong and incomplete information, are strictly
ruled out, as long as there is no verifiable wilful or reckless fault on the part of SevenCs GmbH.

© SevenCs GmbH 2015


EC2007 ECDIS Kernel - Example Programs and Data

Contents

Contents ....................................................................................................................... i

Preface ......................................................................................................................... ii
Document Conventions ...................................................................................................ii
Trademarks.................................................................................................................... iii

1 Example Programs - Overview ............................................................................. 1


1.1 3dtestosg ..............................................................................................................2
1.2 bsbtest ..................................................................................................................3
1.3 cellcatalog .............................................................................................................3
1.4 chartdemo.............................................................................................................3
1.5 denctest ................................................................................................................4
1.6 dncto7cb ...............................................................................................................4
1.7 Geotifftest .............................................................................................................5
1.8 getbestroute..........................................................................................................5
1.9 manualupd ............................................................................................................6
1.10 readcat ..................................................................................................................6
1.11 readhead ...............................................................................................................6
1.12 register..................................................................................................................6
1.13 s63test ..................................................................................................................7
1.14 showAIS ................................................................................................................7
1.15 showcell ................................................................................................................7
1.16 showDENC .............................................................................................................8
1.17 showENC ...............................................................................................................8
1.18 showDTED .............................................................................................................8
1.19 showglobe .............................................................................................................8
1.20 showroute .............................................................................................................9
1.21 showVPF ...............................................................................................................9
1.22 testchart................................................................................................................9
1.23 tidaltest............................................................................................................... 10

2 Example Data .................................................................................................... 11

© SevenCs GmbH 2015 i


EC2007 ECDIS Kernel - Example Programs and Data

Preface
This document is aimed at programmers who are developing a chart display system using the
EC2007 ECDIS Kernel SDK. It gives a step by step introduction to the structure and functionality of
the EC2007 ECDIS Kernel SDK as well as a complete description of all its components.
For instructions on installation and registration of the EC2007 ECDIS Kernel see the
EC2007_InstallationGuide.
For general background information about the different chart products, their formats and related
standards see the document EC2007_BackgroundInformation.

Document Conventions
This manual uses several conventions to highlight certain words and phrases and draw attention
to specific pieces of information.

Calibri font is used for plain text in this document.

Calibri bold font is used for program or tool names and for program settings.

Calibri bold italic font is used for file names or environment variables.

Calibri blue bold font is used for cross references or other documentation.

Calibri blue underline font is used for hyperlinks.

Calibri red bold font is used for command line calls or Kernel function calls.

Important notes are displayed in shaded text boxes.

Please note:
Such note box displays important information which should not be ignored.

Simple file content is displayed in black.

#Configuration file
Version 1.0
screenW 1024
screenH 768

ii © SevenCs GmbH 2015


EC2007 ECDIS Kernel - Example Programs and Data

Source Code is displayed in different colours.


#include "eckernel.h"

//This is an example source code


int main(int argc, char *argv[])
{
EcCellId cellId;
...
return 0;
}

Trademarks
Windows XP, Windows Vista, Windows 7 and .NET are trademarks of Microsoft Corporation.
Linux is a trademark of Linus Torvalds.
SUSE and openSUSE are trademarks of Novell, Inc.
Red Hat is a trademark of Red Hat, Inc.
Intel is a trademark of Intel Corporation.
Sentinel is a trakemark of SafeNet, Inc.
Rockey is a trademark of SecureMetric Technology Sdn Bhd

© SevenCs GmbH 2015 iii


EC2007 ECDIS Kernel - Programming Guide

1 Example Programs - Overview


The EC2007 ECDIS Kernel comes with small example applications to help getting started with
Kernel programming. Both the executables and the source codes of these examples are included.
There are different kinds of examples:
 Command line tools for Windows and Linux
 GUI tools for Windows and Linux (based on Qt)
 GUI tools for Windows only (based on Microsoft Win32)
 GUI tools for Linux only (based on Motif)

Example Prog. Win Linux Gui Description


3dtestosg  Displays ENCs in 3D
bsbtest  Win32 Displays a BSB chart (Windows 32bit only)
cellcatalog n/a Lists the content of a SENC cell catalogue
chartdemo  Win32 Displays SENC in multiple views,
chart settings, pick report, chart updating
denctest   n/a Creates a DENC structure in which S-57 Exchange
Sets or directENC packages (7CX),
directENC package handling
dncto7cb   n/a Converts a VPF data to SENC and imports them
into DENC Structure
geoTiffTest   Qt 4.6 Reads a GeoTiff image and displays it together with
an raster SENC image
getBestRoute   n/a Calculates the best route from the SevenCs Route
Database
manualupd  Win32 Manual Update Handling
readcat   n/a Reads Information from the Object Catalogue
readhead   n/a Reads cell header information
register   n/a Queries for registration information
Registers the Kernel
s63test   n/a S-63 data handling, certificate reading, permit
handling, S-63 authentication and decryption,
provides high level function and low level functions
for S-64 required error output
showAIS   Qt 4.x reads a AIS log file or connects to an AIS Server
(tcp/ip) and displays AIS targets
showcell   Win32 Displays a single cell, mariner’s settings
Motif
showDENC   Qt 4.x Imports S-57 Exchange Sets, direct ENC packages

© SevenCs GmbH 2015 1


EC2007 ECDIS Kernel - Programming Guide

or S-63 Exchange Sets into DENC structure


Automatic chart loading from DENC Structure for
chart display, provides different chart projections,
world overview
showENC   Qt 4.x Displays single ENCs, provides different chart
settings, deals with non-latin text, provides
different chart projections, IENC handling
showglobe  Win32 Displays globe chart and harbor list
showHistory   Qt 4.x Based on showDENC. In addition it shows how to
indicate past ENC updates, defined by a date
range.
showroute  Win32 Route creation and display
showVPF   Qt 4.x Imports VPF data (DNC, VMap) and displays them
according to S-52 or GeoSym
showDTED   > Qt 4.8 Imports and displays ARINC 424 and DTED data
testchart  Win32 Displays a SENC at a certain position, displays
ARCS, User defined object handling
tidaltest   n/a Reads tides from the SevenCs tides database
wmsclient  Win32
wmsserver   n/a

Please note:
To build the 3D example application it is required to install the OpenGL Utility Toolkit GLUT and
the OpenSG package.
All example programs which display charts are working with hard coded screen settings which
might lead to an oval display of circles or arcs.

1.1 3dtestosg
This application shows the basic ideas and functionality of the Kernel "3D" module. This sample
program requires OpenSG 1.8 and GLUT to be installed. See also the manual in the doc
subdirectory of the kernel installation (EC2007_3DLibOSG.pdf).
There are some functions available via mouse and keyboard input. Please see "[Link]"
for a list of key and mouse events.

Usage:
3dtestosg <DENC path> <cell>

Parameters:

<DENC Path> Path of sample cells

2 © SevenCs GmbH 2014


EC2007 ECDIS Kernel - Programming Guide

(3DDatabase/ENC/DENC)
<cell> Path and name of the cell with special objects
(3DDatabase/ENC/udoCell/MoveObjects.7cb)

1.2 bsbtest
This application shows BSB raster charts and provides some operations (e.g. zooming, catalogue
creation). It can store the loaded chart into a *.gif image (the extension has to be set explicitly
when storing the image).
This application requires some DLLs. They can be found in the lib directory of the Kernel
installation %EC2007DIR%\lib. This path has to be set in the environment variable PATH.
bsbtest is only available for Windows.

Usage:
bsbtest

1.3 cellcatalog
This application lists information about cells from either a SENC catalogue (CATALOG.7CC) or from
an S-57 ExchangeSet (CATALOG.031).
The output is displayed in a command window (DOS box).

Usage:
cellcatalog <catalogue file>

Parameters:

<catalog file> Path and file name of the catalogue file

1.4 chartdemo
This application displays *.7CB cells and provides some operations. It is possible to load and
unload single cells and areas. Charts may be zoomed, scaled, and rotated. Several display options
can be switched on and off. A chart update can be performed. The "globe" functionality is
demonstrated. The functions are started from a menu bar.
A "pick report" can be shown (left mouse click on the chart).
chartdemo is platform dependent.

Usage:
chartdemo

Testdata:

© SevenCs GmbH 2015 3


EC2007 ECDIS Kernel - Programming Guide

%EC2007DIR%\data\Sample\SENC

1.5 denctest
This application demonstrates the import of S-57 or SENC data. It is possible to install *.7CB cells,
SENC Packages (*.7CX), and S-57 Exchange Sets including update files. Packages can be created
from cells; installed packages can be listed and removed.

Usage:
denctest <DENC path> -i <import path>
-l
-d <package name>
-c <package name> <import path>

Parameters:

<DENC path> Target path for creating the DENC structure

Options:

-i Creates a DENC structure and imports *.7CB cells from the import path into the DENC
structure
Also imports SENC packages (*.7CX) and S-57 Exchange Sets
<import path> Source path for package data
-l Lists the content of a SENC package
-d Deletes the cells from the given package from the DENC structure
Only the cells files (*.7CB) are deleted, the history files (*.7CH) remain in the structure!
<package name> Name of the SENC package (incl. extension 7CX)
-c Creates an empty DENC structure. Packs the cells from the import directory into a package
that is stored in the actual folder
<package name> Name of the SENC package (incl. extension 7CX)
<import path> Source path for package data

Testdata:
%EC2007DIR%\data\Sample\SENC
%EC2007DIR%\data\Sample\S-57

1.6 dncto7cb
This application display information about DNC data and converts them into *.7CB cells.

Usage:

4 © SevenCs GmbH 2014


EC2007 ECDIS Kernel - Programming Guide

denctest -d <database path> [-l <library>] [-t <tile>] [-v] [-o <output path>]

Options:

-d Lists the available libraries of the database.


The folder has to contain the file "DHT" and "LAT"!
<database path> Pathname of the database folder
-l Lists the available tiles of the given library.
<library> Name of the library
-t Creates a *.7CB cell from the given tile. Using '*' as a wildcard for all tiles is possible
<tile> Name of the tile
-v Displays additional version information.
-o Creates the *.7CB files in a folder in the subdirectory <library>
<output path>] Target folder name

Testdata:
Charts may be downloaded for free from NGA.

1.7 Geotifftest
Load GeoTiff images, references and display them. In addition it is possible to overlay the GeoTiff
image with an ENC.

Usage:
Geotifftest

Testdata:
%EC2007DIR%\data\geotiff

1.8 getbestroute
This application reads the SevenCs' Routing database and calculates the best route for the given
entry and exit point. Entry and exit point have to be set in the source code.
The route is stored in a cell named MYROUTE.7CS in the actual directory (Default: Hamburg – New
York).

Usage:
getbestroute

© SevenCs GmbH 2015 5


EC2007 ECDIS Kernel - Programming Guide

1.9 manualupd
This application displays a cell in a window and allows manual updating of the cell. There are
some functions available via a menu (cell loading, zooming, manual updating functions).

Usage:
manualupd

Testdata:
%EC2007DIR%\data\Sample\SENC

1.10 readcat
This application reads the dictionaries of version 3.0 and displays some information about the
attributes DRVAL1 and DRVAL2 to "stdout".

Usage:
readcat

1.11 readhead
This application reads all header information of a cell (version 3.0) and displays the values to
"stdout".

Usage:
readhead <cell>

Parameters:

<cell> Path and name of the cell (*.7CB)

Testdata:
%EC2007DIR%\data\Sample\SENC

1.12 register
This application handles the software registration and display the actual registration status.
For the usage of this application please refer to the document EC2007_InstallationGuide.

6 © SevenCs GmbH 2014


EC2007 ECDIS Kernel - Programming Guide

1.13 s63test
This application handles S-63 chart decryption and import. The import can either be done via
high-level functions or low-level functions. The use of the latter ones is necessary in case of an
ECDIS which have to fulfill certain requirements, especially the error handling. High level functions
might be used in case of non-ECDIS developments.
The user permit is based on the official IHO test Manufacturer Key / Manufacturer ID.
Batch files or shell scripts are provided which can be used to run s63test with the test data of the
S-64 standard, edition 2 and edition 3.

Usage:
s63test -perm <permit> -cert <certificate> -denc <path>[-upd] <source path>

Parameters:

<source path> Path of the source data (folder ENC_ROOT)

Options:

-perm Defines the chart permit file


<permit> Path and name of the chart permit file
-cert Defines the certificate file
<certificate> Path and name of the certificate file (e.g. [Link], [Link])
-denc Folder in which the DENC file structure is saved
<path> Target path and folder name
-upd Apply chart updates (Default: chart updates are not applied)

1.14 showAIS
This application displays chart from a DENC structure and AIS targets. AIS messages can be read
either from the log file or from an AIS server via TCP connection.
It demonstrates also, how dynamic overlays like AIS targets can be handled in an overlay cell in
RAM and how the display of the overlay can be separated from the chart display.

1.15 showcell
This application displays a given cell in a window.

Usage:
showcell <cell>

Parameters:

© SevenCs GmbH 2015 7


EC2007 ECDIS Kernel - Programming Guide

<cell> Path and name of the cell (*.7CB)

Testdata:
%EC2007DIR%\data\Sample\SENC

1.16 showDENC
This application displays chart from a DENC structure. Charts can be imported either as pure or
unprotected S-57 or SENC, as protected directENC or S-63. The import of S-63 is implemented
with the high level functions and therefore does not comply with the ECDIS requirements. For the
use of the low level S-63 functions for ECDIS developments please refer to the example program
s63test.

1.17 showENC
This application displays a single cell. Either S-57 or SENC files can be loaded. For the chart display
either a fixed projection can be chosen or the application determines a proper one. It can be
switched between the IMO display categories and the ChartRadar specific category PCIS is
supported as well.
The application demonstrates also how the display of charts and the content of the pick report
can be localized.

1.18 showDTED
This application is based on the showDENC but additionally demonstrates how DTED and ARINC
424 data can be imported and displayed.

1.19 showHistory
This application is based on the showDENC. In addition it shows how to indicate past ENC updates
by the definition of a date range, which is a new requirement in the IHO S-52 Presentation Library
Ed. 4.0 and the new IEC 61174 standard, Ed. 3.0.
Please note that updates have to be loaded and applied in showHistory before.

1.20 showglobe
This application demonstrates the usage of the "Globe" functionality. There are some functions
available via a menu (zooming, rotating, harbor selection, projections).

Usage:
showglobe

8 © SevenCs GmbH 2014


EC2007 ECDIS Kernel - Programming Guide

1.21 showroute
This application demonstrates the route functionality. There are some functions available via a
menu (route construction, route selection, cross track limit).

Usage:
showroute

1.22 showVPF
This application displays chart from a DENC structure. Either unprotected S-57 or SENC chart can
be imported or the supported VPF products, e.g. DNC or VMap0. VPF can be displayed either by
means of the S-52 standard or by means of the GeoSym.

1.23 testchart
This application displays cells from a DENC structure. There are some functions available via
mouse and keyboard input.
In addition it shows, how user defined objects can be handled. Please note that the object
dictionary files have to be copied to %LIB_7CS%\lib\objcat and the lookup table files to
%LIB_7CS%\lib\preslib4\lookup

Left mousebutton Show pick report


Right mouse button Move chart center
+/- Zoom in / zoom out
a Switch on / off ARCS mixed mode
c Create a new object
d Delete a new object
i Import charts
o Toggle AIO display
p Print a chart
r Start / stop timer to run "pan" demo
s Toggle "SCAMIN" usage flag
t Toggle display type for user-defined objects

Usage:
testchart -lat xx.x -lon xx.x <DENC path> <range>

Parameters:

© SevenCs GmbH 2015 9


EC2007 ECDIS Kernel - Programming Guide

<DENC path> Path of the installed cells


<range> Display range

Options:

-lat Latitude of the chart center


-lon Longitude of the chart center

Testdata:
C:\EC2007\[Link]\data\Sample\SENC

1.24 tidaltest
This application displays the tide values for a certain place on a certain date.

Usage:
tidaltest <cell> [-date [Link]] [-lat xx.x -lon xx.x]
<placename>

Parameters:

<cell> Path and name of the cell (*.7CB)


<placename> Name of a place (e.g. HAMBURG)

Options:

-date Date value (day, month, year)


-lat Latitude of the place
-lon Longitude of the place

Testdata:
C:\EC2007\[Link]\data\Tides\7C0TIDES.7CB

10 © SevenCs GmbH 2014


EC2007 ECDIS Kernel - Programming Guide

2 Example Data
Together with the EC2007 ECDIS Kernel SDK some example data are delivered. They are installed
in %EC2007DIR%/data/Sample.
Directory Data
AIS AIS records
3D Gridded data in BAG and DTED format
ARCS Official ARCS test data from the United Kingdom Hydrographic Office
directENC Packed SENC data in the SevenCs directENC format, published by ChartWorld
Int. ([Link])
GeoTiff A GeoTiff image from a paper chart from the University of Rhode Island and the
corresponding ENC from NOAA
myObjects SENC containing user defined objects
nationalText SENC file which contains national attributes NOBJNM with Chinese text
S-57 S57 Exchange Set
S-63 S-63 Exchange Set and Permits based on the user parameters of the IHO S-64
test data set
SENC Indidual SENC files, unpacked and unprotected

Please note:
The sample data for S-57, S-63 and SENC cover the same areas. Therefore it is advisable to run
tests only on one type of data or package and delete the other charts which were previously
installed.

Other free available example data can be found on following home pages
S-57 and S-63 [Link] (IHO S-64 Standard)
IENCs [Link]
NOAA ENCs [Link]
USACE IENCs [Link]
AML [Link]
DNC [Link]
VMap0/1 [Link]
[Link]

© SevenCs GmbH 2015 11

Common questions

Powered by AI

The EC2007 ECDIS Kernel provides tools like the 'denctest' application to import S-57 or SENC data, allowing installation of *.7CB cells, SENC Packages (*.7CX), and S-57 Exchange Sets with update files. It can create or list DENC structures and handle various input formats including directENC and S-63 charts. While high-level functions enable easier deployment for non-ECDIS applications, ECDIS-compliant operations require the use of low-level functions demonstrated in programs like 's63test', which are necessary for proper error handling compliant with S-64 standards .

The 'testchart' application offers key functionalities including the ability to display SENC data, user-defined object handling, and interactive features such as zooming and chart center moving via mouse and keyboard inputs. It also allows toggling of ARCS mix mode, AIO displays, SCAMIN usage, and user-defined object display types. 'testchart' also enables the creation, deletion, and importation of charts, providing a comprehensive toolset for users to interactively manage and augment chart data presentations .

The 'showDENC' application enhances chart data interaction by allowing display from a DENC structure, which can import pure or unprotected S-57 or SENC, as well as protected directENC or S-63 datasets. It supports automatic chart loading and offers different chart projections and a global overview, enriching user interaction. However, it uses high-level functions for S-63 imports, which may not satisfy specific ECDIS regulatory requirements, indicating that for compliance, lower-level function examples such as 's63test' are suggested .

The 'manualupd' application enables users to load a cell and perform manual updates within an application window, allowing zooming and interface-based update functionalities. This application impacts chart management by providing direct control over chart data updates and modifications, facilitating enhanced accuracy and relevance of chart information as per user or operational needs. Such an interface supports detailed management actions that ensure the chart data stays current and well-adapted to navigational requirements .

Different programming environments contribute to the versatility of Kernel applications like '3dtestosg', which utilize the OpenGL Utility Toolkit GLUT and OpenSG package for its 3D displays. The cross-platform compatibility provided by these tools allows the depiction of ENC data in 3D across various systems, enhancing application reach and capability. This cross-compatibility facilitates broader deployment and utilization in assorted operational setups, highlighting the Kernel's adaptability to diverse technological ecosystems .

To calculate the best maritime route using 'getbestroute', it involves reading from the SevenCs Routing database and specifying entry and exit points directly in the source code. The calculated route is then saved in a file named MYROUTE.7CS within the current directory. This setup requires a source code modification to specify entry and exit points and leads to the creation of navigational routes, by default between Hamburg and New York .

TCP/IP connectivity in 'showAIS' is significant as it enables real-time AIS data acquisition from servers, enhancing dynamic overlay capabilities. By processing AIS messages from either a log file or an AIS server, the application can display AIS targets alongside navigational data. This enhances situational awareness and the integration of live shipping data, crucial for effective maritime navigation and vessel traffic management within the Kernel interface .

The 'chartdemo' application enables interaction by displaying *.7CB cells and facilitating operations like loading, unloading, zooming, scaling, and rotating charts. Users can switch display options on or off and perform updates, demonstrating the Kernel's ability to manage multiple chart views and dynamic chart settings. The application supports interactions through a menu bar, enabling features like 'pick reports' via mouse clicks, which increase user interactivity with ENC data within the Kernel environment .

The 's63test' application is designed for S-63 chart handling, providing both high- and low-level functions necessary for ECDIS compliance. Key considerations include proper certificate handling, permit file specifications, and the application of updates necessary for meeting S-64 standards. S-63 data handling involves decryption and authentication processes, requiring the use of official IHO test Manufacturer Key. This ensures that chart usage meets strict security and regulatory guidelines mandatory for ECDIS systems .

The 'Geotifftest' application allows the loading and display of GeoTiff images, which can be overlaid with ENC data to give geospatial context. The benefits include enhanced visual representation and reference within nautical charts. The ability to handle overlays with ENC enriches user comprehension of geographic data, highlighting areas of interest more explicitly than standard chart formats alone .

You might also like