1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-01 21:39:15 +02:00

Compare commits

..

27 Commits
5.6 ... 5.7

Author SHA1 Message Date
9e36451001 RectC now uses the expected axis direction
+ some more refactoring
2018-04-16 20:26:10 +02:00
b26a10a5b3 Added missing initialization 2018-04-16 19:14:27 +02:00
4530ec1354 Code cleanup 2018-04-15 17:32:25 +02:00
f2b72ec1b5 Fixed GeoTIFF on platforms where qreal != double 2018-04-15 16:27:47 +02:00
4b776c8cc1 Replaced remaining qreals in Coordinates logic 2018-04-15 10:42:06 +02:00
d31bf80885 Merget the OziExplorer parsers to a single source file 2018-04-15 10:08:50 +02:00
f77497c93e Translations update 2018-04-15 09:50:20 +02:00
c6ddee8682 Merge branch 'master' of https://github.com/tumic0/GPXSee 2018-04-14 23:35:09 +02:00
0d6bc05818 Added missing GPX icon to OS X bundle copy 2018-04-14 23:33:59 +02:00
fdecbc6cee Merge branch 'master' of https://github.com/tumic0/GPXSee 2018-04-14 22:56:37 +02:00
cad17fb5d3 appdata.xml description update 2018-04-14 22:55:58 +02:00
ced1244cbd Translations update (#100) 2018-04-14 22:34:41 +02:00
3dd22eb2ba Version++ 2018-04-14 21:26:13 +02:00
b12e83043d Updated icns files 2018-04-14 21:21:58 +02:00
6416c81232 Removed debug comment 2018-04-14 20:55:39 +02:00
e5db00a4f4 Added missing density setting 2018-04-14 20:54:18 +02:00
6266d71463 Added icns generation script 2018-04-14 20:30:44 +02:00
daf0cf6f9d Updated forgotten TCX icon 2018-04-14 17:41:20 +02:00
d6b810b6ef Updated icns icons 2018-04-14 17:31:39 +02:00
8f20080a36 Adjusted the SVG template to workaround broken rsvg vertical centering 2018-04-14 17:17:17 +02:00
e112363424 Fixed icon order 2018-04-14 15:10:27 +02:00
a277d0ad4f Added OziExplorer data formats icons & association 2018-04-14 14:04:19 +02:00
d4cd542a20 Grouped OziExplorer files to a single selection 2018-04-14 08:53:37 +02:00
5eaf0455aa Fixed empty CSV fields handling 2018-04-14 00:45:03 +02:00
3f71775101 Fixed broken radius-rect computation
Always use the double type for coordinate related data
2018-04-13 21:14:12 +02:00
f8009b0151 Added support for OziExplorer data files 2018-04-13 20:54:38 +02:00
f64e88290d Update README.md 2018-04-08 21:21:04 +02:00
88 changed files with 1101 additions and 1379 deletions

View File

@ -1,4 +1,4 @@
version: 5.6.{build}
version: 5.7.{build}
configuration: Release
platform: Any CPU
environment:

View File

@ -3,7 +3,7 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports GPX, TCX,
KML, FIT, IGC and NMEA files.
## Features
* User-definable online maps (OSM/Google tiles, WMTS).
* User-definable online maps (OSM/Google tiles, WMTS, WMS).
* Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF images).
* Elevation, speed, heart rate, cadence, power and temperature graphs.
* Support for multiple tracks in one view.

View File

@ -1,5 +1,5 @@
TARGET = GPXSee
VERSION = 5.6
VERSION = 5.7
QT += core \
gui \
network
@ -92,6 +92,20 @@ HEADERS += src/config.h \
src/map/transform.h \
src/map/mapfile.h \
src/map/tifffile.h \
src/map/gcs.h \
src/map/angularunits.h \
src/map/primemeridian.h \
src/map/linearunits.h \
src/map/ct.h \
src/map/mapsource.h \
src/map/tileloader.h \
src/map/wmtsmap.h \
src/map/wmts.h \
src/map/wmsmap.h \
src/map/wms.h \
src/map/crs.h \
src/map/coordinatesystem.h \
src/map/pointd.h \
src/data/graph.h \
src/data/poi.h \
src/data/waypoint.h \
@ -111,19 +125,7 @@ HEADERS += src/config.h \
src/data/fitparser.h \
src/data/igcparser.h \
src/data/nmeaparser.h \
src/map/gcs.h \
src/map/angularunits.h \
src/map/primemeridian.h \
src/map/linearunits.h \
src/map/ct.h \
src/map/mapsource.h \
src/map/tileloader.h \
src/map/wmtsmap.h \
src/map/wmts.h \
src/map/wmsmap.h \
src/map/wms.h \
src/map/crs.h \
src/map/coordinatesystem.h
src/data/oziparsers.h
SOURCES += src/main.cpp \
src/common/coordinates.cpp \
src/common/rectc.cpp \
@ -192,18 +194,6 @@ SOURCES += src/main.cpp \
src/map/transform.cpp \
src/map/mapfile.cpp \
src/map/tifffile.cpp \
src/data/data.cpp \
src/data/poi.cpp \
src/data/track.cpp \
src/data/route.cpp \
src/data/path.cpp \
src/data/gpxparser.cpp \
src/data/tcxparser.cpp \
src/data/csvparser.cpp \
src/data/kmlparser.cpp \
src/data/fitparser.cpp \
src/data/igcparser.cpp \
src/data/nmeaparser.cpp \
src/map/projection.cpp \
src/map/gcs.cpp \
src/map/angularunits.cpp \
@ -216,7 +206,20 @@ SOURCES += src/main.cpp \
src/map/wmsmap.cpp \
src/map/wms.cpp \
src/map/crs.cpp \
src/map/coordinatesystem.cpp
src/map/coordinatesystem.cpp \
src/data/data.cpp \
src/data/poi.cpp \
src/data/track.cpp \
src/data/route.cpp \
src/data/path.cpp \
src/data/gpxparser.cpp \
src/data/tcxparser.cpp \
src/data/csvparser.cpp \
src/data/kmlparser.cpp \
src/data/fitparser.cpp \
src/data/igcparser.cpp \
src/data/nmeaparser.cpp \
src/data/oziparsers.cpp
RESOURCES += gpxsee.qrc
TRANSLATIONS = lang/gpxsee_cs.ts \
lang/gpxsee_sv.ts \
@ -239,11 +242,15 @@ macx {
MAPS.path = Contents/Resources
MAPS.files = pkg/maps
ICONS.path = Contents/Resources/icons
ICONS.files = icons/tcx.icns \
ICONS.files = icons/gpx.icns \
icons/tcx.icns \
icons/kml.icns \
icons/fit.icns \
icons/igc.icns \
icons/nmea.icns
icons/nmea.icns \
icons/plt.icns \
icons/rte.icns \
icons/wpt.icns
QMAKE_BUNDLE_DATA += LOCALE MAPS ICONS CSV
}
win32 {
@ -253,6 +260,9 @@ win32 {
icons/kml.ico \
icons/fit.ico \
icons/igc.ico \
icons/nmea.ico
icons/nmea.ico \
icons/plt.ico \
icons/rte.ico \
icons/wpt.ico
}
DEFINES += APP_VERSION=\\\"$$VERSION\\\"

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View File

@ -1,171 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg3390"
height="185"
width="185"
inkscape:version="0.91 r13725"
sodipodi:docname="fit.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1440"
inkscape:window-height="815"
id="namedview3427"
showgrid="false"
inkscape:zoom="3.1351351"
inkscape:cx="92.5"
inkscape:cy="92.5"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3390" />
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
id="path3392"
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
<rect
y="124.9782"
x="16.573463"
height="49.84631"
width="120.3215"
id="rect3426"
style="fill:#006600;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
id="g3828"
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
<g
id="g3715">
<circle
style="fill:#000000"
cx="113"
cy="90.875"
id="ellipse3717"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
cx="113"
cy="90.875"
id="ellipse3719"
r="7.0209999" />
</g>
<polyline
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
id="polyline3721" />
<g
id="g3723">
<circle
style="fill:#000000"
cx="73.5"
cy="125.854"
id="ellipse3725"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="73.5"
cy="125.854"
id="ellipse3727"
r="7.0209999" />
</g>
<g
id="g3729">
<circle
style="fill:#000000"
cx="136.5"
cy="172.375"
id="ellipse3731"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="136.5"
cy="172.375"
id="ellipse3733"
r="7.0209999" />
</g>
<g
id="g3735">
<circle
style="fill:#000000"
cx="60.700001"
cy="186.39999"
id="ellipse3737"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="60.700001"
cy="186.39999"
id="ellipse3739"
r="7.0209999" />
</g>
<g
id="g3741">
<circle
style="fill:#000000"
cx="154.5"
cy="154.354"
id="ellipse3743"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="154.5"
cy="154.354"
id="ellipse3745"
r="7.0209999" />
</g>
<g
id="g3747">
<circle
style="fill:#000000"
cx="96"
cy="151.875"
id="ellipse3749"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="96"
cy="151.875"
id="ellipse3751"
r="7.0209999" />
</g>
</g>
<text
transform="scale(0.9437456,1.0596076)"
id="text3921"
y="155.86783"
x="44.388157"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"
sodipodi:linespacing="100%"><tspan
sodipodi:role="line"
id="tspan3429"
x="44.388157"
y="155.86783">FIT</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 305 KiB

View File

@ -1,146 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg3390"
height="185"
width="185">
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
id="path3392"
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
<rect
y="124.9782"
x="16.573463"
height="49.84631"
width="120.3215"
id="rect3426"
style="fill:#003399;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
id="g3828"
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
<g
id="g3715">
<circle
style="fill:#000000"
cx="113"
cy="90.875"
id="ellipse3717"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
cx="113"
cy="90.875"
id="ellipse3719"
r="7.0209999" />
</g>
<polyline
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
id="polyline3721" />
<g
id="g3723">
<circle
style="fill:#000000"
cx="73.5"
cy="125.854"
id="ellipse3725"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="73.5"
cy="125.854"
id="ellipse3727"
r="7.0209999" />
</g>
<g
id="g3729">
<circle
style="fill:#000000"
cx="136.5"
cy="172.375"
id="ellipse3731"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="136.5"
cy="172.375"
id="ellipse3733"
r="7.0209999" />
</g>
<g
id="g3735">
<circle
style="fill:#000000"
cx="60.700001"
cy="186.39999"
id="ellipse3737"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="60.700001"
cy="186.39999"
id="ellipse3739"
r="7.0209999" />
</g>
<g
id="g3741">
<circle
style="fill:#000000"
cx="154.5"
cy="154.354"
id="ellipse3743"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="154.5"
cy="154.354"
id="ellipse3745"
r="7.0209999" />
</g>
<g
id="g3747">
<circle
style="fill:#000000"
cx="96"
cy="151.875"
id="ellipse3749"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="96"
cy="151.875"
id="ellipse3751"
r="7.0209999" />
</g>
</g>
<text
transform="scale(0.9437456,1.0596076)"
id="text3921"
y="155.86783"
x="31.672857"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="155.86783"
x="31.672857"
id="tspan3923"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start">GPX</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -1,145 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="185"
height="185"
id="svg3390"
version="1.1">
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
id="path3392"
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
<rect
style="fill:#ff3300;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3426"
width="120.3215"
height="49.84631"
x="16.573463"
y="124.9782" />
<g
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
id="g3828">
<g
id="g3715">
<circle
r="7.0209999"
id="ellipse3717"
cy="90.875"
cx="113"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3719"
cy="90.875"
cx="113"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
</g>
<polyline
id="polyline3721"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
<g
id="g3723">
<circle
r="7.0209999"
id="ellipse3725"
cy="125.854"
cx="73.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3727"
cy="125.854"
cx="73.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3729">
<circle
r="7.0209999"
id="ellipse3731"
cy="172.375"
cx="136.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3733"
cy="172.375"
cx="136.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3735">
<circle
r="7.0209999"
id="ellipse3737"
cy="186.39999"
cx="60.700001"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3739"
cy="186.39999"
cx="60.700001"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3741">
<circle
r="7.0209999"
id="ellipse3743"
cy="154.354"
cx="154.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3745"
cy="154.354"
cx="154.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3747">
<circle
r="7.0209999"
id="ellipse3749"
cy="151.875"
cx="96"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3751"
cy="151.875"
cx="96"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="40.149723"
y="155.86783"
id="text3921"
transform="scale(0.9437456,1.0596076)"><tspan
y="155.86783"
x="40.149723"
id="tspan3448">IGC</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="185"
height="185"
id="svg3390"
version="1.1">
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
id="path3392"
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
<rect
style="fill:#990000;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3426"
width="120.3215"
height="49.84631"
x="16.573463"
y="124.9782" />
<g
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
id="g3828">
<g
id="g3715">
<circle
r="7.0209999"
id="ellipse3717"
cy="90.875"
cx="113"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3719"
cy="90.875"
cx="113"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
</g>
<polyline
id="polyline3721"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
<g
id="g3723">
<circle
r="7.0209999"
id="ellipse3725"
cy="125.854"
cx="73.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3727"
cy="125.854"
cx="73.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3729">
<circle
r="7.0209999"
id="ellipse3731"
cy="172.375"
cx="136.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3733"
cy="172.375"
cx="136.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3735">
<circle
r="7.0209999"
id="ellipse3737"
cy="186.39999"
cx="60.700001"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3739"
cy="186.39999"
cx="60.700001"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3741">
<circle
r="7.0209999"
id="ellipse3743"
cy="154.354"
cx="154.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3745"
cy="154.354"
cx="154.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3747">
<circle
r="7.0209999"
id="ellipse3749"
cy="151.875"
cx="96"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3751"
cy="151.875"
cx="96"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
x="31.672857"
y="155.86783"
id="text3921"
transform="scale(0.9437456,1.0596076)"><tspan
id="tspan3429">KML</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -1,145 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
id="svg3390"
height="185"
width="185">
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867"
id="path3392"
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
<rect
y="124.9782"
x="16.573463"
height="49.84631"
width="131.6837"
id="rect3426"
style="fill:#0083d7;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<g
id="g3828"
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
<g
id="g3715">
<circle
style="fill:#000000"
cx="113"
cy="90.875"
id="ellipse3717"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round"
cx="113"
cy="90.875"
id="ellipse3719"
r="7.0209999" />
</g>
<polyline
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
id="polyline3721" />
<g
id="g3723">
<circle
style="fill:#000000"
cx="73.5"
cy="125.854"
id="ellipse3725"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="73.5"
cy="125.854"
id="ellipse3727"
r="7.0209999" />
</g>
<g
id="g3729">
<circle
style="fill:#000000"
cx="136.5"
cy="172.375"
id="ellipse3731"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="136.5"
cy="172.375"
id="ellipse3733"
r="7.0209999" />
</g>
<g
id="g3735">
<circle
style="fill:#000000"
cx="60.700001"
cy="186.39999"
id="ellipse3737"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="60.700001"
cy="186.39999"
id="ellipse3739"
r="7.0209999" />
</g>
<g
id="g3741">
<circle
style="fill:#000000"
cx="154.5"
cy="154.354"
id="ellipse3743"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="154.5"
cy="154.354"
id="ellipse3745"
r="7.0209999" />
</g>
<g
id="g3747">
<circle
style="fill:#000000"
cx="96"
cy="151.875"
id="ellipse3749"
r="7.0209999" />
<circle
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2"
cx="96"
cy="151.875"
id="ellipse3751"
r="7.0209999" />
</g>
</g>
<text
transform="scale(0.9437456,1.0596076)"
id="text3921"
y="155.86783"
x="21.076782"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="155.86783"
x="21.076782"
id="tspan3429">NMEA</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
icons/plt.icns Normal file

Binary file not shown.

BIN
icons/plt.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB

BIN
icons/rte.icns Normal file

Binary file not shown.

BIN
icons/rte.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

28
icons/scripts/icns.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
EXTENSIONS="fit:#006600 gpx:#003399 igc:#ff3300 kml:#990000 nmea:#0083d7 \
plt:#66ff00 rte:#66ff00 tcx:#ffcc00 wpt:#66ff00"
for e in $EXTENSIONS; do
IFS=":"; set $e
EXT=`echo $1 | tr /a-z/ /A-Z/`
sed -e "s/\$EXTENSION/$EXT/" -e "s/\$COLOR/$2/" icon-template.svg > $1.svg
ICONSET=$1.iconset
mkdir $ICONSET
convert -density 400 -background none -resize '16x16' "$1.svg" "$ICONSET/icon_16x16.png"
convert -density 400 -background none -resize '32x32' "$1.svg" "$ICONSET/icon_16x16@2x.png"
cp "$ICONSET/icon_16x16@2x.png" "$ICONSET/icon_32x32.png"
convert -density 400 -background none -resize '64x64' "$1.svg" "$ICONSET/icon_32x32@2x.png"
convert -density 400 -background none -resize '128x128' "$1.svg" "$ICONSET/icon_128x128.png"
convert -density 400 -background none -resize '256x256' "$1.svg" "$ICONSET/icon_128x128@2x.png"
cp "$ICONSET/icon_128x128@2x.png" "$ICONSET/icon_256x256.png"
convert -density 400 -background none -resize '512x512' "$1.svg" "$ICONSET/icon_256x256@2x.png"
cp "$ICONSET/icon_256x256@2x.png" "$ICONSET/icon_512x512.png"
convert -density 400 -background none -resize '1024x1024' "$1.svg" "$ICONSET/icon_512x512@2x.png"
iconutil -c icns -o $1.icns "$ICONSET"
rm -R "$ICONSET" $1.svg
done

13
icons/scripts/ico.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
EXTENSIONS="fit:#006600 gpx:#003399 igc:#ff3300 kml:#990000 nmea:#0083d7 \
plt:#66ff00 rte:#66ff00 tcx:#ffcc00 wpt:#66ff00"
for e in $EXTENSIONS; do
IFS=":"; set $e
EXT=`echo $1 | tr /a-z/ /A-Z/`
sed -e "s/\$EXTENSION/$EXT/" -e "s/\$COLOR/$2/" icon-template.svg > $1.svg
convert -density 400 $1.svg -define icon:auto-resize $1.ico
rm $1.svg
done

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" height="185" width="185">
<path id="envelope" style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
<g id="logo" transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
<polyline style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "/>
<circle style="fill:#000000" cx="113" cy="90.875" r="8"/>
<circle style="fill:#000000" cx="73.5" cy="125.854" r="8"/>
<circle style="fill:#000000" cx="136.5" cy="172.375" r="8"/>
<circle style="fill:#000000" cx="60.700001" cy="186.39999" r="8"/>
<circle style="fill:#000000" cx="154.5" cy="154.354" r="8"/>
<circle style="fill:#000000" cx="96" cy="151.875" r="8"/>
</g>
<g transform="translate(16.573463,124.9782)">
<rect y="0" x="0" id="textrect" height="50" width="120" style="fill:$COLOR;fill-opacity:1;stroke:none;"/>
<text y="28" x="60" dominant-baseline="central" text-anchor="middle" style="fill:#FFFFFF;font-size:39px;font-family:sans-serif;font-weight:bold;">$EXTENSION</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -1,145 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
width="185"
height="185"
id="svg3390"
version="1.1">
<metadata
id="metadata3404">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs3402" />
<path
d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0"
id="path3392"
style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" />
<rect
style="fill:#ffcc00;fill-opacity:1;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3426"
width="120.3215"
height="49.84631"
x="16.573463"
y="124.9782" />
<g
transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)"
id="g3828">
<g
id="g3715">
<circle
r="7.0209999"
id="ellipse3717"
cy="90.875"
cx="113"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3719"
cy="90.875"
cx="113"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2;stroke-linejoin:round" />
</g>
<polyline
id="polyline3721"
points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" />
<g
id="g3723">
<circle
r="7.0209999"
id="ellipse3725"
cy="125.854"
cx="73.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3727"
cy="125.854"
cx="73.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3729">
<circle
r="7.0209999"
id="ellipse3731"
cy="172.375"
cx="136.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3733"
cy="172.375"
cx="136.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3735">
<circle
r="7.0209999"
id="ellipse3737"
cy="186.39999"
cx="60.700001"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3739"
cy="186.39999"
cx="60.700001"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3741">
<circle
r="7.0209999"
id="ellipse3743"
cy="154.354"
cx="154.5"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3745"
cy="154.354"
cx="154.5"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
<g
id="g3747">
<circle
r="7.0209999"
id="ellipse3749"
cy="151.875"
cx="96"
style="fill:#000000" />
<circle
r="7.0209999"
id="ellipse3751"
cy="151.875"
cx="96"
style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:2" />
</g>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:100%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="35.911289"
y="155.86783"
id="text3921"
transform="scale(0.9437456,1.0596076)"><tspan
y="155.86783"
x="35.911289"
id="tspan3429">TCX</tspan></text>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

BIN
icons/wpt.icns Normal file

Binary file not shown.

BIN
icons/wpt.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Podporované soubory</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>Soubory CSV</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>Soubory FIT</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>Soubory GPX</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>Soubory IGC</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>Soubory KML</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>Soubory NMEA</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation>Soubory OziExploreru</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>Soubory TCX</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Všechny soubory</translation>
</message>

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Unterstütze Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>CSV-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>FIT-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>GPX-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>IGC-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>KML-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>NMEA-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation>OziExplorer-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>TCX-Dateien</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Alle Dateien</translation>
</message>

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Tuetut tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>CSV-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>FIT-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>GPX-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>IGC-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>KML-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>NMEA-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation>OziExplorer-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>TCX-tiedostot</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Kaikki tiedostot</translation>
</message>

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Formats pris en charge</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>Données CSV</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>Données FIT</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>Données GPX</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>Données IGC</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>Données KML</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>Données NMEA</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>Données TCX</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Tous les fichiers</translation>
</message>

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Все поддерживаемые файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>CSV файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>FIT файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>GPX файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>IGC файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>KML файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>NMEA файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation>OziExplorer файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>TCX файлы</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Все файлы</translation>
</message>

View File

@ -47,47 +47,52 @@
<context>
<name>Data</name>
<message>
<location filename="../src/data/data.cpp" line="103"/>
<location filename="../src/data/data.cpp" line="112"/>
<source>Supported files</source>
<translation>Filer som stöds</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>CSV files</source>
<translation>CSV-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="104"/>
<location filename="../src/data/data.cpp" line="114"/>
<source>FIT files</source>
<translation>FIT-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>GPX files</source>
<translation>GPX-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="105"/>
<location filename="../src/data/data.cpp" line="115"/>
<source>IGC files</source>
<translation>IGC-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>KML files</source>
<translation>KML-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="106"/>
<location filename="../src/data/data.cpp" line="116"/>
<source>NMEA files</source>
<translation>NMEA-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="117"/>
<source>OziExplorer files</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="118"/>
<source>TCX files</source>
<translation>TCX-filer</translation>
</message>
<message>
<location filename="../src/data/data.cpp" line="107"/>
<location filename="../src/data/data.cpp" line="118"/>
<source>All files</source>
<translation>Alla filer</translation>
</message>

View File

@ -115,6 +115,54 @@
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>plt</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.oziexplorer.plt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/plt.icns</string>
<key>CFBundleTypeName</key>
<string>OziExplorer Track Point File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rte</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.oziexplorer.rte</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/rte.icns</string>
<key>CFBundleTypeName</key>
<string>OziExplorer Route File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>wpt</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/vnd.oziexplorer.wpt</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icons/wpt.icns</string>
<key>CFBundleTypeName</key>
<string>OziExplorer Waypoint File</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
@ -245,6 +293,69 @@
<string>application/vnd.nmea.nmea</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.oziexplorer3.plt</string>
<key>UTTypeReferenceURL</key>
<string>http://www.oziexplorer3.com/eng/help/fileformats.html</string>
<key>UTTypeDescription</key>
<string>OziExplorer Track Point File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>plt</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.oziexplorer.plt</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.oziexplorer3.plt</string>
<key>UTTypeReferenceURL</key>
<string>http://www.oziexplorer3.com/eng/help/fileformats.html</string>
<key>UTTypeDescription</key>
<string>OziExplorer Route File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rte</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.oziexplorer.rte</string>
</dict>
</dict>
<dict>
<key>UTTypeIdentifier</key>
<string>com.oziexplorer3.plt</string>
<key>UTTypeReferenceURL</key>
<string>http://www.oziexplorer3.com/eng/help/fileformats.html</string>
<key>UTTypeDescription</key>
<string>OziExplorer Waypoint File</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>wpt</string>
</array>
<key>public.mime-type</key>
<string>application/vnd.oziexplorer.wpt</string>
</dict>
</dict>
</array>
</dict>

View File

@ -8,11 +8,11 @@
<summary>GPS log file viewer and analyzer</summary>
<description>
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
KML, FIT, IGC and NMEA files.</p>
KML, FIT, IGC, NMEA and OziExplorer files.</p>
<p>Features:</p>
<ul>
<li>User-definable online maps.</li>
<li>User-definable online maps (OSM/Google tiles, WMTS, WMS).</li>
<li>Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF
images).</li>
<li>Elevation, speed, heart rate, cadence, power and temperature
@ -21,7 +21,8 @@
<li>Support for POI files.</li>
<li>Print/export to PDF.</li>
<li>Full-screen mode.</li>
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA and Garmin CSV files.</li>
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, OziExplorer (PLT, WPT, RTE)
and Garmin CSV files.</li>
</ul>
</description>
@ -54,5 +55,8 @@
<mimetype>application/vnd.google-earth.kml+xml</mimetype>
<mimetype>application/vnd.fai.igc</mimetype>
<mimetype>application/vnd.nmea.nmea</mimetype>
<mimetype>application/vnd.oziexplorer.plt</mimetype>
<mimetype>application/vnd.oziexplorer.rte</mimetype>
<mimetype>application/vnd.oziexplorer.wpt</mimetype>
</mimetypes>
</component>

View File

@ -10,4 +10,4 @@ Icon=gpxsee
Terminal=false
Type=Application
Categories=Graphics;Viewer;Maps;Qt;
MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;
MimeType=application/gpx+xml;application/tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;

View File

@ -5,14 +5,14 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "5.6"
!define VERSION "5.7"
; The file to write
OutFile "GPXSee-${VERSION}.exe"
; Compression method
SetCompressor /SOLID lzma
; Required execution level
; Required execution level
RequestExecutionLevel admin
; The default installation directory
@ -26,7 +26,7 @@ VIAddVersionKey "ProductName" "GPXSee"
VIAddVersionKey "LegalCopyright" "GPXSee project"
VIAddVersionKey "FileDescription" "GPXSee installer"
; Registry key to check for directory (so if you install again, it will
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
@ -39,11 +39,14 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
!define REGFIT "GPXSee.fit"
!define REGIGC "GPXSee.igc"
!define REGNMEA "GPXSee.nmea"
!define REGPLT "GPXSee.plt"
!define REGRTE "GPXSee.rte"
!define REGWPT "GPXSee.wpt"
; Start menu page configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
Var StartMenuFolder
@ -77,10 +80,10 @@ FunctionEnd
Section "GPXSee" SEC_APP
SectionIn RO
; Set output path to the installation directory.
; Set output path to the installation directory
SetOutPath $INSTDIR
; Put the files there
File "gpxsee.exe"
File /r "maps"
@ -88,14 +91,14 @@ Section "GPXSee" SEC_APP
; Create start menu entry and add links
SetShellVarContext all
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
!insertmacro MUI_STARTMENU_WRITE_END
; Create the uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
WriteUninstaller "$INSTDIR\uninstall.exe"
; Write the installation path into the registry
DetailPrint "Registering application..."
@ -113,28 +116,40 @@ Section "GPXSee" SEC_APP
DetailPrint "Associating file types..."
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".kml" "" "${REGKML}"
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".fit" "" "${REGFIT}"
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".igc" "" "${REGIGC}"
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,7"
WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".plt" "" "${REGPLT}"
WriteRegStr HKCR "${REGPLT}" "" "OziExplorer Track Point File"
WriteRegStr HKCR "${REGPLT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,8"
WriteRegStr HKCR "${REGPLT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".rte" "" "${REGRTE}"
WriteRegStr HKCR "${REGRTE}" "" "OziExplorer Route File"
WriteRegStr HKCR "${REGRTE}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,9"
WriteRegStr HKCR "${REGRTE}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".wpt" "" "${REGWPT}"
WriteRegStr HKCR "${REGWPT}" "" "OziExplorer Waypoint File"
WriteRegStr HKCR "${REGWPT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
WriteRegStr HKCR "${REGWPT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
@ -152,7 +167,7 @@ Section "QT framework" SEC_QT
File /r "platforms"
File /r "imageformats"
File /r "printsupport"
SectionEnd
Section "MSVC runtime" SEC_MSVC
@ -231,7 +246,7 @@ SectionGroupEnd
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "${REGENTRY}"
DeleteRegKey HKLM SOFTWARE\GPXSee
@ -258,7 +273,13 @@ Section "Uninstall"
DeleteRegKey HKCR ".igc"
DeleteRegKey HKCR "${REGNMEA}"
DeleteRegKey HKCR ".nmea"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
DeleteRegKey HKCR "${REGPLT}"
DeleteRegKey HKCR ".plt"
DeleteRegKey HKCR "${REGRTE}"
DeleteRegKey HKCR ".rte"
DeleteRegKey HKCR "${REGWPT}"
DeleteRegKey HKCR ".wpt"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd

View File

@ -43,4 +43,24 @@
<glob pattern="*.nmea"/>
</mime-type>
<mime-type type="application/vnd.oziexplorer.plt">
<comment>OziExplorer Track Point File</comment>
<sub-class-of type="text/plain"/>
<generic-icon name="text-plain"/>
<glob pattern="*.plt"/>
</mime-type>
<mime-type type="application/vnd.oziexplorer.rte">
<comment>OziExplorer Route File</comment>
<sub-class-of type="text/plain"/>
<generic-icon name="text-plain"/>
<glob pattern="*.rte"/>
</mime-type>
<mime-type type="application/vnd.oziexplorer.wpt">
<comment>OziExplorer Waypoint File</comment>
<sub-class-of type="text/plain"/>
<generic-icon name="text-plain"/>
<glob pattern="*.wpt"/>
</mime-type>
</mime-info>

View File

@ -5,14 +5,14 @@
; The name of the installer
Name "GPXSee"
; Program version
!define VERSION "5.6"
!define VERSION "5.7"
; The file to write
OutFile "GPXSee-${VERSION}_x64.exe"
; Compression method
SetCompressor /SOLID lzma
; Required execution level
; Required execution level
RequestExecutionLevel admin
; The default installation directory
@ -26,7 +26,7 @@ VIAddVersionKey "ProductName" "GPXSee"
VIAddVersionKey "LegalCopyright" "GPXSee project"
VIAddVersionKey "FileDescription" "GPXSee installer (x64)"
; Registry key to check for directory (so if you install again, it will
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
@ -39,11 +39,14 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
!define REGFIT "GPXSee.fit"
!define REGIGC "GPXSee.igc"
!define REGNMEA "GPXSee.nmea"
!define REGPLT "GPXSee.plt"
!define REGRTE "GPXSee.rte"
!define REGWPT "GPXSee.wpt"
; Start menu page configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
Var StartMenuFolder
@ -71,31 +74,31 @@ Function .onInit
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
Abort
${EndIf}
${If} ${RunningX64}
SetRegView 64
${Else}
MessageBox MB_OK "The 64b version of GPXSee can not be run on 32b systems."
Abort
${Else}
MessageBox MB_OK "The 64b version of GPXSee can not be run on 32b systems."
Abort
${EndIf}
FunctionEnd
FunctionEnd
; The stuff to install
Section "GPXSee" SEC_APP
SectionIn RO
; Set output path to the installation directory.
; Set output path to the installation directory
SetOutPath $INSTDIR
; Put the files there
File "gpxsee.exe"
File /r "maps"
File /r "csv"
; Create start menu entry and add links
SetShellVarContext all
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
@ -103,7 +106,7 @@ Section "GPXSee" SEC_APP
; Create the uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"
; Write the installation path into the registry
DetailPrint "Registering application..."
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
@ -120,29 +123,41 @@ Section "GPXSee" SEC_APP
DetailPrint "Associating file types..."
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
WriteRegStr HKCR "${REGGPX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
WriteRegStr HKCR "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,2"
WriteRegStr HKCR "${REGTCX}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
WriteRegStr HKCR "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".kml" "" "${REGKML}"
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,3"
WriteRegStr HKCR "${REGKML}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
WriteRegStr HKCR "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".fit" "" "${REGFIT}"
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,4"
WriteRegStr HKCR "${REGFIT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
WriteRegStr HKCR "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".igc" "" "${REGIGC}"
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,5"
WriteRegStr HKCR "${REGIGC}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
WriteRegStr HKCR "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,6"
WriteRegStr HKCR "${REGNMEA}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,7"
WriteRegStr HKCR "${REGNMEA}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".plt" "" "${REGPLT}"
WriteRegStr HKCR "${REGPLT}" "" "OziExplorer Track Point File"
WriteRegStr HKCR "${REGPLT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,8"
WriteRegStr HKCR "${REGPLT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".rte" "" "${REGRTE}"
WriteRegStr HKCR "${REGRTE}" "" "OziExplorer Route File"
WriteRegStr HKCR "${REGRTE}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,9"
WriteRegStr HKCR "${REGRTE}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
WriteRegStr HKCR ".wpt" "" "${REGWPT}"
WriteRegStr HKCR "${REGWPT}" "" "OziExplorer Waypoint File"
WriteRegStr HKCR "${REGWPT}\DefaultIcon" "" "$INSTDIR\GPXSee.exe,1"
WriteRegStr HKCR "${REGWPT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@ -159,7 +174,7 @@ Section "QT framework" SEC_QT
File /r "platforms"
File /r "imageformats"
File /r "printsupport"
SectionEnd
Section "MSVC runtime" SEC_MSVC
@ -233,7 +248,7 @@ SectionGroupEnd
; Uninstaller
Section "Uninstall"
; Remove registry keys
SetRegView 64
DeleteRegKey HKLM "${REGENTRY}"
@ -247,7 +262,7 @@ Section "Uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
RMDir "$SMPROGRAMS\$StartMenuFolder"
; Remove File associations
DeleteRegKey HKCR "${REGGPX}"
DeleteRegKey HKCR ".gpx"
@ -261,6 +276,12 @@ Section "Uninstall"
DeleteRegKey HKCR ".igc"
DeleteRegKey HKCR "${REGNMEA}"
DeleteRegKey HKCR ".nmea"
DeleteRegKey HKCR "${REGPLT}"
DeleteRegKey HKCR ".plt"
DeleteRegKey HKCR "${REGRTE}"
DeleteRegKey HKCR ".rte"
DeleteRegKey HKCR "${REGWPT}"
DeleteRegKey HKCR ".wpt"
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
SectionEnd
@ -291,4 +312,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
!insertmacro MUI_FUNCTION_DESCRIPTION_END

View File

@ -150,7 +150,7 @@ void MapView::addWaypoints(const QList<Waypoint> &waypoints)
WaypointItem *wi = new WaypointItem(w, _map);
_waypoints.append(wi);
_wr.unite(wi->waypoint().coordinates());
_wr = _wr.united(wi->waypoint().coordinates());
wi->setZValue(1);
wi->setSize(_waypointSize);
wi->setColor(_waypointColor);

View File

@ -1,50 +1,16 @@
#include "wgs84.h"
#include "coordinates.h"
#define MIN_LAT deg2rad(-90.0)
#define MAX_LAT deg2rad(90.0)
#define MIN_LON deg2rad(-180.0)
#define MAX_LON deg2rad(180.0)
qreal Coordinates::distanceTo(const Coordinates &c) const
double Coordinates::distanceTo(const Coordinates &c) const
{
qreal dLat = deg2rad(c.lat() - _lat);
qreal dLon = deg2rad(c.lon() - _lon);
qreal a = pow(sin(dLat / 2.0), 2.0)
double dLat = deg2rad(c.lat() - _lat);
double dLon = deg2rad(c.lon() - _lon);
double a = pow(sin(dLat / 2.0), 2.0)
+ cos(deg2rad(_lat)) * cos(deg2rad(c.lat())) * pow(sin(dLon / 2.0), 2.0);
return (WGS84_RADIUS * (2.0 * atan2(sqrt(a), sqrt(1.0 - a))));
}
QPair<Coordinates, Coordinates> Coordinates::boundingRect(qreal distance) const
{
qreal radDist = distance / WGS84_RADIUS;
qreal minLat = deg2rad(_lat) - radDist;
qreal maxLat = deg2rad(_lat) + radDist;
qreal minLon, maxLon;
if (minLat > MIN_LAT && maxLat < MAX_LAT) {
qreal deltaLon = asin(sin(radDist) / cos(_lat));
minLon = deg2rad(_lon) - deltaLon;
if (minLon < MIN_LON)
minLon += 2.0 * M_PI;
maxLon = deg2rad(_lon) + deltaLon;
if (maxLon > MAX_LON)
maxLon -= 2.0 * M_PI;
} else {
// a pole is within the distance
minLat = qMax(minLat, MIN_LAT);
maxLat = qMin(maxLat, MAX_LAT);
minLon = MIN_LON;
maxLon = MAX_LON;
}
return QPair<Coordinates, Coordinates>(Coordinates(rad2deg(qMin(minLon,
maxLon)), rad2deg(qMin(minLat, maxLat))), Coordinates(rad2deg(qMax(minLon,
maxLon)), rad2deg(qMax(minLat, maxLat))));
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Coordinates &c)
{

View File

@ -2,7 +2,6 @@
#define COORDINATES_H
#include <cmath>
#include <QPair>
#include <QDebug>
#ifndef M_PI
@ -15,14 +14,14 @@ class Coordinates
{
public:
Coordinates() {_lon = NAN; _lat = NAN;}
Coordinates(qreal lon, qreal lat) {_lon = lon; _lat = lat;}
Coordinates(double lon, double lat) {_lon = lon; _lat = lat;}
qreal &rlon() {return _lon;}
qreal &rlat() {return _lat;}
void setLon(qreal lon) {_lon = lon;}
void setLat(qreal lat) {_lat = lat;}
qreal lon() const {return _lon;}
qreal lat() const {return _lat;}
double &rlon() {return _lon;}
double &rlat() {return _lat;}
void setLon(double lon) {_lon = lon;}
void setLat(double lat) {_lat = lat;}
double lon() const {return _lon;}
double lat() const {return _lat;}
bool isNull() const
{return std::isnan(_lon) && std::isnan(_lat);}
@ -30,11 +29,10 @@ public:
{return (_lon >= -180.0 && _lon <= 180.0
&& _lat >= -90.0 && _lat <= 90.0);}
qreal distanceTo(const Coordinates &c) const;
QPair<Coordinates, Coordinates> boundingRect(qreal distance) const;
double distanceTo(const Coordinates &c) const;
private:
qreal _lat, _lon;
double _lat, _lon;
};
inline bool operator==(const Coordinates &c1, const Coordinates &c2)

View File

@ -1,5 +1,41 @@
#include "wgs84.h"
#include "rectc.h"
#define MIN_LAT deg2rad(-90.0)
#define MAX_LAT deg2rad(90.0)
#define MIN_LON deg2rad(-180.0)
#define MAX_LON deg2rad(180.0)
RectC::RectC(const Coordinates &center, double radius)
{
double radDist = radius / WGS84_RADIUS;
double radLon = deg2rad(center.lon());
double radlat = deg2rad(center.lat());
double minLat = radlat - radDist;
double maxLat = radlat + radDist;
double minLon, maxLon;
if (minLat > MIN_LAT && maxLat < MAX_LAT) {
double deltaLon = asin(sin(radDist) / cos(radlat));
minLon = radLon - deltaLon;
if (minLon < MIN_LON)
minLon += 2.0 * M_PI;
maxLon = radLon + deltaLon;
if (maxLon > MAX_LON)
maxLon -= 2.0 * M_PI;
} else {
// a pole is within the distance
minLat = qMax(minLat, MIN_LAT);
maxLat = qMin(maxLat, MAX_LAT);
minLon = MIN_LON;
maxLon = MAX_LON;
}
_tl = Coordinates(rad2deg(minLon), rad2deg(maxLat));
_br = Coordinates(rad2deg(maxLon), rad2deg(minLat));
}
RectC RectC::operator|(const RectC &r) const
{
if (isNull())
@ -7,41 +43,36 @@ RectC RectC::operator|(const RectC &r) const
if (r.isNull())
return *this;
qreal l1 = _tl.lon();
qreal r1 = _tl.lon();
if (_br.lon() - _tl.lon() < 0)
double l1 = _tl.lon();
double r1 = _tl.lon();
if (_br.lon() < _tl.lon())
l1 = _br.lon();
else
r1 = _br.lon();
qreal l2 = r._tl.lon();
qreal r2 = r._tl.lon();
if (r._br.lon() - r._tl.lon() < 0)
double l2 = r._tl.lon();
double r2 = r._tl.lon();
if (r._br.lon() < r._tl.lon())
l2 = r._br.lon();
else
r2 = r._br.lon();
qreal t1 = _tl.lat();
qreal b1 = _tl.lat();
if (_br.lat() - _tl.lat() < 0)
double t1 = _tl.lat();
double b1 = _tl.lat();
if (_br.lat() > _tl.lat())
t1 = _br.lat();
else
b1 = _br.lat();
qreal t2 = r._tl.lat();
qreal b2 = r._tl.lat();
if (r._br.lat() - r._tl.lat() < 0)
double t2 = r._tl.lat();
double b2 = r._tl.lat();
if (r._br.lat() > r._tl.lat())
t2 = r._br.lat();
else
b2 = r._br.lat();
RectC tmp;
tmp._tl.setLon(qMin(l1, l2));
tmp._br.setLon(qMax(r1, r2));
tmp._tl.setLat(qMin(t1, t2));
tmp._br.setLat(qMax(b1, b2));
return tmp;
return RectC(Coordinates(qMin(l1, l2), qMax(t1, t2)),
Coordinates(qMax(r1, r2), qMin(b1, b2)));
}
RectC RectC::operator&(const RectC &r) const
@ -49,16 +80,16 @@ RectC RectC::operator&(const RectC &r) const
if (isNull() || r.isNull())
return RectC();
qreal l1 = _tl.lon();
qreal r1 = _tl.lon();
if (_br.lon() - _tl.lon() < 0)
double l1 = _tl.lon();
double r1 = _tl.lon();
if (_br.lon() < _tl.lon())
l1 = _br.lon();
else
r1 = _br.lon();
qreal l2 = r._tl.lon();
qreal r2 = r._tl.lon();
if (r._br.lon() - r._tl.lon() < 0)
double l2 = r._tl.lon();
double r2 = r._tl.lon();
if (r._br.lon() < r._tl.lon())
l2 = r._br.lon();
else
r2 = r._br.lon();
@ -66,75 +97,65 @@ RectC RectC::operator&(const RectC &r) const
if (l1 > r2 || l2 > r1)
return RectC();
qreal t1 = _tl.lat();
qreal b1 = _tl.lat();
if (_br.lat() - _tl.lat() < 0)
double t1 = _tl.lat();
double b1 = _tl.lat();
if (_br.lat() > _tl.lat())
t1 = _br.lat();
else
b1 = _br.lat();
qreal t2 = r._tl.lat();
qreal b2 = r._tl.lat();
if (r._br.lat() - r._tl.lat() < 0)
double t2 = r._tl.lat();
double b2 = r._tl.lat();
if (r._br.lat() > r._tl.lat())
t2 = r._br.lat();
else
b2 = r._br.lat();
if (t1 > b2 || t2 > b1)
if (b1 > t2 || b2 > t1)
return RectC();
RectC tmp;
tmp._tl.setLon(qMax(l1, l2));
tmp._br.setLon(qMin(r1, r2));
tmp._tl.setLat(qMax(t1, t2));
tmp._br.setLat(qMin(b1, b2));
return tmp;
return RectC(Coordinates(qMax(l1, l2), qMin(t1, t2)),
Coordinates(qMin(r1, r2), qMax(b1, b2)));
}
RectC RectC::normalized() const
RectC RectC::united(const Coordinates &c) const
{
RectC r;
if (c.isNull())
return *this;
if (isNull())
return RectC(c, c);
if (_br.lon() < _tl.lon()) {
r._tl.setLon(_br.lon());
r._br.setLon(_tl.lon());
} else {
r._tl.setLon(_tl.lon());
r._br.setLon(_br.lon());
}
if (_br.lat() < _tl.lat()) {
r._tl.setLat(_br.lat());
r._br.setLat(_tl.lat());
} else {
r._tl.setLat(_tl.lat());
r._br.setLat(_br.lat());
}
double l = _tl.lon();
double r = _tl.lon();
if (_br.lon() < _tl.lon())
l = _br.lon();
else
r = _br.lon();
return r;
}
double t = _tl.lat();
double b = _tl.lat();
if (_br.lat() > _tl.lat())
t = _br.lat();
else
b = _br.lat();
void RectC::unite(const Coordinates &c)
{
if (isNull()) {
_tl = c;
_br = c;
} else {
if (c.lon() < _tl.lon())
_tl.setLon(c.lon());
if (c.lon() > _br.lon())
_br.setLon(c.lon());
if (c.lat() > _br.lat())
_br.setLat(c.lat());
if (c.lat() < _tl.lat())
_tl.setLat(c.lat());
}
if (c.lon() < l)
l = c.lon();
if (c.lon() > r)
r = c.lon();
if (c.lat() < b)
b = c.lat();
if (c.lat() > t)
t = c.lat();
return RectC(Coordinates(l, t), Coordinates(r, b));
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const RectC &rect)
{
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.size() << ")";
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.bottomRight()
<< ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -2,7 +2,6 @@
#define RECTC_H
#include <QDebug>
#include <QSizeF>
#include "coordinates.h"
class RectC
@ -11,6 +10,7 @@ public:
RectC() {}
RectC(const Coordinates &topLeft, const Coordinates &bottomRight)
: _tl(topLeft), _br(bottomRight) {}
RectC(const Coordinates &center, double radius);
bool isNull() const
{return _tl.isNull() && _br.isNull();}
@ -19,22 +19,16 @@ public:
Coordinates topLeft() const {return _tl;}
Coordinates bottomRight() const {return _br;}
Coordinates center() const
{return Coordinates((_tl.lon() + _br.lon()) / 2.0,
(_tl.lat() + _br.lat()) / 2.0);}
qreal width() const {return _br.lon() - _tl.lon();}
qreal height() const {return _br.lat() - _tl.lat();}
QSizeF size() const {return QSizeF(width(), height());}
RectC operator|(const RectC &r) const;
RectC &operator|=(const RectC &r) {*this = *this | r; return *this;}
RectC operator&(const RectC &r) const;
RectC &operator&=(const RectC &r) {*this = *this & r; return *this;}
void unite(const Coordinates &c);
RectC normalized() const;
RectC united(const Coordinates &c) const;
private:
Coordinates _tl, _br;

View File

@ -1,9 +1,9 @@
#include "csvparser.h"
bool CSVParser::parse(QFile *file, QList<TrackData> &track,
bool CSVParser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Waypoint> &waypoints)
{
Q_UNUSED(track);
Q_UNUSED(tracks);
Q_UNUSED(routes);
bool res;

View File

@ -8,7 +8,7 @@ class CSVParser : public Parser
public:
CSVParser() : _errorLine(0) {}
bool parse(QFile *file, QList<TrackData> &track, QList<RouteData> &routes,
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}

View File

@ -8,6 +8,7 @@
#include "fitparser.h"
#include "igcparser.h"
#include "nmeaparser.h"
#include "oziparsers.h"
#include "data.h"
@ -18,6 +19,9 @@ static FITParser fit;
static CSVParser csv;
static IGCParser igc;
static NMEAParser nmea;
static PLTParser plt;
static WPTParser wpt;
static RTEParser rte;
static QHash<QString, Parser*> parsers()
{
@ -30,6 +34,9 @@ static QHash<QString, Parser*> parsers()
hash.insert("csv", &csv);
hash.insert("igc", &igc);
hash.insert("nmea", &nmea);
hash.insert("plt", &plt);
hash.insert("wpt", &wpt);
hash.insert("rte", &rte);
return hash;
}
@ -100,11 +107,13 @@ bool Data::loadFile(const QString &fileName)
QString Data::formats()
{
return
tr("Supported files") + " (*.csv *.fit *.gpx *.igc *.kml *.nmea *.tcx);;"
tr("Supported files")
+ " (*.csv *.fit *.gpx *.igc *.kml *.nmea *.plt *.rte *.tcx *.wpt);;"
+ tr("CSV files") + " (*.csv);;" + tr("FIT files") + " (*.fit);;"
+ tr("GPX files") + " (*.gpx);;" + tr("IGC files") + " (*.igc);;"
+ tr("KML files") + " (*.kml);;" + tr("NMEA files") + " (*.nmea);;"
+ tr("TCX files") + " (*.tcx);;" + tr("All files") + "(*)";
+ tr("OziExplorer files") + " (*.plt *.rte *.wpt);;"
+ tr("TCX files") + " (*.tcx);;" + tr("All files") + " (*)";
}
QStringList Data::filter()

273
src/data/oziparsers.cpp Normal file
View File

@ -0,0 +1,273 @@
#include "map/gcs.h"
#include "oziparsers.h"
static qint64 delphi2unixMS(double date)
{
return (qint64)((date - 25569.0) * 86400000);
}
bool PLTParser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Waypoint> &waypoints)
{
Q_UNUSED(waypoints);
Q_UNUSED(routes);
bool res;
const GCS *gcs = 0;
_errorLine = 1;
_errorString.clear();
tracks.append(TrackData());
TrackData &track = tracks.last();
while (!file->atEnd()) {
QByteArray line = file->readLine();
if (_errorLine == 1) {
if (!line.trimmed().startsWith("OziExplorer Track Point File")) {
_errorString = "Not a PLT file";
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
_errorString = "Invalid/unknown datum";
return false;
}
} else if (_errorLine == 5) {
QList<QByteArray> list = line.split(',');
if (list.size() >= 4)
track.setName(list.at(3));
} else if (_errorLine > 6) {
QList<QByteArray> list = line.split(',');
if (list.size() < 2) {
_errorString = "Parse error";
return false;
}
qreal lat = list.at(0).trimmed().toDouble(&res);
if (!res || (lat < -90.0 || lat > 90.0)) {
_errorString = "Invalid latitude";
return false;
}
qreal lon = list.at(1).trimmed().toDouble(&res);
if (!res || (lon < -180.0 || lon > 180.0)) {
_errorString = "Invalid longitude";
return false;
}
Trackpoint tp(gcs->toWGS84(Coordinates(lon, lat)));
if (list.size() >= 4) {
QByteArray field(list.at(3).trimmed());
if (!field.isEmpty()) {
double elevation = field.toDouble(&res);
if (!res) {
_errorString = "Invalid elevation";
return false;
}
if (elevation != -777)
tp.setElevation(elevation * 0.3048);
}
}
if (list.size() >= 5) {
QByteArray field(list.at(4).trimmed());
if (!field.isEmpty()) {
double date = field.toDouble(&res);
if (!res) {
_errorString = "Invalid date";
return false;
}
tp.setTimestamp(QDateTime::fromMSecsSinceEpoch(
delphi2unixMS(date)));
}
}
track.append(tp);
}
_errorLine++;
}
return true;
}
bool RTEParser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Waypoint> &waypoints)
{
Q_UNUSED(waypoints);
Q_UNUSED(tracks);
bool res, record = false;
const GCS *gcs = 0;
_errorLine = 1;
_errorString.clear();
while (!file->atEnd()) {
QByteArray line = file->readLine();
if (_errorLine == 1) {
if (!line.trimmed().startsWith("OziExplorer Route File")) {
_errorString = "Not a RTE file";
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
_errorString = "Invalid/unknown datum";
return false;
}
} else if (_errorLine > 4) {
QList<QByteArray> list = line.split(',');
if (list.size() < 2) {
_errorString = "Parse error";
return false;
}
if (list.at(0).trimmed() == "R") {
routes.append(RouteData());
record = true;
if (list.size() >= 3)
routes.last().setName(list.at(2).trimmed()
.replace('\xD1', ','));
if (list.size() >= 4)
routes.last().setDescription(list.at(3).trimmed()
.replace('\xD1', ','));
} else if (list.at(0).trimmed() == "W") {
if (!record || list.size() < 7) {
_errorString = "Parse error";
return false;
}
qreal lat = list.at(5).trimmed().toDouble(&res);
if (!res || (lat < -90.0 || lat > 90.0)) {
_errorString = "Invalid latitude";
return false;
}
qreal lon = list.at(6).trimmed().toDouble(&res);
if (!res || (lon < -180.0 || lon > 180.0)) {
_errorString = "Invalid longitude";
return false;
}
Waypoint wp(gcs->toWGS84(Coordinates(lon, lat)));
QString name(list.at(4).trimmed().replace('\xD1', ','));
if (!name.isEmpty())
wp.setName(name);
if (list.size() >= 8) {
QByteArray field(list.at(7).trimmed());
if (!field.isEmpty()) {
double date = field.toDouble(&res);
if (!res) {
_errorString = "Invalid date";
return false;
}
wp.setTimestamp(QDateTime::fromMSecsSinceEpoch(
delphi2unixMS(date)));
}
}
if (list.size() >= 14) {
QString desc(list.at(13).trimmed().replace('\xD1', ','));
if (!desc.isEmpty())
wp.setDescription(desc);
}
routes.last().append(wp);
} else {
_errorString = "Parse error";
return false;
}
}
_errorLine++;
}
return true;
}
bool WPTParser::parse(QFile *file, QList<TrackData> &tracks,
QList<RouteData> &routes, QList<Waypoint> &waypoints)
{
Q_UNUSED(tracks);
Q_UNUSED(routes);
bool res;
const GCS *gcs = 0;
_errorLine = 1;
_errorString.clear();
while (!file->atEnd()) {
QByteArray line = file->readLine();
if (_errorLine == 1) {
if (!line.trimmed().startsWith("OziExplorer Waypoint File")) {
_errorString = "Not a WPT file";
return false;
}
} else if (_errorLine == 2) {
if (!(gcs = GCS::gcs(QString(line.trimmed())))) {
_errorString = "Invalid/unknown datum";
return false;
}
} else if (_errorLine > 4) {
QList<QByteArray> list = line.split(',');
if (list.size() < 4) {
_errorString = "Parse error";
return false;
}
qreal lat = list.at(2).trimmed().toDouble(&res);
if (!res || (lat < -90.0 || lat > 90.0)) {
_errorString = "Invalid latitude";
return false;
}
qreal lon = list.at(3).trimmed().toDouble(&res);
if (!res || (lon < -180.0 || lon > 180.0)) {
_errorString = "Invalid longitude";
return false;
}
Waypoint wp(gcs->toWGS84(Coordinates(lon, lat)));
QString name(list.at(1).trimmed().replace('\xD1', ','));
if (!name.isEmpty())
wp.setName(name);
if (list.size() >= 5) {
QByteArray field(list.at(4).trimmed());
if (!field.isEmpty()) {
double date = field.toDouble(&res);
if (!res) {
_errorString = "Invalid date";
return false;
}
wp.setTimestamp(QDateTime::fromMSecsSinceEpoch(
delphi2unixMS(date)));
}
}
if (list.size() >= 11) {
QString desc(list.at(10).trimmed().replace('\xD1', ','));
if (!desc.isEmpty())
wp.setDescription(desc);
}
if (list.size() >= 15) {
QByteArray field(list.at(14).trimmed());
if (!field.isEmpty()) {
double elevation = list.at(14).trimmed().toDouble(&res);
if (!res) {
_errorString = "Invalid elevation";
return false;
}
if (elevation != -777)
wp.setElevation(elevation * 0.3048);
}
}
waypoints.append(wp);
}
_errorLine++;
}
return true;
}

51
src/data/oziparsers.h Normal file
View File

@ -0,0 +1,51 @@
#ifndef OZIPARSERS_H
#define OZIPARSERS_H
#include "parser.h"
class PLTParser : public Parser
{
public:
PLTParser() : _errorLine(0) {}
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
private:
QString _errorString;
int _errorLine;
};
class RTEParser : public Parser
{
public:
RTEParser() : _errorLine(0) {}
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
private:
QString _errorString;
int _errorLine;
};
class WPTParser : public Parser
{
public:
WPTParser() : _errorLine(0) {}
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
QList<Waypoint> &waypoints);
QString errorString() const {return _errorString;}
int errorLine() const {return _errorLine;}
private:
QString _errorString;
int _errorLine;
};
#endif // OZIPARSERS_H

View File

@ -8,7 +8,7 @@ RectC Path::boundingRect() const
return ret;
for (int i = 0; i < size(); i++)
ret.unite(at(i).coordinates());
ret = ret.united(at(i).coordinates());
return ret;
}

View File

@ -1,5 +1,6 @@
#include <QFile>
#include <QDir>
#include "common/rectc.h"
#include "data.h"
#include "poi.h"
@ -101,12 +102,11 @@ QList<Waypoint> POI::points(const Path &path) const
QSet<int>::const_iterator it;
for (int i = 0; i < path.count(); i++) {
const Coordinates &c = path.at(i).coordinates();
QPair<Coordinates, Coordinates> br = c.boundingRect(_radius);
min[0] = br.first.lon();
min[1] = br.first.lat();
max[0] = br.second.lon();
max[1] = br.second.lat();
RectC br(path.at(i).coordinates(), _radius);
min[0] = br.topLeft().lon();
min[1] = br.bottomRight().lat();
max[0] = br.bottomRight().lon();
max[1] = br.topLeft().lat();
_tree.Search(min, max, cb, &set);
}
@ -124,13 +124,11 @@ QList<Waypoint> POI::points(const Waypoint &point) const
qreal min[2], max[2];
QSet<int>::const_iterator it;
const Coordinates &c = point.coordinates();
QPair<Coordinates, Coordinates> br = c.boundingRect(_radius);
min[0] = br.first.lon();
min[1] = br.first.lat();
max[0] = br.second.lon();
max[1] = br.second.lat();
RectC br(point.coordinates(), _radius);
min[0] = br.topLeft().lon();
min[1] = br.bottomRight().lat();
max[0] = br.bottomRight().lon();
max[1] = br.topLeft().lat();
_tree.Search(min, max, cb, &set);

View File

@ -115,7 +115,7 @@ AlbersEqual::AlbersEqual(const Ellipsoid *ellipsoid, double standardParallel1,
_rho0 = (_C < nq0) ? 0 : _a_over_n * sqrt(_C - nq0);
}
QPointF AlbersEqual::ll2xy(const Coordinates &c) const
PointD AlbersEqual::ll2xy(const Coordinates &c) const
{
double dlam;
double sin_lat;
@ -139,11 +139,11 @@ QPointF AlbersEqual::ll2xy(const Coordinates &c) const
rho = (_C < nq) ? 0 : _a_over_n * sqrt(_C - nq);
theta = _n * dlam;
return QPointF(rho * sin(theta) + _falseEasting,
return PointD(rho * sin(theta) + _falseEasting,
_rho0 - rho * cos(theta) + _falseNorthing);
}
Coordinates AlbersEqual::xy2ll(const QPointF &p) const
Coordinates AlbersEqual::xy2ll(const PointD &p) const
{
double dy, dx;
double rho0_minus_dy;

View File

@ -14,8 +14,8 @@ public:
virtual CT *clone() const {return new AlbersEqual(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
private:
double _latitudeOrigin;

View File

@ -75,8 +75,9 @@ void Atlas::computeBounds()
}
for (int i = 0; i < _maps.count(); i++)
_bounds.append(QPair<QRectF, QRectF>(QRectF(TL(_maps.at(i)),
BR(_maps.at(i))), QRectF(offsets.at(i), _maps.at(i)->bounds().size())));
_bounds.append(QPair<QRectF, QRectF>(QRectF(TL(_maps.at(i)).toPointF(),
BR(_maps.at(i)).toPointF()), QRectF(offsets.at(i),
_maps.at(i)->bounds().size())));
}
Atlas::Atlas(const QString &fileName, QObject *parent)
@ -166,7 +167,8 @@ qreal Atlas::resolution(const QRectF &rect) const
int idx = _zooms.at(_zoom).first;
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
if (_bounds.at(i).second.contains(_maps.at(i)->xy2pp(rect.center()))) {
if (_bounds.at(i).second.contains(_maps.at(i)->xy2pp(rect.center())
.toPointF())) {
idx = i;
break;
}
@ -187,7 +189,8 @@ int Atlas::zoomFit(const QSize &size, const RectC &br)
for (int z = 0; z < _zooms.count(); z++) {
for (int i = _zooms.at(z).first; i <= _zooms.at(z).second; i++) {
if (!_bounds.at(i).first.contains(_maps.at(i)->ll2pp(br.center())))
if (!_bounds.at(i).first.contains(_maps.at(i)->ll2pp(br.center())
.toPointF()))
continue;
QRect sbr = QRectF(_maps.at(i)->ll2xy(br.topLeft()),
@ -226,11 +229,11 @@ QPointF Atlas::ll2xy(const Coordinates &c)
QPointF pp;
if (_mapIndex >= 0)
pp = _maps.at(_mapIndex)->ll2pp(c);
pp = _maps.at(_mapIndex)->ll2pp(c).toPointF();
if (_mapIndex < 0 || !_bounds.at(_mapIndex).first.contains(pp)) {
_mapIndex = _zooms.at(_zoom).first;
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
pp = _maps.at(i)->ll2pp(c);
pp = _maps.at(i)->ll2pp(c).toPointF();
if (_bounds.at(i).first.contains(pp)) {
_mapIndex = i;
break;
@ -247,7 +250,7 @@ Coordinates Atlas::xy2ll(const QPointF &p)
int idx = _zooms.at(_zoom).first;
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
if (_bounds.at(i).second.contains(_maps.at(i)->xy2pp(p))) {
if (_bounds.at(i).second.contains(_maps.at(i)->xy2pp(p).toPointF())) {
idx = i;
break;
}

View File

@ -1,8 +1,8 @@
#ifndef CT_H
#define CT_H
#include <QPointF>
#include "common/coordinates.h"
#include "pointd.h"
class CT {
public:
@ -10,8 +10,8 @@ public:
virtual CT *clone() const = 0;
virtual QPointF ll2xy(const Coordinates &c) const = 0;
virtual Coordinates xy2ll(const QPointF &p) const = 0;
virtual PointD ll2xy(const Coordinates &c) const = 0;
virtual Coordinates xy2ll(const PointD &p) const = 0;
};
#endif // CT_H

View File

@ -51,15 +51,15 @@ QRectF EmptyMap::bounds() const
return QRectF(ll2xy(Coordinates(-180, 85)), ll2xy(Coordinates(180, -85)));
}
int EmptyMap::zoomFit(const QSize &size, const RectC &br)
int EmptyMap::zoomFit(const QSize &size, const RectC &rect)
{
if (!br.isValid())
if (!rect.isValid())
_zoom = ZOOM_MAX;
else {
QRectF tbr(ll2m(br.topLeft()), ll2m(br.bottomRight()));
QRectF tbr(ll2m(rect.topLeft()), ll2m(rect.bottomRight()));
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
_zoom = limitZoom(scale2zoom(qMax(sc.x(), sc.y())));
_zoom = limitZoom(scale2zoom(qMax(sc.x(), -sc.y())));
}
return _zoom;

View File

@ -16,7 +16,7 @@ public:
qreal resolution(const QRectF &rect) const;
int zoom() const {return _zoom;}
int zoomFit(const QSize &size, const RectC &br);
int zoomFit(const QSize &size, const RectC &rect);
int zoomIn();
int zoomOut();

View File

@ -138,7 +138,7 @@ bool GeoTIFF::readIFD(TIFFFile &file, quint32 &offset, Ctx &ctx) const
return true;
}
bool GeoTIFF::readScale(TIFFFile &file, quint32 offset, QPointF &scale) const
bool GeoTIFF::readScale(TIFFFile &file, quint32 offset, PointD &scale) const
{
if (!file.seek(offset))
return false;
@ -155,7 +155,7 @@ bool GeoTIFF::readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
QList<ReferencePoint> &points) const
{
double z, pz;
QPointF xy, pp;
PointD xy, pp;
if (!file.seek(offset))
return false;
@ -175,10 +175,7 @@ bool GeoTIFF::readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
if (!file.readValue(pz))
return false;
ReferencePoint p;
p.xy = xy.toPoint();
p.pp = pp;
points.append(p);
points.append(ReferencePoint(xy, pp));
}
return true;
@ -450,7 +447,7 @@ GeoTIFF::GeoTIFF(const QString &path)
{
quint32 ifd;
QList<ReferencePoint> points;
QPointF scale;
PointD scale;
QMap<quint16, Value> kv;
Ctx ctx;
TIFFFile file;
@ -519,12 +516,12 @@ GeoTIFF::GeoTIFF(const QString &path)
else if (ctx.tiepointCount > 1)
_transform = Transform(points);
else if (ctx.matrix) {
double m[16];
if (!readMatrix(file, ctx.matrix, m)) {
double matrix[16];
if (!readMatrix(file, ctx.matrix, matrix)) {
_errorString = "Error reading transformation matrix";
return;
}
_transform = Transform(m);
_transform = Transform(matrix);
} else {
_errorString = "Incomplete/missing model transformation info";
return;

View File

@ -40,7 +40,7 @@ private:
bool readEntry(TIFFFile &file, Ctx &ctx) const;
bool readIFD(TIFFFile &file, quint32 &offset, Ctx &ctx) const;
bool readScale(TIFFFile &file, quint32 offset, QPointF &scale) const;
bool readScale(TIFFFile &file, quint32 offset, PointD &scale) const;
bool readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
QList<ReferencePoint> &points) const;
bool readMatrix(TIFFFile &file, quint32 offset, double matrix[16]) const;

View File

@ -31,7 +31,7 @@ LambertAzimuthal::LambertAzimuthal(const Ellipsoid *ellipsoid,
_D = _a * (cos(lat0) / sqrt(1.0 - _es2 * sin2(lat0))) / (_Rq * cos(_beta0));
}
QPointF LambertAzimuthal::ll2xy(const Coordinates &c) const
PointD LambertAzimuthal::ll2xy(const Coordinates &c) const
{
double lon = deg2rad(c.lon());
double lat = deg2rad(c.lat());
@ -47,10 +47,10 @@ QPointF LambertAzimuthal::ll2xy(const Coordinates &c) const
double y = _falseNorthing + (B / _D) * ((cos(_beta0) * sin(beta))
- (sin(_beta0) * cos(beta) * cos(lon - _lon0)));
return QPointF(x, y);
return PointD(x, y);
}
Coordinates LambertAzimuthal::xy2ll(const QPointF &p) const
Coordinates LambertAzimuthal::xy2ll(const PointD &p) const
{
double es4 = _es2 * _es2;
double es6 = _es2 * es4;

View File

@ -13,8 +13,8 @@ public:
virtual CT *clone() const {return new LambertAzimuthal(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
private:
double _lon0;

View File

@ -93,7 +93,7 @@ LambertConic1::LambertConic1(const Ellipsoid *ellipsoid, double latitudeOrigin,
_rho_olat = _rho0;
}
QPointF LambertConic1::ll2xy(const Coordinates &c) const
PointD LambertConic1::ll2xy(const Coordinates &c) const
{
double t;
double rho;
@ -117,11 +117,11 @@ QPointF LambertConic1::ll2xy(const Coordinates &c) const
theta = _n * dlam;
return QPointF(rho * sin(theta) + _falseEasting, _rho_olat - rho
return PointD(rho * sin(theta) + _falseEasting, _rho_olat - rho
* cos(theta) + _falseNorthing);
}
Coordinates LambertConic1::xy2ll(const QPointF &p) const
Coordinates LambertConic1::xy2ll(const PointD &p) const
{
double dx;
double dy;
@ -266,12 +266,12 @@ LambertConic2::LambertConic2(const Ellipsoid *ellipsoid,
falseEasting, falseNorthing);
}
QPointF LambertConic2::ll2xy(const Coordinates &c) const
PointD LambertConic2::ll2xy(const Coordinates &c) const
{
return _lc1.ll2xy(c);
}
Coordinates LambertConic2::xy2ll(const QPointF &p) const
Coordinates LambertConic2::xy2ll(const PointD &p) const
{
return _lc1.xy2ll(p);
}

View File

@ -15,8 +15,8 @@ public:
virtual CT *clone() const {return new LambertConic1(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
private:
double _longitudeOrigin;
@ -40,8 +40,8 @@ public:
virtual CT *clone() const {return new LambertConic2(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
private:
LambertConic1 _lc1;

View File

@ -11,9 +11,9 @@ public:
virtual CT *clone() const {return new LatLon(*this);}
virtual QPointF ll2xy(const Coordinates &c) const
{return QPointF(_au.fromDegrees(c.lon()), _au.fromDegrees(c.lat()));}
virtual Coordinates xy2ll(const QPointF &p) const
virtual PointD ll2xy(const Coordinates &c) const
{return PointD(_au.fromDegrees(c.lon()), _au.fromDegrees(c.lat()));}
virtual Coordinates xy2ll(const PointD &p) const
{return Coordinates(_au.toDegrees(p.x()), _au.toDegrees(p.y()));}
private:

View File

@ -3,7 +3,7 @@
#include <cmath>
#include <QDebug>
#include <QPointF>
#include "pointd.h"
class LinearUnits
{
@ -15,11 +15,11 @@ public:
bool isValid() const {return !std::isnan(_f);}
double toMeters(double val) const {return val * _f;}
QPointF toMeters(const QPointF &p) const
{return QPointF(p.x() * _f, p.y() * _f);}
PointD toMeters(const PointD &p) const
{return PointD(p.x() * _f, p.y() * _f);}
double fromMeters(double val) const {return val / _f;}
QPointF fromMeters(const QPointF &p) const
{return QPointF(p.x() / _f, p.y() /_f);}
PointD fromMeters(const PointD &p) const
{return PointD(p.x() / _f, p.y() /_f);}
friend bool operator==(const LinearUnits &lu1, const LinearUnits &lu2);
#ifndef QT_NO_DEBUG

View File

@ -24,7 +24,7 @@ public:
virtual qreal resolution(const QRectF &rect) const = 0;
virtual int zoom() const = 0;
virtual int zoomFit(const QSize &size, const RectC &br) = 0;
virtual int zoomFit(const QSize &size, const RectC &rect) = 0;
virtual int zoomIn() = 0;
virtual int zoomOut() = 0;

View File

@ -54,13 +54,13 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
int latd = list.at(6).trimmed().toInt(&res);
if (!res)
ll = false;
qreal latm = list.at(7).trimmed().toFloat(&res);
double latm = list.at(7).trimmed().toDouble(&res);
if (!res)
ll = false;
int lond = list.at(9).trimmed().toInt(&res);
if (!res)
ll = false;
qreal lonm = list.at(10).trimmed().toFloat(&res);
double lonm = list.at(10).trimmed().toDouble(&res);
if (!res)
ll = false;
if (ll && list.at(8).trimmed() == "S") {
@ -75,16 +75,16 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
p.zone = list.at(13).trimmed().toInt(&res);
if (!res)
p.zone = 0;
qreal ppx = list.at(14).trimmed().toFloat(&res);
double ppx = list.at(14).trimmed().toDouble(&res);
if (!res)
pp = false;
qreal ppy = list.at(15).trimmed().toFloat(&res);
double ppy = list.at(15).trimmed().toDouble(&res);
if (!res)
pp = false;
if (list.at(16).trimmed() == "S")
p.zone = -p.zone;
p.rp.xy = QPoint(x, y);
p.rp.setXY(PointD(x, y));
if (ll) {
p.ll = Coordinates(lond + lonm/60.0, latd + latm/60.0);
if (p.ll.isValid())
@ -92,7 +92,7 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
else
return ln;
} else if (pp) {
p.rp.pp = QPointF(ppx, ppy);
p.rp.setPP(PointD(ppx, ppy));
points.append(p);
} else
return ln;
@ -238,8 +238,8 @@ bool MapFile::computeTransformation(QList<CalibrationPoint> &points)
QList<ReferencePoint> rp;
for (int i = 0; i < points.size(); i++) {
if (points.at(i).rp.pp.isNull())
points[i].rp.pp = _projection.ll2xy(points.at(i).ll);
if (points.at(i).rp.pp().isNull())
points[i].rp.setPP(_projection.ll2xy(points.at(i).ll));
rp.append(points.at(i).rp);
}

View File

@ -3,13 +3,13 @@
#include "common/wgs84.h"
#include "mercator.h"
QPointF Mercator::ll2xy(const Coordinates &c) const
PointD Mercator::ll2xy(const Coordinates &c) const
{
return QPointF(deg2rad(c.lon()) * WGS84_RADIUS,
return PointD(deg2rad(c.lon()) * WGS84_RADIUS,
log(tan(M_PI/4.0 + deg2rad(c.lat())/2.0)) * WGS84_RADIUS);
}
Coordinates Mercator::xy2ll(const QPointF &p) const
Coordinates Mercator::xy2ll(const PointD &p) const
{
return Coordinates(rad2deg(p.x() / WGS84_RADIUS),
rad2deg(2 * atan(exp(p.y() / WGS84_RADIUS)) - M_PI/2));

View File

@ -8,8 +8,8 @@ class Mercator : public CT
public:
virtual CT *clone() const {return new Mercator(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
};
#endif // MERCATOR_H

View File

@ -41,11 +41,11 @@ public:
bool isValid() const {return _valid;}
QString errorString() const {return _errorString;}
QPointF ll2pp(const Coordinates &c) const
PointD ll2pp(const Coordinates &c) const
{return _projection.ll2xy(c);}
QPointF xy2pp(const QPointF &p) const
PointD xy2pp(const QPointF &p) const
{return _transform.img2proj(p);}
QPointF pp2xy(const QPointF &p) const
QPointF pp2xy(const PointD &p) const
{return _transform.proj2img(p);}
private:

View File

@ -42,8 +42,8 @@ static int scale2zoom(qreal scale)
OnlineMap::OnlineMap(const QString &name, const QString &url,
const Range &zooms, const RectC &bounds, QObject *parent) :
Map(parent), _name(name), _zooms(zooms), _bounds(bounds),
_block(false), _valid(false)
Map(parent), _name(name), _zooms(zooms), _bounds(bounds), _block(false),
_valid(false)
{
QString dir(TILES_DIR + "/" + _name);
@ -90,15 +90,14 @@ int OnlineMap::limitZoom(int zoom) const
return zoom;
}
int OnlineMap::zoomFit(const QSize &size, const RectC &br)
int OnlineMap::zoomFit(const QSize &size, const RectC &rect)
{
if (!br.isValid())
if (!rect.isValid())
_zoom = _zooms.max();
else {
QRectF tbr(ll2m(br.topLeft()), ll2m(br.bottomRight()));
QRectF tbr(ll2m(rect.topLeft()), ll2m(rect.bottomRight()));
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
_zoom = limitZoom(scale2zoom(qMax(sc.x(), sc.y())));
_zoom = limitZoom(scale2zoom(qMax(sc.x(), -sc.y())));
}
return _zoom;

View File

@ -20,7 +20,7 @@ public:
qreal resolution(const QRectF &rect) const;
int zoom() const {return _zoom;}
int zoomFit(const QSize &size, const RectC &br);
int zoomFit(const QSize &size, const RectC &rect);
int zoomIn();
int zoomOut();

36
src/map/pointd.h Normal file
View File

@ -0,0 +1,36 @@
#ifndef POINT_H
#define POINT_H
#include <cmath>
#include <QPointF>
#include <QDebug>
class PointD
{
public:
PointD() : _x(NAN), _y(NAN) {}
PointD(double x, double y) : _x(x), _y(y) {}
PointD(const QPointF &p) : _x(p.x()), _y(p.y()) {}
double x() const {return _x;}
double y() const {return _y;}
double &rx() {return _x;}
double &ry() {return _y;}
bool isNull() const {return std::isnan(_x) && std::isnan(_y);}
QPointF toPointF() const {return QPointF(_x, _y);}
private:
double _x, _y;
};
#ifndef QT_NO_DEBUG
inline QDebug operator<<(QDebug dbg, const PointD &p)
{
dbg.nospace() << "PointD(" << p.x() << ", " << p.y() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG
#endif // POINT_H

View File

@ -103,13 +103,13 @@ Projection &Projection::operator=(const Projection &p)
return *this;
}
QPointF Projection::ll2xy(const Coordinates &c) const
PointD Projection::ll2xy(const Coordinates &c) const
{
return isValid()
? _units.fromMeters(_ct->ll2xy(_gcs->fromWGS84(c))) : QPointF();
? _units.fromMeters(_ct->ll2xy(_gcs->fromWGS84(c))) : PointD();
}
Coordinates Projection::xy2ll(const QPointF &p) const
Coordinates Projection::xy2ll(const PointD &p) const
{
return isValid()
? _gcs->toWGS84(_ct->xy2ll(_units.toMeters(p))) : Coordinates();

View File

@ -1,9 +1,9 @@
#ifndef PROJECTION_H
#define PROJECTION_H
#include <QPointF>
#include <QDebug>
#include "common/coordinates.h"
#include "pointd.h"
#include "linearunits.h"
#include "coordinatesystem.h"
@ -83,8 +83,8 @@ public:
bool isValid() const {return !(_gcs == 0 || _ct == 0 || _units.isNull());}
bool isGeographic() const {return _geographic;}
QPointF ll2xy(const Coordinates &c) const;
Coordinates xy2ll(const QPointF &p) const;
PointD ll2xy(const Coordinates &c) const;
Coordinates xy2ll(const PointD &p) const;
const LinearUnits &units() const {return _units;}
const CoordinateSystem &coordinateSystem() const {return _cs;}

View File

@ -5,21 +5,17 @@
#define NULL_QTRANSFORM 0,0,0,0,0,0,0,0,0
void Transform::simple(const QList<ReferencePoint> &points)
void Transform::simple(const ReferencePoint &p1, const ReferencePoint &p2)
{
if (points.at(0).xy.x() == points.at(1).xy.x()
|| points.at(0).xy.y() == points.at(1).xy.y()) {
if (p1.xy().x() == p2.xy().x() || p1.xy().y() == p2.xy().y()) {
_errorString = "Invalid reference points tuple";
return;
}
qreal sX, sY, dX, dY;
sX = (points.at(0).xy.x() - points.at(1).xy.x())
/ (points.at(0).pp.x() - points.at(1).pp.x());
sY = (points.at(1).xy.y() - points.at(0).xy.y())
/ (points.at(1).pp.y() - points.at(0).pp.y());
dX = points.at(1).xy.x() - points.at(1).pp.x() * sX;
dY = points.at(0).xy.y() - points.at(0).pp.y() * sY;
double sX = (p1.xy().x() - p2.xy().x()) / (p1.pp().x() - p2.pp().x());
double sY = (p2.xy().y() - p1.xy().y()) / (p2.pp().y() - p1.pp().y());
double dX = p2.xy().x() - p2.pp().x() * sX;
double dY = p1.xy().y() - p1.pp().y() * sY;
_proj2img = QTransform(sX, 0, 0, sY, dX, dY);
_img2proj = _proj2img.inverted();
@ -34,11 +30,11 @@ void Transform::affine(const QList<ReferencePoint> &points)
for (int k = 0; k < points.size(); k++) {
double f[3], t[2];
f[0] = points.at(k).pp.x();
f[1] = points.at(k).pp.y();
f[0] = points.at(k).pp().x();
f[1] = points.at(k).pp().y();
f[2] = 1.0;
t[0] = points.at(k).xy.x();
t[1] = points.at(k).xy.y();
t[0] = points.at(k).xy().x();
t[1] = points.at(k).xy().y();
c.m(i,j) += f[i] * t[j];
}
}
@ -49,8 +45,8 @@ void Transform::affine(const QList<ReferencePoint> &points)
for (int qi = 0; qi < points.size(); qi++) {
double v[3];
v[0] = points.at(qi).pp.x();
v[1] = points.at(qi).pp.y();
v[0] = points.at(qi).pp().x();
v[1] = points.at(qi).pp().y();
v[2] = 1.0;
for (size_t i = 0; i < Q.h(); i++)
for (size_t j = 0; j < Q.w(); j++)
@ -75,16 +71,23 @@ Transform::Transform()
}
Transform::Transform(const QList<ReferencePoint> &points)
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
{
if (points.count() < 2)
_errorString = "Insufficient number of reference points";
else if (points.size() == 2)
simple(points);
simple(points.at(0), points.at(1));
else
affine(points);
}
Transform::Transform(const ReferencePoint &p, const QPointF &scale)
Transform::Transform(const ReferencePoint &p1, const ReferencePoint &p2)
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
{
simple(p1, p2);
}
Transform::Transform(const ReferencePoint &p, const PointD &scale)
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
{
if (scale.x() == 0.0 || scale.y() == 0.0) {
@ -92,15 +95,16 @@ Transform::Transform(const ReferencePoint &p, const QPointF &scale)
return;
}
_img2proj = QTransform(scale.x(), 0, 0, -scale.y(), p.pp.x() - p.xy.x()
/ scale.x(), p.pp.y() + p.xy.x() / scale.y());
_img2proj = QTransform(scale.x(), 0, 0, -scale.y(), p.pp().x() - p.xy().x()
/ scale.x(), p.pp().y() + p.xy().x() / scale.y());
_proj2img = _img2proj.inverted();
}
Transform::Transform(double m[16])
Transform::Transform(double matrix[16])
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
{
_img2proj = QTransform(m[0], m[1], m[4], m[5], m[3], m[7]);
_img2proj = QTransform(matrix[0], matrix[1], matrix[4], matrix[5],
matrix[3], matrix[7]);
if (!_img2proj.isInvertible())
_errorString = "Singular transformation matrix";
else
@ -110,7 +114,7 @@ Transform::Transform(double m[16])
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const ReferencePoint &p)
{
dbg.nospace() << "ReferencePoint(" << p.xy << ", " << p.pp << ")";
dbg.nospace() << "ReferencePoint(" << p.xy() << ", " << p.pp() << ")";
return dbg.space();
}
#endif // QT_NO_DEBUG

View File

@ -4,10 +4,21 @@
#include <QTransform>
#include <QList>
#include <QDebug>
#include "pointd.h"
struct ReferencePoint {
QPoint xy;
QPointF pp;
class ReferencePoint
{
public:
ReferencePoint() {}
ReferencePoint(const PointD &xy, const PointD &pp) : _xy(xy), _pp(pp) {}
const PointD &xy() const {return _xy;}
const PointD &pp() const {return _pp;}
void setXY(const PointD &xy) {_xy = xy;}
void setPP(const PointD &pp) {_pp = pp;}
private:
PointD _xy, _pp;
};
class Transform
@ -15,18 +26,21 @@ class Transform
public:
Transform();
Transform(const QList<ReferencePoint> &points);
Transform(const ReferencePoint &p, const QPointF &scale);
Transform(double m[16]);
Transform(const ReferencePoint &p1, const ReferencePoint &p2);
Transform(const ReferencePoint &p, const PointD &scale);
Transform(double matrix[16]);
QPointF proj2img(const QPointF &p) const {return _proj2img.map(p);}
QPointF img2proj(const QPointF &p) const {return _img2proj.map(p);}
QPointF proj2img(const PointD &p) const
{return _proj2img.map(p.toPointF());}
PointD img2proj(const QPointF &p) const
{return _img2proj.map(p);}
bool isValid() const
{return _proj2img.isInvertible() && _img2proj.isInvertible();}
const QString &errorString() const {return _errorString;}
private:
void simple(const QList<ReferencePoint> &points);
void simple(const ReferencePoint &p1, const ReferencePoint &p2);
void affine(const QList<ReferencePoint> &points);
QTransform _proj2img, _img2proj;

View File

@ -93,7 +93,7 @@ TransverseMercator::TransverseMercator(const Ellipsoid *ellipsoid,
_ep = 315.e0 * _a * (tn4 - tn5) / 512.e0;
}
QPointF TransverseMercator::ll2xy(const Coordinates &c) const
PointD TransverseMercator::ll2xy(const Coordinates &c) const
{
double rl;
double cl, c2, c3, c5, c7;
@ -164,10 +164,10 @@ QPointF TransverseMercator::ll2xy(const Coordinates &c) const
x = _falseEasting + dlam * t6 + pow(dlam, 3.e0) * t7 + pow(dlam, 5.e0)
* t8 + pow(dlam, 7.e0) * t9;
return QPointF(x, y);
return PointD(x, y);
}
Coordinates TransverseMercator::xy2ll(const QPointF &p) const
Coordinates TransverseMercator::xy2ll(const PointD &p) const
{
double cl;
double de;

View File

@ -14,8 +14,8 @@ public:
virtual CT *clone() const {return new TransverseMercator(*this);}
virtual QPointF ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const QPointF &p) const;
virtual PointD ll2xy(const Coordinates &c) const;
virtual Coordinates xy2ll(const PointD &p) const;
private:
double _longitudeOrigin;

View File

@ -63,7 +63,7 @@ QString WMS::style(QXmlStreamReader &reader)
RectC WMS::geographicBoundingBox(QXmlStreamReader &reader)
{
qreal left = NAN, top = NAN, right = NAN, bottom = NAN;
double left = NAN, top = NAN, right = NAN, bottom = NAN;
while (reader.readNextStartElement()) {
if (reader.name() == "westBoundLongitude")

View File

@ -10,7 +10,7 @@
#define CAPABILITIES_FILE "capabilities.xml"
#define TILE_SIZE 256
qreal WMSMap::sd2res(qreal scaleDenominator) const
double WMSMap::sd2res(double scaleDenominator) const
{
return scaleDenominator * 0.28e-3 * _projection.units().fromMeters(1.0);
}
@ -48,9 +48,9 @@ void WMSMap::computeZooms(const RangeF &scaleDenominator)
_zooms.clear();
if (scaleDenominator.size() > 0) {
qreal ld = log2(scaleDenominator.max()) - log2(scaleDenominator.min());
double ld = log2(scaleDenominator.max()) - log2(scaleDenominator.min());
int cld = ceil(ld);
qreal step = ld / (qreal)cld;
double step = ld / (qreal)cld;
qreal lmax = log2(scaleDenominator.max());
for (int i = 0; i <= cld; i++)
_zooms.append(pow(2.0, lmax - i * step));
@ -60,22 +60,17 @@ void WMSMap::computeZooms(const RangeF &scaleDenominator)
void WMSMap::updateTransform()
{
qreal scaleDenominator = _zooms.at(_zoom);
ReferencePoint tl, br;
qreal pixelSpan = sd2res(scaleDenominator);
double pixelSpan = sd2res(_zooms.at(_zoom));
if (_projection.isGeographic())
pixelSpan /= deg2rad(WGS84_RADIUS);
double sx = (_br.x() - _tl.x()) / pixelSpan;
double sy = (_tl.y() - _br.y()) / pixelSpan;
tl.xy = QPoint(0, 0);
tl.pp = _boundingBox.topLeft();
br.xy = QPoint(_boundingBox.width() / pixelSpan, -_boundingBox.height()
/ pixelSpan);
br.pp = _boundingBox.bottomRight();
ReferencePoint tl(PointD(0, 0), _tl);
ReferencePoint br(PointD(sx, sy), _br);
_transform = Transform(tl, br);
QList<ReferencePoint> points;
points << tl << br;
_transform = Transform(points);
_bounds = QRectF(QPointF(0, 0), QSizeF(sx, sy));
}
bool WMSMap::loadWMS()
@ -89,10 +84,8 @@ bool WMSMap::loadWMS()
}
_projection = wms.projection();
RectC bb = wms.boundingBox().normalized();
_boundingBox = QRectF(_projection.ll2xy(Coordinates(bb.topLeft().lon(),
bb.bottomRight().lat())), _projection.ll2xy(Coordinates(
bb.bottomRight().lon(), bb.topLeft().lat())));
_tl = _projection.ll2xy(wms.boundingBox().topLeft());
_br = _projection.ll2xy(wms.boundingBox().bottomRight());
_tileLoader = TileLoader(tileUrl(wms.version()), tilesDir(),
_setup.authorization());
@ -148,17 +141,6 @@ void WMSMap::emitLoaded()
emit loaded();
}
QRectF WMSMap::bounds() const
{
qreal pixelSpan = sd2res(_zooms.at(_zoom));
if (_projection.isGeographic())
pixelSpan /= deg2rad(WGS84_RADIUS);
QSizeF size(_boundingBox.width() / pixelSpan, -_boundingBox.height()
/ pixelSpan);
return QRectF(QPointF(0, 0), size);
}
qreal WMSMap::resolution(const QRectF &rect) const
{
Coordinates tl = xy2ll((rect.topLeft()));
@ -170,13 +152,14 @@ qreal WMSMap::resolution(const QRectF &rect) const
return ds/ps;
}
int WMSMap::zoomFit(const QSize &size, const RectC &br)
int WMSMap::zoomFit(const QSize &size, const RectC &rect)
{
if (br.isValid()) {
QRectF tbr(_projection.ll2xy(br.topLeft()),
_projection.ll2xy(br.bottomRight()));
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
qreal resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
if (rect.isValid()) {
PointD tl(_projection.ll2xy(rect.topLeft()));
PointD br(_projection.ll2xy(rect.bottomRight()));
PointD sc((br.x() - tl.x()) / size.width(), (tl.y() - br.y())
/ size.height());
double resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
if (_projection.isGeographic())
resolution *= deg2rad(WGS84_RADIUS);
@ -227,13 +210,13 @@ void WMSMap::draw(QPainter *painter, const QRectF &rect)
QList<Tile> tiles;
for (int i = tl.x(); i < br.x(); i++) {
for (int j = tl.y(); j < br.y(); j++) {
QPointF ttl(_transform.img2proj(QPointF(i * TILE_SIZE,
PointD ttl(_transform.img2proj(QPointF(i * TILE_SIZE,
j * TILE_SIZE)));
QPointF tbr(_transform.img2proj(QPointF(i * TILE_SIZE + TILE_SIZE
PointD tbr(_transform.img2proj(QPointF(i * TILE_SIZE + TILE_SIZE
- 1, j * TILE_SIZE + TILE_SIZE - 1)));
QRectF bbox = (_cs.axisOrder() == CoordinateSystem::YX)
? QRectF(QPointF(tbr.y(), tbr.x()), QPointF(ttl.y(), ttl.x()))
: QRectF(ttl, tbr);
: QRectF(ttl.toPointF(), tbr.toPointF());
tiles.append(Tile(QPoint(i, j), _zoom, bbox));
}

View File

@ -17,11 +17,11 @@ public:
const QString &name() const {return _name;}
QRectF bounds() const;
QRectF bounds() const {return _bounds;}
qreal resolution(const QRectF &rect) const;
int zoom() const {return _zoom;}
int zoomFit(const QSize &size, const RectC &br);
int zoomFit(const QSize &size, const RectC &rect);
int zoomIn();
int zoomOut();
@ -46,7 +46,7 @@ private slots:
private:
QString tileUrl(const QString &version) const;
qreal sd2res(qreal scaleDenominator) const;
double sd2res(double scaleDenominator) const;
QString tilesDir() const;
void computeZooms(const RangeF &scaleDenominator);
void updateTransform();
@ -62,8 +62,9 @@ private:
Projection _projection;
Transform _transform;
CoordinateSystem _cs;
QVector<qreal> _zooms;
QRectF _boundingBox;
QVector<double> _zooms;
PointD _tl, _br;
QRectF _bounds;
int _zoom;
bool _block;

View File

@ -54,7 +54,7 @@ public:
class Zoom
{
public:
Zoom(const QString &id, qreal scaleDenominator, const QPointF &topLeft,
Zoom(const QString &id, double scaleDenominator, const PointD &topLeft,
const QSize &tile, const QSize &matrix, const QRect &limits) :
_id(id), _scaleDenominator(scaleDenominator), _topLeft(topLeft),
_tile(tile), _matrix(matrix), _limits(limits) {}
@ -62,16 +62,16 @@ public:
{return _scaleDenominator > other._scaleDenominator;}
const QString &id() const {return _id;}
qreal scaleDenominator() const {return _scaleDenominator;}
const QPointF &topLeft() const {return _topLeft;}
double scaleDenominator() const {return _scaleDenominator;}
const PointD &topLeft() const {return _topLeft;}
const QSize &tile() const {return _tile;}
const QSize &matrix() const {return _matrix;}
const QRect &limits() const {return _limits;}
private:
QString _id;
qreal _scaleDenominator;
QPointF _topLeft;
double _scaleDenominator;
PointD _topLeft;
QSize _tile;
QSize _matrix;
QRect _limits;
@ -94,8 +94,8 @@ public:
private:
struct TileMatrix {
QString id;
qreal scaleDenominator;
QPointF topLeft;
double scaleDenominator;
PointD topLeft;
QSize tile;
QSize matrix;

View File

@ -62,7 +62,7 @@ QString WMTSMap::tilesDir() const
return QString(TILES_DIR + "/" + _name);
}
qreal WMTSMap::sd2res(qreal scaleDenominator) const
double WMTSMap::sd2res(double scaleDenominator) const
{
return scaleDenominator * 0.28e-3 * _projection.units().fromMeters(1.0);
}
@ -70,27 +70,21 @@ qreal WMTSMap::sd2res(qreal scaleDenominator) const
void WMTSMap::updateTransform()
{
const WMTS::Zoom &z = _zooms.at(_zoom);
ReferencePoint tl, br;
QPointF topLeft = (_cs.axisOrder() == CoordinateSystem::YX)
? QPointF(z.topLeft().y(), z.topLeft().x()) : z.topLeft();
PointD topLeft = (_cs.axisOrder() == CoordinateSystem::YX)
? PointD(z.topLeft().y(), z.topLeft().x()) : z.topLeft();
qreal pixelSpan = sd2res(z.scaleDenominator());
double pixelSpan = sd2res(z.scaleDenominator());
if (_projection.isGeographic())
pixelSpan /= deg2rad(WGS84_RADIUS);
QPointF tileSpan(z.tile().width() * pixelSpan, z.tile().height() * pixelSpan);
QPointF bottomRight(topLeft.x() + tileSpan.x() * z.matrix().width(),
PointD tileSpan(z.tile().width() * pixelSpan, z.tile().height() * pixelSpan);
PointD bottomRight(topLeft.x() + tileSpan.x() * z.matrix().width(),
topLeft.y() - tileSpan.y() * z.matrix().height());
tl.xy = QPoint(0, 0);
tl.pp = topLeft;
br.xy = QPoint(z.tile().width() * z.matrix().width(),
z.tile().height() * z.matrix().height());
br.pp = bottomRight;
QList<ReferencePoint> points;
points << tl << br;
_transform = Transform(points);
ReferencePoint tl(PointD(0, 0), topLeft);
ReferencePoint br(PointD(z.tile().width() * z.matrix().width(),
z.tile().height() * z.matrix().height()), bottomRight);
_transform = Transform(tl, br);
}
void WMTSMap::load()
@ -128,13 +122,14 @@ QRectF WMTSMap::bounds() const
return _bounds.isValid() ? tileBounds.intersected(bounds) : tileBounds;
}
int WMTSMap::zoomFit(const QSize &size, const RectC &br)
int WMTSMap::zoomFit(const QSize &size, const RectC &rect)
{
if (br.isValid()) {
QRectF tbr(_projection.ll2xy(br.topLeft()),
_projection.ll2xy(br.bottomRight()));
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
qreal resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
if (rect.isValid()) {
PointD tl(_projection.ll2xy(rect.topLeft()));
PointD br(_projection.ll2xy(rect.bottomRight()));
PointD sc((br.x() - tl.x()) / size.width(), (tl.y() - br.y())
/ size.height());
double resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
if (_projection.isGeographic())
resolution *= deg2rad(WGS84_RADIUS);

View File

@ -21,7 +21,7 @@ public:
qreal resolution(const QRectF &rect) const;
int zoom() const {return _zoom;}
int zoomFit(const QSize &size, const RectC &br);
int zoomFit(const QSize &size, const RectC &rect);
int zoomIn();
int zoomOut();
@ -46,7 +46,7 @@ private slots:
private:
bool loadWMTS();
qreal sd2res(qreal scaleDenominator) const;
double sd2res(double scaleDenominator) const;
QString tilesDir() const;
void updateTransform();