AvNav Chart Import Page

AvNav Chart Import Page


=== not on Android ===

Chart Types

The importer has converters (built in) for the following chart types:

  • BSB charts (extension .kap) and zip archives with multiple .kap files
  • mbitles files (but only with the default coding, a different tile numbering is not supperted)
    Normally you can use the mbtiles directly in AvNav without conversion. The only use case would be to convert to gemf for the usage on Android as gemf charts can be read from an external chart directory (e.g. SD card) but mbtiles can (on Android) only be read from the internal chart directory.
  • navipack files

Additionally plugins can add own converters - like the ochartsng plugin (zip's of S57 files).

Usage

The importer page can be reached from the Files/Download page with the Button.
When activated the page shows all currently known import files/directories from the import dir (DATADIR/import). For each of them a possible converter is shown if AvNav was able to find a suitable one. In the picture above all files have already been (successfully) converted.

When clicking on one of the files you will get a dialog with a couple of actions.

The visible actions depend on the status of the item (converted, currently converting,...).

Button Function
Delete Delete the file/dir at the import directory. Converted charts are not deleted.
Disable Disable the item in the import directory. No new conversion will be tried even if you update the item (e.g. upload new files to a sub directory).
Restart Restart the conversion.
Download
(only when done)
Download the converted chart. For the internal converters this will always be a gemf file, for others it depends on the plugin that provides the conversion.
Log Get the last (or current) conversion log file
Stop
(only when running)
Interrupt a currently running conversion.

The result of the conversion is stored in the AvNav charts directory or in the appropriate plugin chart directory.
With a click on the button you can select a file to upload (.kap file, .zip file with .kap files, .navipack, .mbtiles,...).

In the dialog you can choose a name for the file as it should appear in the converter (this will also later on be used as the name of the gemf file).
When you upload a single .kap file the importer will allow you to use a "set name" (i.e. a directory in the importer directory).

This way you can upload multiple .kap files that will form a single gemf chart with the name of the set file.
But typically it's more convenient to package the kap files into a zip and upload this.

After uploading the importer will still wait some time to ensure that all files have been uploaded.

Once the importer did not detect changes for one file/directory any more it will start the conversion.

You can view the log after clicking the button beside the entry or at the converter. After the conversion is finished the result is presented. If there are errors you can check the log for problems.

When the conversion has been successful the converted chart should immediately be available for use in AvNav. If you want to transfer the chart to another system (maybe you just run the conversion on a desktop and now you would like to use the chart on a raspberry pi or on android) you can use the download button as described above.

With the button at the right side you reach the property dialog for the importer.

You can configure the settle times for files and directories and the scan interval. The default interval of "0" will let the importer only scan once every 24h - but on every upload a scan is triggered.

If you copied some files to the import directory by hand, just click the button beside the scanner and trigger a rescan.

Copying Files(Experts)

If you run into trouble uploading large files you can copy the files (or even complete directories) to the importer directory by hand. You will find it at DATADIR/import. DATADIR will be $HOME/avnav or $HOME/avnav/data depending on your set up.
After you copied a file or direcftory you need to trigger a rescan by hand.

To avoid copying lare files or directory trees you can also create a file with the extension ".clk" (converter link file) in the importer directory.
Inside the file just put one line with the absolute path to the file or directory you would like to convert.
Don't forget to trigger a rescan after you saved the file.

Eingebaute Konverter

AvNav bringt die folgenden Konverter mit.

.kap (BSB)

For kap (BSB) charts you can pack multiple files into a zip archive and upload this archive.
The connversions has the following steps:

  • Sorting the charts into layers (with possible conversion)
  • Creation of the tiles
  • Building the gemf file

Details (Experts only)

Here are some details about the conversion steps of the internal kap files converter. Normally you do care about them.
But if you are unhappy with the results of the conversion you still could run the conversion using the command line.
The read_charts.py is located at /usr/lib/avnav/chartconvert.

The first step is fast. All chart data will be read, resolution and range will be detected. If necessary charts would be converted/reprojected. As a result there will be a chartlist.xml in workdir/<name> . The command line would be:

read_charts.py -g -o name -m chartlist inputdir [inputdir...]

Afterwards you can check the chartlist.xml and you could e.g. move some charts into a different layer.

The second step will take more time -  now the tiles are created:

read_charts.py -g -o name -m generate inputdir [inputdir...]

The file chartlist.xml must already exist at  workdir/<name>. The creation will run multi threaded.

At the end you need to create the gemf file:

read_charts.py -g -o name -m gemf inputdir [inputdir...]

You could also combine all steps:

read_charts.py -g -m all [-o name] inputdir [inputdir...]

.mbtiles

In principle AvNav can handle .mbtiles files directly. But ot could make sense to convert them to .gemf any way - e.g. for copying them to the external charts directory on Android.
Until now the converter can only handle mbtiles with the default xyz scheme.

.navipack

Conversion into gemf.