CherSoft Ltd www.chersoft.co.uk Home   About   Advantages   Developer Reference   Downloads   FAQ   Contact

World Vector Shoreline

By Andy Nibbs

Friday, December 03, 2010

NOAA, who we admire greatly, make freely available a world vector shoreline. This is a comma separated value (CSV) file containing the coordinates for a few massive (continent sized) geographic polygons and a load of island outlines.

To produce the CherSoft WVS: We took it and fixed some errors, filtered it, rearranged it into scale bands and added some islands that were missing. Obviously it's Not for Navigation. You need real charts for navigation.

Why have a vector shoreline? Because having a world shoreline backdrop is very useful. Actually in some applications it's all the chart you need. It allows people to quickly find the bit of the world that they are interested in. Even with some proper charts most of the time people don't have worldwide chart coverage - so if they zoom out too far they can "lose" their place in the World. Try it in one of the sample applications - it's not good.

ENCX will display our WVS if you have a license. Evaluators please get in touch for an evaluation license. You can download the data from http://www.encx.com/download/wvs.zip.

This zip contains an ENC chart folder (sometimes called a SENC). You can unzip it and open it with an S57Manager object. For example you could just unzip it somewhere and modify the EncView1 sample to display it. Just like I've done...

senc.OpenSenc(libr, "d:\charts\wvs_1")

EncView1 sample displaying the World Vector Shoreline

How to integrate the CherSoft WVS into your apps?

There are two approaches to using the WVS in your programs. The decision is yours - a configuration choice that depends on your customers, and how much control they get over their chart folders - whether they need to be able to run multiple folders and so on. So here are the approaches:

Use two separate chart folders

This is what we do in our Navigation systems. We keep the WVS data separate from the chart data that the user buys and installs. They can do what they will with their chart folder - decide where on the disk it goes, delete it, recreate it, whatever. But we keep the WVS somewhere else and we install it with the app.

When we draw S-57 chart we first draw the WVS as a bottom layer and then draw their S-57 data afterwards. In ENCX terms that means you need two S57Manager objects and two S57Draw objects.

Merge the data into your chart folder

A lot of people merge the WVS data and their customer's data. This works best if there's one true location for the Chart Folder. The SENC Directory file makes this a little harder than it used to be - there's an extra couple of steps to make sure there is a correct directory file in there.

First, you need to copy the contents of the WVS SENC's cells folder into the cells folder of your chart folder. You might be starting from an empty chart folder that you have made using ManageENC. The problem these days is that the SENC's directory folder must contain a directory file pointing to all the chart cells. You haven't got entries for the cells that you have manually copied in the directory file.

Fortunately ManageENC will recreate a directory file either when charts are installed or when there isn't a directory file. So just delete the directory folder and then run ManageENC, point it at the chart folder and it will make you a directory file.

Pointing ManageENC at your SENC to regenerate the directory file

Andrew Nibbs has developed software and managed projects for Chersoft for 11 years. He specialises in C++ and does a bit of C# and even less VB. He once wrote a Python script.

ENCX Home