diff --git a/.appveyor.yml b/.appveyor.yml
index d9ec599f..5088f737 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,4 +1,4 @@
-version: 13.40.{build}
+version: 13.42.{build}
configuration:
- Release
diff --git a/gpxsee.pro b/gpxsee.pro
index 40a7e5a2..ab247eaf 100644
--- a/gpxsee.pro
+++ b/gpxsee.pro
@@ -3,7 +3,7 @@ unix:!macx:!android {
} else {
TARGET = GPXSee
}
-VERSION = 13.40
+VERSION = 13.42
QT += core \
gui \
diff --git a/gpxsee.qrc b/gpxsee.qrc
index fd883090..652940ec 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -43,6 +43,7 @@
icons/map/POI/casino-11.svg
icons/map/POI/castle-11.svg
icons/map/POI/cemetery-11.svg
+ icons/map/POI/charging-station-11.svg
icons/map/POI/cinema-11.svg
icons/map/POI/clothing-store-11.svg
icons/map/POI/college-11.svg
@@ -138,7 +139,101 @@
icons/map/marine/light-major.png
icons/map/marine/buoy.png
+ icons/map/marine/buoy-white.png
+ icons/map/marine/buoy-white-black.png
+ icons/map/marine/buoy-white-green.png
+ icons/map/marine/buoy-white-red.png
+ icons/map/marine/buoy-white-yellow.png
+ icons/map/marine/buoy-white-yellow-white.png
+ icons/map/marine/buoy-green.png
+ icons/map/marine/buoy-green-white.png
+ icons/map/marine/buoy-green-white-green-white.png
+ icons/map/marine/buoy-green-black.png
+ icons/map/marine/buoy-green-red.png
+ icons/map/marine/buoy-green-red-green.png
+ icons/map/marine/buoy-green-red-green-red.png
+ icons/map/marine/buoy-red.png
+ icons/map/marine/buoy-red-white.png
+ icons/map/marine/buoy-red-white-red-white.png
+ icons/map/marine/buoy-red-black.png
+ icons/map/marine/buoy-red-green.png
+ icons/map/marine/buoy-red-yellow.png
+ icons/map/marine/buoy-red-green-red.png
+ icons/map/marine/buoy-red-green-red-green.png
+ icons/map/marine/buoy-yellow.png
+ icons/map/marine/buoy-yellow-white.png
+ icons/map/marine/buoy-yellow-white-yellow.png
+ icons/map/marine/buoy-yellow-black.png
+ icons/map/marine/buoy-yellow-black-yellow.png
+ icons/map/marine/buoy-yellow-red-yellow.png
+ icons/map/marine/buoy-black-white.png
+ icons/map/marine/buoy-black-red.png
+ icons/map/marine/buoy-black-white-black.png
+ icons/map/marine/buoy-black-red-black.png
+ icons/map/marine/buoy-black-green.png
+ icons/map/marine/buoy-black-yellow.png
+ icons/map/marine/buoy-black-yellow-black.png
icons/map/marine/beacon.png
+ icons/map/marine/beacon-white.png
+ icons/map/marine/beacon-white-black.png
+ icons/map/marine/beacon-white-green.png
+ icons/map/marine/beacon-white-red.png
+ icons/map/marine/beacon-white-yellow.png
+ icons/map/marine/beacon-white-yellow-white.png
+ icons/map/marine/beacon-green.png
+ icons/map/marine/beacon-green-white.png
+ icons/map/marine/beacon-green-white-green-white.png
+ icons/map/marine/beacon-green-black.png
+ icons/map/marine/beacon-green-red.png
+ icons/map/marine/beacon-green-red-green.png
+ icons/map/marine/beacon-green-red-green-red.png
+ icons/map/marine/beacon-red.png
+ icons/map/marine/beacon-red-white.png
+ icons/map/marine/beacon-red-white-red-white.png
+ icons/map/marine/beacon-red-black.png
+ icons/map/marine/beacon-red-green.png
+ icons/map/marine/beacon-red-yellow.png
+ icons/map/marine/beacon-red-green-red.png
+ icons/map/marine/beacon-red-green-red-green.png
+ icons/map/marine/beacon-yellow.png
+ icons/map/marine/beacon-yellow-white.png
+ icons/map/marine/beacon-yellow-white-yellow.png
+ icons/map/marine/beacon-yellow-black.png
+ icons/map/marine/beacon-yellow-black-yellow.png
+ icons/map/marine/beacon-yellow-red-yellow.png
+ icons/map/marine/beacon-black-white.png
+ icons/map/marine/beacon-black-white-black.png
+ icons/map/marine/beacon-black-red.png
+ icons/map/marine/beacon-black-red-black.png
+ icons/map/marine/beacon-black-green.png
+ icons/map/marine/beacon-black-yellow.png
+ icons/map/marine/beacon-black-yellow-black.png
+ icons/map/marine/spar-buoy.png
+ icons/map/marine/spar-buoy-red.png
+ icons/map/marine/spar-buoy-green.png
+ icons/map/marine/spar-buoy-yellow.png
+ icons/map/marine/spar-buoy-white.png
+ icons/map/marine/spar-buoy-black-yellow.png
+ icons/map/marine/spar-buoy-white-red.png
+ icons/map/marine/spar-buoy-black-red.png
+ icons/map/marine/spar-buoy-white-green.png
+ icons/map/marine/spar-buoy-red-yellow.png
+ icons/map/marine/spar-buoy-red-green.png
+ icons/map/marine/spar-buoy-black-yellow-black.png
+ icons/map/marine/spar-buoy-yellow-black.png
+ icons/map/marine/spar-buoy-yellow-black-yellow.png
+ icons/map/marine/spar-buoy-red-white.png
+ icons/map/marine/spar-buoy-green-red-green.png
+ icons/map/marine/spar-buoy-red-green-red.png
+ icons/map/marine/spar-buoy-black-red-black.png
+ icons/map/marine/spar-buoy-yellow-red-yellow.png
+ icons/map/marine/spar-buoy-green-red.png
+ icons/map/marine/spar-buoy-black-white.png
+ icons/map/marine/spar-buoy-white-yellow.png
+ icons/map/marine/spar-buoy-yellow-white.png
+ icons/map/marine/spar-buoy-green-white.png
+ icons/map/marine/mooring-buoy.png
+ icons/map/marine/platform.png
icons/map/marine/rock-exposed.png
icons/map/marine/rock-dangerous.png
icons/map/marine/wreck.png
@@ -158,11 +253,8 @@
icons/map/marine/yacht-harbor.png
icons/map/marine/fishing-harbor.png
icons/map/marine/pile.png
- icons/map/marine/spar-buoy.png
- icons/map/marine/mooring-buoy.png
icons/map/marine/tower.png
icons/map/marine/chimney.png
- icons/map/marine/platform.png
icons/map/marine/ferry-line.png
icons/map/marine/dw-route-line.png
icons/map/marine/fence-line.png
@@ -217,6 +309,8 @@
icons/map/marine/nature-reserve-line.png
icons/map/marine/sanctuary-line.png
icons/map/marine/fishing-farm.png
+ icons/map/marine/shellfish-farm-line.png
+ icons/map/marine/degaussing-line.png
diff --git a/icons/map/POI/charging-station-11.svg b/icons/map/POI/charging-station-11.svg
new file mode 100644
index 00000000..9727f704
--- /dev/null
+++ b/icons/map/POI/charging-station-11.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/icons/map/marine/beacon-black-green.png b/icons/map/marine/beacon-black-green.png
new file mode 100644
index 00000000..63bf20cb
Binary files /dev/null and b/icons/map/marine/beacon-black-green.png differ
diff --git a/icons/map/marine/beacon-black-red-black.png b/icons/map/marine/beacon-black-red-black.png
new file mode 100644
index 00000000..184d3746
Binary files /dev/null and b/icons/map/marine/beacon-black-red-black.png differ
diff --git a/icons/map/marine/beacon-black-red.png b/icons/map/marine/beacon-black-red.png
new file mode 100644
index 00000000..b1c483d1
Binary files /dev/null and b/icons/map/marine/beacon-black-red.png differ
diff --git a/icons/map/marine/beacon-black-white-black.png b/icons/map/marine/beacon-black-white-black.png
new file mode 100644
index 00000000..ea4bbfea
Binary files /dev/null and b/icons/map/marine/beacon-black-white-black.png differ
diff --git a/icons/map/marine/beacon-black-white.png b/icons/map/marine/beacon-black-white.png
new file mode 100644
index 00000000..49c14904
Binary files /dev/null and b/icons/map/marine/beacon-black-white.png differ
diff --git a/icons/map/marine/beacon-black-yellow-black.png b/icons/map/marine/beacon-black-yellow-black.png
new file mode 100644
index 00000000..79522e14
Binary files /dev/null and b/icons/map/marine/beacon-black-yellow-black.png differ
diff --git a/icons/map/marine/beacon-black-yellow.png b/icons/map/marine/beacon-black-yellow.png
new file mode 100644
index 00000000..99a90302
Binary files /dev/null and b/icons/map/marine/beacon-black-yellow.png differ
diff --git a/icons/map/marine/beacon-green-black.png b/icons/map/marine/beacon-green-black.png
new file mode 100644
index 00000000..803a56e3
Binary files /dev/null and b/icons/map/marine/beacon-green-black.png differ
diff --git a/icons/map/marine/beacon-green-red-green-red.png b/icons/map/marine/beacon-green-red-green-red.png
new file mode 100644
index 00000000..2736df0a
Binary files /dev/null and b/icons/map/marine/beacon-green-red-green-red.png differ
diff --git a/icons/map/marine/beacon-green-red-green.png b/icons/map/marine/beacon-green-red-green.png
new file mode 100644
index 00000000..f3c0bdea
Binary files /dev/null and b/icons/map/marine/beacon-green-red-green.png differ
diff --git a/icons/map/marine/beacon-green-red.png b/icons/map/marine/beacon-green-red.png
new file mode 100644
index 00000000..483ef81d
Binary files /dev/null and b/icons/map/marine/beacon-green-red.png differ
diff --git a/icons/map/marine/beacon-green-white-green-white.png b/icons/map/marine/beacon-green-white-green-white.png
new file mode 100644
index 00000000..9c21d6e8
Binary files /dev/null and b/icons/map/marine/beacon-green-white-green-white.png differ
diff --git a/icons/map/marine/beacon-green-white.png b/icons/map/marine/beacon-green-white.png
new file mode 100644
index 00000000..f693e9c3
Binary files /dev/null and b/icons/map/marine/beacon-green-white.png differ
diff --git a/icons/map/marine/beacon-green.png b/icons/map/marine/beacon-green.png
new file mode 100644
index 00000000..36e522dc
Binary files /dev/null and b/icons/map/marine/beacon-green.png differ
diff --git a/icons/map/marine/beacon-red-black.png b/icons/map/marine/beacon-red-black.png
new file mode 100644
index 00000000..b96ea97c
Binary files /dev/null and b/icons/map/marine/beacon-red-black.png differ
diff --git a/icons/map/marine/beacon-red-green-red-green.png b/icons/map/marine/beacon-red-green-red-green.png
new file mode 100644
index 00000000..e33b743f
Binary files /dev/null and b/icons/map/marine/beacon-red-green-red-green.png differ
diff --git a/icons/map/marine/beacon-red-green-red.png b/icons/map/marine/beacon-red-green-red.png
new file mode 100644
index 00000000..e12f5e73
Binary files /dev/null and b/icons/map/marine/beacon-red-green-red.png differ
diff --git a/icons/map/marine/beacon-red-green.png b/icons/map/marine/beacon-red-green.png
new file mode 100644
index 00000000..72482371
Binary files /dev/null and b/icons/map/marine/beacon-red-green.png differ
diff --git a/icons/map/marine/beacon-red-white-red-white.png b/icons/map/marine/beacon-red-white-red-white.png
new file mode 100644
index 00000000..c57538d2
Binary files /dev/null and b/icons/map/marine/beacon-red-white-red-white.png differ
diff --git a/icons/map/marine/beacon-red-white.png b/icons/map/marine/beacon-red-white.png
new file mode 100644
index 00000000..e6d151cf
Binary files /dev/null and b/icons/map/marine/beacon-red-white.png differ
diff --git a/icons/map/marine/beacon-red-yellow.png b/icons/map/marine/beacon-red-yellow.png
new file mode 100644
index 00000000..82ec81b5
Binary files /dev/null and b/icons/map/marine/beacon-red-yellow.png differ
diff --git a/icons/map/marine/beacon-red.png b/icons/map/marine/beacon-red.png
new file mode 100644
index 00000000..4a68ce33
Binary files /dev/null and b/icons/map/marine/beacon-red.png differ
diff --git a/icons/map/marine/beacon-white-black.png b/icons/map/marine/beacon-white-black.png
new file mode 100644
index 00000000..7c48f3df
Binary files /dev/null and b/icons/map/marine/beacon-white-black.png differ
diff --git a/icons/map/marine/beacon-white-green.png b/icons/map/marine/beacon-white-green.png
new file mode 100644
index 00000000..baabfddd
Binary files /dev/null and b/icons/map/marine/beacon-white-green.png differ
diff --git a/icons/map/marine/beacon-white-red.png b/icons/map/marine/beacon-white-red.png
new file mode 100644
index 00000000..41bfaf1c
Binary files /dev/null and b/icons/map/marine/beacon-white-red.png differ
diff --git a/icons/map/marine/beacon-white-yellow-white.png b/icons/map/marine/beacon-white-yellow-white.png
new file mode 100644
index 00000000..2e72f534
Binary files /dev/null and b/icons/map/marine/beacon-white-yellow-white.png differ
diff --git a/icons/map/marine/beacon-white-yellow.png b/icons/map/marine/beacon-white-yellow.png
new file mode 100644
index 00000000..57f41a74
Binary files /dev/null and b/icons/map/marine/beacon-white-yellow.png differ
diff --git a/icons/map/marine/beacon-white.png b/icons/map/marine/beacon-white.png
new file mode 100644
index 00000000..2c1de323
Binary files /dev/null and b/icons/map/marine/beacon-white.png differ
diff --git a/icons/map/marine/beacon-yellow-black-yellow.png b/icons/map/marine/beacon-yellow-black-yellow.png
new file mode 100644
index 00000000..d6112d53
Binary files /dev/null and b/icons/map/marine/beacon-yellow-black-yellow.png differ
diff --git a/icons/map/marine/beacon-yellow-black.png b/icons/map/marine/beacon-yellow-black.png
new file mode 100644
index 00000000..f74fa690
Binary files /dev/null and b/icons/map/marine/beacon-yellow-black.png differ
diff --git a/icons/map/marine/beacon-yellow-red-yellow.png b/icons/map/marine/beacon-yellow-red-yellow.png
new file mode 100644
index 00000000..97631242
Binary files /dev/null and b/icons/map/marine/beacon-yellow-red-yellow.png differ
diff --git a/icons/map/marine/beacon-yellow-white-yellow.png b/icons/map/marine/beacon-yellow-white-yellow.png
new file mode 100644
index 00000000..3181f630
Binary files /dev/null and b/icons/map/marine/beacon-yellow-white-yellow.png differ
diff --git a/icons/map/marine/beacon-yellow-white.png b/icons/map/marine/beacon-yellow-white.png
new file mode 100644
index 00000000..6e2c0266
Binary files /dev/null and b/icons/map/marine/beacon-yellow-white.png differ
diff --git a/icons/map/marine/beacon-yellow.png b/icons/map/marine/beacon-yellow.png
new file mode 100644
index 00000000..8f7cc09a
Binary files /dev/null and b/icons/map/marine/beacon-yellow.png differ
diff --git a/icons/map/marine/beacon.png b/icons/map/marine/beacon.png
index 36d054d2..5e400143 100644
Binary files a/icons/map/marine/beacon.png and b/icons/map/marine/beacon.png differ
diff --git a/icons/map/marine/buoy-black-green.png b/icons/map/marine/buoy-black-green.png
new file mode 100644
index 00000000..fb6b2cda
Binary files /dev/null and b/icons/map/marine/buoy-black-green.png differ
diff --git a/icons/map/marine/buoy-black-red-black.png b/icons/map/marine/buoy-black-red-black.png
new file mode 100644
index 00000000..9b6310d9
Binary files /dev/null and b/icons/map/marine/buoy-black-red-black.png differ
diff --git a/icons/map/marine/buoy-black-red.png b/icons/map/marine/buoy-black-red.png
new file mode 100644
index 00000000..ff610b6b
Binary files /dev/null and b/icons/map/marine/buoy-black-red.png differ
diff --git a/icons/map/marine/buoy-black-white-black.png b/icons/map/marine/buoy-black-white-black.png
new file mode 100644
index 00000000..98c3c018
Binary files /dev/null and b/icons/map/marine/buoy-black-white-black.png differ
diff --git a/icons/map/marine/buoy-black-white.png b/icons/map/marine/buoy-black-white.png
new file mode 100644
index 00000000..c0a4e46a
Binary files /dev/null and b/icons/map/marine/buoy-black-white.png differ
diff --git a/icons/map/marine/buoy-black-yellow-black.png b/icons/map/marine/buoy-black-yellow-black.png
new file mode 100644
index 00000000..0ff9be9b
Binary files /dev/null and b/icons/map/marine/buoy-black-yellow-black.png differ
diff --git a/icons/map/marine/buoy-black-yellow.png b/icons/map/marine/buoy-black-yellow.png
new file mode 100644
index 00000000..6f9d9833
Binary files /dev/null and b/icons/map/marine/buoy-black-yellow.png differ
diff --git a/icons/map/marine/buoy-green-black.png b/icons/map/marine/buoy-green-black.png
new file mode 100644
index 00000000..f002b93b
Binary files /dev/null and b/icons/map/marine/buoy-green-black.png differ
diff --git a/icons/map/marine/buoy-green-red-green-red.png b/icons/map/marine/buoy-green-red-green-red.png
new file mode 100644
index 00000000..07093775
Binary files /dev/null and b/icons/map/marine/buoy-green-red-green-red.png differ
diff --git a/icons/map/marine/buoy-green-red-green.png b/icons/map/marine/buoy-green-red-green.png
new file mode 100644
index 00000000..ca78b2e4
Binary files /dev/null and b/icons/map/marine/buoy-green-red-green.png differ
diff --git a/icons/map/marine/buoy-green-red.png b/icons/map/marine/buoy-green-red.png
new file mode 100644
index 00000000..024ab597
Binary files /dev/null and b/icons/map/marine/buoy-green-red.png differ
diff --git a/icons/map/marine/buoy-green-white-green-white.png b/icons/map/marine/buoy-green-white-green-white.png
new file mode 100644
index 00000000..c5f0d776
Binary files /dev/null and b/icons/map/marine/buoy-green-white-green-white.png differ
diff --git a/icons/map/marine/buoy-green-white.png b/icons/map/marine/buoy-green-white.png
new file mode 100644
index 00000000..2b21ebbb
Binary files /dev/null and b/icons/map/marine/buoy-green-white.png differ
diff --git a/icons/map/marine/buoy-green.png b/icons/map/marine/buoy-green.png
new file mode 100644
index 00000000..168dd827
Binary files /dev/null and b/icons/map/marine/buoy-green.png differ
diff --git a/icons/map/marine/buoy-red-black.png b/icons/map/marine/buoy-red-black.png
new file mode 100644
index 00000000..0c0853e9
Binary files /dev/null and b/icons/map/marine/buoy-red-black.png differ
diff --git a/icons/map/marine/buoy-red-green-red-green.png b/icons/map/marine/buoy-red-green-red-green.png
new file mode 100644
index 00000000..5a6bf7f2
Binary files /dev/null and b/icons/map/marine/buoy-red-green-red-green.png differ
diff --git a/icons/map/marine/buoy-red-green-red.png b/icons/map/marine/buoy-red-green-red.png
new file mode 100644
index 00000000..fb55915b
Binary files /dev/null and b/icons/map/marine/buoy-red-green-red.png differ
diff --git a/icons/map/marine/buoy-red-green.png b/icons/map/marine/buoy-red-green.png
new file mode 100644
index 00000000..7c5a06d9
Binary files /dev/null and b/icons/map/marine/buoy-red-green.png differ
diff --git a/icons/map/marine/buoy-red-white-red-white.png b/icons/map/marine/buoy-red-white-red-white.png
new file mode 100644
index 00000000..12961e4c
Binary files /dev/null and b/icons/map/marine/buoy-red-white-red-white.png differ
diff --git a/icons/map/marine/buoy-red-white.png b/icons/map/marine/buoy-red-white.png
new file mode 100644
index 00000000..9c82e5b6
Binary files /dev/null and b/icons/map/marine/buoy-red-white.png differ
diff --git a/icons/map/marine/buoy-red-yellow.png b/icons/map/marine/buoy-red-yellow.png
new file mode 100644
index 00000000..a1c2fdc4
Binary files /dev/null and b/icons/map/marine/buoy-red-yellow.png differ
diff --git a/icons/map/marine/buoy-red.png b/icons/map/marine/buoy-red.png
new file mode 100644
index 00000000..bc57dfb4
Binary files /dev/null and b/icons/map/marine/buoy-red.png differ
diff --git a/icons/map/marine/buoy-white-black.png b/icons/map/marine/buoy-white-black.png
new file mode 100644
index 00000000..f9d25421
Binary files /dev/null and b/icons/map/marine/buoy-white-black.png differ
diff --git a/icons/map/marine/buoy-white-green.png b/icons/map/marine/buoy-white-green.png
new file mode 100644
index 00000000..5fde7a38
Binary files /dev/null and b/icons/map/marine/buoy-white-green.png differ
diff --git a/icons/map/marine/buoy-white-red.png b/icons/map/marine/buoy-white-red.png
new file mode 100644
index 00000000..24a99acb
Binary files /dev/null and b/icons/map/marine/buoy-white-red.png differ
diff --git a/icons/map/marine/buoy-white-yellow-white.png b/icons/map/marine/buoy-white-yellow-white.png
new file mode 100644
index 00000000..ba462786
Binary files /dev/null and b/icons/map/marine/buoy-white-yellow-white.png differ
diff --git a/icons/map/marine/buoy-white-yellow.png b/icons/map/marine/buoy-white-yellow.png
new file mode 100644
index 00000000..857f17fa
Binary files /dev/null and b/icons/map/marine/buoy-white-yellow.png differ
diff --git a/icons/map/marine/buoy-white.png b/icons/map/marine/buoy-white.png
new file mode 100644
index 00000000..d2ef25e8
Binary files /dev/null and b/icons/map/marine/buoy-white.png differ
diff --git a/icons/map/marine/buoy-yellow-black-yellow.png b/icons/map/marine/buoy-yellow-black-yellow.png
new file mode 100644
index 00000000..e482b13a
Binary files /dev/null and b/icons/map/marine/buoy-yellow-black-yellow.png differ
diff --git a/icons/map/marine/buoy-yellow-black.png b/icons/map/marine/buoy-yellow-black.png
new file mode 100644
index 00000000..4e2ad793
Binary files /dev/null and b/icons/map/marine/buoy-yellow-black.png differ
diff --git a/icons/map/marine/buoy-yellow-red-yellow.png b/icons/map/marine/buoy-yellow-red-yellow.png
new file mode 100644
index 00000000..63290e6f
Binary files /dev/null and b/icons/map/marine/buoy-yellow-red-yellow.png differ
diff --git a/icons/map/marine/buoy-yellow-white-yellow.png b/icons/map/marine/buoy-yellow-white-yellow.png
new file mode 100644
index 00000000..fc26f219
Binary files /dev/null and b/icons/map/marine/buoy-yellow-white-yellow.png differ
diff --git a/icons/map/marine/buoy-yellow-white.png b/icons/map/marine/buoy-yellow-white.png
new file mode 100644
index 00000000..4f482d42
Binary files /dev/null and b/icons/map/marine/buoy-yellow-white.png differ
diff --git a/icons/map/marine/buoy-yellow.png b/icons/map/marine/buoy-yellow.png
new file mode 100644
index 00000000..e0d0ff0e
Binary files /dev/null and b/icons/map/marine/buoy-yellow.png differ
diff --git a/icons/map/marine/degaussing-line.png b/icons/map/marine/degaussing-line.png
new file mode 100644
index 00000000..697c1404
Binary files /dev/null and b/icons/map/marine/degaussing-line.png differ
diff --git a/icons/map/marine/entry-prohibited-line.png b/icons/map/marine/entry-prohibited-line.png
index 509e8c80..fe0e628a 100644
Binary files a/icons/map/marine/entry-prohibited-line.png and b/icons/map/marine/entry-prohibited-line.png differ
diff --git a/icons/map/marine/nature-reserve-line.png b/icons/map/marine/nature-reserve-line.png
index c677c355..e67ae30c 100644
Binary files a/icons/map/marine/nature-reserve-line.png and b/icons/map/marine/nature-reserve-line.png differ
diff --git a/icons/map/marine/noanchor-line.png b/icons/map/marine/noanchor-line.png
index 4d71cca9..c50af80a 100644
Binary files a/icons/map/marine/noanchor-line.png and b/icons/map/marine/noanchor-line.png differ
diff --git a/icons/map/marine/overfalls.png b/icons/map/marine/overfalls.png
index 105c0963..9a6a68c5 100644
Binary files a/icons/map/marine/overfalls.png and b/icons/map/marine/overfalls.png differ
diff --git a/icons/map/marine/shellfish-farm-line.png b/icons/map/marine/shellfish-farm-line.png
new file mode 100644
index 00000000..7236ec51
Binary files /dev/null and b/icons/map/marine/shellfish-farm-line.png differ
diff --git a/icons/map/marine/spar-buoy-black-red-black.png b/icons/map/marine/spar-buoy-black-red-black.png
new file mode 100644
index 00000000..b643509c
Binary files /dev/null and b/icons/map/marine/spar-buoy-black-red-black.png differ
diff --git a/icons/map/marine/spar-buoy-black-red.png b/icons/map/marine/spar-buoy-black-red.png
new file mode 100644
index 00000000..f7972a2d
Binary files /dev/null and b/icons/map/marine/spar-buoy-black-red.png differ
diff --git a/icons/map/marine/spar-buoy-black-white.png b/icons/map/marine/spar-buoy-black-white.png
new file mode 100644
index 00000000..caed2975
Binary files /dev/null and b/icons/map/marine/spar-buoy-black-white.png differ
diff --git a/icons/map/marine/spar-buoy-black-yellow-black.png b/icons/map/marine/spar-buoy-black-yellow-black.png
new file mode 100644
index 00000000..df5718ec
Binary files /dev/null and b/icons/map/marine/spar-buoy-black-yellow-black.png differ
diff --git a/icons/map/marine/spar-buoy-black-yellow.png b/icons/map/marine/spar-buoy-black-yellow.png
new file mode 100644
index 00000000..1c10d7e8
Binary files /dev/null and b/icons/map/marine/spar-buoy-black-yellow.png differ
diff --git a/icons/map/marine/spar-buoy-green-red-green.png b/icons/map/marine/spar-buoy-green-red-green.png
new file mode 100644
index 00000000..af6db7c4
Binary files /dev/null and b/icons/map/marine/spar-buoy-green-red-green.png differ
diff --git a/icons/map/marine/spar-buoy-green-red.png b/icons/map/marine/spar-buoy-green-red.png
new file mode 100644
index 00000000..44a44ba4
Binary files /dev/null and b/icons/map/marine/spar-buoy-green-red.png differ
diff --git a/icons/map/marine/spar-buoy-green-white.png b/icons/map/marine/spar-buoy-green-white.png
new file mode 100644
index 00000000..7791afe2
Binary files /dev/null and b/icons/map/marine/spar-buoy-green-white.png differ
diff --git a/icons/map/marine/spar-buoy-green.png b/icons/map/marine/spar-buoy-green.png
new file mode 100644
index 00000000..037aa9e8
Binary files /dev/null and b/icons/map/marine/spar-buoy-green.png differ
diff --git a/icons/map/marine/spar-buoy-red-green-red.png b/icons/map/marine/spar-buoy-red-green-red.png
new file mode 100644
index 00000000..3b7a8013
Binary files /dev/null and b/icons/map/marine/spar-buoy-red-green-red.png differ
diff --git a/icons/map/marine/spar-buoy-red-green.png b/icons/map/marine/spar-buoy-red-green.png
new file mode 100644
index 00000000..6f6b00e5
Binary files /dev/null and b/icons/map/marine/spar-buoy-red-green.png differ
diff --git a/icons/map/marine/spar-buoy-red-white.png b/icons/map/marine/spar-buoy-red-white.png
new file mode 100644
index 00000000..03e0a0c4
Binary files /dev/null and b/icons/map/marine/spar-buoy-red-white.png differ
diff --git a/icons/map/marine/spar-buoy-red-yellow.png b/icons/map/marine/spar-buoy-red-yellow.png
new file mode 100644
index 00000000..988e03a0
Binary files /dev/null and b/icons/map/marine/spar-buoy-red-yellow.png differ
diff --git a/icons/map/marine/spar-buoy-red.png b/icons/map/marine/spar-buoy-red.png
new file mode 100644
index 00000000..bb09c6f5
Binary files /dev/null and b/icons/map/marine/spar-buoy-red.png differ
diff --git a/icons/map/marine/spar-buoy-white-green.png b/icons/map/marine/spar-buoy-white-green.png
new file mode 100644
index 00000000..d25b0e42
Binary files /dev/null and b/icons/map/marine/spar-buoy-white-green.png differ
diff --git a/icons/map/marine/spar-buoy-white-red.png b/icons/map/marine/spar-buoy-white-red.png
new file mode 100644
index 00000000..779b90eb
Binary files /dev/null and b/icons/map/marine/spar-buoy-white-red.png differ
diff --git a/icons/map/marine/spar-buoy-white-yellow.png b/icons/map/marine/spar-buoy-white-yellow.png
new file mode 100644
index 00000000..06e4b779
Binary files /dev/null and b/icons/map/marine/spar-buoy-white-yellow.png differ
diff --git a/icons/map/marine/spar-buoy-white.png b/icons/map/marine/spar-buoy-white.png
new file mode 100644
index 00000000..029081c7
Binary files /dev/null and b/icons/map/marine/spar-buoy-white.png differ
diff --git a/icons/map/marine/spar-buoy-yellow-black-yellow.png b/icons/map/marine/spar-buoy-yellow-black-yellow.png
new file mode 100644
index 00000000..8a0370b2
Binary files /dev/null and b/icons/map/marine/spar-buoy-yellow-black-yellow.png differ
diff --git a/icons/map/marine/spar-buoy-yellow-black.png b/icons/map/marine/spar-buoy-yellow-black.png
new file mode 100644
index 00000000..b9aa057a
Binary files /dev/null and b/icons/map/marine/spar-buoy-yellow-black.png differ
diff --git a/icons/map/marine/spar-buoy-yellow-red-yellow.png b/icons/map/marine/spar-buoy-yellow-red-yellow.png
new file mode 100644
index 00000000..cd9067dc
Binary files /dev/null and b/icons/map/marine/spar-buoy-yellow-red-yellow.png differ
diff --git a/icons/map/marine/spar-buoy-yellow-white.png b/icons/map/marine/spar-buoy-yellow-white.png
new file mode 100644
index 00000000..3c26b812
Binary files /dev/null and b/icons/map/marine/spar-buoy-yellow-white.png differ
diff --git a/icons/map/marine/spar-buoy-yellow.png b/icons/map/marine/spar-buoy-yellow.png
new file mode 100644
index 00000000..faac5878
Binary files /dev/null and b/icons/map/marine/spar-buoy-yellow.png differ
diff --git a/icons/map/marine/spar-buoy.png b/icons/map/marine/spar-buoy.png
index 4b6380cb..aa8e9acb 100644
Binary files a/icons/map/marine/spar-buoy.png and b/icons/map/marine/spar-buoy.png differ
diff --git a/lang/gpxsee_ca.ts b/lang/gpxsee_ca.ts
index ea47d0e4..5d6ab357 100644
--- a/lang/gpxsee_ca.ts
+++ b/lang/gpxsee_ca.ts
@@ -172,7 +172,7 @@
VKX files
-
+ Arxius VKX
diff --git a/pkg/linux/gpxsee.xml b/pkg/linux/gpxsee.xml
index 2c91fa5d..26e3b80c 100644
--- a/pkg/linux/gpxsee.xml
+++ b/pkg/linux/gpxsee.xml
@@ -210,7 +210,12 @@
-
+
+
+
+
+
+
diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi
index 1105db8d..b0d98d35 100644
--- a/pkg/windows/gpxsee64.nsi
+++ b/pkg/windows/gpxsee64.nsi
@@ -49,7 +49,7 @@ Unicode true
; The name of the installer
Name "GPXSee"
; Program version
-!define VERSION "13.40"
+!define VERSION "13.42"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
diff --git a/src/GUI/gui.cpp b/src/GUI/gui.cpp
index a3f24162..1f3bf9b4 100644
--- a/src/GUI/gui.cpp
+++ b/src/GUI/gui.cpp
@@ -1075,7 +1075,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
if (url.scheme() == "geo") {
if (loadURL(url, showError)) {
_fileActionGroup->setEnabled(true);
- _reloadFileAction->setEnabled(false);
return true;
} else if (showError)
return false;
@@ -1098,8 +1097,6 @@ bool GUI::openFile(const QString &fileName, bool tryUnknown, int &showError)
_browser->setCurrent(path);
#endif // Q_OS_ANDROID
_fileActionGroup->setEnabled(true);
- // Explicitly enable the reload action as it may be disabled by loadMapDir()
- _reloadFileAction->setEnabled(true);
_navigationActionGroup->setEnabled(true);
updateNavigationActions();
@@ -2025,7 +2022,6 @@ void GUI::loadMapDir()
_mapDir = fi.absolutePath();
_fileActionGroup->setEnabled(true);
- _reloadFileAction->setEnabled(false);
}
void GUI::clearMapCache()
@@ -2087,11 +2083,8 @@ void GUI::showDEMTiles()
QMessageBox::information(this, APP_NAME, tr("No local DEM tiles found."));
} else {
_mapView->loadDEMs(tiles);
-
_areaCount += tiles.size();
-
_fileActionGroup->setEnabled(true);
- _reloadFileAction->setEnabled(false);
}
}
diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h
index 167a0ad5..7cef6a21 100644
--- a/src/map/ENC/attributes.h
+++ b/src/map/ENC/attributes.h
@@ -33,6 +33,7 @@
#define TRAFIC 172
#define VALDCO 174
#define VALNMR 178
+#define VALSOU 179
#define VERCLR 181
#define WATLEV 187
@@ -43,6 +44,7 @@
#define I_RDOCAL 17017
#define I_WTWDIS 17064
#define I_CATBRT 17066
+#define I_CATBUN 17067
#define I_HUNITS 17103
#endif // ENC_ATTRIBUTES_H
diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp
index 5ee607de..4d71774f 100644
--- a/src/map/ENC/iso8211.cpp
+++ b/src/map/ENC/iso8211.cpp
@@ -44,6 +44,15 @@ ISO8211::SubFieldDefinition ISO8211::fieldType(const QString &str, int cnt)
return SubFieldDefinition();
}
+const ISO8211::Field *ISO8211::Record::field(quint32 name) const
+{
+ for (int i = 0; i < size(); i++)
+ if (at(i).tag() == name)
+ return &at(i);
+
+ return 0;
+}
+
int ISO8211::readDR(QVector &fields)
{
DR ddr;
@@ -77,11 +86,13 @@ int ISO8211::readDR(QVector &fields)
return -1;
r.tag = qFromLittleEndian(tag);
- r.pos = offset + Util::str2int(fieldPos.constData(), posSize);
+ r.pos = Util::str2int(fieldPos.constData(), posSize);
r.size = Util::str2int(fieldLen.constData(), lenSize);
if (r.pos < 0 || r.size < 0)
return -1;
+
+ r.pos += offset;
}
return len;
@@ -172,10 +183,8 @@ bool ISO8211::readDDR()
for (int i = 0; i < fields.size(); i++) {
SubFields def;
if (!readDDA(fields.at(i), def)) {
- QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized);
- qToLittleEndian(fields.at(i).tag, tag.data());
_errorString = QString("Error reading %1 DDA field")
- .arg(QString(tag));
+ .arg(NAME(fields.at(i).tag));
return false;
}
_map.insert(fields.at(i).tag, def);
@@ -259,13 +268,9 @@ bool ISO8211::readUDA(quint64 pos, const FieldDefinition &def,
bool ISO8211::readRecord(Record &record)
{
- if (_file.atEnd())
- return false;
-
QVector fields;
qint64 pos = _file.pos();
-
if (readDR(fields) < 0) {
_errorString = "Error reading DR";
return false;
@@ -279,16 +284,12 @@ bool ISO8211::readRecord(Record &record)
FieldsMap::const_iterator it(_map.find(def.tag));
if (it == _map.constEnd()) {
- QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized);
- qToLittleEndian(def.tag, tag.data());
- _errorString = QString("%1: unknown record").arg(QString(tag));
+ _errorString = QString("%1: unknown record").arg(NAME(def.tag));
return false;
}
if (!readUDA(pos, def, it->defs(), it->repeat(), data)) {
- QByteArray tag(sizeof(quint32), Qt::Initialization::Uninitialized);
- qToLittleEndian(def.tag, tag.data());
- _errorString = QString("Error reading %1 record").arg(QString(tag));
+ _errorString = QString("Error reading %1 record").arg(NAME(def.tag));
return false;
}
@@ -298,11 +299,9 @@ bool ISO8211::readRecord(Record &record)
return true;
}
-const ISO8211::Field *ISO8211::field(const Record &record, quint32 name)
+QString ISO8211::NAME(quint32 tag)
{
- for (int i = 0; i < record.size(); i++)
- if (record.at(i).tag() == name)
- return &record.at(i);
-
- return 0;
+ char buffer[sizeof(quint32)];
+ qToLittleEndian(tag, buffer);
+ return QString::fromLatin1(buffer, sizeof(buffer));
}
diff --git a/src/map/ENC/iso8211.h b/src/map/ENC/iso8211.h
index 992f7846..6418387d 100644
--- a/src/map/ENC/iso8211.h
+++ b/src/map/ENC/iso8211.h
@@ -26,21 +26,26 @@ public:
Data _data;
};
- typedef QVector Record;
+ class Record : public QVector
+ {
+ public:
+ const Field *field(quint32 name) const;
+ };
ISO8211(const QString &path) : _file(path) {}
bool readDDR();
bool readRecord(Record &record);
+ bool atEnd() const {return _file.atEnd();}
const QString &errorString() const {return _errorString;}
- static const Field *field(const Record &record, quint32 name);
- static constexpr quint32 NAME(const char str[4])
+ static constexpr quint32 TAG(const char name[4])
{
- return static_cast(str[0])
- + (static_cast(str[1]) << 8)
- + (static_cast(str[2]) << 16)
- + (static_cast(str[3]) << 24);
+ return static_cast(name[0])
+ + (static_cast(name[1]) << 8)
+ + (static_cast(name[2]) << 16)
+ + (static_cast(name[3]) << 24);
}
+ static QString NAME(quint32 tag);
private:
enum FieldType {Unknown, String, Array, S8, S16, S32, U8, U16, U32};
diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp
index 8576635c..1819f66c 100644
--- a/src/map/ENC/mapdata.cpp
+++ b/src/map/ENC/mapdata.cpp
@@ -15,14 +15,14 @@ using namespace ENC;
#define PRIM_L 2
#define PRIM_A 3
-constexpr quint32 SG2D = ISO8211::NAME("SG2D");
-constexpr quint32 SG3D = ISO8211::NAME("SG3D");
-constexpr quint32 FSPT = ISO8211::NAME("FSPT");
-constexpr quint32 VRPT = ISO8211::NAME("VRPT");
-constexpr quint32 ATTF = ISO8211::NAME("ATTF");
-constexpr quint32 VRID = ISO8211::NAME("VRID");
-constexpr quint32 FRID = ISO8211::NAME("FRID");
-constexpr quint32 DSPM = ISO8211::NAME("DSPM");
+constexpr quint32 SG2D = ISO8211::TAG("SG2D");
+constexpr quint32 SG3D = ISO8211::TAG("SG3D");
+constexpr quint32 FSPT = ISO8211::TAG("FSPT");
+constexpr quint32 VRPT = ISO8211::TAG("VRPT");
+constexpr quint32 ATTF = ISO8211::TAG("ATTF");
+constexpr quint32 VRID = ISO8211::TAG("VRID");
+constexpr quint32 FRID = ISO8211::TAG("FRID");
+constexpr quint32 DSPM = ISO8211::TAG("DSPM");
static QMap orderMapInit()
{
@@ -70,10 +70,10 @@ static QMap orderMapInit()
map.insert(TYPE(I_TRNBSN), 32);
map.insert(TYPE(HRBFAC), 33);
map.insert(TYPE(I_HRBFAC), 33);
- map.insert(TYPE(PILPNT), 34);
- map.insert(TYPE(ACHBRT), 35);
- map.insert(TYPE(I_ACHBRT), 35);
- map.insert(TYPE(RADRFL), 36);
+ map.insert(TYPE(RADRFL), 34);
+ map.insert(TYPE(PILPNT), 35);
+ map.insert(TYPE(ACHBRT), 36);
+ map.insert(TYPE(I_ACHBRT), 36);
map.insert(TYPE(CRANES), 37);
map.insert(TYPE(I_CRANES), 37);
map.insert(TYPE(I_WTWGAG), 38);
@@ -81,9 +81,12 @@ static QMap orderMapInit()
map.insert(TYPE(SLCONS), 40);
map.insert(TYPE(LNDMRK), 41);
map.insert(TYPE(SILTNK), 42);
- map.insert(TYPE(LNDELV), 43);
- map.insert(TYPE(SMCFAC), 44);
- map.insert(TYPE(BUISGL), 45);
+ map.insert(TYPE(I_BUNSTA), 43);
+ map.insert(TYPE(LNDELV), 44);
+ map.insert(TYPE(SMCFAC), 45);
+ map.insert(TYPE(BUISGL), 46);
+ map.insert(TYPE(ACHARE), 47);
+ map.insert(TYPE(I_ACHARE), 47);
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
@@ -150,9 +153,9 @@ static const ISO8211::Field *SGXD(const ISO8211::Record &r)
{
const ISO8211::Field *f;
- if ((f = ISO8211::field(r, SG2D)))
+ if ((f = r.field(SG2D)))
return f;
- else if ((f = ISO8211::field(r, SG3D)))
+ else if ((f = r.field(SG3D)))
return f;
else
return 0;
@@ -187,22 +190,28 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN
|| baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE
- || baseType == LNDARE || baseType == LNDRGN
+ || baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA
+ || baseType == PILBOP
|| type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2)
|| type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3)
|| type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9)
- || type == SUBTYPE(I_BERTHS, 6)
+ || type == SUBTYPE(I_ACHARE, 10) || type == SUBTYPE(I_ACHARE, 11)
+ || type == SUBTYPE(I_ACHARE, 12) || type == SUBTYPE(I_BERTHS, 6)
|| type == SUBTYPE(RESARE, 1) || type == SUBTYPE(I_RESARE, 1)
|| type == SUBTYPE(RESARE, 2) || type == SUBTYPE(I_RESARE, 2)
|| type == SUBTYPE(RESARE, 4) || type == SUBTYPE(I_RESARE, 4)
|| type == SUBTYPE(RESARE, 5) || type == SUBTYPE(I_RESARE, 5)
|| type == SUBTYPE(RESARE, 6) || type == SUBTYPE(I_RESARE, 6)
|| type == SUBTYPE(RESARE, 7) || type == SUBTYPE(I_RESARE, 7)
+ || type == SUBTYPE(RESARE, 8) || type == SUBTYPE(I_RESARE, 8)
|| type == SUBTYPE(RESARE, 9) || type == SUBTYPE(I_RESARE, 9)
|| type == SUBTYPE(RESARE, 12) || type == SUBTYPE(I_RESARE, 12)
+ || type == SUBTYPE(RESARE, 14) || type == SUBTYPE(I_RESARE, 14)
|| type == SUBTYPE(RESARE, 17) || type == SUBTYPE(I_RESARE, 17)
|| type == SUBTYPE(RESARE, 22) || type == SUBTYPE(I_RESARE, 22)
- || type == SUBTYPE(RESARE, 23) || type == SUBTYPE(I_RESARE, 23))
+ || type == SUBTYPE(RESARE, 23) || type == SUBTYPE(I_RESARE, 23)
+ || type == SUBTYPE(RESARE, 25) || type == SUBTYPE(I_RESARE, 25)
+ || type == SUBTYPE(RESARE, 26) || type == SUBTYPE(I_RESARE, 26))
points->append(MapData::Point(baseType, polygon->bounds().center(),
polygon->attributes(), polygon->HUNI(), true));
@@ -322,6 +331,16 @@ static uint restrictionCategory(uint type, const MapData::Attributes &attr)
return catrea;
}
+static uint color(const QList &list)
+{
+ uint c = 0;
+
+ for (int i = 0; i < list.size() && i < 4; i++)
+ c |= list.at(i).toUInt() << (i * 4);
+
+ return c;
+}
+
MapData::Point::Point(uint type, const Coordinates &c, const QString &label)
: _type(SUBTYPE(type, 0)), _pos(c), _label(label), _polygon(false)
{
@@ -332,6 +351,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon)
{
uint subtype = 0;
+ bool ok;
if (type == HRBFAC)
subtype = CATHAF;
@@ -371,14 +391,26 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
subtype = CATACH;
else if (type == I_ACHARE)
subtype = I_CATACH;
- else if (type == MARKUL)
+ else if (type == MARCUL)
subtype = CATMFA;
+ else if (type == I_BUNSTA)
+ subtype = I_CATBUN;
+ else if (type == BOYCAR || type == BOYINB || type == BOYISD
+ || type == BOYLAT || type == I_BOYLAT || type == BOYSAW || type == BOYSPP
+ || type == BCNCAR || type == BCNISD || type == BCNLAT || type == I_BCNLAT
+ || type == BCNSAW || type == BCNSPP)
+ subtype = COLOUR;
QList list(_attr.value(subtype).split(','));
- std::sort(list.begin(), list.end());
- _type = (type == RESARE || type == I_RESARE)
- ? SUBTYPE(type, restrictionCategory(type, _attr))
- : SUBTYPE(type, list.first().toUInt());
+ if (type == RESARE || type == I_RESARE)
+ _type = SUBTYPE(type, restrictionCategory(type, _attr));
+ else if (subtype == COLOUR)
+ _type = SUBTYPE(type, color(list));
+ else {
+ std::sort(list.begin(), list.end());
+ _type = SUBTYPE(type, list.first().toUInt());
+ }
+
_id = ((quint64)order(_type))<<32 | (uint)qHash(c);
_label = QString::fromLatin1(_attr.value(OBJNAM));
@@ -411,11 +443,17 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
_label += "\n(" + QString::fromLatin1(_attr.value(ELEVAT))
+ "\xE2\x80\x89m)";
} else if (type == BRIDGE || type == I_BRIDGE) {
- double clr = _attr.value(VERCLR).toDouble();
- if (clr > 0) {
+ double clr = _attr.value(VERCLR).toDouble(&ok);
+ if (ok && clr > 0)
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
- }
+ } else if (type == OBSTRN || type == WRECKS) {
+ double depth = _attr.value(VALSOU).toDouble(&ok);
+ if (ok && _label.isEmpty())
+ _label = QString::number(depth);
+ } else if (_type == SUBTYPE(RESARE, 8)) {
+ if (_label.isEmpty())
+ _label = "Degaussing Range";
}
}
@@ -430,7 +468,7 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr,
subtype = I_CATACH;
else if (type == HRBFAC)
subtype = CATHAF;
- else if (type == MARKUL)
+ else if (type == MARCUL)
subtype = CATMFA;
else if (type == I_BERTHS)
subtype = I_CATBRT;
@@ -489,7 +527,7 @@ QVector MapData::soundings(const ISO8211::Record &r,
uint comf, uint somf)
{
QVector s;
- const ISO8211::Field *f = ISO8211::field(r, SG3D);
+ const ISO8211::Field *f = r.field(SG3D);
if (!f)
return QVector();
@@ -511,7 +549,7 @@ QVector MapData::soundingGeometry(const ISO8211::Record &r,
quint32 id;
RecordMapIterator it;
- const ISO8211::Field *fspt = ISO8211::field(r, FSPT);
+ const ISO8211::Field *fspt = r.field(FSPT);
if (!fspt || fspt->data().at(0).size() != 4)
return QVector();
@@ -539,7 +577,7 @@ Coordinates MapData::pointGeometry(const ISO8211::Record &r,
quint32 id;
RecordMapIterator it;
- const ISO8211::Field *fspt = ISO8211::field(r, FSPT);
+ const ISO8211::Field *fspt = r.field(FSPT);
if (!fspt || fspt->data().at(0).size() != 4)
return Coordinates();
@@ -569,7 +607,7 @@ QVector MapData::lineGeometry(const ISO8211::Record &r,
quint8 type;
quint32 id;
- const ISO8211::Field *fspt = ISO8211::field(r, FSPT);
+ const ISO8211::Field *fspt = r.field(FSPT);
if (!fspt || fspt->data().at(0).size() != 4)
return QVector();
@@ -582,7 +620,7 @@ QVector MapData::lineGeometry(const ISO8211::Record &r,
if (it == ve.constEnd())
return QVector();
const ISO8211::Record &frid = it.value();
- const ISO8211::Field *vrpt = ISO8211::field(frid, VRPT);
+ const ISO8211::Field *vrpt = frid.field(VRPT);
if (!vrpt || vrpt->data().size() != 2)
return QVector();
@@ -635,7 +673,7 @@ Polygon MapData::polyGeometry(const ISO8211::Record &r, const RecordMap &vc,
quint8 type;
quint32 id;
- const ISO8211::Field *fspt = ISO8211::field(r, FSPT);
+ const ISO8211::Field *fspt = r.field(FSPT);
if (!fspt || fspt->data().at(0).size() != 4)
return Polygon();
@@ -654,7 +692,7 @@ Polygon MapData::polyGeometry(const ISO8211::Record &r, const RecordMap &vc,
if (it == ve.constEnd())
return Polygon();
const ISO8211::Record &frid = it.value();
- const ISO8211::Field *vrpt = ISO8211::field(frid, VRPT);
+ const ISO8211::Field *vrpt = frid.field(VRPT);
if (!vrpt || vrpt->data().size() != 2)
return Polygon();
@@ -717,7 +755,7 @@ MapData::Attributes MapData::attributes(const ISO8211::Record &r)
{
Attributes attr;
- const ISO8211::Field *attf = ISO8211::field(r, ATTF);
+ const ISO8211::Field *attf = r.field(ATTF);
if (!(attf && attf->data().at(0).size() == 2))
return attr;
@@ -757,7 +795,7 @@ MapData::Poly *MapData::polyObject(const ISO8211::Record &r,
bool MapData::processRecord(const ISO8211::Record &record,
QVector &fe, RecordMap &vi, RecordMap &vc, RecordMap &ve,
- uint &comf, uint &huni, uint &somf)
+ uint &comf, uint &somf, uint &huni)
{
if (record.size() < 2)
return false;
@@ -823,9 +861,15 @@ MapData::MapData(const QString &path)
if (!ddf.readDDR())
return;
- while (ddf.readRecord(record))
+ while (!ddf.atEnd()) {
+ if (!ddf.readRecord(record)) {
+ qWarning("%s: %s", qUtf8Printable(path),
+ qUtf8Printable(ddf.errorString()));
+ return;
+ }
if (!processRecord(record, fe, vi, vc, ve, comf, somf, huni))
- qWarning("Invalid S-57 record");
+ qWarning("%s: Invalid S-57 record", qUtf8Printable(path));
+ }
for (int i = 0; i < fe.size(); i++) {
const ISO8211::Record &r = fe.at(i);
diff --git a/src/map/ENC/objects.h b/src/map/ENC/objects.h
index 8f1aa498..aea5ebce 100644
--- a/src/map/ENC/objects.h
+++ b/src/map/ENC/objects.h
@@ -55,7 +55,7 @@
#define LNDMRK 74
#define LIGHTS 75
#define LOKBSN 79
-#define MARKUL 82
+#define MARCUL 82
#define MORFAC 84
#define NAVLNE 85
#define OBSTRN 86
@@ -122,6 +122,7 @@
#define I_GATCON 17031
#define I_SLCONS 17032
#define I_WTWAXS 17051
+#define I_BUNSTA 17054
#define I_TERMNL 17064
#define I_TRNBSN 17065
#define I_WTWGAG 17067
diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp
index 8a9fe2f2..ea39fd16 100644
--- a/src/map/ENC/style.cpp
+++ b/src/map/ENC/style.cpp
@@ -6,6 +6,69 @@
using namespace ENC;
using namespace Util;
+#define COLOR2(c1, c2) (((c2)<<4) | (c1))
+#define COLOR3(c1, c2, c3) (((c3)<<8) | ((c2)<<4) | (c1))
+#define COLOR4(c1, c2, c3, c4) (((c4)<<12) | ((c3)<<8) | ((c2)<<4) | (c1))
+
+#define PNT(type, subtype, img, dx, dy) \
+ _points[SUBTYPE((type), (subtype))] = Point(QImage(img), Small, QPoint((dx), (dy)));
+
+#define COLORSET(type, name, dx, dy) \
+ PNT(type, 0, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 1, ":/marine/" name "-white.png", dx, dy); \
+ PNT(type, 2, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 3, ":/marine/" name "-red.png", dx, dy); \
+ PNT(type, 4, ":/marine/" name "-green.png", dx, dy); \
+ PNT(type, 5, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 6, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 7, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 8, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 9, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 10, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 11, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 12, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 13, ":/marine/" name ".png", dx, dy); \
+ PNT(type, COLOR2(1, 2), ":/marine/" name "-white-black.png", dx, dy); \
+ PNT(type, COLOR2(1, 3), ":/marine/" name "-white-red.png", dx, dy); \
+ PNT(type, COLOR2(1, 4), ":/marine/" name "-white-green.png", dx, dy); \
+ PNT(type, COLOR2(1, 6), ":/marine/" name "-white-yellow.png", dx, dy); \
+ PNT(type, COLOR2(1, 9), ":/marine/" name "-white-yellow.png", dx, dy); \
+ PNT(type, COLOR2(1, 11), ":/marine/" name "-white-yellow.png", dx, dy); \
+ PNT(type, COLOR2(2, 1), ":/marine/" name "-black-white.png", dx, dy); \
+ PNT(type, COLOR2(2, 3), ":/marine/" name "-black-red.png", dx, dy); \
+ PNT(type, COLOR2(2, 4), ":/marine/" name "-black-green.png", dx, dy); \
+ PNT(type, COLOR2(2, 6), ":/marine/" name "-black-yellow.png", dx, dy); \
+ PNT(type, COLOR2(2, 9), ":/marine/" name "-black-yellow.png", dx, dy); \
+ PNT(type, COLOR2(2, 11), ":/marine/" name "-black-yellow.png", dx, dy); \
+ PNT(type, COLOR2(3, 1), ":/marine/" name "-red-white.png", dx, dy); \
+ PNT(type, COLOR2(3, 2), ":/marine/" name "-red-black.png", dx, dy); \
+ PNT(type, COLOR2(3, 4), ":/marine/" name "-red-green.png", dx, dy); \
+ PNT(type, COLOR2(3, 6), ":/marine/" name "-red-yellow.png", dx, dy); \
+ PNT(type, COLOR2(4, 1), ":/marine/" name "-green-white.png", dx, dy); \
+ PNT(type, COLOR2(4, 2), ":/marine/" name "-green-black.png", dx, dy); \
+ PNT(type, COLOR2(4, 3), ":/marine/" name "-green-red.png", dx, dy); \
+ PNT(type, COLOR2(6, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
+ PNT(type, COLOR2(9, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
+ PNT(type, COLOR2(11, 1), ":/marine/" name "-yellow-white.png", dx, dy); \
+ PNT(type, COLOR2(6, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
+ PNT(type, COLOR2(9, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
+ PNT(type, COLOR2(11, 2), ":/marine/" name "-yellow-black.png", dx, dy); \
+ PNT(type, COLOR3(1, 6, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
+ PNT(type, COLOR3(1, 9, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
+ PNT(type, COLOR3(1, 11, 1), ":/marine/" name "-white-yellow-white.png", dx, dy); \
+ PNT(type, COLOR3(2, 1, 2), ":/marine/" name "-black-white-black.png", dx, dy); \
+ PNT(type, COLOR3(2, 3, 2), ":/marine/" name "-black-red-black.png", dx, dy); \
+ PNT(type, COLOR3(2, 6, 2), ":/marine/" name "-black-yellow-black.png", dx, dy); \
+ PNT(type, COLOR3(3, 4, 3), ":/marine/" name "-red-green-red.png", dx, dy); \
+ PNT(type, COLOR3(4, 3, 4), ":/marine/" name "-green-red-green.png", dx, dy); \
+ PNT(type, COLOR3(6, 1, 6), ":/marine/" name "-yellow-white-yellow.png", dx, dy); \
+ PNT(type, COLOR3(6, 2, 6), ":/marine/" name "-yellow-black-yellow.png", dx, dy); \
+ PNT(type, COLOR3(6, 3, 6), ":/marine/" name "-yellow-red-yellow.png", dx, dy); \
+ PNT(type, COLOR4(3, 1, 3, 1), ":/marine/" name "-red-white-red-white.png", dx, dy); \
+ PNT(type, COLOR4(3, 4, 3, 4), ":/marine/" name "-red-green-red-green.png", dx, dy); \
+ PNT(type, COLOR4(4, 1, 4, 1), ":/marine/" name "-green-white-green-white.png", dx, dy); \
+ PNT(type, COLOR4(4, 3, 4, 3), ":/marine/" name "-green-red-green-red.png", dx, dy);
+
static QImage railroad(qreal ratio)
{
QImage img(16 * ratio, 4 * ratio, QImage::Format_ARGB32_Premultiplied);
@@ -75,20 +138,32 @@ void Style::polygonStyle()
_polygons[SUBTYPE(RESARE, 5)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 6)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 7)] = Polygon(QImage(":/marine/sanctuary-line.png"));
+ _polygons[SUBTYPE(RESARE, 8)] = Polygon(QImage(":/marine/degaussing-line.png"));
_polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00),
Qt::BDiagPattern));
_polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png"));
+ _polygons[SUBTYPE(RESARE, 14)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(RESARE, 17)] = Polygon(QImage(":/marine/entry-prohibited-line.png"));
_polygons[SUBTYPE(RESARE, 22)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 23)] = Polygon(QImage(":/marine/nature-reserve-line.png"));
+ _polygons[SUBTYPE(RESARE, 25)] = Polygon(Qt::NoBrush,
+ QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
+ _polygons[SUBTYPE(RESARE, 26)] = Polygon(QImage(":/marine/safety-zone-line.png"));
_polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)];
_polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)];
_polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)];
+ _polygons[SUBTYPE(I_RESARE, 5)] = _polygons[SUBTYPE(RESARE, 5)];
+ _polygons[SUBTYPE(I_RESARE, 6)] = _polygons[SUBTYPE(RESARE, 6)];
+ _polygons[SUBTYPE(I_RESARE, 7)] = _polygons[SUBTYPE(RESARE, 7)];
+ _polygons[SUBTYPE(I_RESARE, 8)] = _polygons[SUBTYPE(RESARE, 8)];
_polygons[SUBTYPE(I_RESARE, 9)] = _polygons[SUBTYPE(RESARE, 9)];
_polygons[SUBTYPE(I_RESARE, 12)] = _polygons[SUBTYPE(RESARE, 12)];
+ _polygons[SUBTYPE(I_RESARE, 14)] = _polygons[SUBTYPE(RESARE, 14)];
_polygons[SUBTYPE(I_RESARE, 17)] = _polygons[SUBTYPE(RESARE, 17)];
_polygons[SUBTYPE(I_RESARE, 22)] = _polygons[SUBTYPE(RESARE, 22)];
_polygons[SUBTYPE(I_RESARE, 23)] = _polygons[SUBTYPE(RESARE, 23)];
+ _polygons[SUBTYPE(I_RESARE, 25)] = _polygons[SUBTYPE(RESARE, 25)];
+ _polygons[SUBTYPE(I_RESARE, 26)] = _polygons[SUBTYPE(RESARE, 26)];
_polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png"));
_polygons[SUBTYPE(ACHARE, 2)] = _polygons[SUBTYPE(ACHARE, 1)];
_polygons[SUBTYPE(ACHARE, 3)] = _polygons[SUBTYPE(ACHARE, 1)];
@@ -140,8 +215,10 @@ void Style::polygonStyle()
1.5, Qt::DashLine));
_polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png"));
_polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png"));
- _polygons[SUBTYPE(MARKUL, 0)] = Polygon(QImage(":/marine/fishing-farm-line.png"));
- _polygons[SUBTYPE(MARKUL, 3)] = Polygon(QImage(":/marine/fishing-farm-line.png"));
+ _polygons[SUBTYPE(MARCUL, 0)] = Polygon(QImage(":/marine/fishing-farm-line.png"));
+ _polygons[SUBTYPE(MARCUL, 1)] = Polygon(QImage(":/marine/shellfish-farm-line.png"));
+ _polygons[SUBTYPE(MARCUL, 2)] = Polygon(QImage(":/marine/shellfish-farm-line.png"));
+ _polygons[SUBTYPE(MARCUL, 3)] = Polygon(QImage(":/marine/fishing-farm-line.png"));
_polygons[TYPE(BERTHS)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashLine));
_polygons[TYPE(I_BERTHS)] = _polygons[TYPE(BERTHS)];
@@ -150,6 +227,8 @@ void Style::polygonStyle()
1, Qt::DashLine));
_polygons[TYPE(CONZNE)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashDotLine));
+ _polygons[TYPE(PILBOP)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
+ 1, Qt::DashLine));
_drawOrder
<< TYPE(LNDARE) << SUBTYPE(DEPARE, 0) << SUBTYPE(DEPARE, 1)
@@ -175,13 +254,16 @@ void Style::polygonStyle()
<< SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
<< SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4) << SUBTYPE(RESARE, 5)
<< SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6)
- << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 9)
- << SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12)
- << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22)
- << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23)
- << SUBTYPE(RESARE, 1) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE)
- << TYPE(I_TRNBSN) << SUBTYPE(MARKUL, 0) << SUBTYPE(MARKUL, 3)
- << TYPE(CONZNE);
+ << SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 8)
+ << SUBTYPE(I_RESARE, 8) << SUBTYPE(RESARE, 9) << SUBTYPE(I_RESARE, 9)
+ << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 14)
+ << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17)
+ << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23)
+ << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) << SUBTYPE(I_RESARE, 25)
+ << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) << TYPE(CBLARE)
+ << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) << TYPE(PILBOP)
+ << SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1) << SUBTYPE(MARCUL, 2)
+ << SUBTYPE(MARCUL, 3) << TYPE(CONZNE);
}
void Style::lineStyle(qreal ratio)
@@ -249,6 +331,21 @@ void Style::lineStyle(qreal ratio)
void Style::pointStyle(qreal ratio)
{
+ COLORSET(BOYCAR, "buoy", 6, -6);
+ COLORSET(BOYINB, "buoy", 6, -6);
+ COLORSET(BOYISD, "buoy", 6, -6);
+ COLORSET(BOYLAT, "buoy", 6, -6);
+ COLORSET(I_BOYLAT, "buoy", 6, -6);
+ COLORSET(BOYSAW, "buoy", 6, -6);
+ COLORSET(BOYSPP, "buoy", 6, -6);
+
+ COLORSET(BCNCAR, "beacon", 0, -8);
+ COLORSET(BCNISD, "beacon", 0, -8);
+ COLORSET(BCNLAT, "beacon", 0, -8);
+ COLORSET(I_BCNLAT, "beacon", 0, -8);
+ COLORSET(BCNSAW, "beacon", 0, -8);
+ COLORSET(BCNSPP, "beacon", 0, -8);
+
_points[SUBTYPE(BUAARE, 1)].setTextFontSize(Large);
_points[SUBTYPE(BUAARE, 5)].setTextFontSize(Large);
_points[SUBTYPE(BUAARE, 4)].setTextFontSize(Large);
@@ -256,32 +353,6 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(BUAARE, 6)].setTextFontSize(Small);
_points[TYPE(SOUNDG)].setTextFontSize(Small);
_points[TYPE(SOUNDG)].setHaloColor(QColor());
- _points[TYPE(BOYCAR)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BOYINB)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BOYISD)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BOYLAT)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(I_BOYLAT)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BOYSAW)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BOYSPP)] = Point(QImage(":/marine/buoy.png"), Small,
- QPoint(6, -6));
- _points[TYPE(BCNCAR)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
- _points[TYPE(BCNISD)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
- _points[TYPE(BCNLAT)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
- _points[TYPE(I_BCNLAT)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
- _points[TYPE(BCNSAW)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
- _points[TYPE(BCNSPP)] = Point(QImage(":/marine/beacon.png"), Small,
- QPoint(0, -8));
_points[SUBTYPE(LNDMRK, 3)] = Point(QImage(":/marine/chimney.png"),
Small, QPoint(0, -11));
_points[SUBTYPE(LNDMRK, 5)] = Point(QImage(":/marine/flagstaff.png"),
@@ -394,22 +465,49 @@ void Style::pointStyle(qreal ratio)
_points[TYPE(LNDARE)].setHaloColor(QColor());
_points[TYPE(LNDRGN)].setHaloColor(QColor());
_points[TYPE(RADRFL)] = Point(QImage(":/marine/radar-reflector.png"));
- _points[SUBTYPE(MARKUL, 0)] = Point(QImage(":/marine/fishing-farm.png"));
- _points[SUBTYPE(MARKUL, 3)] = Point(QImage(":/marine/fishing-farm.png"));
+ _points[SUBTYPE(MARCUL, 0)] = Point(QImage(":/marine/fishing-farm.png"));
+ _points[SUBTYPE(MARCUL, 3)] = Point(QImage(":/marine/fishing-farm.png"));
_points[SUBTYPE(I_BERTHS, 6)] = Point(QImage(":/marine/fleeting-area.png"),
Small);
_points[SUBTYPE(I_BERTHS, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb));
_points[SUBTYPE(I_BERTHS, 6)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 1)].setHaloColor(QColor());
_points[SUBTYPE(ACHARE, 2)] = Point(QImage(":/marine/dw-anchorage.png"),
Small);
+ _points[SUBTYPE(ACHARE, 2)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 2)].setHaloColor(QColor());
_points[SUBTYPE(ACHARE, 3)] = Point(QImage(":/marine/tanker-anchorage.png"),
Small);
+ _points[SUBTYPE(ACHARE, 3)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 3)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 4)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 4)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 5)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 5)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 6)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 6)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 7)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 7)].setHaloColor(QColor());
+ _points[SUBTYPE(ACHARE, 8)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 8)].setHaloColor(QColor());
_points[SUBTYPE(ACHARE, 9)] = Point(QImage(":/marine/24h-anchorage.png"),
Small);
+ _points[SUBTYPE(ACHARE, 9)].setTextColor(QColor(0xeb, 0x49, 0xeb));
+ _points[SUBTYPE(ACHARE, 9)].setHaloColor(QColor());
+ _points[SUBTYPE(I_ACHARE, 1)] = _points[SUBTYPE(ACHARE, 1)];
_points[SUBTYPE(I_ACHARE, 2)] = _points[SUBTYPE(ACHARE, 2)];
_points[SUBTYPE(I_ACHARE, 3)] = _points[SUBTYPE(ACHARE, 3)];
+ _points[SUBTYPE(I_ACHARE, 4)] = _points[SUBTYPE(ACHARE, 4)];
+ _points[SUBTYPE(I_ACHARE, 5)] = _points[SUBTYPE(ACHARE, 5)];
+ _points[SUBTYPE(I_ACHARE, 6)] = _points[SUBTYPE(ACHARE, 6)];
+ _points[SUBTYPE(I_ACHARE, 7)] = _points[SUBTYPE(ACHARE, 7)];
+ _points[SUBTYPE(I_ACHARE, 8)] = _points[SUBTYPE(ACHARE, 8)];
_points[SUBTYPE(I_ACHARE, 9)] = _points[SUBTYPE(ACHARE, 9)];
+ _points[SUBTYPE(I_ACHARE, 10)] = _points[SUBTYPE(I_ACHARE, 1)];
+ _points[SUBTYPE(I_ACHARE, 11)] = _points[SUBTYPE(I_ACHARE, 1)];
+ _points[SUBTYPE(I_ACHARE, 12)] = _points[SUBTYPE(I_ACHARE, 1)];
_points[SUBTYPE(RESARE, 1)].setTextColor(QColor(0xeb, 0x49, 0xeb));
_points[SUBTYPE(RESARE, 1)].setHaloColor(QColor());
_points[SUBTYPE(RESARE, 2)] = _points[SUBTYPE(RESARE, 1)];
@@ -418,22 +516,37 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(RESARE, 5)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 6)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 7)] = _points[SUBTYPE(RESARE, 4)];
+ _points[SUBTYPE(RESARE, 8)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 9)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 12)] = _points[SUBTYPE(RESARE, 1)];
+ _points[SUBTYPE(RESARE, 14)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 17)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 22)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 23)] = _points[SUBTYPE(RESARE, 4)];
+ _points[SUBTYPE(RESARE, 25)] = _points[SUBTYPE(RESARE, 1)];
+ _points[SUBTYPE(RESARE, 26)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(I_RESARE, 1)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(I_RESARE, 2)] = _points[SUBTYPE(RESARE, 2)];
_points[SUBTYPE(I_RESARE, 4)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(I_RESARE, 5)] = _points[SUBTYPE(RESARE, 5)];
_points[SUBTYPE(I_RESARE, 6)] = _points[SUBTYPE(RESARE, 6)];
_points[SUBTYPE(I_RESARE, 7)] = _points[SUBTYPE(RESARE, 7)];
+ _points[SUBTYPE(I_RESARE, 8)] = _points[SUBTYPE(RESARE, 8)];
_points[SUBTYPE(I_RESARE, 9)] = _points[SUBTYPE(RESARE, 9)];
_points[SUBTYPE(I_RESARE, 12)] = _points[SUBTYPE(RESARE, 12)];
+ _points[SUBTYPE(I_RESARE, 14)] = _points[SUBTYPE(RESARE, 14)];
_points[SUBTYPE(I_RESARE, 17)] = _points[SUBTYPE(RESARE, 17)];
_points[SUBTYPE(I_RESARE, 22)] = _points[SUBTYPE(RESARE, 22)];
_points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)];
+ _points[SUBTYPE(I_RESARE, 25)] = _points[SUBTYPE(RESARE, 25)];
+ _points[SUBTYPE(I_RESARE, 26)] = _points[SUBTYPE(RESARE, 26)];
+
+ _points[SUBTYPE(I_BUNSTA, 1)] = Point(svg2img(":/POI/fuel-11.svg", ratio),
+ Small);
+ _points[SUBTYPE(I_BUNSTA, 2)] = Point(svg2img(":/POI/drinking-water-11.svg",
+ ratio), Small);
+ _points[SUBTYPE(I_BUNSTA, 4)] = Point(svg2img(":/POI/charging-station-11.svg",
+ ratio), Small);
_points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg",
ratio), Small);
@@ -443,6 +556,8 @@ void Style::pointStyle(qreal ratio)
ratio), Small);
_points[SUBTYPE(SMCFAC, 13)] = Point(svg2img(":/POI/fuel-11.svg", ratio),
Small);
+ _points[SUBTYPE(SMCFAC, 14)] = Point(svg2img(":/POI/charging-station-11.svg",
+ ratio), Small);
_points[SUBTYPE(SMCFAC, 18)] = Point(svg2img(":/POI/toilet-11.svg", ratio),
Small);
_points[SUBTYPE(SMCFAC, 20)] = Point(svg2img(":/POI/telephone-11.svg",
diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp
index aedf3fa1..cc8f9b69 100644
--- a/src/map/IMG/rastertile.cpp
+++ b/src/map/IMG/rastertile.cpp
@@ -522,7 +522,8 @@ void RasterTile::processPoints(QList &points,
for (int i = 0; i < points.size(); i++) {
const MapData::Point &point = points.at(i);
const Style *style = _data->style();
- const Style::Point &ps = style->point(point.type);
+ const Style::Point &ps = style->point(Style::hasColorset(point.type)
+ ? point.type | (point.flags & 0xFF000000) : point.type);
bool poi = Style::isPOI(point.type);
bool sl = sectorLight(point.lights);
diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp
index 28f4cb5b..8baed229 100644
--- a/src/map/IMG/rgnfile.cpp
+++ b/src/map/IMG/rgnfile.cpp
@@ -120,6 +120,8 @@ bool RGNFile::readBuoyInfo(Handle &hdl, quint8 flags, quint32 size,
if (!(size >= 2 && readUInt16(hdl, val)))
return false;
+ point->flags = (val & 0x3f)<<24;
+
lc = (val >> 10) & 0x0f;
if (!lc)
lc = (val >> 6) & 7;
@@ -402,18 +404,20 @@ bool RGNFile::readLclLights(Handle &hdl, quint32 &size, quint32 lights,
bool RGNFile::readLclNavaid(Handle &hdl, quint32 size,
MapData::Point *point) const
{
- quint32 unused, flags;
+ quint32 unused, color, flags;
// Discard the class lights info if any (marine points may have both!)
point->lights.clear();
+ point->flags &= 0xffffff;
if (!(size >= 4 && readUInt32(hdl, flags)))
return false;
size -= 4;
if (flags & 1) {
- if (!(size >= 1 && readUInt8(hdl, unused)))
+ if (!(size >= 1 && readUInt8(hdl, color)))
return false;
size--;
+ point->flags |= color<<24;
}
if (flags & 2) {
if (!(size >= 1 && readUInt8(hdl, unused)))
diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp
index 85d7e6a2..6e741aac 100644
--- a/src/map/IMG/style.cpp
+++ b/src/map/IMG/style.cpp
@@ -7,6 +7,37 @@
using namespace IMG;
using namespace Util;
+#define PNT(type, color, img, dx, dy) \
+ _points[(type) | (color)<<24] = Point(QImage(img), QPoint(dx, dy));
+
+#define COLORSET(type, name, dx, dy) \
+ PNT(type, 0, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 1, ":/marine/" name "-red.png", dx, dy); \
+ PNT(type, 2, ":/marine/" name "-green.png", dx, dy); \
+ PNT(type, 3, ":/marine/" name "-yellow.png", dx, dy); \
+ PNT(type, 4, ":/marine/" name "-white.png", dx, dy); \
+ PNT(type, 5, ":/marine/" name ".png", dx, dy); \
+ PNT(type, 6, ":/marine/" name "-black-yellow.png", dx, dy); \
+ PNT(type, 7, ":/marine/" name "-white-red.png", dx, dy); \
+ PNT(type, 8, ":/marine/" name "-black-red.png", dx, dy); \
+ PNT(type, 9, ":/marine/" name "-white-green.png", dx, dy); \
+ PNT(type, 10, ":/marine/" name "-red-yellow.png", dx, dy); \
+ PNT(type, 11, ":/marine/" name "-red-green.png", dx, dy); \
+ PNT(type, 12, ":/marine/" name "yellow.png", dx, dy); \
+ PNT(type, 13, ":/marine/" name "-black-yellow-black.png", dx, dy); \
+ PNT(type, 14, ":/marine/" name "-yellow-black.png", dx, dy); \
+ PNT(type, 15, ":/marine/" name "-yellow-black-yellow.png", dx, dy); \
+ PNT(type, 16, ":/marine/" name "-red-white.png", dx, dy); \
+ PNT(type, 17, ":/marine/" name "-green-red-green.png", dx, dy); \
+ PNT(type, 18, ":/marine/" name "-red-green-red.png", dx, dy); \
+ PNT(type, 19, ":/marine/" name "-black-red-black.png", dx, dy); \
+ PNT(type, 20, ":/marine/" name "-yellow-red-yellow.png", dx, dy); \
+ PNT(type, 21, ":/marine/" name "-green-red.png", dx, dy); \
+ PNT(type, 22, ":/marine/" name "-black-white.png", dx, dy); \
+ PNT(type, 23, ":/marine/" name "-white-yellow.png", dx, dy); \
+ PNT(type, 24, ":/marine/" name "-yellow-white.png", dx, dy); \
+ PNT(type, 25, ":/marine/" name "-green-white.png", dx, dy);
+
static QFont pixelSizeFont(int pixelSize)
{
QFont f;
@@ -319,6 +350,8 @@ void Style::defaultPolygonStyle()
_polygons[0x10306] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff)));
_polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
_polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff)));
+ _polygons[0x10407] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3),
+ Qt::Dense3Pattern));
_polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
Qt::FDiagPattern));
_polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40),
@@ -350,8 +383,8 @@ void Style::defaultPolygonStyle()
<< TYPE(0x0a) << 0x10907 << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909
<< TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f)
<< TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d
- << TYPE(0x13) << 0x10900 << 0x10613 << 0x10409 << 0x10503 << 0x10504
- << 0x1060a;
+ << TYPE(0x13) << 0x10900 << 0x10613 << 0x10407 << 0x10409 << 0x10503
+ << 0x10504 << 0x1060a;
}
void Style::defaultLineStyle(qreal ratio)
@@ -464,13 +497,14 @@ void Style::defaultLineStyle(qreal ratio)
_lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png"));
_lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png"));
_lines[0x10406] = Line(QImage(":/marine/cable-area-line.png"));
+ _lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine));
_lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine));
_lines[0x10501] = Line(QImage(":/marine/noanchor-line.png"));
- _lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png"));
_lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
_lines[0x10505] = Line(QImage(":/marine/safety-zone-line.png"));
_lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png"));
- _lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
+ _lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png"));
_lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine));
_lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DashDotLine));
_lines[0x10606] = Line(QImage(":/marine/anchor-line.png"));
@@ -731,29 +765,32 @@ void Style::defaultPointStyle(qreal ratio)
_points[0x10108] = Point(QImage(":/marine/light-major.png"));
_points[0x10109] = Point(QImage(":/marine/light-major.png"));
_points[0x1010a] = Point(QImage(":/marine/light-major.png"));
- _points[0x10200] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10201] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10202] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10203] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10204] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10205] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x10206] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10207] = Point(QImage(":/marine/spar-buoy.png"), QPoint(2, -9));
- _points[0x10208] = Point(QImage(":/marine/buoy.png"), QPoint(2, -9));
- _points[0x10209] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x1020a] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x1020b] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
- _points[0x1020c] = Point(QImage(":/marine/buoy.png"), QPoint(6, -6));
+
+ COLORSET(0x10200, "buoy", 6, -6);
+ COLORSET(0x10201, "buoy", 6, -6);
+ COLORSET(0x10202, "buoy", 6, -6);
+ COLORSET(0x10203, "buoy", 6, -6);
+ COLORSET(0x10204, "buoy", 6, -6);
+ COLORSET(0x10205, "buoy", 6, -6);
+ COLORSET(0x10206, "beacon", 0, -8);
+ COLORSET(0x10207, "spar-buoy", 2, -8);
+ COLORSET(0x10208, "buoy", 6, -6);
+ COLORSET(0x10209, "buoy", 6, -6);
+ COLORSET(0x1020a, "buoy", 6, -6);
+ COLORSET(0x1020b, "buoy", 6, -6);
+ COLORSET(0x1020c, "buoy", 6, -6);
_points[0x1020d] = Point(QImage(":/marine/platform.png"));
- _points[0x1020e] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x1020f] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10210] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10211] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10212] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10213] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10214] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
- _points[0x10215] = Point(QImage(":/marine/beacon.png"), QPoint(0, -8));
+ COLORSET(0x1020e, "beacon", 0, -8);
+ COLORSET(0x1020f, "beacon", 0, -8);
+ COLORSET(0x10210, "beacon", 0, -8);
+ COLORSET(0x10210, "beacon", 0, -8);
+ COLORSET(0x10211, "beacon", 0, -8);
+ COLORSET(0x10212, "beacon", 0, -8);
+ COLORSET(0x10213, "beacon", 0, -8);
+ COLORSET(0x10214, "beacon", 0, -8);
+ COLORSET(0x10215, "beacon", 0, -8);
_points[0x10216] = Point(QImage(":/marine/mooring-buoy.png"), QPoint(0, -5));
+
_points[0x10304] = Point(QImage(":/marine/building.png"));
_points[0x10305] = Point(QImage(":/marine/chimney.png"), QPoint(0, -11));
_points[0x10306] = Point(QImage(":/marine/church.png"));
@@ -761,6 +798,7 @@ void Style::defaultPointStyle(qreal ratio)
_points[0x10308] = Point(QImage(":/marine/tower.png"), QPoint(0, -11));
_points[0x1030a] = Point(QImage(":/marine/triangulation-point.png"));
_points[0x1030b] = Point(QImage(":/marine/radio.png"));
+
_points[0x10400] = Point(QImage(":/marine/obstruction.png"));
_points[0x10401] = Point(QImage(":/marine/obstruction.png"));
_points[0x10402] = Point(QImage(":/marine/wreck.png"));
@@ -768,12 +806,13 @@ void Style::defaultPointStyle(qreal ratio)
_points[0x10408] = Point(QImage(":/marine/obstruction-covers.png"));
_points[0x1040a] = Point(QImage(":/marine/rock-dangerous.png"));
_points[0x1040c] = Point(QImage(":/marine/rock-exposed.png"));
+
_points[0x10701] = Point(QImage(":/marine/anchorage.png"));
_points[0x10702] = Point(QImage(":/marine/boarding-place.png"));
_points[0x10703] = Point(QImage(":/marine/yacht-harbor.png"));
_points[0x10704] = Point(QImage(":/marine/pile.png"));
_points[0x10705] = Point(QImage(":/marine/anchoring-prohibited.png"));
- _points[0x1070a] = Point(QImage(":/marine/coast-guard.png"));
+ _points[0x1070a] = Point(QImage(":/marine/rescue-station.png"));
_points[0x1070b] = Point(QImage(":/marine/fishing-harbor.png"));
}
diff --git a/src/map/IMG/style.h b/src/map/IMG/style.h
index 944f5468..5144d9db 100644
--- a/src/map/IMG/style.h
+++ b/src/map/IMG/style.h
@@ -118,16 +118,16 @@ public:
static bool isPOI(quint32 type)
{return !((type >= TYPE(0x01) && type <= TYPE(0x1f))
- || (type >= 0x11400 && type < 0x11500));}
+ || (type >= 0x11400 && type < 0x11500));}
static bool isContourLine(quint32 type)
{return ((type >= TYPE(0x20) && type <= TYPE(0x25))
- || (type & 0xffff00) == TYPE(0x109));}
+ || (type & 0xffff00) == TYPE(0x109));}
static bool isWaterArea(quint32 type)
{return ((type >= TYPE(0x3c) && type <= TYPE(0x44))
- || (type & 0xffff00) == TYPE(0x10b));}
+ || (type & 0xffff00) == TYPE(0x10b));}
static bool isWaterLine(quint32 type)
{return (type == TYPE(0x26) || type == TYPE(0x18)
- || type == TYPE(0x1f));}
+ || type == TYPE(0x1f));}
static bool isMilitaryArea(quint32 type)
{return (type == TYPE(0x04) || type == 0x10901);}
static bool isNatureReserve(quint32 type)
@@ -156,6 +156,8 @@ public:
{return type >= 0x10100 && type < 0x10a00;}
static bool isMarina(quint32 type)
{return type == 0x10703;}
+ static bool hasColorset(quint32 type)
+ {return (isBuoy(type) && !(type == 0x1020d || type == 0x10216));}
static QColor color(Light::Color c);
diff --git a/src/map/encatlas.cpp b/src/map/encatlas.cpp
index 6a9b78c2..4cd8585f 100644
--- a/src/map/encatlas.cpp
+++ b/src/map/encatlas.cpp
@@ -12,7 +12,7 @@ using namespace ENC;
#define EPSILON 1e-6
#define TILE_SIZE 512
-constexpr quint32 CATD = ISO8211::NAME("CATD");
+constexpr quint32 CATD = ISO8211::TAG("CATD");
Range ENCAtlas::zooms(IntendedUsage usage)
{
@@ -127,14 +127,14 @@ ENCAtlas::ENCAtlas(const QString &fileName, QObject *parent)
_errorString = ddf.errorString();
return;
}
- while (ddf.readRecord(record)) {
+ while (!ddf.atEnd()) {
+ if (!ddf.readRecord(record)) {
+ _errorString = ddf.errorString();
+ return;
+ }
if (processRecord(record, file, bounds))
addMap(dir, file, bounds);
}
- if (!ddf.errorString().isNull()) {
- _errorString = ddf.errorString();
- return;
- }
if (_data.isEmpty()) {
_errorString = "No usable ENC map found";
diff --git a/src/map/encmap.cpp b/src/map/encmap.cpp
index 1e1cd922..afe1c061 100644
--- a/src/map/encmap.cpp
+++ b/src/map/encmap.cpp
@@ -15,11 +15,11 @@ using namespace ENC;
#define EPSILON 1e-6
#define TILE_SIZE 512
-constexpr quint32 SG2D = ISO8211::NAME("SG2D");
-constexpr quint32 SG3D = ISO8211::NAME("SG3D");
-constexpr quint32 VRID = ISO8211::NAME("VRID");
-constexpr quint32 DSID = ISO8211::NAME("DSID");
-constexpr quint32 DSPM = ISO8211::NAME("DSPM");
+constexpr quint32 SG2D = ISO8211::TAG("SG2D");
+constexpr quint32 SG3D = ISO8211::TAG("SG3D");
+constexpr quint32 VRID = ISO8211::TAG("VRID");
+constexpr quint32 DSID = ISO8211::TAG("DSID");
+constexpr quint32 DSPM = ISO8211::TAG("DSPM");
static Range zooms(const RectC &bounds)
{
@@ -63,9 +63,9 @@ static const ISO8211::Field *SGXD(const ISO8211::Record &r)
{
const ISO8211::Field *f;
- if ((f = ISO8211::field(r, SG2D)))
+ if ((f = r.field(SG2D)))
return f;
- else if ((f = ISO8211::field(r, SG3D)))
+ else if ((f = r.field(SG3D)))
return f;
else
return 0;
@@ -143,16 +143,16 @@ ENCMap::ENCMap(const QString &fileName, QObject *parent)
_errorString = ddf.errorString();
return;
}
- while (ddf.readRecord(record)) {
+ while (!ddf.atEnd()) {
+ if (!ddf.readRecord(record)) {
+ _errorString = ddf.errorString();
+ return;
+ }
if (!processRecord(record, gv, comf, dsnm)) {
_errorString = "Invalid S-57 record";
return;
}
}
- if (!ddf.errorString().isNull()) {
- _errorString = ddf.errorString();
- return;
- }
_name = dsnm;
diff --git a/src/map/ozf.cpp b/src/map/ozf.cpp
index 4d7225d1..9497737b 100644
--- a/src/map/ozf.cpp
+++ b/src/map/ozf.cpp
@@ -232,7 +232,11 @@ QPixmap OZF::tile(int zoom, int x, int y)
tileSize().height(), QImage::Format_Indexed8);
img.setColorTable(z.palette);
+#if QT_VERSION < QT_VERSION_CHECK(6, 9, 0)
return QPixmap::fromImage(img.mirrored());
+#else // QT 6.9
+ return QPixmap::fromImage(img.flipped());
+#endif // QT 6.9
}
QSize OZF::size(int zoom) const