Compare commits
27 Commits
Author | SHA1 | Date | |
---|---|---|---|
9e36451001 | |||
b26a10a5b3 | |||
4530ec1354 | |||
f2b72ec1b5 | |||
4b776c8cc1 | |||
d31bf80885 | |||
f77497c93e | |||
c6ddee8682 | |||
0d6bc05818 | |||
fdecbc6cee | |||
cad17fb5d3 | |||
ced1244cbd | |||
3dd22eb2ba | |||
b12e83043d | |||
6416c81232 | |||
e5db00a4f4 | |||
6266d71463 | |||
daf0cf6f9d | |||
d6b810b6ef | |||
8f20080a36 | |||
e112363424 | |||
a277d0ad4f | |||
d4cd542a20 | |||
5eaf0455aa | |||
3f71775101 | |||
f8009b0151 | |||
f64e88290d |
@ -1,4 +1,4 @@
|
|||||||
version: 5.6.{build}
|
version: 5.7.{build}
|
||||||
configuration: Release
|
configuration: Release
|
||||||
platform: Any CPU
|
platform: Any CPU
|
||||||
environment:
|
environment:
|
||||||
|
@ -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.
|
KML, FIT, IGC and NMEA files.
|
||||||
|
|
||||||
## Features
|
## 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).
|
* Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF images).
|
||||||
* Elevation, speed, heart rate, cadence, power and temperature graphs.
|
* Elevation, speed, heart rate, cadence, power and temperature graphs.
|
||||||
* Support for multiple tracks in one view.
|
* Support for multiple tracks in one view.
|
||||||
|
70
gpxsee.pro
@ -1,5 +1,5 @@
|
|||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
VERSION = 5.6
|
VERSION = 5.7
|
||||||
QT += core \
|
QT += core \
|
||||||
gui \
|
gui \
|
||||||
network
|
network
|
||||||
@ -92,6 +92,20 @@ HEADERS += src/config.h \
|
|||||||
src/map/transform.h \
|
src/map/transform.h \
|
||||||
src/map/mapfile.h \
|
src/map/mapfile.h \
|
||||||
src/map/tifffile.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/graph.h \
|
||||||
src/data/poi.h \
|
src/data/poi.h \
|
||||||
src/data/waypoint.h \
|
src/data/waypoint.h \
|
||||||
@ -111,19 +125,7 @@ HEADERS += src/config.h \
|
|||||||
src/data/fitparser.h \
|
src/data/fitparser.h \
|
||||||
src/data/igcparser.h \
|
src/data/igcparser.h \
|
||||||
src/data/nmeaparser.h \
|
src/data/nmeaparser.h \
|
||||||
src/map/gcs.h \
|
src/data/oziparsers.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
|
|
||||||
SOURCES += src/main.cpp \
|
SOURCES += src/main.cpp \
|
||||||
src/common/coordinates.cpp \
|
src/common/coordinates.cpp \
|
||||||
src/common/rectc.cpp \
|
src/common/rectc.cpp \
|
||||||
@ -192,18 +194,6 @@ SOURCES += src/main.cpp \
|
|||||||
src/map/transform.cpp \
|
src/map/transform.cpp \
|
||||||
src/map/mapfile.cpp \
|
src/map/mapfile.cpp \
|
||||||
src/map/tifffile.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/projection.cpp \
|
||||||
src/map/gcs.cpp \
|
src/map/gcs.cpp \
|
||||||
src/map/angularunits.cpp \
|
src/map/angularunits.cpp \
|
||||||
@ -216,7 +206,20 @@ SOURCES += src/main.cpp \
|
|||||||
src/map/wmsmap.cpp \
|
src/map/wmsmap.cpp \
|
||||||
src/map/wms.cpp \
|
src/map/wms.cpp \
|
||||||
src/map/crs.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
|
RESOURCES += gpxsee.qrc
|
||||||
TRANSLATIONS = lang/gpxsee_cs.ts \
|
TRANSLATIONS = lang/gpxsee_cs.ts \
|
||||||
lang/gpxsee_sv.ts \
|
lang/gpxsee_sv.ts \
|
||||||
@ -239,11 +242,15 @@ macx {
|
|||||||
MAPS.path = Contents/Resources
|
MAPS.path = Contents/Resources
|
||||||
MAPS.files = pkg/maps
|
MAPS.files = pkg/maps
|
||||||
ICONS.path = Contents/Resources/icons
|
ICONS.path = Contents/Resources/icons
|
||||||
ICONS.files = icons/tcx.icns \
|
ICONS.files = icons/gpx.icns \
|
||||||
|
icons/tcx.icns \
|
||||||
icons/kml.icns \
|
icons/kml.icns \
|
||||||
icons/fit.icns \
|
icons/fit.icns \
|
||||||
icons/igc.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
|
QMAKE_BUNDLE_DATA += LOCALE MAPS ICONS CSV
|
||||||
}
|
}
|
||||||
win32 {
|
win32 {
|
||||||
@ -253,6 +260,9 @@ win32 {
|
|||||||
icons/kml.ico \
|
icons/kml.ico \
|
||||||
icons/fit.ico \
|
icons/fit.ico \
|
||||||
icons/igc.ico \
|
icons/igc.ico \
|
||||||
icons/nmea.ico
|
icons/nmea.ico \
|
||||||
|
icons/plt.ico \
|
||||||
|
icons/rte.ico \
|
||||||
|
icons/wpt.ico
|
||||||
}
|
}
|
||||||
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
|
||||||
|
BIN
icons/fit.icns
BIN
icons/fit.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 302 KiB |
171
icons/fit.svg
@ -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 |
BIN
icons/gpx.icns
BIN
icons/gpx.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 305 KiB |
146
icons/gpx.svg
@ -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 |
BIN
icons/igc.icns
BIN
icons/igc.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 304 KiB |
145
icons/igc.svg
@ -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 |
BIN
icons/kml.icns
BIN
icons/kml.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 304 KiB |
143
icons/kml.svg
@ -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 |
BIN
icons/nmea.icns
BIN
icons/nmea.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 304 KiB |
145
icons/nmea.svg
@ -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
BIN
icons/plt.ico
Normal file
After Width: | Height: | Size: 302 KiB |
BIN
icons/rte.icns
Normal file
BIN
icons/rte.ico
Normal file
After Width: | Height: | Size: 303 KiB |
28
icons/scripts/icns.sh
Executable 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
@ -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
|
17
icons/scripts/icon-template.svg
Normal 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 |
BIN
icons/tcx.icns
BIN
icons/tcx.ico
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 304 KiB |
145
icons/tcx.svg
@ -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
BIN
icons/wpt.ico
Normal file
After Width: | Height: | Size: 304 KiB |
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Podporované soubory</translation>
|
<translation>Podporované soubory</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>Soubory CSV</translation>
|
<translation>Soubory CSV</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>Soubory FIT</translation>
|
<translation>Soubory FIT</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>Soubory GPX</translation>
|
<translation>Soubory GPX</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>Soubory IGC</translation>
|
<translation>Soubory IGC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>Soubory KML</translation>
|
<translation>Soubory KML</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>Soubory NMEA</translation>
|
<translation>Soubory NMEA</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>Soubory TCX</translation>
|
<translation>Soubory TCX</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Všechny soubory</translation>
|
<translation>Všechny soubory</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Unterstütze Dateien</translation>
|
<translation>Unterstütze Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>CSV-Dateien</translation>
|
<translation>CSV-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>FIT-Dateien</translation>
|
<translation>FIT-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>GPX-Dateien</translation>
|
<translation>GPX-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>IGC-Dateien</translation>
|
<translation>IGC-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>KML-Dateien</translation>
|
<translation>KML-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>NMEA-Dateien</translation>
|
<translation>NMEA-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>TCX-Dateien</translation>
|
<translation>TCX-Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Alle Dateien</translation>
|
<translation>Alle Dateien</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Tuetut tiedostot</translation>
|
<translation>Tuetut tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>CSV-tiedostot</translation>
|
<translation>CSV-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>FIT-tiedostot</translation>
|
<translation>FIT-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>GPX-tiedostot</translation>
|
<translation>GPX-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>IGC-tiedostot</translation>
|
<translation>IGC-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>KML-tiedostot</translation>
|
<translation>KML-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>NMEA-tiedostot</translation>
|
<translation>NMEA-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>TCX-tiedostot</translation>
|
<translation>TCX-tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Kaikki tiedostot</translation>
|
<translation>Kaikki tiedostot</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Formats pris en charge</translation>
|
<translation>Formats pris en charge</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>Données CSV</translation>
|
<translation>Données CSV</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>Données FIT</translation>
|
<translation>Données FIT</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>Données GPX</translation>
|
<translation>Données GPX</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>Données IGC</translation>
|
<translation>Données IGC</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>Données KML</translation>
|
<translation>Données KML</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>Données NMEA</translation>
|
<translation>Données NMEA</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>Données TCX</translation>
|
<translation>Données TCX</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Tous les fichiers</translation>
|
<translation>Tous les fichiers</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Все поддерживаемые файлы</translation>
|
<translation>Все поддерживаемые файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>CSV файлы</translation>
|
<translation>CSV файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>FIT файлы</translation>
|
<translation>FIT файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>GPX файлы</translation>
|
<translation>GPX файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>IGC файлы</translation>
|
<translation>IGC файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>KML файлы</translation>
|
<translation>KML файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>NMEA файлы</translation>
|
<translation>NMEA файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>TCX файлы</translation>
|
<translation>TCX файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Все файлы</translation>
|
<translation>Все файлы</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -47,47 +47,52 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>Data</name>
|
<name>Data</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="103"/>
|
<location filename="../src/data/data.cpp" line="112"/>
|
||||||
<source>Supported files</source>
|
<source>Supported files</source>
|
||||||
<translation>Filer som stöds</translation>
|
<translation>Filer som stöds</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>CSV files</source>
|
<source>CSV files</source>
|
||||||
<translation>CSV-filer</translation>
|
<translation>CSV-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="104"/>
|
<location filename="../src/data/data.cpp" line="114"/>
|
||||||
<source>FIT files</source>
|
<source>FIT files</source>
|
||||||
<translation>FIT-filer</translation>
|
<translation>FIT-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>GPX files</source>
|
<source>GPX files</source>
|
||||||
<translation>GPX-filer</translation>
|
<translation>GPX-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="105"/>
|
<location filename="../src/data/data.cpp" line="115"/>
|
||||||
<source>IGC files</source>
|
<source>IGC files</source>
|
||||||
<translation>IGC-filer</translation>
|
<translation>IGC-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>KML files</source>
|
<source>KML files</source>
|
||||||
<translation>KML-filer</translation>
|
<translation>KML-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="106"/>
|
<location filename="../src/data/data.cpp" line="116"/>
|
||||||
<source>NMEA files</source>
|
<source>NMEA files</source>
|
||||||
<translation>NMEA-filer</translation>
|
<translation>NMEA-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>TCX files</source>
|
||||||
<translation>TCX-filer</translation>
|
<translation>TCX-filer</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/data/data.cpp" line="107"/>
|
<location filename="../src/data/data.cpp" line="118"/>
|
||||||
<source>All files</source>
|
<source>All files</source>
|
||||||
<translation>Alla filer</translation>
|
<translation>Alla filer</translation>
|
||||||
</message>
|
</message>
|
||||||
|
111
pkg/Info.plist
@ -115,6 +115,54 @@
|
|||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Viewer</string>
|
<string>Viewer</string>
|
||||||
</dict>
|
</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>
|
</array>
|
||||||
|
|
||||||
<key>UTImportedTypeDeclarations</key>
|
<key>UTImportedTypeDeclarations</key>
|
||||||
@ -245,6 +293,69 @@
|
|||||||
<string>application/vnd.nmea.nmea</string>
|
<string>application/vnd.nmea.nmea</string>
|
||||||
</dict>
|
</dict>
|
||||||
</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>
|
</array>
|
||||||
|
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
<summary>GPS log file viewer and analyzer</summary>
|
<summary>GPS log file viewer and analyzer</summary>
|
||||||
<description>
|
<description>
|
||||||
<p>GPXSee is a GPS log file viewer and analyzer that supports GPX, TCX,
|
<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>
|
<p>Features:</p>
|
||||||
<ul>
|
<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
|
<li>Offline maps (OziExplorer maps, TrekBuddy maps/atlases, GeoTIFF
|
||||||
images).</li>
|
images).</li>
|
||||||
<li>Elevation, speed, heart rate, cadence, power and temperature
|
<li>Elevation, speed, heart rate, cadence, power and temperature
|
||||||
@ -21,7 +21,8 @@
|
|||||||
<li>Support for POI files.</li>
|
<li>Support for POI files.</li>
|
||||||
<li>Print/export to PDF.</li>
|
<li>Print/export to PDF.</li>
|
||||||
<li>Full-screen mode.</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>
|
</ul>
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
@ -54,5 +55,8 @@
|
|||||||
<mimetype>application/vnd.google-earth.kml+xml</mimetype>
|
<mimetype>application/vnd.google-earth.kml+xml</mimetype>
|
||||||
<mimetype>application/vnd.fai.igc</mimetype>
|
<mimetype>application/vnd.fai.igc</mimetype>
|
||||||
<mimetype>application/vnd.nmea.nmea</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>
|
</mimetypes>
|
||||||
</component>
|
</component>
|
||||||
|
@ -10,4 +10,4 @@ Icon=gpxsee
|
|||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Graphics;Viewer;Maps;Qt;
|
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;
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "5.6"
|
!define VERSION "5.7"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}.exe"
|
OutFile "GPXSee-${VERSION}.exe"
|
||||||
; Compression method
|
; Compression method
|
||||||
SetCompressor /SOLID lzma
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
; Required execution level
|
; Required execution level
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
; The default installation directory
|
; The default installation directory
|
||||||
@ -26,7 +26,7 @@ VIAddVersionKey "ProductName" "GPXSee"
|
|||||||
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
||||||
VIAddVersionKey "FileDescription" "GPXSee installer"
|
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)
|
; overwrite the old one automatically)
|
||||||
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
||||||
|
|
||||||
@ -39,11 +39,14 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
|||||||
!define REGFIT "GPXSee.fit"
|
!define REGFIT "GPXSee.fit"
|
||||||
!define REGIGC "GPXSee.igc"
|
!define REGIGC "GPXSee.igc"
|
||||||
!define REGNMEA "GPXSee.nmea"
|
!define REGNMEA "GPXSee.nmea"
|
||||||
|
!define REGPLT "GPXSee.plt"
|
||||||
|
!define REGRTE "GPXSee.rte"
|
||||||
|
!define REGWPT "GPXSee.wpt"
|
||||||
|
|
||||||
; Start menu page configuration
|
; Start menu page configuration
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
||||||
|
|
||||||
Var StartMenuFolder
|
Var StartMenuFolder
|
||||||
|
|
||||||
@ -77,10 +80,10 @@ FunctionEnd
|
|||||||
Section "GPXSee" SEC_APP
|
Section "GPXSee" SEC_APP
|
||||||
|
|
||||||
SectionIn RO
|
SectionIn RO
|
||||||
|
|
||||||
; Set output path to the installation directory.
|
; Set output path to the installation directory
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
; Put the files there
|
; Put the files there
|
||||||
File "gpxsee.exe"
|
File "gpxsee.exe"
|
||||||
File /r "maps"
|
File /r "maps"
|
||||||
@ -88,14 +91,14 @@ Section "GPXSee" SEC_APP
|
|||||||
|
|
||||||
; Create start menu entry and add links
|
; Create start menu entry and add links
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
|
|
||||||
; Create the uninstaller
|
; Create the uninstaller
|
||||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
; Write the installation path into the registry
|
; Write the installation path into the registry
|
||||||
DetailPrint "Registering application..."
|
DetailPrint "Registering application..."
|
||||||
@ -113,28 +116,40 @@ Section "GPXSee" SEC_APP
|
|||||||
DetailPrint "Associating file types..."
|
DetailPrint "Associating file types..."
|
||||||
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
||||||
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
|
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 "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
||||||
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
|
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 "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
||||||
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
|
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 "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
||||||
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
|
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 "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
||||||
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
|
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 "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
||||||
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
|
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 "${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)'
|
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 "platforms"
|
||||||
File /r "imageformats"
|
File /r "imageformats"
|
||||||
File /r "printsupport"
|
File /r "printsupport"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "MSVC runtime" SEC_MSVC
|
Section "MSVC runtime" SEC_MSVC
|
||||||
@ -231,7 +246,7 @@ SectionGroupEnd
|
|||||||
; Uninstaller
|
; Uninstaller
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|
||||||
; Remove registry keys
|
; Remove registry keys
|
||||||
DeleteRegKey HKLM "${REGENTRY}"
|
DeleteRegKey HKLM "${REGENTRY}"
|
||||||
DeleteRegKey HKLM SOFTWARE\GPXSee
|
DeleteRegKey HKLM SOFTWARE\GPXSee
|
||||||
@ -258,7 +273,13 @@ Section "Uninstall"
|
|||||||
DeleteRegKey HKCR ".igc"
|
DeleteRegKey HKCR ".igc"
|
||||||
DeleteRegKey HKCR "${REGNMEA}"
|
DeleteRegKey HKCR "${REGNMEA}"
|
||||||
DeleteRegKey HKCR ".nmea"
|
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
|
SectionEnd
|
||||||
|
|
||||||
|
@ -43,4 +43,24 @@
|
|||||||
<glob pattern="*.nmea"/>
|
<glob pattern="*.nmea"/>
|
||||||
</mime-type>
|
</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>
|
</mime-info>
|
||||||
|
@ -5,14 +5,14 @@
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "5.6"
|
!define VERSION "5.7"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
; Compression method
|
; Compression method
|
||||||
SetCompressor /SOLID lzma
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
; Required execution level
|
; Required execution level
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
; The default installation directory
|
; The default installation directory
|
||||||
@ -26,7 +26,7 @@ VIAddVersionKey "ProductName" "GPXSee"
|
|||||||
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
VIAddVersionKey "LegalCopyright" "GPXSee project"
|
||||||
VIAddVersionKey "FileDescription" "GPXSee installer (x64)"
|
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)
|
; overwrite the old one automatically)
|
||||||
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
||||||
|
|
||||||
@ -39,11 +39,14 @@ InstallDirRegKey HKLM "Software\GPXSee" "Install_Dir"
|
|||||||
!define REGFIT "GPXSee.fit"
|
!define REGFIT "GPXSee.fit"
|
||||||
!define REGIGC "GPXSee.igc"
|
!define REGIGC "GPXSee.igc"
|
||||||
!define REGNMEA "GPXSee.nmea"
|
!define REGNMEA "GPXSee.nmea"
|
||||||
|
!define REGPLT "GPXSee.plt"
|
||||||
|
!define REGRTE "GPXSee.rte"
|
||||||
|
!define REGWPT "GPXSee.wpt"
|
||||||
|
|
||||||
; Start menu page configuration
|
; Start menu page configuration
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\GPXSee"
|
||||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "GPXSee"
|
||||||
|
|
||||||
Var StartMenuFolder
|
Var StartMenuFolder
|
||||||
|
|
||||||
@ -71,31 +74,31 @@ Function .onInit
|
|||||||
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
|
MessageBox MB_OK "GPXSee can only be installed on Windows 7 or later."
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${If} ${RunningX64}
|
${If} ${RunningX64}
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
${Else}
|
${Else}
|
||||||
MessageBox MB_OK "The 64b version of GPXSee can not be run on 32b systems."
|
MessageBox MB_OK "The 64b version of GPXSee can not be run on 32b systems."
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
; The stuff to install
|
; The stuff to install
|
||||||
Section "GPXSee" SEC_APP
|
Section "GPXSee" SEC_APP
|
||||||
|
|
||||||
SectionIn RO
|
SectionIn RO
|
||||||
|
|
||||||
; Set output path to the installation directory.
|
; Set output path to the installation directory
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
; Put the files there
|
; Put the files there
|
||||||
File "gpxsee.exe"
|
File "gpxsee.exe"
|
||||||
File /r "maps"
|
File /r "maps"
|
||||||
File /r "csv"
|
File /r "csv"
|
||||||
|
|
||||||
; Create start menu entry and add links
|
; Create start menu entry and add links
|
||||||
SetShellVarContext all
|
SetShellVarContext all
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GPXSee.lnk" "$INSTDIR\gpxsee.exe"
|
||||||
@ -103,7 +106,7 @@ Section "GPXSee" SEC_APP
|
|||||||
|
|
||||||
; Create the uninstaller
|
; Create the uninstaller
|
||||||
WriteUninstaller "$INSTDIR\uninstall.exe"
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
; Write the installation path into the registry
|
; Write the installation path into the registry
|
||||||
DetailPrint "Registering application..."
|
DetailPrint "Registering application..."
|
||||||
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
|
WriteRegStr HKLM SOFTWARE\GPXSee "Install_Dir" "$INSTDIR"
|
||||||
@ -120,29 +123,41 @@ Section "GPXSee" SEC_APP
|
|||||||
DetailPrint "Associating file types..."
|
DetailPrint "Associating file types..."
|
||||||
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
WriteRegStr HKCR ".gpx" "" "${REGGPX}"
|
||||||
WriteRegStr HKCR "${REGGPX}" "" "GPS Exchange Format"
|
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 "${REGGPX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
WriteRegStr HKCR ".tcx" "" "${REGTCX}"
|
||||||
WriteRegStr HKCR "${REGTCX}" "" "Training Center XML"
|
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 "${REGTCX}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
WriteRegStr HKCR ".kml" "" "${REGKML}"
|
||||||
WriteRegStr HKCR "${REGKML}" "" "Keyhole Markup Language"
|
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 "${REGKML}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
WriteRegStr HKCR ".fit" "" "${REGFIT}"
|
||||||
WriteRegStr HKCR "${REGFIT}" "" "Flexible and Interoperable Data Transfer"
|
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 "${REGFIT}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
WriteRegStr HKCR ".igc" "" "${REGIGC}"
|
||||||
WriteRegStr HKCR "${REGIGC}" "" "Flight Recorder Data Format"
|
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 "${REGIGC}\shell\open\command" "" "$\"$INSTDIR\GPXSee.exe$\" $\"%1$\""
|
||||||
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
WriteRegStr HKCR ".nmea" "" "${REGNMEA}"
|
||||||
WriteRegStr HKCR "${REGNMEA}" "" "NMEA 0183 data"
|
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 "${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)'
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
@ -159,7 +174,7 @@ Section "QT framework" SEC_QT
|
|||||||
File /r "platforms"
|
File /r "platforms"
|
||||||
File /r "imageformats"
|
File /r "imageformats"
|
||||||
File /r "printsupport"
|
File /r "printsupport"
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "MSVC runtime" SEC_MSVC
|
Section "MSVC runtime" SEC_MSVC
|
||||||
@ -233,7 +248,7 @@ SectionGroupEnd
|
|||||||
; Uninstaller
|
; Uninstaller
|
||||||
|
|
||||||
Section "Uninstall"
|
Section "Uninstall"
|
||||||
|
|
||||||
; Remove registry keys
|
; Remove registry keys
|
||||||
SetRegView 64
|
SetRegView 64
|
||||||
DeleteRegKey HKLM "${REGENTRY}"
|
DeleteRegKey HKLM "${REGENTRY}"
|
||||||
@ -247,7 +262,7 @@ Section "Uninstall"
|
|||||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
|
Delete "$SMPROGRAMS\$StartMenuFolder\*.*"
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
|
||||||
; Remove File associations
|
; Remove File associations
|
||||||
DeleteRegKey HKCR "${REGGPX}"
|
DeleteRegKey HKCR "${REGGPX}"
|
||||||
DeleteRegKey HKCR ".gpx"
|
DeleteRegKey HKCR ".gpx"
|
||||||
@ -261,6 +276,12 @@ Section "Uninstall"
|
|||||||
DeleteRegKey HKCR ".igc"
|
DeleteRegKey HKCR ".igc"
|
||||||
DeleteRegKey HKCR "${REGNMEA}"
|
DeleteRegKey HKCR "${REGNMEA}"
|
||||||
DeleteRegKey HKCR ".nmea"
|
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)'
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
@ -291,4 +312,4 @@ LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
@ -150,7 +150,7 @@ void MapView::addWaypoints(const QList<Waypoint> &waypoints)
|
|||||||
|
|
||||||
WaypointItem *wi = new WaypointItem(w, _map);
|
WaypointItem *wi = new WaypointItem(w, _map);
|
||||||
_waypoints.append(wi);
|
_waypoints.append(wi);
|
||||||
_wr.unite(wi->waypoint().coordinates());
|
_wr = _wr.united(wi->waypoint().coordinates());
|
||||||
wi->setZValue(1);
|
wi->setZValue(1);
|
||||||
wi->setSize(_waypointSize);
|
wi->setSize(_waypointSize);
|
||||||
wi->setColor(_waypointColor);
|
wi->setColor(_waypointColor);
|
||||||
|
@ -1,50 +1,16 @@
|
|||||||
#include "wgs84.h"
|
#include "wgs84.h"
|
||||||
#include "coordinates.h"
|
#include "coordinates.h"
|
||||||
|
|
||||||
#define MIN_LAT deg2rad(-90.0)
|
double Coordinates::distanceTo(const Coordinates &c) const
|
||||||
#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
|
|
||||||
{
|
{
|
||||||
qreal dLat = deg2rad(c.lat() - _lat);
|
double dLat = deg2rad(c.lat() - _lat);
|
||||||
qreal dLon = deg2rad(c.lon() - _lon);
|
double dLon = deg2rad(c.lon() - _lon);
|
||||||
qreal a = pow(sin(dLat / 2.0), 2.0)
|
double a = pow(sin(dLat / 2.0), 2.0)
|
||||||
+ cos(deg2rad(_lat)) * cos(deg2rad(c.lat())) * pow(sin(dLon / 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))));
|
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
|
#ifndef QT_NO_DEBUG
|
||||||
QDebug operator<<(QDebug dbg, const Coordinates &c)
|
QDebug operator<<(QDebug dbg, const Coordinates &c)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define COORDINATES_H
|
#define COORDINATES_H
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <QPair>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
@ -15,14 +14,14 @@ class Coordinates
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Coordinates() {_lon = NAN; _lat = NAN;}
|
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;}
|
double &rlon() {return _lon;}
|
||||||
qreal &rlat() {return _lat;}
|
double &rlat() {return _lat;}
|
||||||
void setLon(qreal lon) {_lon = lon;}
|
void setLon(double lon) {_lon = lon;}
|
||||||
void setLat(qreal lat) {_lat = lat;}
|
void setLat(double lat) {_lat = lat;}
|
||||||
qreal lon() const {return _lon;}
|
double lon() const {return _lon;}
|
||||||
qreal lat() const {return _lat;}
|
double lat() const {return _lat;}
|
||||||
|
|
||||||
bool isNull() const
|
bool isNull() const
|
||||||
{return std::isnan(_lon) && std::isnan(_lat);}
|
{return std::isnan(_lon) && std::isnan(_lat);}
|
||||||
@ -30,11 +29,10 @@ public:
|
|||||||
{return (_lon >= -180.0 && _lon <= 180.0
|
{return (_lon >= -180.0 && _lon <= 180.0
|
||||||
&& _lat >= -90.0 && _lat <= 90.0);}
|
&& _lat >= -90.0 && _lat <= 90.0);}
|
||||||
|
|
||||||
qreal distanceTo(const Coordinates &c) const;
|
double distanceTo(const Coordinates &c) const;
|
||||||
QPair<Coordinates, Coordinates> boundingRect(qreal distance) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
qreal _lat, _lon;
|
double _lat, _lon;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const Coordinates &c1, const Coordinates &c2)
|
inline bool operator==(const Coordinates &c1, const Coordinates &c2)
|
||||||
|
@ -1,5 +1,41 @@
|
|||||||
|
#include "wgs84.h"
|
||||||
#include "rectc.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 ¢er, 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
|
RectC RectC::operator|(const RectC &r) const
|
||||||
{
|
{
|
||||||
if (isNull())
|
if (isNull())
|
||||||
@ -7,41 +43,36 @@ RectC RectC::operator|(const RectC &r) const
|
|||||||
if (r.isNull())
|
if (r.isNull())
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
qreal l1 = _tl.lon();
|
double l1 = _tl.lon();
|
||||||
qreal r1 = _tl.lon();
|
double r1 = _tl.lon();
|
||||||
if (_br.lon() - _tl.lon() < 0)
|
if (_br.lon() < _tl.lon())
|
||||||
l1 = _br.lon();
|
l1 = _br.lon();
|
||||||
else
|
else
|
||||||
r1 = _br.lon();
|
r1 = _br.lon();
|
||||||
|
|
||||||
qreal l2 = r._tl.lon();
|
double l2 = r._tl.lon();
|
||||||
qreal r2 = r._tl.lon();
|
double r2 = r._tl.lon();
|
||||||
if (r._br.lon() - r._tl.lon() < 0)
|
if (r._br.lon() < r._tl.lon())
|
||||||
l2 = r._br.lon();
|
l2 = r._br.lon();
|
||||||
else
|
else
|
||||||
r2 = r._br.lon();
|
r2 = r._br.lon();
|
||||||
|
|
||||||
qreal t1 = _tl.lat();
|
double t1 = _tl.lat();
|
||||||
qreal b1 = _tl.lat();
|
double b1 = _tl.lat();
|
||||||
if (_br.lat() - _tl.lat() < 0)
|
if (_br.lat() > _tl.lat())
|
||||||
t1 = _br.lat();
|
t1 = _br.lat();
|
||||||
else
|
else
|
||||||
b1 = _br.lat();
|
b1 = _br.lat();
|
||||||
|
|
||||||
qreal t2 = r._tl.lat();
|
double t2 = r._tl.lat();
|
||||||
qreal b2 = r._tl.lat();
|
double b2 = r._tl.lat();
|
||||||
if (r._br.lat() - r._tl.lat() < 0)
|
if (r._br.lat() > r._tl.lat())
|
||||||
t2 = r._br.lat();
|
t2 = r._br.lat();
|
||||||
else
|
else
|
||||||
b2 = r._br.lat();
|
b2 = r._br.lat();
|
||||||
|
|
||||||
RectC tmp;
|
return RectC(Coordinates(qMin(l1, l2), qMax(t1, t2)),
|
||||||
tmp._tl.setLon(qMin(l1, l2));
|
Coordinates(qMax(r1, r2), qMin(b1, b2)));
|
||||||
tmp._br.setLon(qMax(r1, r2));
|
|
||||||
tmp._tl.setLat(qMin(t1, t2));
|
|
||||||
tmp._br.setLat(qMax(b1, b2));
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RectC RectC::operator&(const RectC &r) const
|
RectC RectC::operator&(const RectC &r) const
|
||||||
@ -49,16 +80,16 @@ RectC RectC::operator&(const RectC &r) const
|
|||||||
if (isNull() || r.isNull())
|
if (isNull() || r.isNull())
|
||||||
return RectC();
|
return RectC();
|
||||||
|
|
||||||
qreal l1 = _tl.lon();
|
double l1 = _tl.lon();
|
||||||
qreal r1 = _tl.lon();
|
double r1 = _tl.lon();
|
||||||
if (_br.lon() - _tl.lon() < 0)
|
if (_br.lon() < _tl.lon())
|
||||||
l1 = _br.lon();
|
l1 = _br.lon();
|
||||||
else
|
else
|
||||||
r1 = _br.lon();
|
r1 = _br.lon();
|
||||||
|
|
||||||
qreal l2 = r._tl.lon();
|
double l2 = r._tl.lon();
|
||||||
qreal r2 = r._tl.lon();
|
double r2 = r._tl.lon();
|
||||||
if (r._br.lon() - r._tl.lon() < 0)
|
if (r._br.lon() < r._tl.lon())
|
||||||
l2 = r._br.lon();
|
l2 = r._br.lon();
|
||||||
else
|
else
|
||||||
r2 = r._br.lon();
|
r2 = r._br.lon();
|
||||||
@ -66,75 +97,65 @@ RectC RectC::operator&(const RectC &r) const
|
|||||||
if (l1 > r2 || l2 > r1)
|
if (l1 > r2 || l2 > r1)
|
||||||
return RectC();
|
return RectC();
|
||||||
|
|
||||||
qreal t1 = _tl.lat();
|
double t1 = _tl.lat();
|
||||||
qreal b1 = _tl.lat();
|
double b1 = _tl.lat();
|
||||||
if (_br.lat() - _tl.lat() < 0)
|
if (_br.lat() > _tl.lat())
|
||||||
t1 = _br.lat();
|
t1 = _br.lat();
|
||||||
else
|
else
|
||||||
b1 = _br.lat();
|
b1 = _br.lat();
|
||||||
|
|
||||||
qreal t2 = r._tl.lat();
|
double t2 = r._tl.lat();
|
||||||
qreal b2 = r._tl.lat();
|
double b2 = r._tl.lat();
|
||||||
if (r._br.lat() - r._tl.lat() < 0)
|
if (r._br.lat() > r._tl.lat())
|
||||||
t2 = r._br.lat();
|
t2 = r._br.lat();
|
||||||
else
|
else
|
||||||
b2 = r._br.lat();
|
b2 = r._br.lat();
|
||||||
|
|
||||||
if (t1 > b2 || t2 > b1)
|
if (b1 > t2 || b2 > t1)
|
||||||
return RectC();
|
return RectC();
|
||||||
|
|
||||||
RectC tmp;
|
return RectC(Coordinates(qMax(l1, l2), qMin(t1, t2)),
|
||||||
tmp._tl.setLon(qMax(l1, l2));
|
Coordinates(qMin(r1, r2), qMax(b1, b2)));
|
||||||
tmp._br.setLon(qMin(r1, r2));
|
|
||||||
tmp._tl.setLat(qMax(t1, t2));
|
|
||||||
tmp._br.setLat(qMin(b1, b2));
|
|
||||||
|
|
||||||
return tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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()) {
|
double l = _tl.lon();
|
||||||
r._tl.setLon(_br.lon());
|
double r = _tl.lon();
|
||||||
r._br.setLon(_tl.lon());
|
if (_br.lon() < _tl.lon())
|
||||||
} else {
|
l = _br.lon();
|
||||||
r._tl.setLon(_tl.lon());
|
else
|
||||||
r._br.setLon(_br.lon());
|
r = _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());
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (c.lon() < l)
|
||||||
{
|
l = c.lon();
|
||||||
if (isNull()) {
|
if (c.lon() > r)
|
||||||
_tl = c;
|
r = c.lon();
|
||||||
_br = c;
|
if (c.lat() < b)
|
||||||
} else {
|
b = c.lat();
|
||||||
if (c.lon() < _tl.lon())
|
if (c.lat() > t)
|
||||||
_tl.setLon(c.lon());
|
t = c.lat();
|
||||||
if (c.lon() > _br.lon())
|
|
||||||
_br.setLon(c.lon());
|
return RectC(Coordinates(l, t), Coordinates(r, b));
|
||||||
if (c.lat() > _br.lat())
|
|
||||||
_br.setLat(c.lat());
|
|
||||||
if (c.lat() < _tl.lat())
|
|
||||||
_tl.setLat(c.lat());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
QDebug operator<<(QDebug dbg, const RectC &rect)
|
QDebug operator<<(QDebug dbg, const RectC &rect)
|
||||||
{
|
{
|
||||||
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.size() << ")";
|
dbg.nospace() << "RectC(" << rect.topLeft() << ", " << rect.bottomRight()
|
||||||
|
<< ")";
|
||||||
return dbg.space();
|
return dbg.space();
|
||||||
}
|
}
|
||||||
#endif // QT_NO_DEBUG
|
#endif // QT_NO_DEBUG
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#define RECTC_H
|
#define RECTC_H
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QSizeF>
|
|
||||||
#include "coordinates.h"
|
#include "coordinates.h"
|
||||||
|
|
||||||
class RectC
|
class RectC
|
||||||
@ -11,6 +10,7 @@ public:
|
|||||||
RectC() {}
|
RectC() {}
|
||||||
RectC(const Coordinates &topLeft, const Coordinates &bottomRight)
|
RectC(const Coordinates &topLeft, const Coordinates &bottomRight)
|
||||||
: _tl(topLeft), _br(bottomRight) {}
|
: _tl(topLeft), _br(bottomRight) {}
|
||||||
|
RectC(const Coordinates ¢er, double radius);
|
||||||
|
|
||||||
bool isNull() const
|
bool isNull() const
|
||||||
{return _tl.isNull() && _br.isNull();}
|
{return _tl.isNull() && _br.isNull();}
|
||||||
@ -19,22 +19,16 @@ public:
|
|||||||
|
|
||||||
Coordinates topLeft() const {return _tl;}
|
Coordinates topLeft() const {return _tl;}
|
||||||
Coordinates bottomRight() const {return _br;}
|
Coordinates bottomRight() const {return _br;}
|
||||||
|
|
||||||
Coordinates center() const
|
Coordinates center() const
|
||||||
{return Coordinates((_tl.lon() + _br.lon()) / 2.0,
|
{return Coordinates((_tl.lon() + _br.lon()) / 2.0,
|
||||||
(_tl.lat() + _br.lat()) / 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) const;
|
||||||
RectC &operator|=(const RectC &r) {*this = *this | r; return *this;}
|
RectC &operator|=(const RectC &r) {*this = *this | r; return *this;}
|
||||||
RectC operator&(const RectC &r) const;
|
RectC operator&(const RectC &r) const;
|
||||||
RectC &operator&=(const RectC &r) {*this = *this & r; return *this;}
|
RectC &operator&=(const RectC &r) {*this = *this & r; return *this;}
|
||||||
|
|
||||||
void unite(const Coordinates &c);
|
RectC united(const Coordinates &c) const;
|
||||||
RectC normalized() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Coordinates _tl, _br;
|
Coordinates _tl, _br;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "csvparser.h"
|
#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)
|
QList<RouteData> &routes, QList<Waypoint> &waypoints)
|
||||||
{
|
{
|
||||||
Q_UNUSED(track);
|
Q_UNUSED(tracks);
|
||||||
Q_UNUSED(routes);
|
Q_UNUSED(routes);
|
||||||
bool res;
|
bool res;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ class CSVParser : public Parser
|
|||||||
public:
|
public:
|
||||||
CSVParser() : _errorLine(0) {}
|
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);
|
QList<Waypoint> &waypoints);
|
||||||
QString errorString() const {return _errorString;}
|
QString errorString() const {return _errorString;}
|
||||||
int errorLine() const {return _errorLine;}
|
int errorLine() const {return _errorLine;}
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "fitparser.h"
|
#include "fitparser.h"
|
||||||
#include "igcparser.h"
|
#include "igcparser.h"
|
||||||
#include "nmeaparser.h"
|
#include "nmeaparser.h"
|
||||||
|
#include "oziparsers.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
|
|
||||||
@ -18,6 +19,9 @@ static FITParser fit;
|
|||||||
static CSVParser csv;
|
static CSVParser csv;
|
||||||
static IGCParser igc;
|
static IGCParser igc;
|
||||||
static NMEAParser nmea;
|
static NMEAParser nmea;
|
||||||
|
static PLTParser plt;
|
||||||
|
static WPTParser wpt;
|
||||||
|
static RTEParser rte;
|
||||||
|
|
||||||
static QHash<QString, Parser*> parsers()
|
static QHash<QString, Parser*> parsers()
|
||||||
{
|
{
|
||||||
@ -30,6 +34,9 @@ static QHash<QString, Parser*> parsers()
|
|||||||
hash.insert("csv", &csv);
|
hash.insert("csv", &csv);
|
||||||
hash.insert("igc", &igc);
|
hash.insert("igc", &igc);
|
||||||
hash.insert("nmea", &nmea);
|
hash.insert("nmea", &nmea);
|
||||||
|
hash.insert("plt", &plt);
|
||||||
|
hash.insert("wpt", &wpt);
|
||||||
|
hash.insert("rte", &rte);
|
||||||
|
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
@ -100,11 +107,13 @@ bool Data::loadFile(const QString &fileName)
|
|||||||
QString Data::formats()
|
QString Data::formats()
|
||||||
{
|
{
|
||||||
return
|
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("CSV files") + " (*.csv);;" + tr("FIT files") + " (*.fit);;"
|
||||||
+ tr("GPX files") + " (*.gpx);;" + tr("IGC files") + " (*.igc);;"
|
+ tr("GPX files") + " (*.gpx);;" + tr("IGC files") + " (*.igc);;"
|
||||||
+ tr("KML files") + " (*.kml);;" + tr("NMEA files") + " (*.nmea);;"
|
+ 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()
|
QStringList Data::filter()
|
||||||
|
273
src/data/oziparsers.cpp
Normal 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
@ -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
|
@ -8,7 +8,7 @@ RectC Path::boundingRect() const
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
for (int i = 0; i < size(); i++)
|
for (int i = 0; i < size(); i++)
|
||||||
ret.unite(at(i).coordinates());
|
ret = ret.united(at(i).coordinates());
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include "common/rectc.h"
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
#include "poi.h"
|
#include "poi.h"
|
||||||
|
|
||||||
@ -101,12 +102,11 @@ QList<Waypoint> POI::points(const Path &path) const
|
|||||||
QSet<int>::const_iterator it;
|
QSet<int>::const_iterator it;
|
||||||
|
|
||||||
for (int i = 0; i < path.count(); i++) {
|
for (int i = 0; i < path.count(); i++) {
|
||||||
const Coordinates &c = path.at(i).coordinates();
|
RectC br(path.at(i).coordinates(), _radius);
|
||||||
QPair<Coordinates, Coordinates> br = c.boundingRect(_radius);
|
min[0] = br.topLeft().lon();
|
||||||
min[0] = br.first.lon();
|
min[1] = br.bottomRight().lat();
|
||||||
min[1] = br.first.lat();
|
max[0] = br.bottomRight().lon();
|
||||||
max[0] = br.second.lon();
|
max[1] = br.topLeft().lat();
|
||||||
max[1] = br.second.lat();
|
|
||||||
|
|
||||||
_tree.Search(min, max, cb, &set);
|
_tree.Search(min, max, cb, &set);
|
||||||
}
|
}
|
||||||
@ -124,13 +124,11 @@ QList<Waypoint> POI::points(const Waypoint &point) const
|
|||||||
qreal min[2], max[2];
|
qreal min[2], max[2];
|
||||||
QSet<int>::const_iterator it;
|
QSet<int>::const_iterator it;
|
||||||
|
|
||||||
const Coordinates &c = point.coordinates();
|
RectC br(point.coordinates(), _radius);
|
||||||
|
min[0] = br.topLeft().lon();
|
||||||
QPair<Coordinates, Coordinates> br = c.boundingRect(_radius);
|
min[1] = br.bottomRight().lat();
|
||||||
min[0] = br.first.lon();
|
max[0] = br.bottomRight().lon();
|
||||||
min[1] = br.first.lat();
|
max[1] = br.topLeft().lat();
|
||||||
max[0] = br.second.lon();
|
|
||||||
max[1] = br.second.lat();
|
|
||||||
|
|
||||||
_tree.Search(min, max, cb, &set);
|
_tree.Search(min, max, cb, &set);
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ AlbersEqual::AlbersEqual(const Ellipsoid *ellipsoid, double standardParallel1,
|
|||||||
_rho0 = (_C < nq0) ? 0 : _a_over_n * sqrt(_C - nq0);
|
_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 dlam;
|
||||||
double sin_lat;
|
double sin_lat;
|
||||||
@ -139,11 +139,11 @@ QPointF AlbersEqual::ll2xy(const Coordinates &c) const
|
|||||||
rho = (_C < nq) ? 0 : _a_over_n * sqrt(_C - nq);
|
rho = (_C < nq) ? 0 : _a_over_n * sqrt(_C - nq);
|
||||||
theta = _n * dlam;
|
theta = _n * dlam;
|
||||||
|
|
||||||
return QPointF(rho * sin(theta) + _falseEasting,
|
return PointD(rho * sin(theta) + _falseEasting,
|
||||||
_rho0 - rho * cos(theta) + _falseNorthing);
|
_rho0 - rho * cos(theta) + _falseNorthing);
|
||||||
}
|
}
|
||||||
|
|
||||||
Coordinates AlbersEqual::xy2ll(const QPointF &p) const
|
Coordinates AlbersEqual::xy2ll(const PointD &p) const
|
||||||
{
|
{
|
||||||
double dy, dx;
|
double dy, dx;
|
||||||
double rho0_minus_dy;
|
double rho0_minus_dy;
|
||||||
|
@ -14,8 +14,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new AlbersEqual(*this);}
|
virtual CT *clone() const {return new AlbersEqual(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _latitudeOrigin;
|
double _latitudeOrigin;
|
||||||
|
@ -75,8 +75,9 @@ void Atlas::computeBounds()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _maps.count(); i++)
|
for (int i = 0; i < _maps.count(); i++)
|
||||||
_bounds.append(QPair<QRectF, QRectF>(QRectF(TL(_maps.at(i)),
|
_bounds.append(QPair<QRectF, QRectF>(QRectF(TL(_maps.at(i)).toPointF(),
|
||||||
BR(_maps.at(i))), QRectF(offsets.at(i), _maps.at(i)->bounds().size())));
|
BR(_maps.at(i)).toPointF()), QRectF(offsets.at(i),
|
||||||
|
_maps.at(i)->bounds().size())));
|
||||||
}
|
}
|
||||||
|
|
||||||
Atlas::Atlas(const QString &fileName, QObject *parent)
|
Atlas::Atlas(const QString &fileName, QObject *parent)
|
||||||
@ -166,7 +167,8 @@ qreal Atlas::resolution(const QRectF &rect) const
|
|||||||
int idx = _zooms.at(_zoom).first;
|
int idx = _zooms.at(_zoom).first;
|
||||||
|
|
||||||
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
|
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;
|
idx = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -187,7 +189,8 @@ int Atlas::zoomFit(const QSize &size, const RectC &br)
|
|||||||
|
|
||||||
for (int z = 0; z < _zooms.count(); z++) {
|
for (int z = 0; z < _zooms.count(); z++) {
|
||||||
for (int i = _zooms.at(z).first; i <= _zooms.at(z).second; i++) {
|
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;
|
continue;
|
||||||
|
|
||||||
QRect sbr = QRectF(_maps.at(i)->ll2xy(br.topLeft()),
|
QRect sbr = QRectF(_maps.at(i)->ll2xy(br.topLeft()),
|
||||||
@ -226,11 +229,11 @@ QPointF Atlas::ll2xy(const Coordinates &c)
|
|||||||
QPointF pp;
|
QPointF pp;
|
||||||
|
|
||||||
if (_mapIndex >= 0)
|
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)) {
|
if (_mapIndex < 0 || !_bounds.at(_mapIndex).first.contains(pp)) {
|
||||||
_mapIndex = _zooms.at(_zoom).first;
|
_mapIndex = _zooms.at(_zoom).first;
|
||||||
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
|
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)) {
|
if (_bounds.at(i).first.contains(pp)) {
|
||||||
_mapIndex = i;
|
_mapIndex = i;
|
||||||
break;
|
break;
|
||||||
@ -247,7 +250,7 @@ Coordinates Atlas::xy2ll(const QPointF &p)
|
|||||||
int idx = _zooms.at(_zoom).first;
|
int idx = _zooms.at(_zoom).first;
|
||||||
|
|
||||||
for (int i = _zooms.at(_zoom).first; i <= _zooms.at(_zoom).second; i++) {
|
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;
|
idx = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef CT_H
|
#ifndef CT_H
|
||||||
#define CT_H
|
#define CT_H
|
||||||
|
|
||||||
#include <QPointF>
|
|
||||||
#include "common/coordinates.h"
|
#include "common/coordinates.h"
|
||||||
|
#include "pointd.h"
|
||||||
|
|
||||||
class CT {
|
class CT {
|
||||||
public:
|
public:
|
||||||
@ -10,8 +10,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const = 0;
|
virtual CT *clone() const = 0;
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const = 0;
|
virtual PointD ll2xy(const Coordinates &c) const = 0;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const = 0;
|
virtual Coordinates xy2ll(const PointD &p) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CT_H
|
#endif // CT_H
|
||||||
|
@ -51,15 +51,15 @@ QRectF EmptyMap::bounds() const
|
|||||||
return QRectF(ll2xy(Coordinates(-180, 85)), ll2xy(Coordinates(180, -85)));
|
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;
|
_zoom = ZOOM_MAX;
|
||||||
else {
|
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());
|
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;
|
return _zoom;
|
||||||
|
@ -16,7 +16,7 @@ public:
|
|||||||
qreal resolution(const QRectF &rect) const;
|
qreal resolution(const QRectF &rect) const;
|
||||||
|
|
||||||
int zoom() const {return _zoom;}
|
int zoom() const {return _zoom;}
|
||||||
int zoomFit(const QSize &size, const RectC &br);
|
int zoomFit(const QSize &size, const RectC &rect);
|
||||||
int zoomIn();
|
int zoomIn();
|
||||||
int zoomOut();
|
int zoomOut();
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ bool GeoTIFF::readIFD(TIFFFile &file, quint32 &offset, Ctx &ctx) const
|
|||||||
return true;
|
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))
|
if (!file.seek(offset))
|
||||||
return false;
|
return false;
|
||||||
@ -155,7 +155,7 @@ bool GeoTIFF::readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
|
|||||||
QList<ReferencePoint> &points) const
|
QList<ReferencePoint> &points) const
|
||||||
{
|
{
|
||||||
double z, pz;
|
double z, pz;
|
||||||
QPointF xy, pp;
|
PointD xy, pp;
|
||||||
|
|
||||||
if (!file.seek(offset))
|
if (!file.seek(offset))
|
||||||
return false;
|
return false;
|
||||||
@ -175,10 +175,7 @@ bool GeoTIFF::readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
|
|||||||
if (!file.readValue(pz))
|
if (!file.readValue(pz))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
ReferencePoint p;
|
points.append(ReferencePoint(xy, pp));
|
||||||
p.xy = xy.toPoint();
|
|
||||||
p.pp = pp;
|
|
||||||
points.append(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -450,7 +447,7 @@ GeoTIFF::GeoTIFF(const QString &path)
|
|||||||
{
|
{
|
||||||
quint32 ifd;
|
quint32 ifd;
|
||||||
QList<ReferencePoint> points;
|
QList<ReferencePoint> points;
|
||||||
QPointF scale;
|
PointD scale;
|
||||||
QMap<quint16, Value> kv;
|
QMap<quint16, Value> kv;
|
||||||
Ctx ctx;
|
Ctx ctx;
|
||||||
TIFFFile file;
|
TIFFFile file;
|
||||||
@ -519,12 +516,12 @@ GeoTIFF::GeoTIFF(const QString &path)
|
|||||||
else if (ctx.tiepointCount > 1)
|
else if (ctx.tiepointCount > 1)
|
||||||
_transform = Transform(points);
|
_transform = Transform(points);
|
||||||
else if (ctx.matrix) {
|
else if (ctx.matrix) {
|
||||||
double m[16];
|
double matrix[16];
|
||||||
if (!readMatrix(file, ctx.matrix, m)) {
|
if (!readMatrix(file, ctx.matrix, matrix)) {
|
||||||
_errorString = "Error reading transformation matrix";
|
_errorString = "Error reading transformation matrix";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_transform = Transform(m);
|
_transform = Transform(matrix);
|
||||||
} else {
|
} else {
|
||||||
_errorString = "Incomplete/missing model transformation info";
|
_errorString = "Incomplete/missing model transformation info";
|
||||||
return;
|
return;
|
||||||
|
@ -40,7 +40,7 @@ private:
|
|||||||
|
|
||||||
bool readEntry(TIFFFile &file, Ctx &ctx) const;
|
bool readEntry(TIFFFile &file, Ctx &ctx) const;
|
||||||
bool readIFD(TIFFFile &file, quint32 &offset, 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,
|
bool readTiepoints(TIFFFile &file, quint32 offset, quint32 count,
|
||||||
QList<ReferencePoint> &points) const;
|
QList<ReferencePoint> &points) const;
|
||||||
bool readMatrix(TIFFFile &file, quint32 offset, double matrix[16]) const;
|
bool readMatrix(TIFFFile &file, quint32 offset, double matrix[16]) const;
|
||||||
|
@ -31,7 +31,7 @@ LambertAzimuthal::LambertAzimuthal(const Ellipsoid *ellipsoid,
|
|||||||
_D = _a * (cos(lat0) / sqrt(1.0 - _es2 * sin2(lat0))) / (_Rq * cos(_beta0));
|
_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 lon = deg2rad(c.lon());
|
||||||
double lat = deg2rad(c.lat());
|
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))
|
double y = _falseNorthing + (B / _D) * ((cos(_beta0) * sin(beta))
|
||||||
- (sin(_beta0) * cos(beta) * cos(lon - _lon0)));
|
- (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 es4 = _es2 * _es2;
|
||||||
double es6 = _es2 * es4;
|
double es6 = _es2 * es4;
|
||||||
|
@ -13,8 +13,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new LambertAzimuthal(*this);}
|
virtual CT *clone() const {return new LambertAzimuthal(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _lon0;
|
double _lon0;
|
||||||
|
@ -93,7 +93,7 @@ LambertConic1::LambertConic1(const Ellipsoid *ellipsoid, double latitudeOrigin,
|
|||||||
_rho_olat = _rho0;
|
_rho_olat = _rho0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointF LambertConic1::ll2xy(const Coordinates &c) const
|
PointD LambertConic1::ll2xy(const Coordinates &c) const
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
double rho;
|
double rho;
|
||||||
@ -117,11 +117,11 @@ QPointF LambertConic1::ll2xy(const Coordinates &c) const
|
|||||||
|
|
||||||
theta = _n * dlam;
|
theta = _n * dlam;
|
||||||
|
|
||||||
return QPointF(rho * sin(theta) + _falseEasting, _rho_olat - rho
|
return PointD(rho * sin(theta) + _falseEasting, _rho_olat - rho
|
||||||
* cos(theta) + _falseNorthing);
|
* cos(theta) + _falseNorthing);
|
||||||
}
|
}
|
||||||
|
|
||||||
Coordinates LambertConic1::xy2ll(const QPointF &p) const
|
Coordinates LambertConic1::xy2ll(const PointD &p) const
|
||||||
{
|
{
|
||||||
double dx;
|
double dx;
|
||||||
double dy;
|
double dy;
|
||||||
@ -266,12 +266,12 @@ LambertConic2::LambertConic2(const Ellipsoid *ellipsoid,
|
|||||||
falseEasting, falseNorthing);
|
falseEasting, falseNorthing);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointF LambertConic2::ll2xy(const Coordinates &c) const
|
PointD LambertConic2::ll2xy(const Coordinates &c) const
|
||||||
{
|
{
|
||||||
return _lc1.ll2xy(c);
|
return _lc1.ll2xy(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
Coordinates LambertConic2::xy2ll(const QPointF &p) const
|
Coordinates LambertConic2::xy2ll(const PointD &p) const
|
||||||
{
|
{
|
||||||
return _lc1.xy2ll(p);
|
return _lc1.xy2ll(p);
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new LambertConic1(*this);}
|
virtual CT *clone() const {return new LambertConic1(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _longitudeOrigin;
|
double _longitudeOrigin;
|
||||||
@ -40,8 +40,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new LambertConic2(*this);}
|
virtual CT *clone() const {return new LambertConic2(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LambertConic1 _lc1;
|
LambertConic1 _lc1;
|
||||||
|
@ -11,9 +11,9 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new LatLon(*this);}
|
virtual CT *clone() const {return new LatLon(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const
|
virtual PointD ll2xy(const Coordinates &c) const
|
||||||
{return QPointF(_au.fromDegrees(c.lon()), _au.fromDegrees(c.lat()));}
|
{return PointD(_au.fromDegrees(c.lon()), _au.fromDegrees(c.lat()));}
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const
|
virtual Coordinates xy2ll(const PointD &p) const
|
||||||
{return Coordinates(_au.toDegrees(p.x()), _au.toDegrees(p.y()));}
|
{return Coordinates(_au.toDegrees(p.x()), _au.toDegrees(p.y()));}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QPointF>
|
#include "pointd.h"
|
||||||
|
|
||||||
class LinearUnits
|
class LinearUnits
|
||||||
{
|
{
|
||||||
@ -15,11 +15,11 @@ public:
|
|||||||
bool isValid() const {return !std::isnan(_f);}
|
bool isValid() const {return !std::isnan(_f);}
|
||||||
|
|
||||||
double toMeters(double val) const {return val * _f;}
|
double toMeters(double val) const {return val * _f;}
|
||||||
QPointF toMeters(const QPointF &p) const
|
PointD toMeters(const PointD &p) const
|
||||||
{return QPointF(p.x() * _f, p.y() * _f);}
|
{return PointD(p.x() * _f, p.y() * _f);}
|
||||||
double fromMeters(double val) const {return val / _f;}
|
double fromMeters(double val) const {return val / _f;}
|
||||||
QPointF fromMeters(const QPointF &p) const
|
PointD fromMeters(const PointD &p) const
|
||||||
{return QPointF(p.x() / _f, p.y() /_f);}
|
{return PointD(p.x() / _f, p.y() /_f);}
|
||||||
|
|
||||||
friend bool operator==(const LinearUnits &lu1, const LinearUnits &lu2);
|
friend bool operator==(const LinearUnits &lu1, const LinearUnits &lu2);
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
virtual qreal resolution(const QRectF &rect) const = 0;
|
virtual qreal resolution(const QRectF &rect) const = 0;
|
||||||
|
|
||||||
virtual int zoom() 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 zoomIn() = 0;
|
||||||
virtual int zoomOut() = 0;
|
virtual int zoomOut() = 0;
|
||||||
|
|
||||||
|
@ -54,13 +54,13 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
|
|||||||
int latd = list.at(6).trimmed().toInt(&res);
|
int latd = list.at(6).trimmed().toInt(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
ll = false;
|
ll = false;
|
||||||
qreal latm = list.at(7).trimmed().toFloat(&res);
|
double latm = list.at(7).trimmed().toDouble(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
ll = false;
|
ll = false;
|
||||||
int lond = list.at(9).trimmed().toInt(&res);
|
int lond = list.at(9).trimmed().toInt(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
ll = false;
|
ll = false;
|
||||||
qreal lonm = list.at(10).trimmed().toFloat(&res);
|
double lonm = list.at(10).trimmed().toDouble(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
ll = false;
|
ll = false;
|
||||||
if (ll && list.at(8).trimmed() == "S") {
|
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);
|
p.zone = list.at(13).trimmed().toInt(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
p.zone = 0;
|
p.zone = 0;
|
||||||
qreal ppx = list.at(14).trimmed().toFloat(&res);
|
double ppx = list.at(14).trimmed().toDouble(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
pp = false;
|
pp = false;
|
||||||
qreal ppy = list.at(15).trimmed().toFloat(&res);
|
double ppy = list.at(15).trimmed().toDouble(&res);
|
||||||
if (!res)
|
if (!res)
|
||||||
pp = false;
|
pp = false;
|
||||||
if (list.at(16).trimmed() == "S")
|
if (list.at(16).trimmed() == "S")
|
||||||
p.zone = -p.zone;
|
p.zone = -p.zone;
|
||||||
|
|
||||||
p.rp.xy = QPoint(x, y);
|
p.rp.setXY(PointD(x, y));
|
||||||
if (ll) {
|
if (ll) {
|
||||||
p.ll = Coordinates(lond + lonm/60.0, latd + latm/60.0);
|
p.ll = Coordinates(lond + lonm/60.0, latd + latm/60.0);
|
||||||
if (p.ll.isValid())
|
if (p.ll.isValid())
|
||||||
@ -92,7 +92,7 @@ int MapFile::parse(QIODevice &device, QList<CalibrationPoint> &points,
|
|||||||
else
|
else
|
||||||
return ln;
|
return ln;
|
||||||
} else if (pp) {
|
} else if (pp) {
|
||||||
p.rp.pp = QPointF(ppx, ppy);
|
p.rp.setPP(PointD(ppx, ppy));
|
||||||
points.append(p);
|
points.append(p);
|
||||||
} else
|
} else
|
||||||
return ln;
|
return ln;
|
||||||
@ -238,8 +238,8 @@ bool MapFile::computeTransformation(QList<CalibrationPoint> &points)
|
|||||||
QList<ReferencePoint> rp;
|
QList<ReferencePoint> rp;
|
||||||
|
|
||||||
for (int i = 0; i < points.size(); i++) {
|
for (int i = 0; i < points.size(); i++) {
|
||||||
if (points.at(i).rp.pp.isNull())
|
if (points.at(i).rp.pp().isNull())
|
||||||
points[i].rp.pp = _projection.ll2xy(points.at(i).ll);
|
points[i].rp.setPP(_projection.ll2xy(points.at(i).ll));
|
||||||
|
|
||||||
rp.append(points.at(i).rp);
|
rp.append(points.at(i).rp);
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
#include "common/wgs84.h"
|
#include "common/wgs84.h"
|
||||||
#include "mercator.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);
|
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),
|
return Coordinates(rad2deg(p.x() / WGS84_RADIUS),
|
||||||
rad2deg(2 * atan(exp(p.y() / WGS84_RADIUS)) - M_PI/2));
|
rad2deg(2 * atan(exp(p.y() / WGS84_RADIUS)) - M_PI/2));
|
||||||
|
@ -8,8 +8,8 @@ class Mercator : public CT
|
|||||||
public:
|
public:
|
||||||
virtual CT *clone() const {return new Mercator(*this);}
|
virtual CT *clone() const {return new Mercator(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MERCATOR_H
|
#endif // MERCATOR_H
|
||||||
|
@ -41,11 +41,11 @@ public:
|
|||||||
bool isValid() const {return _valid;}
|
bool isValid() const {return _valid;}
|
||||||
QString errorString() const {return _errorString;}
|
QString errorString() const {return _errorString;}
|
||||||
|
|
||||||
QPointF ll2pp(const Coordinates &c) const
|
PointD ll2pp(const Coordinates &c) const
|
||||||
{return _projection.ll2xy(c);}
|
{return _projection.ll2xy(c);}
|
||||||
QPointF xy2pp(const QPointF &p) const
|
PointD xy2pp(const QPointF &p) const
|
||||||
{return _transform.img2proj(p);}
|
{return _transform.img2proj(p);}
|
||||||
QPointF pp2xy(const QPointF &p) const
|
QPointF pp2xy(const PointD &p) const
|
||||||
{return _transform.proj2img(p);}
|
{return _transform.proj2img(p);}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -42,8 +42,8 @@ static int scale2zoom(qreal scale)
|
|||||||
|
|
||||||
OnlineMap::OnlineMap(const QString &name, const QString &url,
|
OnlineMap::OnlineMap(const QString &name, const QString &url,
|
||||||
const Range &zooms, const RectC &bounds, QObject *parent) :
|
const Range &zooms, const RectC &bounds, QObject *parent) :
|
||||||
Map(parent), _name(name), _zooms(zooms), _bounds(bounds),
|
Map(parent), _name(name), _zooms(zooms), _bounds(bounds), _block(false),
|
||||||
_block(false), _valid(false)
|
_valid(false)
|
||||||
{
|
{
|
||||||
QString dir(TILES_DIR + "/" + _name);
|
QString dir(TILES_DIR + "/" + _name);
|
||||||
|
|
||||||
@ -90,15 +90,14 @@ int OnlineMap::limitZoom(int zoom) const
|
|||||||
return zoom;
|
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();
|
_zoom = _zooms.max();
|
||||||
else {
|
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());
|
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;
|
return _zoom;
|
||||||
|
@ -20,7 +20,7 @@ public:
|
|||||||
qreal resolution(const QRectF &rect) const;
|
qreal resolution(const QRectF &rect) const;
|
||||||
|
|
||||||
int zoom() const {return _zoom;}
|
int zoom() const {return _zoom;}
|
||||||
int zoomFit(const QSize &size, const RectC &br);
|
int zoomFit(const QSize &size, const RectC &rect);
|
||||||
int zoomIn();
|
int zoomIn();
|
||||||
int zoomOut();
|
int zoomOut();
|
||||||
|
|
||||||
|
36
src/map/pointd.h
Normal 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
|
@ -103,13 +103,13 @@ Projection &Projection::operator=(const Projection &p)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPointF Projection::ll2xy(const Coordinates &c) const
|
PointD Projection::ll2xy(const Coordinates &c) const
|
||||||
{
|
{
|
||||||
return isValid()
|
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()
|
return isValid()
|
||||||
? _gcs->toWGS84(_ct->xy2ll(_units.toMeters(p))) : Coordinates();
|
? _gcs->toWGS84(_ct->xy2ll(_units.toMeters(p))) : Coordinates();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef PROJECTION_H
|
#ifndef PROJECTION_H
|
||||||
#define PROJECTION_H
|
#define PROJECTION_H
|
||||||
|
|
||||||
#include <QPointF>
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "common/coordinates.h"
|
#include "common/coordinates.h"
|
||||||
|
#include "pointd.h"
|
||||||
#include "linearunits.h"
|
#include "linearunits.h"
|
||||||
#include "coordinatesystem.h"
|
#include "coordinatesystem.h"
|
||||||
|
|
||||||
@ -83,8 +83,8 @@ public:
|
|||||||
bool isValid() const {return !(_gcs == 0 || _ct == 0 || _units.isNull());}
|
bool isValid() const {return !(_gcs == 0 || _ct == 0 || _units.isNull());}
|
||||||
bool isGeographic() const {return _geographic;}
|
bool isGeographic() const {return _geographic;}
|
||||||
|
|
||||||
QPointF ll2xy(const Coordinates &c) const;
|
PointD ll2xy(const Coordinates &c) const;
|
||||||
Coordinates xy2ll(const QPointF &p) const;
|
Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
const LinearUnits &units() const {return _units;}
|
const LinearUnits &units() const {return _units;}
|
||||||
const CoordinateSystem &coordinateSystem() const {return _cs;}
|
const CoordinateSystem &coordinateSystem() const {return _cs;}
|
||||||
|
@ -5,21 +5,17 @@
|
|||||||
|
|
||||||
#define NULL_QTRANSFORM 0,0,0,0,0,0,0,0,0
|
#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()
|
if (p1.xy().x() == p2.xy().x() || p1.xy().y() == p2.xy().y()) {
|
||||||
|| points.at(0).xy.y() == points.at(1).xy.y()) {
|
|
||||||
_errorString = "Invalid reference points tuple";
|
_errorString = "Invalid reference points tuple";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal sX, sY, dX, dY;
|
double sX = (p1.xy().x() - p2.xy().x()) / (p1.pp().x() - p2.pp().x());
|
||||||
sX = (points.at(0).xy.x() - points.at(1).xy.x())
|
double sY = (p2.xy().y() - p1.xy().y()) / (p2.pp().y() - p1.pp().y());
|
||||||
/ (points.at(0).pp.x() - points.at(1).pp.x());
|
double dX = p2.xy().x() - p2.pp().x() * sX;
|
||||||
sY = (points.at(1).xy.y() - points.at(0).xy.y())
|
double dY = p1.xy().y() - p1.pp().y() * sY;
|
||||||
/ (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;
|
|
||||||
|
|
||||||
_proj2img = QTransform(sX, 0, 0, sY, dX, dY);
|
_proj2img = QTransform(sX, 0, 0, sY, dX, dY);
|
||||||
_img2proj = _proj2img.inverted();
|
_img2proj = _proj2img.inverted();
|
||||||
@ -34,11 +30,11 @@ void Transform::affine(const QList<ReferencePoint> &points)
|
|||||||
for (int k = 0; k < points.size(); k++) {
|
for (int k = 0; k < points.size(); k++) {
|
||||||
double f[3], t[2];
|
double f[3], t[2];
|
||||||
|
|
||||||
f[0] = points.at(k).pp.x();
|
f[0] = points.at(k).pp().x();
|
||||||
f[1] = points.at(k).pp.y();
|
f[1] = points.at(k).pp().y();
|
||||||
f[2] = 1.0;
|
f[2] = 1.0;
|
||||||
t[0] = points.at(k).xy.x();
|
t[0] = points.at(k).xy().x();
|
||||||
t[1] = points.at(k).xy.y();
|
t[1] = points.at(k).xy().y();
|
||||||
c.m(i,j) += f[i] * t[j];
|
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++) {
|
for (int qi = 0; qi < points.size(); qi++) {
|
||||||
double v[3];
|
double v[3];
|
||||||
|
|
||||||
v[0] = points.at(qi).pp.x();
|
v[0] = points.at(qi).pp().x();
|
||||||
v[1] = points.at(qi).pp.y();
|
v[1] = points.at(qi).pp().y();
|
||||||
v[2] = 1.0;
|
v[2] = 1.0;
|
||||||
for (size_t i = 0; i < Q.h(); i++)
|
for (size_t i = 0; i < Q.h(); i++)
|
||||||
for (size_t j = 0; j < Q.w(); j++)
|
for (size_t j = 0; j < Q.w(); j++)
|
||||||
@ -75,16 +71,23 @@ Transform::Transform()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Transform::Transform(const QList<ReferencePoint> &points)
|
Transform::Transform(const QList<ReferencePoint> &points)
|
||||||
|
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
|
||||||
{
|
{
|
||||||
if (points.count() < 2)
|
if (points.count() < 2)
|
||||||
_errorString = "Insufficient number of reference points";
|
_errorString = "Insufficient number of reference points";
|
||||||
else if (points.size() == 2)
|
else if (points.size() == 2)
|
||||||
simple(points);
|
simple(points.at(0), points.at(1));
|
||||||
else
|
else
|
||||||
affine(points);
|
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)
|
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
|
||||||
{
|
{
|
||||||
if (scale.x() == 0.0 || scale.y() == 0.0) {
|
if (scale.x() == 0.0 || scale.y() == 0.0) {
|
||||||
@ -92,15 +95,16 @@ Transform::Transform(const ReferencePoint &p, const QPointF &scale)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_img2proj = QTransform(scale.x(), 0, 0, -scale.y(), p.pp.x() - p.xy.x()
|
_img2proj = QTransform(scale.x(), 0, 0, -scale.y(), p.pp().x() - p.xy().x()
|
||||||
/ scale.x(), p.pp.y() + p.xy.x() / scale.y());
|
/ scale.x(), p.pp().y() + p.xy().x() / scale.y());
|
||||||
_proj2img = _img2proj.inverted();
|
_proj2img = _img2proj.inverted();
|
||||||
}
|
}
|
||||||
|
|
||||||
Transform::Transform(double m[16])
|
Transform::Transform(double matrix[16])
|
||||||
: _proj2img(NULL_QTRANSFORM), _img2proj(NULL_QTRANSFORM)
|
: _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())
|
if (!_img2proj.isInvertible())
|
||||||
_errorString = "Singular transformation matrix";
|
_errorString = "Singular transformation matrix";
|
||||||
else
|
else
|
||||||
@ -110,7 +114,7 @@ Transform::Transform(double m[16])
|
|||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
QDebug operator<<(QDebug dbg, const ReferencePoint &p)
|
QDebug operator<<(QDebug dbg, const ReferencePoint &p)
|
||||||
{
|
{
|
||||||
dbg.nospace() << "ReferencePoint(" << p.xy << ", " << p.pp << ")";
|
dbg.nospace() << "ReferencePoint(" << p.xy() << ", " << p.pp() << ")";
|
||||||
return dbg.space();
|
return dbg.space();
|
||||||
}
|
}
|
||||||
#endif // QT_NO_DEBUG
|
#endif // QT_NO_DEBUG
|
||||||
|
@ -4,10 +4,21 @@
|
|||||||
#include <QTransform>
|
#include <QTransform>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include "pointd.h"
|
||||||
|
|
||||||
struct ReferencePoint {
|
class ReferencePoint
|
||||||
QPoint xy;
|
{
|
||||||
QPointF pp;
|
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
|
class Transform
|
||||||
@ -15,18 +26,21 @@ class Transform
|
|||||||
public:
|
public:
|
||||||
Transform();
|
Transform();
|
||||||
Transform(const QList<ReferencePoint> &points);
|
Transform(const QList<ReferencePoint> &points);
|
||||||
Transform(const ReferencePoint &p, const QPointF &scale);
|
Transform(const ReferencePoint &p1, const ReferencePoint &p2);
|
||||||
Transform(double m[16]);
|
Transform(const ReferencePoint &p, const PointD &scale);
|
||||||
|
Transform(double matrix[16]);
|
||||||
|
|
||||||
QPointF proj2img(const QPointF &p) const {return _proj2img.map(p);}
|
QPointF proj2img(const PointD &p) const
|
||||||
QPointF img2proj(const QPointF &p) const {return _img2proj.map(p);}
|
{return _proj2img.map(p.toPointF());}
|
||||||
|
PointD img2proj(const QPointF &p) const
|
||||||
|
{return _img2proj.map(p);}
|
||||||
|
|
||||||
bool isValid() const
|
bool isValid() const
|
||||||
{return _proj2img.isInvertible() && _img2proj.isInvertible();}
|
{return _proj2img.isInvertible() && _img2proj.isInvertible();}
|
||||||
const QString &errorString() const {return _errorString;}
|
const QString &errorString() const {return _errorString;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void simple(const QList<ReferencePoint> &points);
|
void simple(const ReferencePoint &p1, const ReferencePoint &p2);
|
||||||
void affine(const QList<ReferencePoint> &points);
|
void affine(const QList<ReferencePoint> &points);
|
||||||
|
|
||||||
QTransform _proj2img, _img2proj;
|
QTransform _proj2img, _img2proj;
|
||||||
|
@ -93,7 +93,7 @@ TransverseMercator::TransverseMercator(const Ellipsoid *ellipsoid,
|
|||||||
_ep = 315.e0 * _a * (tn4 - tn5) / 512.e0;
|
_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 rl;
|
||||||
double cl, c2, c3, c5, c7;
|
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)
|
x = _falseEasting + dlam * t6 + pow(dlam, 3.e0) * t7 + pow(dlam, 5.e0)
|
||||||
* t8 + pow(dlam, 7.e0) * t9;
|
* 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 cl;
|
||||||
double de;
|
double de;
|
||||||
|
@ -14,8 +14,8 @@ public:
|
|||||||
|
|
||||||
virtual CT *clone() const {return new TransverseMercator(*this);}
|
virtual CT *clone() const {return new TransverseMercator(*this);}
|
||||||
|
|
||||||
virtual QPointF ll2xy(const Coordinates &c) const;
|
virtual PointD ll2xy(const Coordinates &c) const;
|
||||||
virtual Coordinates xy2ll(const QPointF &p) const;
|
virtual Coordinates xy2ll(const PointD &p) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double _longitudeOrigin;
|
double _longitudeOrigin;
|
||||||
|
@ -63,7 +63,7 @@ QString WMS::style(QXmlStreamReader &reader)
|
|||||||
|
|
||||||
RectC WMS::geographicBoundingBox(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()) {
|
while (reader.readNextStartElement()) {
|
||||||
if (reader.name() == "westBoundLongitude")
|
if (reader.name() == "westBoundLongitude")
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define CAPABILITIES_FILE "capabilities.xml"
|
#define CAPABILITIES_FILE "capabilities.xml"
|
||||||
#define TILE_SIZE 256
|
#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);
|
return scaleDenominator * 0.28e-3 * _projection.units().fromMeters(1.0);
|
||||||
}
|
}
|
||||||
@ -48,9 +48,9 @@ void WMSMap::computeZooms(const RangeF &scaleDenominator)
|
|||||||
_zooms.clear();
|
_zooms.clear();
|
||||||
|
|
||||||
if (scaleDenominator.size() > 0) {
|
if (scaleDenominator.size() > 0) {
|
||||||
qreal ld = log2(scaleDenominator.max()) - log2(scaleDenominator.min());
|
double ld = log2(scaleDenominator.max()) - log2(scaleDenominator.min());
|
||||||
int cld = ceil(ld);
|
int cld = ceil(ld);
|
||||||
qreal step = ld / (qreal)cld;
|
double step = ld / (qreal)cld;
|
||||||
qreal lmax = log2(scaleDenominator.max());
|
qreal lmax = log2(scaleDenominator.max());
|
||||||
for (int i = 0; i <= cld; i++)
|
for (int i = 0; i <= cld; i++)
|
||||||
_zooms.append(pow(2.0, lmax - i * step));
|
_zooms.append(pow(2.0, lmax - i * step));
|
||||||
@ -60,22 +60,17 @@ void WMSMap::computeZooms(const RangeF &scaleDenominator)
|
|||||||
|
|
||||||
void WMSMap::updateTransform()
|
void WMSMap::updateTransform()
|
||||||
{
|
{
|
||||||
qreal scaleDenominator = _zooms.at(_zoom);
|
double pixelSpan = sd2res(_zooms.at(_zoom));
|
||||||
ReferencePoint tl, br;
|
|
||||||
|
|
||||||
qreal pixelSpan = sd2res(scaleDenominator);
|
|
||||||
if (_projection.isGeographic())
|
if (_projection.isGeographic())
|
||||||
pixelSpan /= deg2rad(WGS84_RADIUS);
|
pixelSpan /= deg2rad(WGS84_RADIUS);
|
||||||
|
double sx = (_br.x() - _tl.x()) / pixelSpan;
|
||||||
|
double sy = (_tl.y() - _br.y()) / pixelSpan;
|
||||||
|
|
||||||
tl.xy = QPoint(0, 0);
|
ReferencePoint tl(PointD(0, 0), _tl);
|
||||||
tl.pp = _boundingBox.topLeft();
|
ReferencePoint br(PointD(sx, sy), _br);
|
||||||
br.xy = QPoint(_boundingBox.width() / pixelSpan, -_boundingBox.height()
|
_transform = Transform(tl, br);
|
||||||
/ pixelSpan);
|
|
||||||
br.pp = _boundingBox.bottomRight();
|
|
||||||
|
|
||||||
QList<ReferencePoint> points;
|
_bounds = QRectF(QPointF(0, 0), QSizeF(sx, sy));
|
||||||
points << tl << br;
|
|
||||||
_transform = Transform(points);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool WMSMap::loadWMS()
|
bool WMSMap::loadWMS()
|
||||||
@ -89,10 +84,8 @@ bool WMSMap::loadWMS()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_projection = wms.projection();
|
_projection = wms.projection();
|
||||||
RectC bb = wms.boundingBox().normalized();
|
_tl = _projection.ll2xy(wms.boundingBox().topLeft());
|
||||||
_boundingBox = QRectF(_projection.ll2xy(Coordinates(bb.topLeft().lon(),
|
_br = _projection.ll2xy(wms.boundingBox().bottomRight());
|
||||||
bb.bottomRight().lat())), _projection.ll2xy(Coordinates(
|
|
||||||
bb.bottomRight().lon(), bb.topLeft().lat())));
|
|
||||||
_tileLoader = TileLoader(tileUrl(wms.version()), tilesDir(),
|
_tileLoader = TileLoader(tileUrl(wms.version()), tilesDir(),
|
||||||
_setup.authorization());
|
_setup.authorization());
|
||||||
|
|
||||||
@ -148,17 +141,6 @@ void WMSMap::emitLoaded()
|
|||||||
emit loaded();
|
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
|
qreal WMSMap::resolution(const QRectF &rect) const
|
||||||
{
|
{
|
||||||
Coordinates tl = xy2ll((rect.topLeft()));
|
Coordinates tl = xy2ll((rect.topLeft()));
|
||||||
@ -170,13 +152,14 @@ qreal WMSMap::resolution(const QRectF &rect) const
|
|||||||
return ds/ps;
|
return ds/ps;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WMSMap::zoomFit(const QSize &size, const RectC &br)
|
int WMSMap::zoomFit(const QSize &size, const RectC &rect)
|
||||||
{
|
{
|
||||||
if (br.isValid()) {
|
if (rect.isValid()) {
|
||||||
QRectF tbr(_projection.ll2xy(br.topLeft()),
|
PointD tl(_projection.ll2xy(rect.topLeft()));
|
||||||
_projection.ll2xy(br.bottomRight()));
|
PointD br(_projection.ll2xy(rect.bottomRight()));
|
||||||
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
|
PointD sc((br.x() - tl.x()) / size.width(), (tl.y() - br.y())
|
||||||
qreal resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
|
/ size.height());
|
||||||
|
double resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
|
||||||
if (_projection.isGeographic())
|
if (_projection.isGeographic())
|
||||||
resolution *= deg2rad(WGS84_RADIUS);
|
resolution *= deg2rad(WGS84_RADIUS);
|
||||||
|
|
||||||
@ -227,13 +210,13 @@ void WMSMap::draw(QPainter *painter, const QRectF &rect)
|
|||||||
QList<Tile> tiles;
|
QList<Tile> tiles;
|
||||||
for (int i = tl.x(); i < br.x(); i++) {
|
for (int i = tl.x(); i < br.x(); i++) {
|
||||||
for (int j = tl.y(); j < br.y(); j++) {
|
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)));
|
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)));
|
- 1, j * TILE_SIZE + TILE_SIZE - 1)));
|
||||||
QRectF bbox = (_cs.axisOrder() == CoordinateSystem::YX)
|
QRectF bbox = (_cs.axisOrder() == CoordinateSystem::YX)
|
||||||
? QRectF(QPointF(tbr.y(), tbr.x()), QPointF(ttl.y(), ttl.x()))
|
? 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));
|
tiles.append(Tile(QPoint(i, j), _zoom, bbox));
|
||||||
}
|
}
|
||||||
|
@ -17,11 +17,11 @@ public:
|
|||||||
|
|
||||||
const QString &name() const {return _name;}
|
const QString &name() const {return _name;}
|
||||||
|
|
||||||
QRectF bounds() const;
|
QRectF bounds() const {return _bounds;}
|
||||||
qreal resolution(const QRectF &rect) const;
|
qreal resolution(const QRectF &rect) const;
|
||||||
|
|
||||||
int zoom() const {return _zoom;}
|
int zoom() const {return _zoom;}
|
||||||
int zoomFit(const QSize &size, const RectC &br);
|
int zoomFit(const QSize &size, const RectC &rect);
|
||||||
int zoomIn();
|
int zoomIn();
|
||||||
int zoomOut();
|
int zoomOut();
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString tileUrl(const QString &version) const;
|
QString tileUrl(const QString &version) const;
|
||||||
qreal sd2res(qreal scaleDenominator) const;
|
double sd2res(double scaleDenominator) const;
|
||||||
QString tilesDir() const;
|
QString tilesDir() const;
|
||||||
void computeZooms(const RangeF &scaleDenominator);
|
void computeZooms(const RangeF &scaleDenominator);
|
||||||
void updateTransform();
|
void updateTransform();
|
||||||
@ -62,8 +62,9 @@ private:
|
|||||||
Projection _projection;
|
Projection _projection;
|
||||||
Transform _transform;
|
Transform _transform;
|
||||||
CoordinateSystem _cs;
|
CoordinateSystem _cs;
|
||||||
QVector<qreal> _zooms;
|
QVector<double> _zooms;
|
||||||
QRectF _boundingBox;
|
PointD _tl, _br;
|
||||||
|
QRectF _bounds;
|
||||||
int _zoom;
|
int _zoom;
|
||||||
bool _block;
|
bool _block;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
class Zoom
|
class Zoom
|
||||||
{
|
{
|
||||||
public:
|
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) :
|
const QSize &tile, const QSize &matrix, const QRect &limits) :
|
||||||
_id(id), _scaleDenominator(scaleDenominator), _topLeft(topLeft),
|
_id(id), _scaleDenominator(scaleDenominator), _topLeft(topLeft),
|
||||||
_tile(tile), _matrix(matrix), _limits(limits) {}
|
_tile(tile), _matrix(matrix), _limits(limits) {}
|
||||||
@ -62,16 +62,16 @@ public:
|
|||||||
{return _scaleDenominator > other._scaleDenominator;}
|
{return _scaleDenominator > other._scaleDenominator;}
|
||||||
|
|
||||||
const QString &id() const {return _id;}
|
const QString &id() const {return _id;}
|
||||||
qreal scaleDenominator() const {return _scaleDenominator;}
|
double scaleDenominator() const {return _scaleDenominator;}
|
||||||
const QPointF &topLeft() const {return _topLeft;}
|
const PointD &topLeft() const {return _topLeft;}
|
||||||
const QSize &tile() const {return _tile;}
|
const QSize &tile() const {return _tile;}
|
||||||
const QSize &matrix() const {return _matrix;}
|
const QSize &matrix() const {return _matrix;}
|
||||||
const QRect &limits() const {return _limits;}
|
const QRect &limits() const {return _limits;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString _id;
|
QString _id;
|
||||||
qreal _scaleDenominator;
|
double _scaleDenominator;
|
||||||
QPointF _topLeft;
|
PointD _topLeft;
|
||||||
QSize _tile;
|
QSize _tile;
|
||||||
QSize _matrix;
|
QSize _matrix;
|
||||||
QRect _limits;
|
QRect _limits;
|
||||||
@ -94,8 +94,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct TileMatrix {
|
struct TileMatrix {
|
||||||
QString id;
|
QString id;
|
||||||
qreal scaleDenominator;
|
double scaleDenominator;
|
||||||
QPointF topLeft;
|
PointD topLeft;
|
||||||
QSize tile;
|
QSize tile;
|
||||||
QSize matrix;
|
QSize matrix;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ QString WMTSMap::tilesDir() const
|
|||||||
return QString(TILES_DIR + "/" + _name);
|
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);
|
return scaleDenominator * 0.28e-3 * _projection.units().fromMeters(1.0);
|
||||||
}
|
}
|
||||||
@ -70,27 +70,21 @@ qreal WMTSMap::sd2res(qreal scaleDenominator) const
|
|||||||
void WMTSMap::updateTransform()
|
void WMTSMap::updateTransform()
|
||||||
{
|
{
|
||||||
const WMTS::Zoom &z = _zooms.at(_zoom);
|
const WMTS::Zoom &z = _zooms.at(_zoom);
|
||||||
ReferencePoint tl, br;
|
|
||||||
|
|
||||||
QPointF topLeft = (_cs.axisOrder() == CoordinateSystem::YX)
|
PointD topLeft = (_cs.axisOrder() == CoordinateSystem::YX)
|
||||||
? QPointF(z.topLeft().y(), z.topLeft().x()) : z.topLeft();
|
? PointD(z.topLeft().y(), z.topLeft().x()) : z.topLeft();
|
||||||
|
|
||||||
qreal pixelSpan = sd2res(z.scaleDenominator());
|
double pixelSpan = sd2res(z.scaleDenominator());
|
||||||
if (_projection.isGeographic())
|
if (_projection.isGeographic())
|
||||||
pixelSpan /= deg2rad(WGS84_RADIUS);
|
pixelSpan /= deg2rad(WGS84_RADIUS);
|
||||||
QPointF tileSpan(z.tile().width() * pixelSpan, z.tile().height() * pixelSpan);
|
PointD tileSpan(z.tile().width() * pixelSpan, z.tile().height() * pixelSpan);
|
||||||
QPointF bottomRight(topLeft.x() + tileSpan.x() * z.matrix().width(),
|
PointD bottomRight(topLeft.x() + tileSpan.x() * z.matrix().width(),
|
||||||
topLeft.y() - tileSpan.y() * z.matrix().height());
|
topLeft.y() - tileSpan.y() * z.matrix().height());
|
||||||
|
|
||||||
tl.xy = QPoint(0, 0);
|
ReferencePoint tl(PointD(0, 0), topLeft);
|
||||||
tl.pp = topLeft;
|
ReferencePoint br(PointD(z.tile().width() * z.matrix().width(),
|
||||||
br.xy = QPoint(z.tile().width() * z.matrix().width(),
|
z.tile().height() * z.matrix().height()), bottomRight);
|
||||||
z.tile().height() * z.matrix().height());
|
_transform = Transform(tl, br);
|
||||||
br.pp = bottomRight;
|
|
||||||
|
|
||||||
QList<ReferencePoint> points;
|
|
||||||
points << tl << br;
|
|
||||||
_transform = Transform(points);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WMTSMap::load()
|
void WMTSMap::load()
|
||||||
@ -128,13 +122,14 @@ QRectF WMTSMap::bounds() const
|
|||||||
return _bounds.isValid() ? tileBounds.intersected(bounds) : tileBounds;
|
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()) {
|
if (rect.isValid()) {
|
||||||
QRectF tbr(_projection.ll2xy(br.topLeft()),
|
PointD tl(_projection.ll2xy(rect.topLeft()));
|
||||||
_projection.ll2xy(br.bottomRight()));
|
PointD br(_projection.ll2xy(rect.bottomRight()));
|
||||||
QPointF sc(tbr.width() / size.width(), tbr.height() / size.height());
|
PointD sc((br.x() - tl.x()) / size.width(), (tl.y() - br.y())
|
||||||
qreal resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
|
/ size.height());
|
||||||
|
double resolution = qMax(qAbs(sc.x()), qAbs(sc.y()));
|
||||||
if (_projection.isGeographic())
|
if (_projection.isGeographic())
|
||||||
resolution *= deg2rad(WGS84_RADIUS);
|
resolution *= deg2rad(WGS84_RADIUS);
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
qreal resolution(const QRectF &rect) const;
|
qreal resolution(const QRectF &rect) const;
|
||||||
|
|
||||||
int zoom() const {return _zoom;}
|
int zoom() const {return _zoom;}
|
||||||
int zoomFit(const QSize &size, const RectC &br);
|
int zoomFit(const QSize &size, const RectC &rect);
|
||||||
int zoomIn();
|
int zoomIn();
|
||||||
int zoomOut();
|
int zoomOut();
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
bool loadWMTS();
|
bool loadWMTS();
|
||||||
qreal sd2res(qreal scaleDenominator) const;
|
double sd2res(double scaleDenominator) const;
|
||||||
QString tilesDir() const;
|
QString tilesDir() const;
|
||||||
void updateTransform();
|
void updateTransform();
|
||||||
|
|
||||||
|