Preparing S-57 data using enc processor Python module: Difference between revisions

From Maria GDK Wiki
Preparing S-57 data using enc processor Python module
Jump to navigation Jump to search
(Created page with "S-57 source data can be converted to MBTiles using the Python module enc_processor. Some layers are given custom fields to facilitate rendering in MARIA GDK. thumb")
 
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
S-57 source data can be converted to MBTiles using the Python module enc_processor. Some layers are given custom fields to facilitate rendering in MARIA GDK.  
{{DISPLAYTITLE:Preparing S-57 data using enc_processor Python module}}
[[File:S-57 enc processor.png|thumb]]
S-57 source data can be converted to MBTiles using the Python module ''enc_processor''. The output is split into one MBTiles dataset for each scaleband. Some layers are given custom fields to facilitate rendering in MARIA GDK. Zoom level configuration in the output is defined to work with the existing product ''NorwayNauticalENCVector.''[[File:S-57 enc processor.png|thumb]]Processing all scalebands for Norway typically takes 7-9 hours on a fast computer and SSD.
 
<syntaxhighlight lang="python3">
scalebands = {
    1 : {'name':'Overview', 'minzoom':3, 'maxzoom':12},
    2 : {'name':'General', 'minzoom':10, 'maxzoom':13},
    3 : {'name':'Coastal', 'minzoom':10, 'maxzoom':13},
    4 : {'name':'Approach', 'minzoom':13, 'maxzoom':16},
    5 : {'name':'Harbor', 'minzoom':14, 'maxzoom':17},
    6 : {'name':'Berthing', 'minzoom':14, 'maxzoom':17},
}
</syntaxhighlight>
== Dependencies ==
The module depends on the following non-standard Python packages.
 
* GDAL
* protobuf
 
== Arguments ==
{| class="wikitable"
|+
!Argument
!Description
|-
|input
|Input folder containing S-57 "000" files. Folders are searched recursively.
|-
|output
|Output folder where MBTiles will be built
|-
| --debug
|Write debug log messages
|}
 
== Example of use ==
<code>python -m enc_processor c:\work\enc\enc_root\ c:\work\enc\mbtiles\ --debug</code>
 
<code>python -m enc_processor --help</code>
 
[[Category:Preparing data]]

Latest revision as of 15:08, 13 March 2024

S-57 source data can be converted to MBTiles using the Python module enc_processor. The output is split into one MBTiles dataset for each scaleband. Some layers are given custom fields to facilitate rendering in MARIA GDK. Zoom level configuration in the output is defined to work with the existing product NorwayNauticalENCVector.

S-57 enc processor.png

Processing all scalebands for Norway typically takes 7-9 hours on a fast computer and SSD.

scalebands = {
    1 : {'name':'Overview', 'minzoom':3, 'maxzoom':12},
    2 : {'name':'General', 'minzoom':10, 'maxzoom':13},
    3 : {'name':'Coastal', 'minzoom':10, 'maxzoom':13},
    4 : {'name':'Approach', 'minzoom':13, 'maxzoom':16},
    5 : {'name':'Harbor', 'minzoom':14, 'maxzoom':17},
    6 : {'name':'Berthing', 'minzoom':14, 'maxzoom':17},
}

Dependencies

The module depends on the following non-standard Python packages.

  • GDAL
  • protobuf

Arguments

Argument Description
input Input folder containing S-57 "000" files. Folders are searched recursively.
output Output folder where MBTiles will be built
--debug Write debug log messages

Example of use

python -m enc_processor c:\work\enc\enc_root\ c:\work\enc\mbtiles\ --debug

python -m enc_processor --help