Skip to content
Open
Show file tree
Hide file tree
Changes from 110 commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
5fbd7c4
Initial changes, started work on format separation
meeqn Feb 23, 2024
d316396
Further changes regarding early parsing
meeqn Feb 29, 2024
e8b5c22
3.03. changes - coordinates
nanatalia1 Mar 3, 2024
3582a85
Changes for autosize
meeqn Mar 3, 2024
334d318
Merge branch 'Natalia_Branch' into miqn_branch
meeqn Mar 3, 2024
d7f379c
Merge pull request #1 from meeqn/miqn_branch
meeqn Mar 3, 2024
8948ff8
3.03. changes - coordinates
nanatalia1 Mar 3, 2024
46d1995
3.03. changes - coordinates
nanatalia1 Mar 3, 2024
fecb285
3.03. changes - parser S-57
nanatalia1 Mar 3, 2024
a46a4dc
13.03. changes - zone
nanatalia1 Mar 13, 2024
cac154d
Delete .idea directory
nanatalia1 Mar 16, 2024
65e7ad6
config new
nanatalia1 Mar 16, 2024
bca170f
Merge remote-tracking branch 'origin/Natalia_Branch' into Natalia_Branch
nanatalia1 Mar 16, 2024
6a31161
lat long to UTM
nanatalia1 Mar 16, 2024
9ca1875
changed zone (one per map)
nanatalia1 Mar 18, 2024
6181aaf
pre pull
meeqn Mar 23, 2024
1802f74
pre pull
meeqn Mar 23, 2024
d5fbf2f
Merge remote-tracking branch 'origin/Natalia_Branch' into miqn
meeqn Mar 23, 2024
18d2acc
working early S-57 maps conversion + display for requested depths, si…
meeqn Mar 27, 2024
0086640
Merge pull request #2 from meeqn/miqn_branch
meeqn Mar 28, 2024
f4a3896
updated configuration for different utm zones, display should now han…
meeqn Apr 23, 2024
bba05eb
Merge pull request #3 from meeqn/miqn
meeqn Apr 23, 2024
52e73e1
fixed coordinate offsets
meeqn May 6, 2024
00ad4db
Merge pull request #4 from meeqn/miqn
meeqn May 6, 2024
eb5eea3
weather download implementation
kdrozd-dev Jun 3, 2024
df81fe1
minor bug fix
kdrozd-dev Jun 3, 2024
532c971
Update weatherManager.py
kdrozd-dev Jun 3, 2024
9489804
weather data into layers
kdrozd-dev Jun 4, 2024
4679eee
weather data into layers
kdrozd-dev Jun 4, 2024
67fac0f
Merge branch 'konrad_branch' of https://github.com/SanityRemnants/sea…
kdrozd-dev Jun 7, 2024
6ecf05a
added map clipping
meeqn Jun 7, 2024
e812a42
Merge branch 'miqn' of https://github.com/meeqn/seacharts_s57_WIP int…
kdrozd-dev Jun 7, 2024
002673f
Merge pull request #1 from SanityRemnants/konrad_branch
kdrozd-dev Jun 7, 2024
2868261
more global coordinate converter
meeqn Jun 8, 2024
f6effa6
weather operation UI, bugfix
meeqn Jun 8, 2024
1e497a3
added weather display heatmap
kdrozd-dev Jun 8, 2024
c1fa69f
display update
kdrozd-dev Jun 9, 2024
d2c238a
update visualization
kdrozd-dev Jun 9, 2024
adfa935
proper demo
kdrozd-dev Jun 9, 2024
d842a2e
Update shape.py
kdrozd-dev Jun 9, 2024
4ec82ab
Added weather data access from code
kdrozd-dev Jun 25, 2024
9844a4f
Update weather.py
kdrozd-dev Jun 25, 2024
482426d
Update display.py
kdrozd-dev Jul 2, 2024
0d5a4d2
Merge pull request #5 from SanityRemnants/konrad_branch
meeqn Jul 2, 2024
2022572
Update weather.py
kdrozd-dev Jul 2, 2024
7f615e6
Merge pull request #6 from SanityRemnants/konrad_branch
meeqn Jul 2, 2024
03fec2f
working on display fix
meeqn Jul 2, 2024
5dcdd9b
v0.5 for displaying shoreline, layers display in S-57 fixed for light…
meeqn Jul 18, 2024
b284ce0
minor fixes
meeqn Jul 19, 2024
eeb067a
Merge pull request #7 from meeqn/s57
meeqn Jul 21, 2024
a1d81c0
minor display improvements
kdrozd-dev Aug 8, 2024
7290b20
z_axis fixes
meeqn Aug 8, 2024
2abc9e1
Merge pull request #8 from meeqn/s57
meeqn Aug 8, 2024
19d2997
enable weather display correction for data cut by projection
kdrozd-dev Aug 13, 2024
3c3ee7f
Update display.py
kdrozd-dev Aug 13, 2024
c03eb13
Update display.py
kdrozd-dev Aug 13, 2024
d3054b4
extra layers for S-57 maps, new config schema (with time separated fr…
meeqn Aug 23, 2024
1113cd6
added improvements for dynamic z_order, and some error proofing for F…
meeqn Aug 24, 2024
bb5168f
Merge pull request #9 from meeqn/z_order_and_display_fixes
meeqn Aug 24, 2024
23c7929
abstraction for DataClass and code improvements
meeqn Aug 24, 2024
2039edd
initial commit adding functionality for having shapefiles for multipl…
meeqn Aug 24, 2024
4818b8e
Merge pull request #10 from meeqn/z_order_and_display_fixes
meeqn Aug 24, 2024
9d5ebdb
Merge pull request #11 from meeqn/multiple_maps_saved
meeqn Aug 24, 2024
b83cd0e
minor display improvements
kdrozd-dev Aug 8, 2024
ad6bb03
enable weather display correction for data cut by projection
kdrozd-dev Aug 13, 2024
778ccf4
Update display.py
kdrozd-dev Aug 13, 2024
a3dc595
Update display.py
kdrozd-dev Aug 13, 2024
3d24fb5
Download slightly larger area to better fit the display
kdrozd-dev Aug 25, 2024
c899e6b
implement basic arrowmap
kdrozd-dev Aug 26, 2024
9292852
added extension for time in config to specify hours and minutes, minu…
meeqn Aug 26, 2024
f0e6903
Merge pull request #12 from meeqn/time_extended_to_hours
meeqn Aug 26, 2024
3401541
Improve arrow map drawing
kdrozd-dev Aug 26, 2024
bcbdda0
Merge remote-tracking branch 'upstream/main' into konrad_branch
kdrozd-dev Aug 26, 2024
eeb6c58
slider handling
kdrozd-dev Aug 26, 2024
f3860cb
autoconfig for windows and minor fixes
meeqn Aug 27, 2024
5a9e9c7
display WIP
kdrozd-dev Aug 30, 2024
a79cc6c
Merge branch 'konrad_branch' of https://github.com/SanityRemnants/sea…
kdrozd-dev Aug 30, 2024
3b609ca
Merge remote-tracking branch 'upstream/main' into konrad_branch
kdrozd-dev Aug 31, 2024
8c28bb4
Weather + UI integration
kdrozd-dev Sep 1, 2024
49e2936
Merge pull request #13 from SanityRemnants/konrad_branch
meeqn Sep 1, 2024
311c432
some stylistic changes
meeqn Sep 1, 2024
db447c7
added unit display to colorbar
kdrozd-dev Sep 24, 2024
a0d49a3
Merge pull request #14 from SanityRemnants/konrad_branch
meeqn Sep 29, 2024
9eb9dce
Fix weather access
kdrozd-dev Sep 30, 2024
56b200a
Merge pull request #15 from SanityRemnants/konrad_branch
meeqn Sep 30, 2024
6c1d907
path fix and label for slider deleted
meeqn Sep 30, 2024
db45821
Merge branch 'main' of https://github.com/meeqn/seacharts_s57
meeqn Sep 30, 2024
ce727dd
shallow waters are not underlapping whole map now
meeqn Oct 1, 2024
686ebaf
Merge pull request #16 from meeqn/reduce_depth_overlapping
meeqn Oct 1, 2024
a15aca8
loading shapefiles simplified
meeqn Oct 1, 2024
7c6408f
Merge pull request #17 from meeqn/reduce_depth_overlapping
meeqn Oct 1, 2024
28e4a73
get records
nanatalia1 Oct 2, 2024
15da5ac
get records
nanatalia1 Oct 2, 2024
bd9547e
Merge pull request #18 from meeqn/get_arguments
nanatalia1 Oct 2, 2024
01ca537
add warning for projection limit exceed
meeqn Oct 2, 2024
63105cf
.
meeqn Oct 3, 2024
8681063
Merge pull request #19 from meeqn/utility_updates
meeqn Oct 3, 2024
3983e82
import fix, comments clarified in config, config file for setting up …
meeqn Oct 3, 2024
117349f
added some description for users running SC for the first time (#22)
meeqn Oct 3, 2024
293dbb9
Readme update (#20)
nanatalia1 Oct 3, 2024
e6b38a0
Display tweaks (#23)
meeqn Oct 3, 2024
a842b48
Documentation update (#24)
meeqn Oct 3, 2024
8df73e7
Documentation update (#26)
meeqn Nov 3, 2024
cf237a3
fixes
meeqn Nov 3, 2024
330a949
pushing user_doc to remote (#27)
meeqn Nov 4, 2024
abc2b25
Added get_value for weather data (#25)
kdrozd-dev Nov 7, 2024
5753843
Minor fixes & tests update (#29)
meeqn Nov 13, 2024
87f1426
getting parameters from layer (#30)
meeqn Nov 28, 2024
06c65b4
removed the min depth constraint from schema (#31)
meeqn May 12, 2025
abe7e43
2025 premerge tweaks (#32)
meeqn Nov 3, 2025
68d094f
Fixed some issues based on Copilot-generated review. (#34)
meeqn Nov 27, 2025
0ef9751
Commit premerge suggestions (#35)
meeqn Jan 11, 2026
080ff20
Add Table of Contents in README.md for improved navigation (#36)
meeqn Jan 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,7 @@ data/db/
data/shapefiles/
data/vessels.csv
output/
.vscode/
.vscode/

#pycharm
.idea
47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Python-based API for Electronic Navigational Charts (ENC)
- Read and process spatial depth data from
[FileGDB](https://gdal.org/drivers/vector/filegdb.html) files into
shapefiles.
- Read and process spatial depth data from [S-57](https://gdal.org/en/latest/drivers/vector/s57.html) files into shapefiles.
- Visualize S-57 [layers](https://www.teledynecaris.com/s-57/frames/S57catalog.htm).
- Access and manipulate standard geometric shapes such as points and polygon
collections.
- Visualize colorful seacharts features and vessels.
Expand All @@ -24,9 +26,9 @@ This module follows the [PEP8](https://www.python.org/dev/peps/pep-0008/)
convention for Python code.


## Prerequisites
## Prerequisites - For SeaCharts 4.0 see [this](#seacharts-40-setup-tips) section

### Linux (Virtual Environment)
### DEPRECATED - Linux (Virtual Environment)

First, ensure that you have the GDAL and GEOS libraries installed, as these are
required in order to successfully install GDAL and Cartopy:
Expand All @@ -43,7 +45,7 @@ pip install -e .
This should preferably be done inside a virtual environment in order to prevent
Python packaging conflicts.

### Anaconda
### DEPRECATED - Anaconda

Install an edition of the [Anaconda](
https://www.anaconda.com/products/individual-d) package manager, and then create a new
Expand All @@ -63,7 +65,7 @@ conda install -c conda-forge fiona cartopy matplotlib
conda install matplotlib-scalebar cerberys pyyaml
```

### Windows (Pipwin)
### DEPRECATED - Windows (Pipwin)

First, ensure that [Python 3.11](https://www.python.org/downloads/) or higher
is installed. Next, install all required packages using
Expand Down Expand Up @@ -103,13 +105,13 @@ or locally inside the SeaCharts root folder as an editable package with `pip ins

## Usage

This module supports reading and processing `FGDB` files for sea depth data,
such as the Norwegian coastal data set used for demonstration purposes, found
[here](
https://kartkatalog.geonorge.no/metadata/2751aacf-5472-4850-a208-3532a51c529a).
This module supports reading and processing `FGDB` and 'S-57' files for sea depth data.

### Downloading regional datasets
### Downloading regional datasets - FGDB

The Norwegian coastal data set used for demonstration purposes, found
[here](
https://kartkatalog.geonorge.no/metadata/2751aacf-5472-4850-a208-3532a51c529a).
To visualize and access coastal data of Norway, follow the above link to download
the `Depth data` (`Sjøkart - Dybdedata`) dataset from the [Norwegian Mapping Authority](
https://kartkatalog.geonorge.no/?organization=Norwegian%20Mapping%20Authority) by adding
Expand All @@ -122,7 +124,7 @@ format. Finally, select your appropriate user group and purpose, and click

### Configuration and startup

Unpack the downloaded file(s) and place the extracted `.gdb` in a suitable location,
Unpack the downloaded file(s) and place the extracted `.gdb` or 'S-57' folder in a suitable location,
in which the SeaCharts setup may be configured to search. The current
working directory as well as the relative `data/` and `data/db/` folders are
included by default.
Expand All @@ -141,7 +143,7 @@ if __name__ == '__main__':
enc.display.show()
```

The `config.yaml` file specifies which file paths to open and which area to load.
The `config.yaml` file specifies which file paths to open and which area to load. In the configuration file the desired map type can be specified by listring data to display - depths for 'FDGB', and [layers](https://www.teledynecaris.com/s-57/frames/S57catalog.htm) for 'S-57'.
The corresponding `config_schema.yaml` specifies how the required setup parameters
must be provided, using `cerberus`.

Expand Down Expand Up @@ -173,9 +175,14 @@ Note how custom settings may be set in a user-defined .yaml-file, if its path is
provided to the ENC during initialization. One may also import and create an
instance of the `seacharts.Config` dataclass, and provide it directly to the ENC.

### FGDB demonstration
![](images/example2.svg "Example visualization of vessels and a
colorbar with depth values in light mode.")

### S-57 demonstration
![](images/example3.png "Example visualization of S-57 map with TSS layer and a
colorbar with depth values in light mode.")

### Environment visualization
The `ENC.start_display` method is used to show a Matplotlib figure plot of the
loaded sea charts features. Zoom and pan the environment view using the mouse
Expand All @@ -186,6 +193,24 @@ the various depth legends may be toggled using the `c` key. Images of the
currently shown display may be saved in various resolutions by pressing
Control + `s`, Shift + `s` or `s`.

### SeaCharts 4.0 setup tips
```
Please be aware that these setup tips require setting up Conda environment.
Possible support for pip installation will be resolved in the future.
```

This is a short to-do list that might come useful when setting up SeaCharts 4.0 for the first time:
1. Set up conda environment as instructed in `conda_requirements.txt` file
2. Use `setup.ps1` (WINDOWS ONLY) to setup directory structure needed by SeaCharts or manually create directories: `data`, `data/db` and `data/shapefiles`
3. Download US1GC09M map via [this link](https://www.charts.noaa.gov/ENCs/US1GC09M.zip), and put the `US1GC09M` directory (found in ENC_ROOT directory) inside data/db folder.
4. Run `test_seacharts_4_0.py` code either by pasting code into some main.py file in root of your project directory or by running it directly (needs fixing the issues with importing seacharts in the test file)
5. After execution you can expect such image to be displayed:
![](images/test_results.svg
"Example visualization with vessels and geometric shapes in dark mode.")
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Malformed markdown image syntax - missing closing parenthesis on line 208. Should be ![](images/test_results.svg) or the description should be on the same line within the brackets.

Copilot uses AI. Check for mistakes.

```
For further experimentation options, look into files: `enc.py`, `config.yaml` and `config-schema.yaml` (for reference)
```
## License

This project uses the [MIT](https://choosealicense.com/licenses/mit/) license.
43 changes: 43 additions & 0 deletions conda_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# first, add conda-forge to channel using:
# conda config --add channels conda-forge

# when in directory with conda_requirements.txt file, use:
# conda create --name <env_name> --file conda_requirements.txt

# next, activate the environment (eg. select interpreter via Visual Studio Code UI or manually via CLI)

attrs=23.2.0
cartopy=0.22.0
cerberus=1.3.5
certifi=2024.8.30
click=8.1.7
click-plugins=1.1.1
cligj=0.7.2
colorama=0.4.6
contourpy=1.2.0
cycler=0.12.1
fiona=1.9.6
fonttools=4.50.0
gdal=3.8.4
ipython=8.26.0
ipywidgets=8.1.5
jedi=0.19.1
js2py=0.74
jupyterlab_widgets=3.0.13
kiwisolver=1.4.5
matplotlib=3.8.3
matplotlib-scalebar=0.8.1
numpy=1.26.4
packaging=24.0
parso=0.8.4
pillow=10.2.0
pyparsing=3.1.2
pyproj=3.6.1
pyshp=2.3.1
python-dateutil=2.9.0
pyyaml=6.0.1
requests=2.31.0
shapely=2.0.3
six=1.16.0
tzdata=2024a
widgetsnbextension=4.0.13
Binary file added images/example3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading