[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -3,7 +3,7 @@
<service name="tar_git">
<param name="url">https://github.com/Karry/osmscout-sailfish.git</param>
<param name="branch">master</param>
- <param name="revision">59b37c0</param>
+ <param name="revision">v2.22</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
|
Deleted |
_service:tar_git:harbour-osmscout-2.21+master.20220120070525.3.g59b37c00c.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/bus_stop.png
^
|
|
Deleted |
_service:tar_git:harbour-osmscout-2.21+master.20220120070525.3.g59b37c00c.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/hospital.png
^
|
|
Deleted |
_service:tar_git:harbour-osmscout-2.21+master.20220120070525.3.g59b37c00c.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/parking.png
^
|
|
Deleted |
_service:tar_git:harbour-osmscout-2.21+master.20220120070525.3.g59b37c00c.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/pharmacy.png
^
|
|
Deleted |
_service:tar_git:harbour-osmscout-2.21+master.20220120070525.3.g59b37c00c.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/scrub.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/.gitignore
^
|
@@ -91,3 +91,5 @@
# unsaved stylesheets
*.tmp
+# not ready for publishing
+chum-notes.md
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/CMakeLists.txt
^
|
@@ -6,7 +6,7 @@
# Redistribution and use is allowed according to the terms of the BSD license.
cmake_policy(SET CMP0048 NEW)
-project(osmscout-sailfish VERSION 2.21.0 LANGUAGES C CXX)
+project(osmscout-sailfish VERSION 2.22.0 LANGUAGES C CXX)
# ==================================================================================================
# Information to update before to release this package.
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/.github/workflows/build_and test_on_vs2019.yml
^
|
@@ -87,6 +87,9 @@
uses: actions/setup-python@v1
with:
python-version: '3.x'
+ # https://github.com/mesonbuild/meson/issues/9955#issuecomment-1030843844
+ - name: Downgrade pip
+ run: python -m pip install -U pip==21.3.1
- name: Install meson and ninja
run: pip install meson ninja
- name: Prepare MSVC
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX.xcodeproj/project.pbxproj
^
|
@@ -38,16 +38,32 @@
E59C37E726C87A8000C38713 /* OSMScoutMap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E59C37D626C8751500C38713 /* OSMScoutMap.framework */; };
E59C37E926C87A8300C38713 /* OSMScoutMapIOSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E59C37D526C8751500C38713 /* OSMScoutMapIOSX.framework */; };
E59C37EC26C87B8200C38713 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E59C37EB26C87B8200C38713 /* Launch Screen.storyboard */; };
- F50CBE8A15E59EAC00F0B370 /* bus_stop.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8315E59EAC00F0B370 /* bus_stop.png */; };
- F50CBE8B15E59EAC00F0B370 /* cemetery.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8415E59EAC00F0B370 /* cemetery.png */; };
- F50CBE8C15E59EAC00F0B370 /* forest.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8515E59EAC00F0B370 /* forest.png */; };
- F50CBE8D15E59EAC00F0B370 /* hospital.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8615E59EAC00F0B370 /* hospital.png */; };
- F50CBE8E15E59EAC00F0B370 /* parking.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8715E59EAC00F0B370 /* parking.png */; };
- F50CBE8F15E59EAC00F0B370 /* pharmacy.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8815E59EAC00F0B370 /* pharmacy.png */; };
- F50CBE9015E59EAC00F0B370 /* scrub.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8915E59EAC00F0B370 /* scrub.png */; };
+ E5F711EF27A5565700890F3C /* map.osmscout in Resources */ = {isa = PBXBuildFile; fileRef = E5F711EE27A5565700890F3C /* map.osmscout */; };
+ E5F711F027A5565700890F3C /* map.osmscout in Resources */ = {isa = PBXBuildFile; fileRef = E5F711EE27A5565700890F3C /* map.osmscout */; };
+ E5F711F227A5C9B600890F3C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BBE160B880500084E83 /* InfoPlist.strings */; };
+ E5F711F527A5CA2E00890F3C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BC1160B880500084E83 /* main.m */; };
+ E5F711F627A5CA2E00890F3C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BC5160B880500084E83 /* AppDelegate.m */; };
+ E5F711F727A5CA2E00890F3C /* OSMScoutIOSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BCE160B880500084E83 /* OSMScoutIOSViewController.m */; };
+ E5F711F827A5CA2E00890F3C /* OSMScout.mm in Sources */ = {isa = PBXBuildFile; fileRef = E50B856D15E024D400C685B3 /* OSMScout.mm */; };
+ E5F711F927A5CA2E00890F3C /* OSMScoutIOSView.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1C14160D1DFA00084E83 /* OSMScoutIOSView.m */; };
+ E5F711FA27A5CA2E00890F3C /* OSMScoutMKTileOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D6036918875EE000D8242B /* OSMScoutMKTileOverlay.m */; };
+ E5F711FD27A5CA2E00890F3C /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = E501876223CA99800055F4B2 /* libiconv.tbd */; };
+ E5F711FE27A5CA2E00890F3C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5653B611F4EF79900EF6212 /* CoreLocation.framework */; };
+ E5F711FF27A5CA2E00890F3C /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E51A610322C573CA007316F9 /* CoreText.framework */; };
+ E5F7120027A5CA2E00890F3C /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5653B5F1F4EF6B700EF6212 /* MapKit.framework */; };
+ E5F7120127A5CA2E00890F3C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5653B5D1F4EF66E00EF6212 /* UIKit.framework */; };
+ E5F7120327A5CA2E00890F3C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5653B581F4EF59D00EF6212 /* CoreGraphics.framework */; };
+ E5F7120627A5CA2E00890F3C /* OSMScoutIOSViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BD0160B880500084E83 /* OSMScoutIOSViewController_iPhone.xib */; };
+ E5F7120727A5CA2E00890F3C /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BBE160B880500084E83 /* InfoPlist.strings */; };
+ E5F7120827A5CA2E00890F3C /* OSMScoutIOSViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BD3160B880500084E83 /* OSMScoutIOSViewController_iPad.xib */; };
+ E5F7120927A5CA2E00890F3C /* map.osmscout in Resources */ = {isa = PBXBuildFile; fileRef = E5F711EE27A5565700890F3C /* map.osmscout */; };
+ E5F7120A27A5CA2E00890F3C /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E501875723CA77610055F4B2 /* Media.xcassets */; };
+ E5F7120B27A5CA2E00890F3C /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E59C37EB26C87B8200C38713 /* Launch Screen.storyboard */; };
+ E5F7121A27A5CCB200890F3C /* OSMScout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5F7121227A5CB3000890F3C /* OSMScout.framework */; };
+ E5F7121B27A5CCB200890F3C /* OSMScoutMap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5F7121327A5CB3000890F3C /* OSMScoutMap.framework */; };
+ E5F7121C27A5CCB200890F3C /* OSMScoutMapIOSX.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5F7121427A5CB3000890F3C /* OSMScoutMapIOSX.framework */; };
F5D6036A18875EE000D8242B /* OSMScoutMKTileOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D6036918875EE000D8242B /* OSMScoutMKTileOverlay.m */; };
F5D6036B18875EE000D8242B /* OSMScoutMKTileOverlay.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D6036918875EE000D8242B /* OSMScoutMKTileOverlay.m */; };
- F5DD1BC0160B880500084E83 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BBE160B880500084E83 /* InfoPlist.strings */; };
F5DD1BC2160B880500084E83 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BC1160B880500084E83 /* main.m */; };
F5DD1BC6160B880500084E83 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BC5160B880500084E83 /* AppDelegate.m */; };
F5DD1BCF160B880500084E83 /* OSMScoutIOSViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1BCE160B880500084E83 /* OSMScoutIOSViewController.m */; };
@@ -55,13 +71,6 @@
F5DD1BD5160B880500084E83 /* OSMScoutIOSViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F5DD1BD3160B880500084E83 /* OSMScoutIOSViewController_iPad.xib */; };
F5DD1BDA160B88EA00084E83 /* OSMScout.mm in Sources */ = {isa = PBXBuildFile; fileRef = E50B856D15E024D400C685B3 /* OSMScout.mm */; };
F5DD1C15160D1DFA00084E83 /* OSMScoutIOSView.m in Sources */ = {isa = PBXBuildFile; fileRef = F5DD1C14160D1DFA00084E83 /* OSMScoutIOSView.m */; };
- F5DD1C16160D22A500084E83 /* bus_stop.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8315E59EAC00F0B370 /* bus_stop.png */; };
- F5DD1C17160D22A500084E83 /* cemetery.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8415E59EAC00F0B370 /* cemetery.png */; };
- F5DD1C18160D22A500084E83 /* forest.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8515E59EAC00F0B370 /* forest.png */; };
- F5DD1C19160D22A500084E83 /* hospital.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8615E59EAC00F0B370 /* hospital.png */; };
- F5DD1C1A160D22A500084E83 /* parking.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8715E59EAC00F0B370 /* parking.png */; };
- F5DD1C1B160D22A500084E83 /* pharmacy.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8815E59EAC00F0B370 /* pharmacy.png */; };
- F5DD1C1C160D22A500084E83 /* scrub.png in Resources */ = {isa = PBXBuildFile; fileRef = F50CBE8915E59EAC00F0B370 /* scrub.png */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -120,13 +129,13 @@
E59C37DC26C875DB00C38713 /* OSMScout.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OSMScout.framework; path = OSMScoutOSX/Frameworks/OSMScout.framework; sourceTree = "<group>"; };
E59C37DD26C875DB00C38713 /* OSMScoutMap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OSMScoutMap.framework; path = OSMScoutOSX/Frameworks/OSMScoutMap.framework; sourceTree = "<group>"; };
E59C37EB26C87B8200C38713 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = "<group>"; };
- F50CBE8315E59EAC00F0B370 /* bus_stop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bus_stop.png; sourceTree = "<group>"; };
- F50CBE8415E59EAC00F0B370 /* cemetery.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cemetery.png; sourceTree = "<group>"; };
- F50CBE8515E59EAC00F0B370 /* forest.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = forest.png; sourceTree = "<group>"; };
- F50CBE8615E59EAC00F0B370 /* hospital.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = hospital.png; sourceTree = "<group>"; };
- F50CBE8715E59EAC00F0B370 /* parking.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = parking.png; sourceTree = "<group>"; };
- F50CBE8815E59EAC00F0B370 /* pharmacy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pharmacy.png; sourceTree = "<group>"; };
- F50CBE8915E59EAC00F0B370 /* scrub.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = scrub.png; sourceTree = "<group>"; };
+ E5F711EE27A5565700890F3C /* map.osmscout */ = {isa = PBXFileReference; lastKnownFileType = folder; path = map.osmscout; sourceTree = "<group>"; };
+ E5F711F127A57B4B00890F3C /* Readme.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = Readme.md; sourceTree = "<group>"; };
+ E5F7120F27A5CA2E00890F3C /* OSMScoutiOS Simulator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OSMScoutiOS Simulator.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ E5F7121227A5CB3000890F3C /* OSMScout.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OSMScout.framework; path = OSMScoutiOS/Frameworks_simulator/OSMScout.framework; sourceTree = "<group>"; };
+ E5F7121327A5CB3000890F3C /* OSMScoutMap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OSMScoutMap.framework; path = OSMScoutiOS/Frameworks_simulator/OSMScoutMap.framework; sourceTree = "<group>"; };
+ E5F7121427A5CB3000890F3C /* OSMScoutMapIOSX.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OSMScoutMapIOSX.framework; path = OSMScoutiOS/Frameworks_simulator/OSMScoutMapIOSX.framework; sourceTree = "<group>"; };
+ E5F7121D27A6F31100890F3C /* OSMScoutiOS Simulator-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "OSMScoutiOS Simulator-Info.plist"; sourceTree = "<group>"; };
F5D6036818875EE000D8242B /* OSMScoutMKTileOverlay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OSMScoutMKTileOverlay.h; path = OSMScoutOSX/OSMScoutMKTileOverlay.h; sourceTree = "<group>"; };
F5D6036918875EE000D8242B /* OSMScoutMKTileOverlay.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OSMScoutMKTileOverlay.m; path = OSMScoutOSX/OSMScoutMKTileOverlay.m; sourceTree = "<group>"; };
F5DD1BB3160B880400084E83 /* OSMScoutiOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OSMScoutiOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -158,19 +167,35 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ E5F711FB27A5CA2E00890F3C /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E5F7121A27A5CCB200890F3C /* OSMScout.framework in Frameworks */,
+ E5F7121B27A5CCB200890F3C /* OSMScoutMap.framework in Frameworks */,
+ E5F7121C27A5CCB200890F3C /* OSMScoutMapIOSX.framework in Frameworks */,
+ E5F711FD27A5CA2E00890F3C /* libiconv.tbd in Frameworks */,
+ E5F711FE27A5CA2E00890F3C /* CoreLocation.framework in Frameworks */,
+ E5F711FF27A5CA2E00890F3C /* CoreText.framework in Frameworks */,
+ E5F7120027A5CA2E00890F3C /* MapKit.framework in Frameworks */,
+ E5F7120127A5CA2E00890F3C /* UIKit.framework in Frameworks */,
+ E5F7120327A5CA2E00890F3C /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
F5DD1BB0160B880400084E83 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ E59C37E426C87A7C00C38713 /* OSMScout.framework in Frameworks */,
E59C37E726C87A8000C38713 /* OSMScoutMap.framework in Frameworks */,
+ E59C37E926C87A8300C38713 /* OSMScoutMapIOSX.framework in Frameworks */,
E501876323CA99800055F4B2 /* libiconv.tbd in Frameworks */,
E5653B621F4EF79900EF6212 /* CoreLocation.framework in Frameworks */,
E51A610422C57414007316F9 /* CoreText.framework in Frameworks */,
E5653B601F4EF6B700EF6212 /* MapKit.framework in Frameworks */,
E5653B5E1F4EF66E00EF6212 /* UIKit.framework in Frameworks */,
- E59C37E426C87A7C00C38713 /* OSMScout.framework in Frameworks */,
E5653B591F4EF59D00EF6212 /* CoreGraphics.framework in Frameworks */,
- E59C37E926C87A8300C38713 /* OSMScoutMapIOSX.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -180,10 +205,10 @@
E50B831215E0136800C685B3 = {
isa = PBXGroup;
children = (
+ E5F711F127A57B4B00890F3C /* Readme.md */,
F5DD1BD9160B889600084E83 /* Common */,
E50B832715E0136800C685B3 /* OSMScoutOSX */,
F5DD1BBB160B880500084E83 /* OSMScoutiOS */,
- F50CBE7E15E59E7F00F0B370 /* Resources */,
E50B832015E0136800C685B3 /* Frameworks */,
E50B831E15E0136800C685B3 /* Products */,
);
@@ -194,6 +219,7 @@
children = (
E50B831D15E0136800C685B3 /* OSMScoutOSX.app */,
F5DD1BB3160B880400084E83 /* OSMScoutiOS.app */,
+ E5F7120F27A5CA2E00890F3C /* OSMScoutiOS Simulator.app */,
);
name = Products;
sourceTree = "<group>";
@@ -203,6 +229,7 @@
children = (
E501876223CA99800055F4B2 /* libiconv.tbd */,
E5653B5A1F4EF5AA00EF6212 /* iOS frameworks */,
+ E5F7121127A5CA6700890F3C /* iOS simulator frameworks */,
E50B832315E0136800C685B3 /* MacOS Frameworks */,
);
name = Frameworks;
@@ -268,43 +295,22 @@
name = "iOS frameworks";
sourceTree = "<group>";
};
- F50CBE7E15E59E7F00F0B370 /* Resources */ = {
- isa = PBXGroup;
- children = (
- F50CBE8015E59EAC00F0B370 /* icons */,
- );
- name = Resources;
- path = OSMScoutOSX;
- sourceTree = "<group>";
- };
- F50CBE8015E59EAC00F0B370 /* icons */ = {
- isa = PBXGroup;
- children = (
- F50CBE8115E59EAC00F0B370 /* 14x14 */,
- );
- path = icons;
- sourceTree = "<group>";
- };
- F50CBE8115E59EAC00F0B370 /* 14x14 */ = {
+ E5F711ED27A5563700890F3C /* Resources */ = {
isa = PBXGroup;
children = (
- F50CBE8215E59EAC00F0B370 /* standard */,
+ E5F711EE27A5565700890F3C /* map.osmscout */,
);
- path = 14x14;
+ path = Resources;
sourceTree = "<group>";
};
- F50CBE8215E59EAC00F0B370 /* standard */ = {
+ E5F7121127A5CA6700890F3C /* iOS simulator frameworks */ = {
isa = PBXGroup;
children = (
- F50CBE8315E59EAC00F0B370 /* bus_stop.png */,
- F50CBE8415E59EAC00F0B370 /* cemetery.png */,
- F50CBE8515E59EAC00F0B370 /* forest.png */,
- F50CBE8615E59EAC00F0B370 /* hospital.png */,
- F50CBE8715E59EAC00F0B370 /* parking.png */,
- F50CBE8815E59EAC00F0B370 /* pharmacy.png */,
- F50CBE8915E59EAC00F0B370 /* scrub.png */,
+ E5F7121227A5CB3000890F3C /* OSMScout.framework */,
+ E5F7121327A5CB3000890F3C /* OSMScoutMap.framework */,
+ E5F7121427A5CB3000890F3C /* OSMScoutMapIOSX.framework */,
);
- path = standard;
+ name = "iOS simulator frameworks";
sourceTree = "<group>";
};
F5DD1BBB160B880500084E83 /* OSMScoutiOS */ = {
@@ -320,6 +326,7 @@
F5DD1BD3160B880500084E83 /* OSMScoutIOSViewController_iPad.xib */,
E501875723CA77610055F4B2 /* Media.xcassets */,
F5DD1BBC160B880500084E83 /* Supporting Files */,
+ E5F711ED27A5563700890F3C /* Resources */,
);
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX.xcodeproj/project.xcworkspace/xcuserdata/vyskocil.xcuserdatad/UserInterfaceState.xcuserstate
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/AppDelegate.m
^
|
@@ -10,9 +10,7 @@
@implementation AppDelegate
-- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
-{
- // Insert code here to initialize your application
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
@end
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Contents.json
^
|
@@ -1,58 +1,66 @@
{
"images" : [
{
+ "filename" : "Icon_osx16.png",
"idiom" : "mac",
- "size" : "16x16",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "16x16"
},
{
+ "filename" : "Icon_osx32-1.png",
"idiom" : "mac",
- "size" : "16x16",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "16x16"
},
{
+ "filename" : "Icon_osx32.png",
"idiom" : "mac",
- "size" : "32x32",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "32x32"
},
{
+ "filename" : "Icon_osx32@2x.png",
"idiom" : "mac",
- "size" : "32x32",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "32x32"
},
{
+ "filename" : "Icon_osx128.png",
"idiom" : "mac",
- "size" : "128x128",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "128x128"
},
{
+ "filename" : "Icon_osx256-1.png",
"idiom" : "mac",
- "size" : "128x128",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "128x128"
},
{
+ "filename" : "Icon_osx256.png",
"idiom" : "mac",
- "size" : "256x256",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "256x256"
},
{
+ "filename" : "Icon_osx256@2.png",
"idiom" : "mac",
- "size" : "256x256",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "256x256"
},
{
"idiom" : "mac",
- "size" : "512x512",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "512x512"
},
{
"idiom" : "mac",
- "size" : "512x512",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "512x512"
}
],
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
-}
\ No newline at end of file
+}
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx128.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx16.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx256-1.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx256.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx256@2.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx32-1.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx32.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/Media.xcassets/AppIcon.appiconset/Icon_osx32@2x.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/OSMScout.mm
^
|
@@ -47,7 +47,7 @@
drawParameter.SetFontName("GillSans");
drawParameter.SetFontSize(1.0);
std::list<std::string> paths;
- NSString *path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES)[0];
+ NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingString: @"/map.osmscout"];
paths.push_back([path UTF8String]);
NSString *imagePath = [[path stringByAppendingPathComponent: @"icons"] stringByAppendingString:@"/"];
paths.push_back([imagePath UTF8String]);
@@ -84,7 +84,6 @@
mapPainter->DrawMap(*styleConfig, projection, drawParameter, data, paintCG);
}
-
void OSMScoutCpp::abortDrawing(){
if(drawBreaker){
std::cout<<"abortDrawing !"<<std::endl;
@@ -99,7 +98,6 @@
}
}
-
}
@interface OSMScout ()
@@ -125,7 +123,10 @@
-(id)initWithPath:(NSString *)path dpi:(double)dpi {
if((self = [super init])){
_osmScoutCpp = new osmscout::OSMScoutCpp([path UTF8String]);
- _osmScoutCpp->initDraw(dpi);
+ BOOL success = _osmScoutCpp->initDraw(dpi);
+ if (!success) {
+ self = nil;
+ }
}
return self;
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/OSMScoutMKTileOverlay.h
^
|
@@ -26,20 +26,18 @@
NSInteger _zoom;
NSUInteger _x;
NSUInteger _y;
- NSInteger _scaleFactor;
+ CGFloat _contentScaleFactor;
OSMScoutMKTileOperationCB _result;
}
--(id)initWithOsmScout: (OSMScout *)osmScout x:(NSUInteger)x y:(NSUInteger)y zoom:(NSInteger)zoom scaleFactor: (CGFloat)scaleFactor result: (OSMScoutMKTileOperationCB)result ;
+-(id)initWithOsmScout: (OSMScout *)osmScout x:(NSUInteger)x y:(NSUInteger)y zoom:(NSInteger)zoom contentScaleFactor:(CGFloat)contentScaleFactor result:(OSMScoutMKTileOperationCB)result;
@end
-@interface OSMScoutMKTileOverlay : MKTileOverlay {
- NSString *_path;
- OSMScout *_osmScout;
- NSOperationQueue *_drawQueue;
+@interface OSMScoutMKTileOverlay : MKTileOverlay
-}
-@property (retain, nonatomic) NSString *path;
+@property (class, retain, nonatomic) NSString *path;
+@property (class, retain, nonatomic, readonly) OSMScout *osmScout;
+@property (class, retain, nonatomic, readonly) NSOperationQueue *drawQueue;
-(id)initWithURLTemplate: (NSString *)urlTemplate;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/OSMScoutMKTileOverlay.m
^
|
@@ -12,15 +12,15 @@
@implementation OSMScoutMKTileOperation
--(id)initWithOsmScout: (OSMScout *)osmScout x:(NSUInteger)x y:(NSUInteger)y zoom:(NSInteger)zoom scaleFactor: (CGFloat)scaleFactor result: (OSMScoutMKTileOperationCB)result {
- if((self = [super init])){
+-(id)initWithOsmScout: (OSMScout *)osmScout x:(NSUInteger)x y:(NSUInteger)y zoom:(NSInteger)zoom contentScaleFactor:(CGFloat)contentScaleFactor result: (OSMScoutMKTileOperationCB)result {
+ if ((self = [super init])) {
executing = NO;
finished = NO;
_osmScout = osmScout;
_x = x;
_y = y;
_zoom = zoom;
- _scaleFactor = scaleFactor;
+ _contentScaleFactor = contentScaleFactor;
_result = [result copy];
}
return self;
@@ -40,8 +40,7 @@
- (void)start {
// Always check for cancellation before launching the task.
- if ([self isCancelled])
- {
+ if ([self isCancelled]) {
// Must move the operation to the finished state if it is canceled.
[self willChangeValueForKey:@"isFinished"];
finished = YES;
@@ -71,18 +70,14 @@
@try {
#if TARGET_OS_IPHONE
- UIGraphicsBeginImageContextWithOptions(CGSizeMake(kOSMScoutDefaultTileSize, kOSMScoutDefaultTileSize),YES,0);
- CGContextRef cg = UIGraphicsGetCurrentContext();
CGFloat contentScale;
if (@available(iOS 15, *)) {
- contentScale = _scaleFactor;
+ contentScale = _contentScaleFactor;
} else {
- contentScale = UIScreen.mainScreen.scale;
- }
-
- if(contentScale != 1.0){
- CGContextScaleCTM(cg, 1/contentScale, 1/contentScale);
+ contentScale = 1;
}
+ UIGraphicsBeginImageContextWithOptions(CGSizeMake(kOSMScoutDefaultTileSize, kOSMScoutDefaultTileSize), YES, contentScale);
+ CGContextRef cg = UIGraphicsGetCurrentContext();
[_osmScout drawMapTo:cg x:_x y:_y zoom:1<<_zoom width:kOSMScoutDefaultTileSize height:kOSMScoutDefaultTileSize];
UIImage* img = UIGraphicsGetImageFromCurrentImageContext();
NSData *imgData = UIImagePNGRepresentation(img);
@@ -93,7 +88,7 @@
NSGraphicsContext *nsgc = [NSGraphicsContext graphicsContextWithGraphicsPort:bitmapContext flipped:YES];
[NSGraphicsContext setCurrentContext:nsgc];
CGContextRef cg = [nsgc graphicsPort];
- CGAffineTransform flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, kOSMScoutDefaultTileSize*_scaleFactor);
+ CGAffineTransform flipVertical = CGAffineTransformMake(1, 0, 0, -1, 0, kOSMScoutDefaultTileSize);
CGContextConcatCTM(cg, flipVertical);
[_osmScout drawMapTo:cg x:_x y:_y zoom:1<<_zoom width:kOSMScoutDefaultTileSize height:kOSMScoutDefaultTileSize];
CGImageRef cgImage = CGBitmapContextCreateImage(bitmapContext);
@@ -117,23 +112,21 @@
#pragma mark -
@implementation OSMScoutMKTileOverlay
-@synthesize path = _path;
+static NSString* _path;
+static OSMScout* _osmScout;
+static NSOperationQueue *_drawQueue;
--(id)initWithURLTemplate: (NSString *)urlTemplate {
- self = [super initWithURLTemplate:urlTemplate];
- if(self){
- self.tileSize = CGSizeMake(kOSMScoutDefaultTileSize, kOSMScoutDefaultTileSize);
- self.canReplaceMapContent = YES;
- self.minimumZ = 1;
- self.maximumZ = 21;
- self.geometryFlipped = YES;
- }
- return self;
++(NSString *)path {
+ return _path;
}
-- (void)loadTileAtPath:(MKTileOverlayPath)path result:(void (^)(NSData *tileData, NSError *error))result {
- double scale = 1;
- if(!_osmScout && _path){
++(void) setPath:(NSString *)path {
+ _path = [path copy];
+}
+
++(OSMScout *)osmScout {
+ if (_osmScout == nil) {
+ double scale = 1;
NSInteger dpi = 163;
#if TARGET_OS_IPHONE
if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad){
@@ -144,26 +137,36 @@
dpi = 220;
#endif
dpi *= scale;
- _osmScout = [OSMScout OSMScoutWithPath:_path dpi:dpi];
+ _osmScout = [OSMScout OSMScoutWithPath:OSMScoutMKTileOverlay.path dpi:dpi];
+ }
+
+ return _osmScout;
+}
+
++(NSOperationQueue *)drawQueue {
+ if (_drawQueue == nil) {
_drawQueue = [[NSOperationQueue alloc] init];
[_drawQueue setMaxConcurrentOperationCount:1];
}
-
- OSMScoutMKTileOperation *drawOp = [[OSMScoutMKTileOperation alloc] initWithOsmScout: _osmScout x:path.x y:((1<<path.z) - 1)-path.y zoom:path.z scaleFactor:scale result:result];
- NSEnumerator *e = _drawQueue.operations.reverseObjectEnumerator;
- OSMScoutMKTileOperation *i;
- int count=0;
- while((i = [e nextObject])){
- if(!i.isFinished && !i.isCancelled){
- if(count<RENDER_QUEUE_MAX_LEN-1){
- [i addDependency:drawOp];
- } else {
- [i cancel];
- }
- count++;
- }
+ return _drawQueue;
+}
+
+-(id)initWithURLTemplate: (NSString *)urlTemplate {
+ self = [super initWithURLTemplate:urlTemplate];
+ if(self){
+ self.tileSize = CGSizeMake(kOSMScoutDefaultTileSize, kOSMScoutDefaultTileSize);
+ self.canReplaceMapContent = YES;
+ self.minimumZ = 1;
+ self.maximumZ = 21;
+ self.geometryFlipped = YES;
}
- [_drawQueue addOperation:drawOp];
+ return self;
+}
+
+- (void)loadTileAtPath:(MKTileOverlayPath)tilePath result:(void (^)(NSData *tileData, NSError *error))result {
+ NSInteger tileY = ((1<<tilePath.z) - 1) - tilePath.y;
+ OSMScoutMKTileOperation *drawOp = [[OSMScoutMKTileOperation alloc] initWithOsmScout: OSMScoutMKTileOverlay.osmScout x:tilePath.x y:tileY zoom:tilePath.z contentScaleFactor:tilePath.contentScaleFactor result:result];
+ [OSMScoutMKTileOverlay.drawQueue addOperation:drawOp];
}
@end
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/OSMScoutView.m
^
|
@@ -11,12 +11,13 @@
@implementation OSMScoutView
-// This should point to OSM data generated with the OSMScout Import tool
-// If not defined the data would be looked at in the App Document dir
-#define OSMSCOUTDATA @""
+// The OpenStreetMap imported data used to draw the map are provided by the map.osmscout folder
+// in the Resources of the project, by default this is the Greater London from GeoFabrik
+// (https://download.geofabrik.de/europe/great-britain/england/greater-london.html)
+
// The center of the displayed map
-#define LATITUDE 43.694417
-#define LONGITUDE 7.279332
+#define LATITUDE 51.5102
+#define LONGITUDE -0.1024
// The zoom level
#define ZOOM 16
@@ -26,12 +27,8 @@
[self setRegion:MKCoordinateRegionMake(centerCoordinate, span) animated:NO];
self.delegate = self;
OSMScoutMKTileOverlay *overlay = [[OSMScoutMKTileOverlay alloc] initWithURLTemplate: nil];
-#ifdef OSMSCOUTDATA
- overlay.path = OSMSCOUTDATA;
-#else
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- overlay.path = [paths objectAtIndex:0];
-#endif
+ NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingString: @"/map.osmscout"];
+ OSMScoutMKTileOverlay.path = path;
tileOverlay = overlay;
[self insertOverlay:tileOverlay atIndex:0 level:MKOverlayLevelAboveLabels];
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/AppDelegate.m
^
|
@@ -26,31 +26,4 @@
return YES;
}
-- (void)applicationWillResignActive:(UIApplication *)application
-{
- // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application
-{
- // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application
-{
- // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
- // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application
-{
- // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
-}
-
@end
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Base.lproj/OSMScoutIOSViewController_iPhone.xib
^
|
@@ -1,8 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
+ <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
- <deployment defaultVersion="1536" identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
+ <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="OSMScoutIOSViewController">
@@ -14,7 +16,10 @@
<view contentMode="scaleToFill" id="8" customClass="OSMScoutIOSView">
<rect key="frame" x="0.0" y="0.0" width="320" height="548"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <nil key="simulatedStatusBarMetrics"/>
+ <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+ <point key="canvasLocation" x="139" y="82"/>
</view>
</objects>
</document>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Contents.json
^
|
@@ -1,98 +1,115 @@
{
"images" : [
{
+ "filename" : "Icon_40-2.png",
"idiom" : "iphone",
- "size" : "20x20",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "20x20"
},
{
+ "filename" : "Icon_60.png",
"idiom" : "iphone",
- "size" : "20x20",
- "scale" : "3x"
+ "scale" : "3x",
+ "size" : "20x20"
},
{
+ "filename" : "Icon_29@2x.png",
"idiom" : "iphone",
- "size" : "29x29",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "29x29"
},
{
+ "filename" : "Icon_29@3x.png",
"idiom" : "iphone",
- "size" : "29x29",
- "scale" : "3x"
+ "scale" : "3x",
+ "size" : "29x29"
},
{
+ "filename" : "Icon_40@2x.png",
"idiom" : "iphone",
- "size" : "40x40",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "40x40"
},
{
+ "filename" : "Icon_40@3x.png",
"idiom" : "iphone",
- "size" : "40x40",
- "scale" : "3x"
+ "scale" : "3x",
+ "size" : "40x40"
},
{
+ "filename" : "Icon@2x.png",
"idiom" : "iphone",
- "size" : "60x60",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "60x60"
},
{
+ "filename" : "Icon@3x.png",
"idiom" : "iphone",
- "size" : "60x60",
- "scale" : "3x"
+ "scale" : "3x",
+ "size" : "60x60"
},
{
+ "filename" : "Icon_20.png",
"idiom" : "ipad",
- "size" : "20x20",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "20x20"
},
{
+ "filename" : "Icon_40-1.png",
"idiom" : "ipad",
- "size" : "20x20",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "20x20"
},
{
+ "filename" : "Icon_29.png",
"idiom" : "ipad",
- "size" : "29x29",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "29x29"
},
{
+ "filename" : "Icon_29@2x-1.png",
"idiom" : "ipad",
- "size" : "29x29",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "29x29"
},
{
+ "filename" : "Icon_40.png",
"idiom" : "ipad",
- "size" : "40x40",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "40x40"
},
{
+ "filename" : "Icon_40@2x-1.png",
"idiom" : "ipad",
- "size" : "40x40",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "40x40"
},
{
+ "filename" : "Icon_iPad.png",
"idiom" : "ipad",
- "size" : "76x76",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "76x76"
},
{
+ "filename" : "Icon_iPad@2x.png",
"idiom" : "ipad",
- "size" : "76x76",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "76x76"
},
{
+ "filename" : "Icon_iPadPro.png",
"idiom" : "ipad",
- "size" : "83.5x83.5",
- "scale" : "2x"
+ "scale" : "2x",
+ "size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
- "size" : "1024x1024",
- "scale" : "1x"
+ "scale" : "1x",
+ "size" : "1024x1024"
}
],
"info" : {
- "version" : 1,
- "author" : "xcode"
+ "author" : "xcode",
+ "version" : 1
}
-}
\ No newline at end of file
+}
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_20.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_29.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_29@2x-1.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_29@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_29@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40-1.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40-2.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40@2x-1.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_40@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_60.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_iPad.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_iPad@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Media.xcassets/AppIcon.appiconset/Icon_iPadPro.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/OSMScoutIOSView.m
^
|
@@ -11,31 +11,28 @@
@implementation OSMScoutIOSView
-// When targeting the iPhone simulator, OSMSCOUTDATA should point to a folder with the
-// files of a OSMScout database generated with the Import tool and the standard.oss
-// stylesheet file.
-// To test the app on a real device you should copy a OSMScout database files and a OSS
-// stylesheet file to the app sharing directory using the Finder to access the app files
-// (search the iPhone in Locations on Mac OSX >= 11.0 or use iTunes on earlier versions)
-#define OSMSCOUTDATA @"/Users/vyskocil/Documents/OSM/Malta.osmscout"
+// The OpenStreetMap imported data used to draw the map are provided by the map.osmscout folder
+// in the Resources of the project, by default this is the Greater London from GeoFabrik
+// (https://download.geofabrik.de/europe/great-britain/england/greater-london.html)
+
// The center of the displayed map
-#define LATITUDE 35.9449
-#define LONGITUDE 14.3796
+#define LATITUDE 51.5102
+#define LONGITUDE -0.1024
// The zoom level
#define ZOOM 16
-(void)defaults {
+ [self setShowsTraffic:NO];
+ [self setShowsBuildings:NO];
+ [self setShowsPointsOfInterest:NO];
+
CLLocationCoordinate2D centerCoordinate = CLLocationCoordinate2DMake(LATITUDE, LONGITUDE);
MKCoordinateSpan span = MKCoordinateSpanMake(0, 360/pow(2, ZOOM)*self.frame.size.width/256);
[self setRegion:MKCoordinateRegionMake(centerCoordinate, span) animated:NO];
self.delegate = self;
OSMScoutMKTileOverlay *overlay = [[OSMScoutMKTileOverlay alloc] initWithURLTemplate: nil];
-#if TARGET_IPHONE_SIMULATOR
- overlay.path = OSMSCOUTDATA;
-#else
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- overlay.path = [paths objectAtIndex:0];
-#endif
+ NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingString: @"/map.osmscout"];
+ OSMScoutMKTileOverlay.path = path;
tileOverlay = overlay;
[self insertOverlay:tileOverlay atIndex:0 level:MKOverlayLevelAboveLabels];
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/OSMScoutIOSViewController.m
^
|
@@ -14,13 +14,11 @@
@implementation OSMScoutIOSViewController
-- (void)viewDidLoad
-{
+- (void)viewDidLoad {
[super viewDidLoad];
}
-- (void)didReceiveMemoryWarning
-{
+- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/OSMScoutiOS Simulator-Info.plist
^
|
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>OSMScoutiOS</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIcons</key>
+ <dict/>
+ <key>CFBundleIcons~ipad</key>
+ <dict/>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIFileSharingEnabled</key>
+ <true/>
+ <key>UILaunchStoryboardName</key>
+ <string>Launch Screen</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>UISupportedInterfaceOrientations~ipad</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/areaarea.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/areanode.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/arearoute.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/areas.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/areasopt.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/areaway.idx
^
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/bounding.dat
^
|
@@ -0,0 +1 @@
+ÿØFúü69MFF
\ No newline at end of file
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/coverage.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/atm.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/atm@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/atm@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bank.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bank@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bank@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/beach.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/beach@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/beach@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/buddhist.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/buddhist@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/buddhist@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop_small.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop_small@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/bus_stop_small@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cafe.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cafe@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cafe@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/camp.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/camp@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/camp@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cave.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cave@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cave@3x.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cemetery.png
^
|
(renamed from dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/cemetery.png)
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cemetery@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/cemetery@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/christian.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/christian@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/christian@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fastfood.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fastfood@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fastfood@3x.png
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/forest.png
^
|
(renamed from dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutOSX/icons/14x14/standard/forest.png)
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/forest@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/forest@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fuel.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fuel@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/fuel@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/guidepost.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/guidepost@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/guidepost@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hospital.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hospital@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hospital@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hotel.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hotel@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/hotel@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/jewish.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/jewish@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/jewish@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/museum.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/museum@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/museum@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/muslim.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/muslim@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/muslim@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/parking.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/parking@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/parking@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/pharmacy.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/pharmacy@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/pharmacy@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/radar.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/radar@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/radar@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/restaurant.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/restaurant@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/restaurant@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scree.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scree@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scree@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scrub.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scrub@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/scrub@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/shinto.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/shinto@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/shinto@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/subway_entrance.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/subway_entrance@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/subway_entrance@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/town.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/town@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/town@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/viewpoint.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/viewpoint@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/viewpoint@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/waterfall.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/waterfall@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/waterfall@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/wetland.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/wetland@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/wetland@3x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/worship.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/worship@2x.png
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/icons/worship@3x.png
^
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/import.log
^
|
@@ -0,0 +1,7602 @@
++ Dump parameter...
+ Mapfile: ../greater-london.osm.pbf
+ typefile: map.ost
+ Destination directory: .
+ Steps: 1 - 28
+ Router: foot+bicycle+car - 'router'
+ StrictAreas: false
+ ProcessingQueueSize: 8
+ NumericIndexPageSize: 1024
+ RawCoordBlockSize: 60000000
+ RawNodeDataMemoryMaped: false
+ RawWayIndexMemoryMaped: true
+ RawWayDataMemoryMaped: false
+ RawWayIndexCacheSize: 10000
+ RawWayBlockSize: 500000
+ SortObjects: true
+ SortBlockSize: 40000000
+ CoordDataMemoryMaped: false
+ CoordIndexCacheSize: 1000000
+ CoordBlockSize: 250000
+ AreaDataMemoryMaped: false
+ AreaDataCacheSize: 0
+ WayDataMemoryMaped: false
+ WayDataCacheSize: 0
+ AreaNodeGridMag: 14
+ AreaNodeSimpleListLimit: 500
+ AreaNodeTileListLimit: 100
+ AreaNodeTileListCoordLimit: 1000
+ AreaNodeBitmapMaxMag: 20
+ AreaNodeBitmapLimit: 20
+ RouteNodeBlockSize: 500000
+ MaxAdminLevel: 10
+ Eco: false
++ Loading type config...
+ Number of types: 478
+ Number of node types: 220 1 byte(s)
+ Number of way types: 90 1 byte(s)
+ Number of area types: 269 2 byte(s)
+ Parsed language(s) :
+ default
+ Parsed alt language(s) :
++ Step #1 - TypeDataGenerator...
+ Module description: Dump *.ost information into data file
+ Module provides file 'types.dat'
+ - Generate types.dat...
+ Number of types: 478
+ => 0.001s
++ Step #2 - Preprocess...
+ Module description: Initial parsing of import file(s)
+ Module provides file 'bounding.dat'
+ Module provides temporary file 'distribution.dat'
+ Module provides temporary file 'rawcoords.dat'
+ Module provides temporary file 'rawnodes.dat'
+ Module provides temporary file 'rawways.dat'
+ Module provides temporary file 'rawrels.dat'
+ Module provides temporary file 'rawcoastline.dat'
+ Module provides temporary file 'rawdatapolygon.dat'
+ Module provides temporary file 'rawturnrestr.dat'
+ Module provides temporary file 'rawroutemaster.dat'
+ Module provides temporary file 'rawroute.dat'
+ Using 8 block worker threads with queue size of 8
+ - Parsing *.osm.pbf file '../greater-london.osm.pbf'...
+ Feature 'OsmSchema-V0.6'
+ Feature 'DenseNodes'
+ Start reading nodes
+ Start reading ways
+ WW Way 2876749 "Lamb's Conduit Street" - Unknown surface type 'brick' !
+ WW Way 3993338 "Grant Way" - Should be way but is area (highway_service)
+ WW Way 4006321 - Should be way but is area (highway_service)
+ WW Way 4020011 "Garratt Lane" - No oneway, but turn:lanes tag is set
+ WW Way 4256528 "Embankment Place" - Unknown surface type 'brick' !
+ WW Way 4258107 "Strutton Ground" - Unknown surface type 'bricks' !
+ WW Way 4259629 "New Palace Yard" - Should be way but is area (highway_service)
+ WW Way 4408045 "High Street" - Unknown surface type 'bricks' !
+ WW Way 4408048 "High Street" - Unknown surface type 'bricks' !
+ WW Way 4776112 - Should be way but is area (highway_service)
+ WW Way 4830161 - Should be way but is area (highway_service)
+ WW Way 5172957 - Should be way but is area (highway_service)
+ WW Way 5182530 - Should be way but is area (highway_service)
+ WW Way 4874240 - Should be way but is area (highway_service)
+ WW Way 5215364 - Should be way but is area (highway_service)
+ WW Way 5372139 - Should be way but is area (highway_service)
+ WW Way 5372248 - Should be way but is area (highway_service)
+ WW Way 5373005 - Should be way but is area (highway_service)
+ WW Way 5373567 "Southgate Road" - Should be way but is area (highway_service)
+ WW Way 5374597 - Should be way but is area (highway_service)
+ WW Way 5562016 - Should be way but is area (highway_service)
+ WW Way 5562974 - Should be way but is area (highway_service)
+ WW Way 5718033 "Wapping High Street" - Unknown surface type 'unhewn_cobblestone' !
+ WW Way 8133666 - Should be way but is area (highway_service)
+ WW Way 8173112 - Should be way but is area (highway_service)
+ WW Way 7954850 - Should be way but is area (highway_service)
+ WW Way 7979369 - Should be way but is area (highway_service)
+ WW Way 7998240 - Should be way but is area (highway_service)
+ WW Way 10484670 - Should be way but is area (highway_service)
+ WW Way 10604409 - Should be way but is area (highway_service)
+ WW Way 9348937 - Unknown surface type 'paved:gravel' !
+ WW Way 10605399 - Should be way but is area (highway_service)
+ WW Way 10781184 - Should be way but is area (highway_service)
+ WW Way 10874179 - Should be way but is area (highway_service)
+ WW Way 10054378 - Should be way but is area (highway_service)
+ WW Way 10068364 - Should be way but is area (highway_service)
+ WW Way 10132845 - Should be way but is area (highway_service)
+ WW Way 11549791 - Should be way but is area (highway_service)
+ WW Way 11849696 - Should be way but is area (highway_service)
+ WW Way 12704451 - Should be way but is area (highway_service)
+ WW Way 13853832 - Should be way but is area (highway_service)
+ WW Way 13868585 - Should be area but is way (boundary_political)
+ WW Way 13869316 - Should be way but is area (highway_service)
+ WW Way 18658325 "Wandle Bank" - Unknown surface type 'hardcore' !
+ WW Way 19797445 - Should be way but is area (highway_service)
+ WW Way 22753552 - Should be area but is way (boundary_political)
+ WW Way 22754344 - Should be way but is area (highway_service)
+ WW Way 20064481 - Should be way but is area (highway_service)
+ WW Way 23000187 "Montague Close" - Unknown surface type 'unhewn_cobblestone' !
+ WW Way 23023275 - Should be way but is area (highway_service)
+ WW Way 23059206 - Should be way but is area (highway_service)
+ WW Way 23061772 - Should be way but is area (highway_service)
+ WW Way 23062475 - Should be way but is area (highway_service)
+ WW Way 22677151 - Should be way but is area (highway_service)
+ WW Way 22715779 - Unknown surface type 'ramp' !
+ WW Way 23089030 - Should be way but is area (highway_service)
+ WW Way 23142091 - Should be way but is area (highway_service)
+ WW Way 23181002 "Heaven Tree Close" - Unknown surface type 'brick' !
+ WW Way 23197919 "Scarba Walk" - Unknown surface type 'brick' !
+ WW Way 23256167 - Should be area but is way (boundary_political)
+ WW Way 23269122 - Should be way but is area (highway_service)
+ WW Way 23286277 "Brancroft Way" - Should be way but is area (highway_service)
+ WW Way 23287275 - Should be way but is area (highway_service)
+ WW Way 23518128 - Should be way but is area (highway_service)
+ WW Way 23614039 - Should be way but is area (highway_service)
+ WW Way 24002733 - Should be way but is area (highway_service)
+ WW Way 24058552 - Should be way but is area (highway_service)
+ WW Way 24224348 - Unknown surface type 'tarmac' !
+ WW Way 24224349 - Unknown surface type 'grit' !
+ WW Way 24224351 - Unknown surface type 'grit' !
+ WW Way 24384858 - Should be way but is area (highway_service)
+ WW Way 24497932 "St. Davids Square" - Should be way but is area (highway_service)
+ WW Way 24539504 - Should be way but is area (highway_service)
+ WW Way 24540507 - Should be way but is area (highway_service)
+ WW Way 24540513 - Should be way but is area (highway_service)
+ WW Way 25818556 - Layer tag value '-0.5' is not numeric!
+ WW Way 24982183 - Should be way but is area (highway_service)
+ WW Way 25842317 - Should be way but is area (highway_service)
+ WW Way 25409586 "Fishponds Road" - lanes tag value '1.5' is not numeric!
+ WW Way 26514409 - Should be way but is area (highway_service)
+ WW Way 26644302 "Strutton Ground" - Unknown surface type 'bricks' !
+ WW Way 26716302 "Staplefield Close" - Should be way but is area (highway_service)
+ WW Way 26815664 "Cambridge Terrace Mews" - Should be way but is area (highway_service)
+ WW Way 27236821 - Unknown surface type 'unhewn_cobblestone' !
+ WW Way 27342326 - Should be way but is area (highway_service)
+ WW Way 27416528 - Should be way but is area (highway_service)
+ WW Way 29163690 "Yew Walk" - Unknown surface type 'bricks' !
+ WW Way 29648153 - Should be way but is area (highway_service)
+ WW Way 27890717 - Should be way but is area (highway_service)
+ WW Way 30060848 - Should be area but is way (sport_climbing)
+ WW Way 30073399 "Old Royal Free Place" - Unknown surface type 'brick' !
+ WW Way 30079693 - Should be way but is area (highway_service)
+ WW Way 30079876 - Should be way but is area (highway_service)
+ WW Way 30119840 - Should be way but is area (highway_service)
+ WW Way 28055218 - Should be way but is area (highway_service)
+ WW Way 28460201 - Unknown surface type 'anti-slip' !
+ WW Way 28460203 - Unknown surface type 'anti-slip' !
+ WW Way 30450611 - Should be way but is area (highway_service)
+ WW Way 30477237 "Lister Mews" - Should be way but is area (highway_service)
+ WW Way 30694596 - Should be way but is area (highway_service)
+ WW Way 33819640 - Unknown surface type 'slabs' !
+ WW Way 31864684 "Lilliput Road" - Unknown surface type 'brick' !
+ WW Way 34035709 - Should be way but is area (highway_service)
+ WW Way 34196733 "Shaftesbury Circle" - Should be way but is area (highway_service)
+ WW Way 34227504 - Should be way but is area (highway_service)
+ WW Way 37760023 - Should be way but is area (highway_service)
+ WW Way 31065470 - Should be way but is area (highway_service)
+ WW Way 37804501 "Daling Way" - Unknown surface type 'tarmac' !
+ WW Way 37809056 - Should be way but is area (highway_service)
+ WW Way 37828411 - Should be way but is area (highway_service)
+ WW Way 37879916 - Unknown surface type 'brick_weave' !
+ WW Way 37937971 - Should be way but is area (highway_service)
+ WW Way 37938372 - Should be way but is area (highway_service)
+ WW Way 38087693 "FP183" - Unknown surface type 'slabs' !
+ WW Way 38088414 "FP181" - Unknown surface type 'slabs' !
+ WW Way 35164221 "Berry's Hill" - lanes tag value '1.5' is not numeric!
+ WW Way 35213387 "Speedbird Way" - Should be way but is area (highway_service)
+ WW Way 38240761 "Baskerville Gardens" - Should be way but is area (highway_service)
+ WW Way 31120027 "Villiers Street" - Unknown surface type 'brick' !
+ WW Way 38249219 - Should be way but is area (highway_service)
+ WW Way 35434992 - Unknown surface type 'slabs' !
+ WW Way 35434995 - Unknown surface type 'slabs' !
+ WW Way 42003210 - Should be way but is area (highway_service)
+ WW Way 35435900 - Unknown surface type 'slabs' !
+ WW Way 35448958 - Unknown surface type 'tarmac' !
+ WW Way 38382961 "High Street" - Unknown surface type 'yes' !
+ WW Way 35485676 - Should be way but is area (highway_service)
+ WW Way 35543936 - Should be area but is way (landuse_residential)
+ WW Way 35646008 - Should be way but is area (highway_service)
+ WW Way 38500506 - Unknown surface type 'slabs' !
+ WW Way 39000867 - Should be way but is area (highway_service)
+ WW Way 35958766 - Should be way but is area (highway_service)
+ WW Way 32814340 - Should be way but is area (highway_service)
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/intersections.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/intersections.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/location.idx
^
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/map.ost
^
|
@@ -0,0 +1,2670 @@
+OST
+
+/*
+ Types:
+ A type can be support for any of the following types:
+ * NODE
+ * WAY: Ways automatically get assigned the following features: Layer
+ * AREA
+ * RELATION
+
+ Meaning of the different OPTIONS:
+ PATH[[FOOT] [BICYLCE] [CAR]]:
+ This way or area is a traversable path and possibly routable for the given vehicles.
+
+ See: http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access-Restrictions
+
+ If something is a path, the following features are automatically assigned:
+ * Width
+ * Grade
+ * Bridge
+ * Tunnel
+ * Roundabout
+ If something is routable, the following features are automatically assigned:
+ * Access
+ * MaxSpeed
+ OPTIMIZE_LOW_ZOOM:
+ Optimize this area or way for displaying in low zoom by
+ reducing visible complexity
+ PIN_WAY:
+ This is a way, even if the path is closed
+ MULTIPOLYGON:
+ Type should be handled as multipolygon even if type is not set to multipolygon.
+ ROUTE_MASTER:
+ Type should be handled as route master relation (public transport schema)..
+ ROUTE:
+ Type should be handled as route relation.
+ ADMIN_REGION:
+ The given area or node describes an administrate region
+ that should be part of the region tree for the city/street
+ index
+ POI:
+ The given area, way or node is a POI and should be indexed
+ by its name in relation to the enclosing region. If something is a POI and has the
+ feature "Name"
+ It automatically get the following features assigned:
+ * Location
+ * Address
+ * Website
+ * Phone
+ ADDRESS:
+ Objects should be indexed as address
+ It automatically get the following features assigned:
+ * Location
+ * Address
+ LOCATION:
+ The given way or area should be indexed as location.
+ MERGE_AREAS:
+ Areas of this type that "touch" each other and the same attribute values
+ will get merged.
+ IGNORESEALAND:
+ Ignore this type for calculation of land masses (because objects of this type can
+ occur on sea, too, and thus have no distinguishing character).
+ IGNORE:
+ Ignore objects of this type
+*/
+
+/*
+ List of max speeds aliases. Normally value for the tag "maxspeed" should always
+ have a numeric value and the source of the speed limit should be placed into
+ the value of the tag "source:maxspeed" containing an alias name.
+ In some country this is not (only) the case, the alias is also sometimes
+ placed into "maxspeed" itself. This table helps to resolve these aliases
+ to numeric values again.
+
+ https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed
+ https://wiki.openstreetmap.org/wiki/Speed_limits
+*/
+MAX SPEEDS
+ SPEED "CZ:urban" = 50 km/h
+ SPEED "CZ:rural" = 90 km/h
+ SPEED "CZ:motorway" = 130 km/h
+
+ SPEED "DE:living_street" = 10 km/h
+ SPEED "DE:urban" = 50 km/h
+ SPEED "DE:rural" = 100 km/h
+
+ SPEED "FR:walk" = 6 km/h
+ SPEED "FR:urban" = 50 km/h
+ SPEED "FR:rural" = 90 km/h
+ SPEED "FR:motorway" = 130 km/h
+
+ SPEED "SK:urban" = 50 km/h
+ SPEED "SK:rural" = 90 km/h
+ SPEED "SK:motorway" = 130 km/h
+
+ SPEED "IT:urban" = 50 km/h
+ SPEED "IT:rural" = 90 km/h
+ SPEED "IT:trunk" = 110 km/h
+ SPEED "IT:motorway" = 130 km/h
+
+ SPEED "RU:living_street" = 20 km/h
+ SPEED "RU:urban" = 60 km/h
+ SPEED "RU:rural" = 90 km/h
+ SPEED "RU:motorway" = 110 km/h
+
+/*
+ Allows you to map surface descriptions to a grade value ([1-5]).
+ Grade 1 ist very well, grade 5 is very bad.
+*/
+GRADES
+ SURFACE GRADE 1 {
+ "paved"
+ "asphalt"
+ "cobblestone"
+ "cobblestone:flattened"
+ "concrete"
+ "concrete:lanes"
+ "concrete:plates"
+ "paving_stones"
+ "paving_stones:20"
+ "paving_stones:30"
+ "sett"
+ "tarred"
+ "tartan"
+ "iron"
+ }
+
+ SURFACE GRADE 2 {
+ "ash"
+ "clay"
+ "compacted"
+ "compacted_gravel"
+ "fine_gravel"
+ "gravel"
+ "gravel;grass"
+ "grass_paver"
+ "metal"
+ "pebblestone"
+ "stone"
+ "wood"
+ "marble"
+ "panel"
+ }
+
+ SURFACE GRADE 3 {
+ "unpaved"
+ "dirt"
+ "dirt/sand"
+ "earth"
+ "grass"
+ "grass;earth"
+ "ground"
+ "mud"
+ "sand"
+ "soil"
+ "woodchips"
+ }
+
+ SURFACE GRADE 4 {
+ "artificial_turf"
+ "bark_mulch"
+ "stones"
+ "rock"
+ "rocks"
+ }
+
+FEATURES
+ FEATURE Address
+ DESC
+ en: "Address"
+ de: "Adresse"
+
+ FEATURE AdminLevel
+ DESC
+ en: "administrative level"
+ de: "Administrative Hierachie"
+
+ FEATURE Destination
+ DESC
+ en: "destination"
+ de: "Ziel"
+
+ FEATURE Name
+ DESC
+ en: "object name"
+ de: "Objektname"
+
+ FEATURE NameAlt
+ DESC
+ en: "object name"
+ de: "Objektname"
+
+ FEATURE Width
+ DESC
+ en: "width"
+ de: "Breite"
+
+TYPES
+
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/nodes.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/ptroutes.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/route.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/router.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/router2.dat
^
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/standard.oss
^
|
@@ -0,0 +1,1624 @@
+OSS
+ ORDER WAYS
+ GROUP _route
+ GROUP highway_motorway, highway_motorway_trunk, highway_motorway_primary
+ GROUP highway_trunk
+ GROUP highway_primary
+ GROUP highway_secondary
+ GROUP highway_tertiary
+ GROUP highway_motorway_link, highway_trunk_link, highway_primary_link, highway_secondary_link, highway_tertiary_link
+ GROUP highway_unclassified, highway_road, highway_residential
+ GROUP railway_rail,
+ aeroway_runway, aeroway_taxiway
+ GROUP highway_living_street, highway_service, highway_bus_guideway,
+ railway_tram, railway_light_rail, railway_subway, public_transport_platform
+ GROUP highway_track, highway_pedestrian, highway_path, highway_cycleway,
+ highway_footway, highway_bridleway, highway_construction,
+ leisure_track,
+ waterway_stream, route_ferry
+ GROUP highway_steps, barrier_fence
+ GROUP waterway_river, waterway_canal, waterway_drain
+ GROUP elevation_contour_major, elevation_contour_medium, elevation_contour_minor
+
+CONST
+ //COLOR red = #ff0000;
+
+ // Label priorities
+ UINT labelPrioContinent = 1;
+ UINT labelPrioIsland = 1;
+ UINT labelPrioCountry = 2;
+ UINT labelPrioState = 3;
+ UINT labelPrioRegion = 4;
+ UINT labelPrioCounty = 5;
+ UINT labelPrioMillionCity = 6;
+ UINT labelPrioBigCity = 7;
+ UINT labelPrioCity = 8;
+ UINT labelPrioTown = 9;
+ UINT labelPrioVillage = 10;
+ UINT labelPrioHamlet = 11;
+ UINT labelPrioSuburb = 12;
+ UINT labelPrioLocality = 13;
+
+ UINT labelPrioNatural = 20;
+ UINT labelPrioLanduse = 25;
+ UINT labelPrioLeisure = 26;
+
+ UINT labelPrioPeak = 29;
+
+ UINT labelPrioHighwayServices = 34;
+ UINT labelPrioRailwayStation = 35;
+
+ UINT labelPrioSpecialBuilding = 37;
+ UINT labelPrioMajorBuilding = 38;
+
+ UINT labelPrioRailwayHalt = 40;
+ UINT labelPrioTramHalt = 40;
+
+ UINT labelPrioHighwayArea = 43;
+
+ UINT labelPrioAmenity = 45;
+ UINT labelPrioShop = 50;
+
+ UINT labelPrioHighwayJunction = 55;
+
+ UINT labelPrioBuilding = 100;
+
+ // Ground tiles
+
+ COLOR waterColor = #9acffd;
+ COLOR landColor = #f1eee9;
+ COLOR unknownColor = #c4dff6;
+
+ COLOR coastColor = lighten(@waterColor,0.5);
+
+ COLOR blackColor = #000000;
+
+ // Landuse, water
+ COLOR allotmentsColor = #c8b084;
+ COLOR beachColor = #fefab8;
+ COLOR brownFieldColor = #ebd7fe;
+ COLOR cemeteryColor = #a9caae;
+ COLOR commercialColor = #efc8c8;
+ COLOR constructionColor = #9d9d6c;
+ COLOR farmColor = #ead8bd;
+ COLOR farmyardColor = #dcbe92;
+ COLOR fellColor = #f9f9f9;
+ COLOR glacierColor = #ddecec;
+ COLOR grassColor = #cfeca8;
+ COLOR greenFieldColor = #dcdcc8;
+ COLOR heathColor = #d6d99f;
+ COLOR industrialColor = #dfd1d6;
+ COLOR landFillColor = #b6b591;
+ COLOR militaryColor = #fe989822;
+ COLOR quarryColor = #b3b3b3;
+ COLOR recreationColor = #bce2ca;
+ COLOR residentialColor = #dcdcdc;
+ COLOR retailColor = #feeaea;
+ COLOR scrubColor = #b5e2b5;
+ COLOR vineyardColor = #b3e2a8;
+ COLOR wetlandColor = #bdd8d8;
+ COLOR woodColor = #aed1a0;
+ COLOR rockColor = #cccccc;
+
+ // Symbols
+ COLOR railwaySymbolColor = #7885b0;
+ COLOR busSymbolColor = #4bb2da;
+ COLOR fuelSymbolColor = #4bb2da;
+ COLOR onewayArrowColor = #00000050;
+ COLOR peakSymbolColor = #9c5e29;
+ COLOR mountainPassSymbolColor = #9c5e29;
+ COLOR hospitalSymbolColor = #da0092;
+ COLOR pharmacySymbolColor = #da0092;
+
+ COLOR peakLabelColor = #9c5329;
+ COLOR mountainPassLabelColor = #9c5329;
+ COLOR cliffColor = #440000;
+
+ COLOR guidepostLabelColor = #9c5329;
+
+ // Ways
+ COLOR bridgeColor = #000000; // black
+
+ COLOR motorwayColor = #ffff88; // yellow
+ COLOR motorwayBColor = #ff8600; // orange
+ COLOR trunkColor = #f9b29c;
+ COLOR primaryColor = #fcd6a4;
+ COLOR secondaryColor = #f7fabf;
+ COLOR tertiaryColor = #ffffff;
+ COLOR roadColor = #ffffff;
+ COLOR roadBColor = #bfbfbf;
+ COLOR livingStreetColor = #ededed;
+
+ // Amenity
+ COLOR postColor = #ffcc00;
+ COLOR buildingColor = #bcbcbc;
+
+ // Man made
+ COLOR historicCityWallsColor= #994444;
+
+ // Contour
+ COLOR minorContourColor = #558855;
+ COLOR mediumContourColor = #447744;
+ COLOR majorContourColor = #446644;
+
+ COLOR countryBorderColor = #9f6bff99;
+
+SYMBOL debug_oneway_arrow
+ POLYGON 0,1.2 2.4,0 0,-1.2 0,-0.4 -1.5,-0.4 -1.5,0.4 0,0.4 {
+ AREA { color: @onewayArrowColor; }
+ }
+ RECTANGLE -6.5,0 12.5 x 0.2 {
+ AREA { color: @onewayArrowColor; }
+ }
+
+SYMBOL oneway_arrow
+ POLYGON 0,0.6 1.2,0 0,-0.6 0,-0.2 -0.75,-0.2 -0.75,0.2 0,0.2 {
+ AREA { color: @onewayArrowColor; }
+ }
+
+SYMBOL natural_peak
+ POLYGON -0.75,0 0.75,0 0.0,-1.5 {
+ AREA { color: @peakSymbolColor; }
+ }
+
+SYMBOL mountain_pass
+ POLYGON 0,0 0,-1.2 0.6,-0.3 1.2,-1.2 1.2,0 {
+ AREA { color: @mountainPassSymbolColor; }
+ }
+
+SYMBOL cliff
+ POLYGON 0,0 1,0 0.5,1.5 {
+ AREA { color: @cliffColor; }
+ }
+
+SYMBOL border
+ RECTANGLE 0,0.45 0.1 x 1 {
+ AREA { color: #000000; }
+ }
+ RECTANGLE -0.45,0 1 x 0.1 {
+ AREA { color: #000000; }
+ }
+
+SYMBOL railway_station
+ RECTANGLE 0,0 1.5 x 1.5 {
+ AREA { color: @railwaySymbolColor; }
+ }
+
+SYMBOL railway_halt
+ RECTANGLE 0,0 1 x 1 {
+ AREA { color: @railwaySymbolColor; }
+ }
+
+SYMBOL railway_tram_stop
+ RECTANGLE 0,0 1 x 1 {
+ AREA { color: @railwaySymbolColor; }
+ }
+
+SYMBOL highway_bus_stop
+ CIRCLE 0,0 0.75 {
+ AREA { color: @busSymbolColor; }
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/textloc.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/textother.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/textpoi.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/textregion.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/types.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/water.idx
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/ways.dat
^
|
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/OSMScoutiOS/Resources/map.osmscout/waysopt.dat
^
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Apple/OSMScoutOSX/Readme.md
^
|
@@ -0,0 +1,56 @@
+# Mac OSX and iOS sample projet
+
+This projet is a sample Objective-C application using the OSMScout libraries to display a interactive map from imported and compiled cartographic data from the OpenStreetMap project using OSMScout tools.
+
+This project target both Mac OS and iOS devices and simulators. The project include a demo map compiled from the OpenStreetMap data of the [Greater London](https://download.geofabrik.de/europe/great-britain/england/greater-london.html) area provided by GeoFabrik.
+
+To compile and run the demo app you have to choice the target between Mac OSX, iOS device (iPhone or iPad) or iOS simulator, then copy the compiled frameworks from the OSMScout sources for the relevant platform to the right framework subdirectory (see below).
+
+The needed frameworks are:
+
+- OSMScout.framework, the core OSMScout library.
+- OSMScoutMap.framework, the generic map drawing library.
+- OSMScoutMapIOSX.framework, the platform specialized drawing code for Mac and iOS.
+
+#### Mac OSX
+The framework directory used by the Mac target is:
+>OSMScoutOSX/OSMScoutOSX/Frameworks
+
+When you have installed the OSMScout sources and the needed dependencies, to compile the library for Mac OSX you might do something like:
+
+```
+cd libosmscout
+mkdir build.osx
+cd build.osx
+cmake -DCMAKE_PREFIX_PATH=/Users/vyskocil/Dev/Qt5.9.1/5.9.1/clang_64/lib/cmake ..
+make
+```
+
+#### iOS device (iPhone, iPad)
+The framework directory used by the iOS device target is:
+>OSMScoutOSX/OSMScoutiOS/Frameworks
+
+When you have installed the OSMScout sources and the needed dependencies, to compile the library for iOS device you might do something like:
+
+```
+cd libosmscout
+mkdir build.ios
+cd build.ios
+cmake -DIOS_DEPLOYMENT_TARGET=13.0 -DCMAKE_TOOLCHAIN_FILE=../cmake/iOS.cmake -DMARISA_INCLUDE_DIRS=~/Dev/marisa/lib -DPKG_CONFIG_EXECUTABLE=/usr/local/bin/pkg-config ..
+make
+```
+
+#### iOS simulator
+The framework directory used by the iOS simulator target is:
+>OSMScoutOSX/OSMScoutiOS/Frameworks_simulator
+
+When you have installed the OSMScout sources and the needed dependencies, to compile the library for iOS simulator you might do something like:
+
+```
+cd libosmscout
+mkdir build.simulator
+cd build.simulator
+cmake -DIOS_DEPLOYMENT_TARGET=13.0 -DCMAKE_TOOLCHAIN_FILE=../cmake/iOS.cmake -DMARISA_INCLUDE_DIRS=~/Dev/marisa/lib -DPKG_CONFIG_EXECUTABLE=/usr/local/bin/pkg-config -DIOS_PLATFORM=SIMULATOR64 ..
+make
+```
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/CMakeLists.txt
^
|
@@ -61,6 +61,10 @@
target_link_libraries(PerformanceTest OSMScout::MapOpenGL ${GLFW_LIBRARIES})
set(HAVE_LIB_OSMSCOUTMAPOPENGL 1)
endif()
+ if(${OSMSCOUT_BUILD_MAP_GDI})
+ target_link_libraries(PerformanceTest OSMScout::MapGDI)
+ set(HAVE_LIB_OSMSCOUTMAPGDI 1)
+ endif()
if(${GPERFTOOLS_USAGE})
target_include_directories(PerformanceTest PRIVATE ${GPERFTOOLS_INCLUDE_DIRS})
target_link_libraries(PerformanceTest ${GPERFTOOLS_LIBRARIES})
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/include/DrawMap.h
^
|
@@ -57,11 +57,7 @@
std::list<std::string> iconPaths;
double fontSize{3.0};
-#ifdef _WIN32
- std::string fontName{ "C:\\Windows\\Fonts\\arial.ttf" };
-#else
- std::string fontName{"/usr/share/fonts/TTF/LiberationSans-Regular.ttf"};
-#endif
+ std::string fontName;
};
enum DrawMapArgParserWindowStyle
@@ -70,6 +66,12 @@
ARG_WS_WINDOW
};
+#ifdef _WIN32
+#define DEMO_DEFAULT_FONT_FILE "C:\\Windows\\Fonts\\arial.ttf"
+#else
+#define DEMO_DEFAULT_FONT_FILE "/usr/share/fonts/TTF/LiberationSans-Regular.ttf"
+#endif
+
class DrawMapArgParser: public osmscout::CmdLineParser
{
private:
@@ -79,10 +81,12 @@
DrawMapArgParser(const std::string& appName,
int argc, char* argv[],
double dpi,
- DrawMapArgParserWindowStyle windowStyle=ARG_WS_CONSOLE)
+ DrawMapArgParserWindowStyle windowStyle=ARG_WS_CONSOLE,
+ const std::string &fontFile=DEMO_DEFAULT_FONT_FILE)
: osmscout::CmdLineParser(appName, argc, argv)
{
args.dpi = dpi;
+ args.fontName = fontFile;
AddOption(osmscout::CmdLineFlag([this](const bool& value) {
args.help=value;
@@ -242,8 +246,9 @@
DrawMapDemo(const std::string& appName,
int argc, char* argv[],
double dpi=96.0,
- DrawMapArgParserWindowStyle windowStyle=ARG_WS_CONSOLE):
- argParser(appName, argc, argv, dpi, windowStyle)
+ DrawMapArgParserWindowStyle windowStyle=ARG_WS_CONSOLE,
+ const std::string &fontFile=DEMO_DEFAULT_FONT_FILE):
+ argParser(appName, argc, argv, dpi, windowStyle, fontFile)
{
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/meson.build
^
|
@@ -110,6 +110,12 @@
links += osmscoutmapopengl
endif
+ if buildMapGDI
+ includes += osmscoutmapgdiIncDir
+ deps += gdiplusDep
+ links += osmscoutmapgdi
+ endif
+
PerformanceTest = executable('PerformanceTest',
'src/PerformanceTest.cpp',
cpp_args: ['-fPIC'],
@@ -286,6 +292,16 @@
install: true)
endif
+if buildMapGDI
+ DrawMapGDI = executable('DrawMapGDI',
+ 'src/DrawMapGDI.cpp',
+ include_directories: [osmscoutIncDir, osmscoutmapIncDir, osmscoutmapgdiIncDir, demoIncDir],
+ dependencies: [mathDep, openmpDep, gdiplusDep],
+ link_with: [osmscout, osmscoutmap, osmscoutmapgdi],
+ gui_app: true,
+ install: true)
+endif
+
if buildGpx
GpxPipe = executable('GpxPipe',
'src/GpxPipe.cpp',
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/src/DrawMapOpenGL.cpp
^
|
@@ -41,7 +41,7 @@
*/
int main(int argc, char* argv[]) {
- DrawMapDemo drawDemo("DrawMapOpenGL", argc, argv);
+ DrawMapDemo drawDemo("DrawMapOpenGL", argc, argv, 96.0, ARG_WS_CONSOLE, DEFAULT_FONT_FILE);
std::string shaderPath=SHADER_INSTALL_DIR;
drawDemo.argParser.AddOption(osmscout::CmdLineStringOption([&shaderPath](const std::string& value) {
@@ -62,8 +62,9 @@
glfwSetErrorCallback([](int, const char *err_str) {
std::cerr << "GLFW Error: " << err_str << std::endl;
});
- if (!glfwInit())
+ if (!glfwInit()) {
return 1;
+ }
glfwWindowHint(GLFW_SAMPLES, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
@@ -77,7 +78,12 @@
}
glfwMakeContextCurrent(offscreen_context);
- osmscout::MapPainterOpenGL* painter = new osmscout::MapPainterOpenGL(args.width, args.height, args.dpi, args.width, args.height, args.fontName, shaderPath);
+ osmscout::MapPainterOpenGL* painter = new osmscout::MapPainterOpenGL(args.width, args.height, args.dpi, args.fontName, shaderPath);
+
+ if (!painter->IsInitialized()) {
+ delete painter;
+ return 1;
+ }
painter->ProcessData(drawDemo.data, drawDemo.drawParameter, drawDemo.projection, drawDemo.styleConfig);
painter->SwapData();
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/src/PerformanceTest.cpp
^
|
@@ -45,6 +45,10 @@
#include <GLFW/glfw3.h>
#endif
+#if defined(HAVE_LIB_OSMSCOUTMAPGDI)
+#include <osmscoutmapgdi/MapPainterGDI.h>
+#endif
+
#if defined(HAVE_LIB_GPERFTOOLS)
#include <gperftools/tcmalloc.h>
#include <gperftools/heap-profiler.h>
@@ -129,35 +133,79 @@
}
};
+class Stats
+{
+private:
+ double minTime;
+ double maxTime;
+ double totalTime=0.0;
+ uint32_t count=0;
+
+public:
+ Stats()
+ : minTime(std::numeric_limits<double>::max()),
+ maxTime(std::numeric_limits<double>::min())
+ {
+ }
+
+ void AddEvent(double time)
+ {
+ minTime=std::min(minTime,time);
+ maxTime=std::max(maxTime,time);
+ totalTime+=time;
+ count++;
+ }
+
+ bool HasValue() const
+ {
+ return count>0;
+ }
+
+ double GetMinTime() const
+ {
+ return minTime;
+ }
+
+ double GetMaxTime() const
+ {
+ return maxTime;
+ }
+
+ double GetTotalTime() const
+ {
+ return totalTime;
+ }
+
+ double GetAverageTime() const
+ {
+ if (HasValue()) {
+ return totalTime/(1.0*count);
+ }
+
+ return NAN;
+ }
+};
+
struct LevelStats
{
- size_t level;
+ size_t level;
- double dbMinTime;
- double dbMaxTime;
- double dbTotalTime;
+ Stats dbStats;
+ Stats drawStats;
- double drawMinTime;
- double drawMaxTime;
- double drawTotalTime;
+ std::vector<Stats> drawLevelStats;
- double allocMax;
- double allocSum;
+ double allocMax;
+ double allocSum;
- size_t nodeCount;
- size_t wayCount;
- size_t areaCount;
+ size_t nodeCount;
+ size_t wayCount;
+ size_t areaCount;
- size_t tileCount;
+ size_t tileCount;
explicit LevelStats(size_t level)
: level(level),
- dbMinTime(std::numeric_limits<double>::max()),
- dbMaxTime(0.0),
- dbTotalTime(0.0),
- drawMinTime(std::numeric_limits<double>::max()),
- drawMaxTime(0.0),
- drawTotalTime(0.0),
allocMax(0.0),
allocSum(0.0),
nodeCount(0),
@@ -165,7 +213,7 @@
areaCount(0),
tileCount(0)
{
- // no code
+ drawLevelStats.resize(osmscout::RenderSteps::LastStep-osmscout::RenderSteps::FirstStep+1);
}
};
@@ -189,12 +237,10 @@
public:
virtual ~PerformanceTestBackend() = default;
- virtual void DrawMap(const osmscout::TileProjection &/*projection*/,
- const osmscout::MapParameter &/*drawParameter*/,
- const osmscout::MapData &/*data*/)
- {
- // none
- }
+ virtual void DrawMap(const osmscout::TileProjection &projection,
+ const osmscout::MapParameter &drawParameter,
+ const osmscout::MapData &data,
+ osmscout::RenderSteps step) = 0;
};
#if defined(HAVE_LIB_OSMSCOUTMAPCAIRO)
@@ -208,7 +254,9 @@
PerformanceTestBackendCairo(size_t tileWidth, size_t tileHeight,
const osmscout::StyleConfigRef& styleConfig)
{
- cairoSurface=cairo_image_surface_create(CAIRO_FORMAT_RGB24,tileWidth,tileHeight);
+ cairoSurface=cairo_image_surface_create(CAIRO_FORMAT_RGB24,
+ int(tileWidth),
+ int(tileHeight));
if (cairoSurface==nullptr) {
throw std::runtime_error("Cannot create cairo image cairoSurface");
}
@@ -221,7 +269,7 @@
cairoMapPainter = new osmscout::MapPainterCairo(styleConfig);
}
- ~PerformanceTestBackendCairo()
+ ~PerformanceTestBackendCairo() override
{
cairo_destroy(cairo);
cairo_surface_destroy(cairoSurface);
@@ -229,12 +277,15 @@
void DrawMap(const osmscout::TileProjection &projection,
const osmscout::MapParameter &drawParameter,
- const osmscout::MapData &data) override
+ const osmscout::MapData &data,
+ osmscout::RenderSteps step) override
{
cairoMapPainter->DrawMap(projection,
drawParameter,
data,
- cairo);
+ cairo,
+ step,
+ step);
}
};
#endif
@@ -258,12 +309,15 @@
void DrawMap(const osmscout::TileProjection &projection,
const osmscout::MapParameter &drawParameter,
- const osmscout::MapData &data) override
+ const osmscout::MapData &data,
+ osmscout::RenderSteps step) override
{
qtMapPainter.DrawMap(projection,
drawParameter,
data,
- &qtPainter);
+ &qtPainter,
+ step,
+ step);
}
};
#endif
@@ -292,12 +346,15 @@
void DrawMap(const osmscout::TileProjection &projection,
const osmscout::MapParameter &drawParameter,
- const osmscout::MapData &data) override
+ const osmscout::MapData &data,
+ osmscout::RenderSteps step) override
{
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Demos/src/PerformanceTestConfig.h.cmake
^
|
@@ -34,6 +34,10 @@
#cmakedefine HAVE_LIB_OPENGL 1
#cmakedefine HAVE_LIB_OSMSCOUTMAPOPENGL 1
+/* GDI detected */
+/* GDI detected */
+#cmakedefine HAVE_LIB_OSMSCOUTMAPGDI 1
+
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/OSMScoutOpenGL/meson.build
^
|
@@ -7,7 +7,7 @@
OSMScoutOpenGL = executable('OSMScoutOpenGL',
osmscoutopenglSrc,
include_directories: [osmscoutopenglIncDir, osmscoutmapopenglIncDir, osmscoutmapIncDir, osmscoutIncDir],
- dependencies: [mathDep, threadDep, openmpDep, glewDep, glmDep, glfwDep, ftDep],
+ dependencies: [mathDep, threadDep, openmpDep, glewDep, glmDep, glfwDep, ftDep, openGLDep],
link_with: [osmscoutmapopengl, osmscoutmap, osmscout],
install: true)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/OSMScoutOpenGL/src/OSMScoutOpenGL.cpp
^
|
@@ -64,15 +64,16 @@
std::string map;
std::string style;
-size_t width;
-size_t height;
+// framebuffer dimensions
+int width;
+int height;
std::future<bool> result;
double prevX;
double prevY;
int level;
int zoom;
-unsigned long long lastZoom;
+std::chrono::steady_clock::time_point lastEvent=std::chrono::steady_clock::time_point::min();
bool loadData = 0;
bool loadingInProgress = 0;
int offset;
@@ -147,9 +148,7 @@
loadData = 1;
}
- lastZoom = std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::steady_clock::now().time_since_epoch()).count();
-
+ lastEvent = std::chrono::steady_clock::now();
}
bool button_down = false;
@@ -174,8 +173,7 @@
static void scroll_callback(GLFWwindow */*window*/, double /*xoffset*/, double yoffset) {
offset = yoffset;
- lastZoom = std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::steady_clock::now().time_since_epoch()).count();
+ lastEvent = std::chrono::steady_clock::now();
loadData = 1;
zoom = 1;
osmscout::log.Info() << "Zoom level: " << magnification.GetLevel();
@@ -188,8 +186,7 @@
renderer->OnTranslation(prevX, prevY, xpos, ypos);
center = renderer->GetCenter();
loadData = 1;
- lastZoom = std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::steady_clock::now().time_since_epoch()).count();
+ lastEvent = std::chrono::steady_clock::now();
osmscout::log.Info() << "BoundingBox: [" << boundingBox.GetMinLon() << " " << boundingBox.GetMinLat() << " "
<< boundingBox.GetMaxLon() << " " << boundingBox.GetMaxLat() << "]";
osmscout::log.Info() << "Center: [" << center.GetLon() << " " << center.GetLat() << "]";
@@ -198,6 +195,16 @@
prevY = ypos;
}
+static void framebuffer_size_callback(GLFWwindow */*window*/, int w, int h) {
+ width=w;
+ height=h;
+ osmscout::log.Info() << "Window resize " << width << " x " << height;
+ glViewport(0, 0, width, height);
+ renderer->SetSize(width, height);
+ loadData = 1;
+ lastEvent = std::chrono::steady_clock::now();
+}
+
int main(int argc, char *argv[]) {
osmscout::CmdLineParser argParser("OSMScoutOpenGL",
@@ -306,9 +313,6 @@
return 1;
}
- width = args.width;
- height = args.height;
-
database.get()->GetBoundingBox(boundingBox);
drawParameter.SetFontSize(args.defaultTextSize);
@@ -330,32 +334,34 @@
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
- const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
- int screenWidth = mode->width;
- int screenHeight = mode->height;
-
if (args.dpi > 0) {
dpi = args.dpi;
} else {
int widthMM, heightMM;
+ const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
glfwGetMonitorPhysicalSize(monitor, &widthMM, &heightMM);
dpi = mode->width / (widthMM / 25.4);
osmscout::log.Debug() << "Using screen dpi: " << dpi;
}
- window = glfwCreateWindow(width, height, "OSMScoutOpenGL", nullptr, nullptr);
+ window = glfwCreateWindow(args.width, args.height, "OSMScoutOpenGL", nullptr, nullptr);
if (!window) {
glfwTerminate();
return -1;
}
+
+ glfwGetFramebufferSize(window, &width, &height);
+ glViewport(0, 0, width, height);
+
glfwSetKeyCallback(window, key_callback);
glfwSetMouseButtonCallback(window, mouse_button_callback);
glfwSetScrollCallback(window, scroll_callback);
glfwSetCursorPosCallback(window, cursor_position_callback);
+ glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwMakeContextCurrent(window);
- renderer = new osmscout::MapPainterOpenGL(width, height, dpi, screenWidth, screenHeight,
+ renderer = new osmscout::MapPainterOpenGL(width, height, dpi,
args.fontPath, args.shaderPath, args.defaultTextSize);
if (!renderer->IsInitialized()) {
glfwDestroyWindow(window);
@@ -368,7 +374,7 @@
LoadData();
renderer->SwapData();
- unsigned long long currentTime;
+ std::chrono::steady_clock::time_point currentTime;
while (!glfwWindowShouldClose(window)) {
glfwSwapBuffers(window);
glfwPollEvents();
@@ -376,9 +382,9 @@
renderer->DrawMap();
if (loadData) {
- currentTime = std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::steady_clock::now().time_since_epoch()).count();
- if (((currentTime - lastZoom) > 100) && (!loadingInProgress)) {
+ currentTime = std::chrono::steady_clock::now();
+ if (( std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - lastEvent).count() > 100)
+ && (!loadingInProgress)) {
double x, y;
glfwGetCursorPos(window, &x, &y);
if(zoom) {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/CMakeLists.txt
^
|
@@ -166,3 +166,6 @@
#---- SunriseSunsetTest
osmscout_test_project(NAME SunriseSunsetTest SOURCES src/SunriseSunsetTest.cpp)
+
+#---- PolygonCenterTest
+osmscout_test_project(NAME PolygonCenterTest SOURCES src/PolygonCenter.cpp)
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/areaarea.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/areanode.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/areas.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/areasopt.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/areaway.idx
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/bounding.dat
^
|
@@ -1 +1 @@
-Ë,=RF¨\>bSF
\ No newline at end of file
+.=RF¨\>bSF
\ No newline at end of file
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/coverage.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/intersections.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/intersections.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/location.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/nodes.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/route.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/router.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/textloc.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/textother.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/textpoi.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/textregion.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/types.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/water.idx
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/ways.dat
^
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/data/testregion/waysopt.dat
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/meson.build
^
|
@@ -215,6 +215,13 @@
link_with: [osmscout],
install: false)
+PolygonCenter = executable('PolygonCenter',
+ 'src/PolygonCenter.cpp',
+ include_directories: [testIncDir, osmscoutIncDir],
+ dependencies: [mathDep, threadDep, openmpDep],
+ link_with: [osmscout],
+ install: false)
+
TilingTest = executable('TilingTest',
'src/TilingTest.cpp',
include_directories: [testIncDir, osmscoutIncDir],
@@ -302,6 +309,7 @@
endif
test('Check correctness of NumberSet class', NumberSet)
+test('Check PolygonCenter utility', PolygonCenter)
test('Check scan conversion code', ScanConversion)
test('Check string utils', StringUtils)
test('Check tiling calculation code', TilingTest)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/src/PolygonCenter.cpp
^
|
@@ -0,0 +1,1199 @@
+/*
+ This source is part of the libosmscout library
+ Copyright (C) 2022 Lukas Karas
+ Copyright (C) 2016 Mapbox
+
+ ISC License (compatible with GNU LGPL)
+
+ Permission to use, copy, modify, and/or distribute this software for any purpose
+ with or without fee is hereby granted, provided that the above copyright notice
+ and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+ IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+ */
+
+/**
+ * Some test cases copied from https://github.com/mapbox/polylabel/tree/master/test
+ */
+#include <osmscout/util/PolygonCenter.h>
+#include <osmscout/util/Logger.h>
+
+#include <TestMain.h>
+
+static const std::vector<std::vector<int>> water1Data = {
+ std::vector<int>{3116, 3071, 3118, 3068, 3108, 3102, 3100, 3105, 3096, 3113, 3099, 3121, 3091, 3135, 3099, 3133,
+ 3105, 3144, 3113, 3144, 3105, 3143, 3117, 3157, 3129, 3155, 3137, 3167, 3152, 3177, 3160, 3187,
+ 3172, 3204, 3174, 3195, 3179, 3217, 3197, 3225, 3189, 3217, 3203, 3217, 3199, 3202, 3186, 3188,
+ 3186, 3174, 3174, 3166, 3165, 3145, 3168, 3143, 3159, 3143, 3151, 3118, 3154, 3107, 3165, 3110,
+ 3174, 3105, 3175, 3082, 3186, 3076, 3178, 3089, 3183, 3103, 3196, 3116, 3181, 3105, 3180, 3111,
+ 3155, 3111, 3173, 3130, 3179, 3150, 3197, 3170, 3199, 3178, 3216, 3190, 3214, 3203, 3235, 3219,
+ 3243, 3212, 3244, 3198, 3246, 3208, 3244, 3219, 3236, 3240, 3237, 3249, 3248, 3262, 3263, 3267,
+ 3327, 3313, 3338, 3327, 3340, 3340, 3351, 3349, 3353, 3361, 3345, 3365, 3355, 3387, 3363, 3392,
+ 3364, 3401, 3375, 3413, 3382, 3421, 3394, 3431, 3404, 3433, 3398, 3416, 3406, 3433, 3409, 3422,
+ 3428, 3400, 3423, 3392, 3446, 3377, 3461, 3366, 3495, 3354, 3506, 3343, 3506, 3334, 3495, 3338,
+ 3505, 3332, 3503, 3323, 3511, 3316, 3512, 3303, 3502, 3302, 3513, 3296, 3509, 3286, 3517, 3283,
+ 3525, 3277, 3528, 3269, 3526, 3277, 3526, 3287, 3517, 3288, 3518, 3301, 3515, 3313, 3508, 3329,
+ 3517, 3333, 3522, 3341, 3534, 3344, 3547, 3333, 3549, 3323, 3561, 3314, 3565, 3302, 3576, 3301,
+ 3573, 3314, 3568, 3329, 3559, 3348, 3543, 3341, 3547, 3362, 3563, 3362, 3573, 3327, 3576, 3309,
+ 3583, 3292, 3594, 3256, 3611, 3205, 3599, 3181, 3585, 3172, 3574, 3167, 3583, 3176, 3597, 3193,
+ 3583, 3184, 3583, 3192, 3583, 3200, 3576, 3188, 3575, 3198, 3573, 3190, 3557, 3197, 3565, 3205,
+ 3564, 3211, 3564, 3224, 3563, 3233, 3565, 3245, 3555, 3240, 3564, 3226, 3558, 3218, 3558, 3210,
+ 3549, 3208, 3557, 3202, 3540, 3186, 3539, 3195, 3540, 3204, 3532, 3198, 3530, 3209, 3528, 3222,
+ 3516, 3220, 3515, 3235, 3503, 3239, 3503, 3241, 3495, 3241, 3497, 3249, 3489, 3260, 3478, 3271,
+ 3477, 3281, 3478, 3272, 3482, 3253, 3470, 3248, 3481, 3245, 3488, 3230, 3496, 3232, 3509, 3221,
+ 3515, 3199, 3502, 3197, 3493, 3189, 3488, 3181, 3478, 3174, 3470, 3185, 3474, 3172, 3470, 3162,
+ 3461, 3170, 3452, 3169, 3449, 3160, 3464, 3158, 3456, 3146, 3464, 3154, 3476, 3153, 3470, 3145,
+ 3488, 3161, 3504, 3182, 3511, 3171, 3522, 3166, 3533, 3168, 3541, 3169, 3537, 3158, 3545, 3152,
+ 3544, 3163, 3553, 3159, 3578, 3138, 3570, 3127, 3561, 3128, 3561, 3120, 3552, 3119, 3518, 3101,
+ 3509, 3090, 3508, 3085, 3517, 3085, 3508, 3079, 3506, 3071, 3512, 3056, 3495, 3053, 3481, 3056,
+ 3478, 3066, 3491, 3073, 3497, 3099, 3493, 3091, 3467, 3086, 3470, 3096, 3476, 3104, 3484, 3106,
+ 3474, 3108, 3484, 3124, 3472, 3116, 3464, 3116, 3468, 3107, 3464, 3099, 3452, 3108, 3448, 3120,
+ 3448, 3112, 3440, 3114, 3449, 3108, 3440, 3108, 3457, 3103, 3461, 3090, 3453, 3089, 3452, 3099,
+ 3437, 3103, 3453, 3083, 3435, 3077, 3432, 3087, 3424, 3087, 3425, 3077, 3413, 3082, 3407, 3090,
+ 3413, 3102, 3405, 3102, 3406, 3116, 3403, 3094, 3392, 3092, 3386, 3101, 3382, 3118, 3385, 3130,
+ 3380, 3119, 3354, 3116, 3378, 3115, 3377, 3107, 3367, 3098, 3376, 3100, 3378, 3092, 3386, 3092,
+ 3375, 3084, 3374, 3071, 3381, 3082, 3397, 3081, 3398, 3072, 3407, 3061, 3398, 3055, 3406, 3057,
+ 3411, 3045, 3402, 3042, 3397, 3033, 3383, 3037, 3375, 3035, 3367, 3038, 3358, 3047, 3348, 3040,
+ 3356, 3041, 3359, 3033, 3372, 3034, 3368, 3024, 3375, 3032, 3385, 3029, 3383, 3018, 3379, 3010,
+ 3389, 3025, 3397, 3024, 3419, 3040, 3419, 3023, 3427, 3034, 3431, 3043, 3436, 3029, 3422, 3010,
+ 3435, 3021, 3436, 3008, 3414, 2983, 3417, 2995, 3413, 3008, 3406, 3000, 3407, 2992, 3384, 2994,
+ 3378, 3003, 3378, 2994, 3367, 2995, 3348, 2988, 3373, 2990, 3383, 2990, 3387, 2985, 3397, 2985,
+ 3395, 2975, 3390, 2964, 3368, 2965, 3328, 2969, 3326, 2977, 3324, 2985, 3326, 3001, 3319, 2988,
+ 3314, 2997, 3319, 2986, 3311, 2984, 3321, 2974, 3313, 2978, 3305, 2979, 3295, 2982, 3289, 2970,
+ 3297, 2977, 3321, 2973, 3285, 2952, 3264, 2928, 3239, 2921, 3203, 2882, 3194, 2873, 3190, 2882,
+ 3184, 2892, 3184, 2883, 3189, 2880, 3179, 2880, 3191, 2877, 3152, 2864, 3160, 2878, 3164, 2890,
+ 3166, 2902, 3158, 2907, 3163, 2891, 3151, 2882, 3151, 2873, 3151, 2855, 3137, 2864, 3129, 2860,
+ 3119, 2869, 3128, 2859, 3142, 2850, 3153, 2849, 3158, 2858, 3155, 2848, 3133, 2837, 3114, 2818,
+ 3094, 2819, 3071, 2818, 3079, 2816, 3108, 2809, 3081, 2774, 3072, 2753, 3050, 2728, 3044, 2711,
+ 3043, 2694, 3028, 2690, 3024, 2679, 2993, 2629, 2965, 2604, 2950, 2584, 2919, 2559, 2909, 2528,
+ 2896, 2507, 2894, 2482, 2883, 2474, 2837, 2458, 2831, 2438, 2835, 2413, 2846, 2402, 2867, 2396,
+ 2871, 2429, 2879, 2431, 2893, 2446, 2908, 2456, 2916, 2454, 2915, 2462, 2921, 2458, 2921, 2466,
+ 2933, 2479, 2948, 2508, 2953, 2528, 2969, 2552, 2977, 2545, 2983, 2537, 3002, 2542, 3006, 2550,
+ 2997, 2553, 2989, 2549, 2985, 2541, 2987, 2551, 2985, 2566, 2992, 2579, 3001, 2575, 3009, 2575,
+ 3018, 2574, 3010, 2576, 3000, 2577, 3000, 2592, 3016, 2602, 3028, 2613, 3038, 2609, 3040, 2599,
+ 3040, 2608, 3050, 2609, 3048, 2621, 3061, 2620, 3053, 2618, 3047, 2631, 3058, 2650, 3073, 2662,
+ 3098, 2699, 3105, 2704, 3113, 2704, 3121, 2730, 3129, 2733, 3141, 2747, 3142, 2730, 3151, 2735,
+ 3143, 2740, 3145, 2752, 3143, 2763, 3167, 2789, 3162, 2777, 3185, 2754, 3174, 2766, 3182, 2791,
+ 3188, 2781, 3189, 2796, 3199, 2796, 3213, 2777, 3205, 2791, 3193, 2803, 3191, 2815, 3196, 2826,
+ 3197, 2807, 3208, 2815, 3205, 2824, 3213, 2823, 3203, 2827, 3212, 2834, 3224, 2832, 3218, 2821,
+ 3226, 2827, 3226, 2819, 3225, 2790, 3230, 2801, 3233, 2799, 3233, 2821, 3227, 2837, 3226, 2849,
+ 3239, 2846, 3247, 2848, 3259, 2865, 3269, 2916, 3305, 2899, 3302, 2889, 3293, 2891, 3295, 2883,
+ 3296, 2875, 3297, 2884, 3307, 2882, 3306, 2890, 3316, 2890, 3321, 2882, 3329, 2881, 3328, 2888,
+ 3343, 2888, 3329, 2890, 3317, 2894, 3305, 2902, 3318, 2906, 3327, 2908, 3367, 2899, 3388, 2886,
+ 3386, 2878, 3378, 2880, 3367, 2878, 3368, 2870, 3379, 2864, 3383, 2876, 3391, 2882, 3401, 2872,
+ 3401, 2881, 3430, 2880, 3438, 2885, 3439, 2873, 3427, 2875, 3417, 2868, 3441, 2869, 3442, 2853,
+ 3437, 2832, 3424, 2828, 3438, 2827, 3427, 2825, 3431, 2815, 3420, 2824, 3415, 2836, 3415, 2825,
+ 3425, 2816, 3414, 2817, 3422, 2811, 3433, 2808, 3426, 2794, 3408, 2799, 3425, 2803, 3395, 2803,
+ 3389, 2816, 3394, 2802, 3380, 2796, 3381, 2807, 3370, 2802, 3365, 2812, 3370, 2816, 3362, 2816,
+ 3368, 2825, 3359, 2823, 3350, 2818, 3348, 2835, 3356, 2846, 3345, 2833, 3336, 2843, 3328, 2844,
+ 3318, 2847, 3329, 2841, 3338, 2831, 3336, 2816, 3327, 2813, 3319, 2815, 3328, 2808, 3337, 2808,
+ 3355, 2808, 3359, 2799, 3343, 2801, 3352, 2795, 3346, 2790, 3356, 2790, 3367, 2791, 3353, 2779,
+ 3349, 2783, 3340, 2783, 3331, 2793, 3319, 2783, 3295, 2799, 3299, 2791, 3319, 2780, 3315, 2769,
+ 3306, 2770, 3310, 2751, 3300, 2746, 3301, 2738, 3313, 2746, 3317, 2758, 3317, 2767, 3323, 2777,
+ 3331, 2776, 3345, 2775, 3336, 2774, 3343, 2760, 3351, 2762, 3356, 2762, 3356, 2748, 3363, 2757,
+ 3363, 2768, 3367, 2776, 3375, 2776, 3370, 2758, 3381, 2774, 3391, 2778, 3399, 2779, 3407, 2772,
+ 3400, 2764, 3398, 2753, 3402, 2744, 3385, 2729, 3373, 2717, 3358, 2695, 3357, 2704, 3360, 2719,
+ 3350, 2715, 3352, 2705, 3338, 2709, 3335, 2701, 3327, 2696, 3317, 2706, 3309, 2704, 3294, 2708,
+ 3303, 2699, 3295, 2693, 3297, 2680, 3301, 2683, 3301, 2691, 3306, 2699, 3319, 2697, 3322, 2681,
+ 3324, 2671, 3328, 2667, 3328, 2659, 3327, 2648, 3315, 2651, 3312, 2643, 3300, 2645, 3292, 2633,
+ 3278, 2629, 3289, 2630, 3285, 2621, 3284, 2608, 3294, 2620, 3307, 2636, 3316, 2629, 3320, 2641,
+ 3329, 2640, 3337, 2639, 3341, 2653, 3350, 2655, 3349, 2660, 3349, 2669, 3381, 2667, 3390, 2680,
+ 3401, 2691, 3411, 2689, 3408, 2679, 3397, 2670, 3399, 2644, 3391, 2648, 3394, 2640, 3385, 2640,
+ 3389, 2631, 3397, 2636, 3401, 2628, 3399, 2616, 3375, 2612, 3364, 2627, 3371, 2610, 3353, 2606,
+ 3329, 2611, 3346, 2599, 3334, 2590, 3347, 2592, 3346, 2578, 3338, 2569, 3350, 2570, 3354, 2559,
+ 3344, 2544, 3359, 2538, 3360, 2531, 3370, 2531, 3367, 2539, 3356, 2542, 3361, 2560, 3364, 2573,
+ 3354, 2580, 3360, 2593, 3377, 2597, 3384, 2589, 3394, 2599, 3405, 2601, 3418, 2599, 3399, 2582,
+ 3407, 2577, 3400, 2559, 3409, 2572, 3410, 2581, 3421, 2585, 3426, 2574, 3420, 2588, 3432, 2583,
+ 3429, 2592, 3425, 2602, 3428, 2615, 3436, 2615, 3428, 2619, 3427, 2630, 3437, 2630, 3434, 2639,
+ 3434, 2650, 3442, 2658, 3452, 2649, 3444, 2661, 3453, 2665, 3457, 2656, 3454, 2664, 3465, 2667,
+ 3468, 2659, 3466, 2670, 3470, 2679, 3482, 2674, 3480, 2684, 3489, 2685, 3498, 2687, 3491, 2678,
+ 3501, 2679, 3505, 2668, 3507, 2653, 3500, 2643, 3493, 2633, 3485, 2636, 3494, 2632, 3485, 2629,
+ 3488, 2619, 3496, 2614, 3493, 2603, 3478, 2605, 3479, 2595, 3470, 2593, 3472, 2582, 3470, 2565,
+ 3479, 2559, 3482, 2550, 3474, 2548, 3482, 2547, 3490, 2542, 3487, 2557, 3478, 2571, 3477, 2584,
+ 3484, 2594, 3492, 2596, 3500, 2582, 3497, 2593, 3501, 2602, 3512, 2604, 3516, 2596, 3520, 2587,
+ 3530, 2577, 3523, 2591, 3523, 2600, 3514, 2604, 3516, 2612, 3500, 2627, 3512, 2629, 3511, 2637,
+ 3519, 2635, 3518, 2644, 3533, 2642, 3519, 2654, 3532, 2657, 3524, 2660, 3526, 2670, 3518, 2669,
+ 3518, 2677, 3516, 2689, 3514, 2701, 3525, 2717, 3533, 2718, 3538, 2726, 3540, 2737, 3549, 2734,
+ 3560, 2720, 3567, 2728, 3556, 2732, 3559, 2742, 3551, 2739, 3558, 2764, 3570, 2767, 3570, 2759,
+ 3579, 2759, 3571, 2766, 3583, 2774, 3594, 2769, 3594, 2783, 3603, 2800, 3609, 2787, 3610, 2762,
+ 3601, 2769, 3598, 2765, 3598, 2754, 3596, 2738, 3597, 2748, 3609, 2748, 3606, 2732, 3598, 2725,
+ 3609, 2718, 3600, 2719, 3599, 2709, 3589, 2706, 3579, 2715, 3581, 2704, 3577, 2704, 3569, 2704,
+ 3563, 2690, 3553, 2693, 3544, 2679, 3554, 2690, 3562, 2689, 3570, 2697, 3580, 2698, 3592, 2702,
+ 3604, 2698, 3607, 2688, 3608, 2700, 3621, 2697, 3619, 2711, 3632, 2698, 3629, 2685, 3631, 2677,
+ 3619, 2676, 3610, 2682, 3605, 2673, 3593, 2678, 3585, 2668, 3601, 2672, 3599, 2660, 3608, 2672,
+ 3609, 2657, 3600, 2652, 3613, 2660, 3622, 2669, 3630, 2671, 3642, 2673, 3633, 2684, 3644, 2679,
+ 3645, 2653, 3637, 2654, 3620, 2651, 3615, 2641, 3627, 2650, 3635, 2650, 3630, 2638, 3632, 2623,
+ 3642, 2619, 3635, 2561, 3624, 2537, 3622, 2551, 3620, 2541, 3615, 2550, 3608, 2558, 3607, 2528,
+ 3617, 2529, 3600, 2513, 3595, 2527, 3601, 2539, 3589, 2554, 3590, 2542, 3589, 2534, 3586, 2522,
+ 3563, 2523, 3562, 2531, 3554, 2543, 3554, 2531, 3561, 2522, 3550, 2519, 3544, 2527, 3548, 2517,
+ 3560, 2518, 3568, 2519, 3581, 2516, 3585, 2503, 3598, 2501, 3573, 2481, 3565, 2490, 3554, 2492,
+ 3563, 2484, 3568, 2474, 3547, 2476, 3526, 2474, 3517, 2477, 3507, 2479, 3493, 2475, 3484, 2471,
+ 3495, 2474, 3508, 2477, 3508, 2468, 3517, 2474, 3523, 2466, 3518, 2443, 3497, 2443, 3489, 2439,
+ 3480, 2421, 3481, 2410, 3467, 2413, 3459, 2408, 3447, 2407, 3437, 2399, 3424, 2400, 3428, 2409,
+ 3430, 2421, 3427, 2413, 3419, 2411, 3418, 2396, 3411, 2409, 3414, 2422, 3402, 2436, 3387, 2439,
+ 3376, 2431, 3361, 2432, 3347, 2423, 3317, 2429, 3334, 2417, 3329, 2401, 3311, 2404, 3301, 2397,
+ 3301, 2387, 3293, 2389, 3283, 2383, 3271, 2387, 3268, 2395, 3272, 2377, 3260, 2365, 3249, 2364,
+ 3240, 2366, 3231, 2347, 3222, 2347, 3209, 2346, 3212, 2334, 3204, 2330, 3200, 2350, 3190, 2349,
+ 3184, 2339, 3170, 2340, 3166, 2332, 3155, 2322, 3161, 2311, 3147, 2306, 3142, 2291, 3149, 2303,
+ 3166, 2307, 3174, 2317, 3169, 2327, 3182, 2330, 3196, 2339, 3195, 2331, 3201, 2325, 3211, 2325,
+ 3218, 2331, 3218, 2339, 3233, 2339, 3243, 2357, 3256, 2355, 3254, 2340, 3262, 2343, 3268, 2359,
+ 3277, 2353, 3278, 2366, 3280, 2378, 3291, 2381, 3308, 2374, 3319, 2387, 3335, 2392, 3342, 2407,
+ 3350, 2407, 3359, 2413, 3359, 2404, 3369, 2396, 3380, 2397, 3385, 2406, 3390, 2428, 3402, 2421,
+ 3397, 2410, 3400, 2382, 3401, 2384, 3401, 2407, 3402, 2412, 3402, 2398, 3411, 2376, 3422, 2375,
+ 3434, 2386, 3430, 2378, 3432, 2369, 3444, 2362, 3432, 2371, 3435, 2379, 3464, 2378, 3479, 2387,
+ 3491, 2382, 3502, 2383, 3510, 2380, 3513, 2371, 3522, 2373, 3524, 2403, 3528, 2369, 3517, 2371,
+ 3509, 2367, 3509, 2357, 3515, 2366, 3524, 2364, 3518, 2353, 3531, 2364, 3533, 2352, 3537, 2363,
+ 3546, 2366, 3554, 2363, 3554, 2355, 3566, 2354, 3571, 2344, 3598, 2233, 3579, 2200, 3566, 2194,
+ 3546, 2192, 3554, 2193, 3554, 2207, 3543, 2208, 3541, 2217, 3520, 2210, 3488, 2216, 3485, 2205,
+ 3477, 2200, 3467, 2190, 3481, 2203, 3496, 2201, 3499, 2209, 3511, 2200, 3522, 2207, 3520, 2190,
+ 3520, 2178, 3511, 2168, 3505, 2180, 3505, 2172, 3492, 2171, 3473, 2167, 3486, 2168, 3498, 2168,
+ 3510, 2164, 3517, 2152, 3514, 2147, 3506, 2147, 3500, 2156, 3506, 2143, 3495, 2141, 3488, 2153,
+ 3487, 2145, 3494, 2137, 3485, 2140, 3485, 2133, 3476, 2133, 3486, 2128, 3475, 2121, 3471, 2117,
+ 3460, 2117, 3472, 2115, 3472, 2106, 3473, 2119, 3482, 2117, 3484, 2125, 3496, 2124, 3497, 2132,
+ 3505, 2134, 3503, 2123, 3509, 2134, 3513, 2126, 3518, 2128, 3518, 2137, 3526, 2132, 3519, 2115,
+ 3509, 2110, 3498, 2108, 3498, 2096, 3492, 2101, 3481, 2101, 3491, 2098, 3496, 2087, 3487, 2088,
+ 3495, 2081, 3482, 2070, 3496, 2080, 3500, 2065, 3490, 2056, 3500, 2056, 3508, 2059, 3506, 2067,
+ 3498, 2076, 3498, 2091, 3507, 2088, 3505, 2097, 3517, 2100, 3519, 2092, 3518, 2103, 3527, 2108,
+ 3526, 2093, 3538, 2092, 3534, 2100, 3542, 2105, 3550, 2110, 3544, 2102, 3549, 2090, 3540, 2077,
+ 3549, 2082, 3552, 2090, 3557, 2103, 3566, 2086, 3561, 2073, 3556, 2064, 3552, 2066, 3552, 2051,
+ 3542, 2053, 3533, 2049, 3543, 2051, 3537, 2042, 3540, 2034, 3531, 2029, 3522, 2028, 3513, 2035,
+ 3525, 2023, 3536, 2025, 3526, 2013, 3512, 2006, 3508, 2017, 3500, 2020, 3508, 2012, 3516, 2003,
+ 3502, 1994, 3514, 1989, 3517, 1983, 3517, 1975, 3516, 1967, 3508, 1962, 3517, 1962, 3519, 1973,
+ 3516, 1997, 3527, 2002, 3536, 2003, 3534, 2011, 3549, 2017, 3558, 2026, 3556, 2007, 3548, 2004,
+ 3545, 1994, 3553, 1978, 3544, 1966, 3535, 1967, 3531, 1959, 3539, 1959, 3555, 1966, 3555, 1944,
+ 3542, 1942, 3560, 1943, 3571, 1931, 3581, 1927, 3586, 1940, 3590, 1931, 3574, 1929, 3560, 1921,
+ 3555, 1932, 3539, 1935, 3546, 1927, 3538, 1924, 3544, 1916, 3530, 1914, 3520, 1913, 3512, 1913,
+ 3508, 1903, 3496, 1897, 3485, 1904, 3490, 1895, 3503, 1892, 3512, 1906, 3527, 1911, 3541, 1909,
+ 3551, 1914, 3552, 1905, 3538, 1895, 3556, 1904, 3558, 1878, 3548, 1878, 3539, 1878, 3528, 1875,
+ 3518, 1870, 3529, 1872, 3525, 1861, 3541, 1869, 3551, 1872, 3559, 1857, 3543, 1861, 3539, 1851,
+ 3534, 1838, 3521, 1847, 3531, 1841, 3522, 1837, 3532, 1837, 3525, 1826, 3528, 1818, 3518, 1812,
+ 3505, 1820, 3497, 1818, 3510, 1825, 3502, 1840, 3504, 1829, 3491, 1826, 3490, 1814, 3483, 1826,
+ 3471, 1841, 3473, 1833, 3473, 1823, 3481, 1813, 3472, 1818, 3459, 1816, 3453, 1810, 3453, 1818,
+ 3445, 1815, 3436, 1822, 3432, 1812, 3454, 1807, 3465, 1806, 3460, 1795, 3454, 1784, 3445, 1790,
+ 3443, 1781, 3434, 1784, 3423, 1781, 3431, 1775, 3418, 1777, 3400, 1769, 3402, 1777, 3390, 1773,
+ 3379, 1765, 3370, 1766, 3364, 1753, 3375, 1755, 3386, 1766, 3395, 1767, 3408, 1765, 3418, 1770,
+ 3434, 1766, 3437, 1758, 3443, 1767, 3439, 1776, 3448, 1779, 3458, 1777, 3469, 1784, 3472, 1779,
+ 3472, 1764, 3473, 1774, 3472, 1782, 3473, 1800, 3472, 1809, 3480, 1797, 3503, 1806, 3499, 1791,
+ 3509, 1789, 3506, 1802, 3527, 1796, 3532, 1808, 3543, 1798, 3551, 1795, 3540, 1804, 3548, 1807,
+ 3541, 1825, 3547, 1827, 3547, 1842, 3547, 1823, 3559, 1807, 3555, 1819, 3553, 1829, 3554, 1837,
+ 3564, 1837, 3568, 1825, 3572, 1834, 3580, 1837, 3575, 1839, 3575, 1849, 3583, 1859, 3593, 1858,
+ 3593, 1842, 3597, 1834, 3589, 1831, 3582, 1821, 3590, 1826, 3593, 1810, 3585, 1807, 3584, 1796,
+ 3593, 1793, 3591, 1801, 3605, 1804, 3595, 1812, 3597, 1821, 3598, 1829, 3606, 1819, 3615, 1815,
+ 3611, 1825, 3619, 1822, 3614, 1831, 3605, 1826, 3612, 1836, 3604, 1831, 3602, 1839, 3607, 1854,
+ 3603, 1864, 3595, 1865, 3597, 1875, 3606, 1874, 3619, 1866, 3616, 1855, 3624, 1858, 3621, 1847,
+ 3623, 1839, 3628, 1848, 3639, 1835, 3641, 1811, 3632, 1816, 3642, 1807, 3626, 1806, 3634, 1802,
+ 3644, 1801, 3660, 1733, 3651, 1755, 3640, 1770, 3643, 1762, 3646, 1752, 3644, 1740, 3638, 1751,
+ 3630, 1748, 3637, 1744, 3637, 1734, 3626, 1738, 3605, 1744, 3608, 1756, 3619, 1757, 3618, 1767,
+ 3608, 1758, 3609, 1770, 3605, 1754, 3600, 1771, 3592, 1766, 3596, 1758, 3600, 1737, 3588, 1746,
+ 3591, 1736, 3579, 1738, 3565, 1734, 3573, 1729, 3561, 1717, 3552, 1723, 3559, 1714, 3555, 1704,
+ 3547, 1696, 3538, 1694, 3548, 1694, 3553, 1685, 3550, 1694, 3556, 1702, 3567, 1698, 3559, 1708,
+ 3563, 1717, 3576, 1713, 3577, 1722, 3583, 1732, 3600, 1729, 3592, 1713, 3597, 1722, 3605, 1734,
+ 3615, 1732, 3618, 1724, 3604, 1710, 3599, 1702, 3613, 1714, 3621, 1712, 3620, 1721, 3631, 1723,
+ 3640, 1723, 3648, 1728, 3661, 1732, 3640, 1721, 3619, 1694, 3516, 1632, 3453, 1610, 3456, 1619,
+ 3458, 1628, 3449, 1613, 3446, 1622, 3441, 1634, 3455, 1642, 3446, 1647, 3449, 1661, 3438, 1671,
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/src/StringUtils.cpp
^
|
@@ -234,6 +234,19 @@
REQUIRE(transformed == "baker street");
}
+TEST_CASE("Check UTF8 string buffer integrity")
+{
+ /* Transliterate 24 POUND SIGN: IN = 48 bytes , OUT = 72 bytes */
+ auto transformed=osmscout::UTF8Transliterate(
+ "\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3"
+ "\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3"
+ "\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3\xc2\xa3"
+ );
+
+ REQUIRE(transformed ==
+ "GBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBPGBP");
+}
+
TEST_CASE("Parse illegal UTF8 sequence")
{
auto transformed=osmscout::UTF8Transliterate("\xef\xbb\xbf\x2f\xc0\xae\x2e\x2f");
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/Tests/src/SunriseSunsetTest.cpp
^
|
@@ -64,14 +64,12 @@
}
TEST_CASE("Compute Prague sunrise and sunset at winter solstice") {
- osmscout::Timestamp ts;
std::string winterSolstice="2021-12-21T12:00:00.0Z";
osmscout::GeoCoord pragueLoc(50.083, 14.422);
REQUIRE(SunriseSunsetString(winterSolstice, pragueLoc, +1) == "2021-12-21T07:59:58.0Z - 2021-12-21T16:03:24.0Z");
}
TEST_CASE("Polar night at Tromso at winter solstice") {
- osmscout::Timestamp ts;
std::string winterSolstice="2021-12-21T12:00:00.0Z";
osmscout::GeoCoord tromsoLoc(69.6523, 18.9753);
REQUIRE(SunriseSunsetString(winterSolstice, tromsoLoc, +1) == "nullopt");
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/buildAll.sh
^
|
@@ -9,3 +9,4 @@
./debian_bullseye_gcc_meson/build.sh
./ubuntu_18.04_gcc_cmake/build.sh
./ubuntu_20.04_gcc_cmake/build.sh
+./ubuntu_21.10_aarch64_gcc_cmake/build.sh
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/runAll.sh
^
|
@@ -23,27 +23,33 @@
./ubuntu_20.04_gcc_cmake/run.sh "$@"
RESULT_ubuntu_20_04_gcc_cmake=$?
+./ubuntu_21.10_aarch64_gcc_cmake/run.sh "$@"
+RESULT_ubuntu_21_10_aarch64_gcc_cmake=$?
+
# print results
set +x
echo
-echo -ne "archlinux_clang_cmake "
+echo -ne "archlinux_clang_cmake "
if [ $RESULT_archlinux_clang_cmake -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "archlinux_gcc_cmake "
+echo -ne "archlinux_gcc_cmake "
if [ $RESULT_archlinux_gcc_cmake -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "archlinux_gcc_meson "
+echo -ne "archlinux_gcc_meson "
if [ $RESULT_archlinux_gcc_meson -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "debian_buster_gcc_meson "
+echo -ne "debian_buster_gcc_meson "
if [ $RESULT_debian_buster_gcc_meson -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "debian_bullseye_gcc_meson "
+echo -ne "debian_bullseye_gcc_meson "
if [ $RESULT_debian_bullseye_gcc_meson -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "ubuntu_18.04_gcc_cmake "
+echo -ne "ubuntu_18.04_gcc_cmake "
if [ $RESULT_ubuntu_18_04_gcc_cmake -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
-echo -ne "ubuntu_20.04_gcc_cmake "
+echo -ne "ubuntu_20.04_gcc_cmake "
if [ $RESULT_ubuntu_20_04_gcc_cmake -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
+
+echo -ne "ubuntu_21.10_aarch64_gcc_cmake "
+if [ $RESULT_ubuntu_21_10_aarch64_gcc_cmake -eq 0 ] ; then echo "OK"; else echo "FAILURE"; fi
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/ubuntu_21.10_aarch64_gcc_cmake/Dockerfile
^
|
@@ -0,0 +1,66 @@
+FROM ubuntu:21.10
+
+# disable interactive functions
+ENV DEBIAN_FRONTEND noninteractive
+
+RUN apt-get update && apt-get install -y \
+ locales git make cmake pkg-config protobuf-compiler \
+ g++-aarch64-linux-gnu qemu-user \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN locale-gen en_US.UTF-8
+ENV LANG=en_US.utf8
+
+ENV SYSROOT=/usr/aarch64-linux-gnu/
+ENV QEMU_LD_PREFIX=/usr/aarch64-linux-gnu/
+ENV CXX=aarch64-linux-gnu-g++
+ENV CC=aarch64-linux-gnu-gcc
+
+RUN mkdir -p \
+ $SYSROOT/etc/apt/sources.list.d \
+ $SYSROOT/etc/apt/preferences.d \
+ $SYSROOT/usr/share/dpkg \
+ $SYSROOT/usr/lib \
+ $SYSROOT/usr/bin \
+ $SYSROOT/etc \
+ $SYSROOT/var/cache \
+ $SYSROOT/var/log/apt \
+ $SYSROOT/var/lib/dpkg \
+ $SYSROOT/var/lib/apt/lists/partial \
+ $SYSROOT/var/lib/dpkg/updates \
+ $SYSROOT/var/lib/dpkg/triggers \
+ $SYSROOT/var/cache/apt/archives/partial
+
+RUN touch \
+ $SYSROOT/var/lib/dpkg/status \
+ $SYSROOT/var/lib/dpkg/triggers/Unincorp \
+ $SYSROOT/var/lib/dpkg/triggers/File
+
+RUN echo arm64 > $SYSROOT/var/lib/dpkg/arch
+RUN echo 'APT::Architecture "arm64";' > $SYSROOT/etc/apt/apt.conf
+COPY arm64.list $SYSROOT/etc/apt/sources.list
+
+RUN cp \
+ /usr/share/dpkg/cputable \
+ /usr/share/dpkg/tupletable \
+ $SYSROOT/usr/share/dpkg/
+
+ENV APTARGS="-o Dir=$SYSROOT -o Debug::NoLocking=1 -o Acquire::AllowInsecureRepositories=1 --allow-unauthenticated"
+
+RUN apt-get \
+ $APTARGS \
+ update
+
+RUN cd $SYSROOT/var/cache/apt/archives/ \
+ && apt-get \
+ $APTARGS \
+ download -y \
+ libprotobuf-dev:arm64 libprotobuf23:arm64 zlib1g:arm64 zlib1g-dev:arm64 \
+ && find $SYSROOT/var/cache/apt/archives/ -name '*.deb' -exec /usr/bin/dpkg -x {} $SYSROOT \;
+
+RUN mkdir /work
+COPY data/build.sh /work
+RUN chmod +x /work/build.sh
+
+WORKDIR /work
+CMD ./build.sh
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/ubuntu_21.10_aarch64_gcc_cmake/arm64.list
^
|
@@ -0,0 +1,10 @@
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish main restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-updates main restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish universe
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-updates universe
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish multiverse
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-updates multiverse
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-backports main restricted universe multiverse
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-security main restricted
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-security universe
+deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports impish-security multiverse
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/ubuntu_21.10_aarch64_gcc_cmake/build.sh
^
|
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd `dirname $0`
+docker build -t libosmscout/ubuntu_21.10_aarch64_gcc_cmake .
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/ubuntu_21.10_aarch64_gcc_cmake/data/build.sh
^
|
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+
+if [ $# -ge 1 ] ; then
+ REPO="$1"
+else
+ REPO="https://github.com/Framstag/libosmscout.git"
+fi
+
+if [ $# -ge 2 ] ; then
+ BRANCH="$2"
+else
+ BRANCH="master"
+fi
+
+git clone -b "$BRANCH" "$REPO" libosmscout
+
+export LANG=en_US.utf8
+cd libosmscout
+mkdir build
+cd build
+cmake \
+ -DCMAKE_BUILD_TYPE=Debug \
+ -DCMAKE_CROSSCOMPILING_EMULATOR=/usr/bin/qemu-aarch64 \
+ -DCMAKE_PREFIX_PATH="/usr/aarch64-linux-gnu/usr/;/usr/aarch64-linux-gnu/" \
+ -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath,/usr/aarch64-linux-gnu/lib/aarch64-linux-gnu/" \
+ ..
+
+make -j $(nproc) install
+ctest --output-on-failure
+
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/ci/docker/ubuntu_21.10_aarch64_gcc_cmake/run.sh
^
|
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+docker run --rm=true -it libosmscout/ubuntu_21.10_aarch64_gcc_cmake ./build.sh "$@"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-import/src/osmscoutimport/GenOptimizeAreaWayIds.cpp
^
|
@@ -31,6 +31,7 @@
#include <osmscout/util/FileScanner.h>
#include <osmscout/util/FileWriter.h>
+#include <osmscout/util/PolygonCenter.h>
#include <osmscout/DataFile.h>
#include <osmscoutimport/GenMergeAreas.h>
@@ -71,6 +72,28 @@
{
}
+ std::optional<GeoCoord> OptionalRingCenter(const Area::Ring &ring)
+ {
+ // TODO: compute center just for types where we need
+ // (types with Name feature, where it is expected that will be used for label)
+ if (ring.nodes.empty()) {
+ return std::nullopt;
+ }
+ auto bbox=ring.GetBoundingBox();
+ double dimension=std::max(bbox.GetWidth(), bbox.GetHeight());
+ auto center=PolygonCenter(ring.nodes,
+ dimension * 0.01);
+ // when computed center is close to bbox center (20% of longest bbox side),
+ // it is not necessary to store center coordinates to Ring
+ auto bboxCenter=bbox.GetCenter();
+ auto a=bboxCenter.GetLat()-center.GetLat();
+ auto b=bboxCenter.GetLon()-center.GetLon();
+ if (sqrt(a*a + b*b) < dimension * 0.2) {
+ return std::nullopt;
+ }
+ return center;
+ }
+
bool operator()() override
{
FileScanner scanner;
@@ -112,6 +135,7 @@
idClearedCount++;
}
}
+ ring.center=OptionalRingCenter(ring);
}
writer.Write(type);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-agg/include/osmscoutmapagg/MapPainterAgg.h
^
|
@@ -210,7 +210,9 @@
bool DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- AggPixelFormat* pf);
+ AggPixelFormat* pf,
+ RenderSteps startStep=RenderSteps::FirstStep,
+ RenderSteps endStep=RenderSteps::LastStep);
};
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-agg/src/osmscoutmapagg/MapPainterAgg.cpp
^
|
@@ -713,39 +713,47 @@
bool MapPainterAgg::DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- AggPixelFormat* pf)
+ AggPixelFormat* pf,
+ RenderSteps startStep,
+ RenderSteps endStep)
{
std::lock_guard<std::mutex> guard(mutex);
bool result;
- this->pf=pf;
+ if (startStep==RenderSteps::Initialize) {
+ this->pf=pf;
- renderer_base=new AggRenderBase(*pf);
- rasterizer=new AggScanlineRasterizer();
- scanlineP8=new AggScanline();
- renderer_aa=new AggScanlineRendererAA(*renderer_base);
- renderer_bin=new AggScanlineRendererBin(*renderer_base);
- fontEngine=new AggFontEngine();
- fontCacheManager=new AggFontManager(*fontEngine);
+ renderer_base=new AggRenderBase(*pf);
+ rasterizer=new AggScanlineRasterizer();
+ scanlineP8=new AggScanline();
+ renderer_aa=new AggScanlineRendererAA(*renderer_base);
+ renderer_bin=new AggScanlineRendererBin(*renderer_base);
+ fontEngine=new AggFontEngine();
+ fontCacheManager=new AggFontManager(*fontEngine);
- convTextCurves=new AggTextCurveConverter(fontCacheManager->path_adaptor());
- convTextCurves->approximation_scale(2.0);
+ convTextCurves=new AggTextCurveConverter(fontCacheManager->path_adaptor());
+ convTextCurves->approximation_scale(2.0);
- convTextContours= new AggTextContourConverter(*convTextCurves);
+ convTextContours= new AggTextContourConverter(*convTextCurves);
+ }
result=Draw(projection,
parameter,
- data);
-
- delete convTextCurves;
- delete convTextContours;
- delete fontEngine;
- delete fontCacheManager;
- delete renderer_bin;
- delete renderer_aa;
- delete scanlineP8;
- delete rasterizer;
- delete renderer_base;
+ data,
+ startStep,
+ endStep);
+
+ if (endStep==RenderSteps::Postrender) {
+ delete convTextCurves;
+ delete convTextContours;
+ delete fontEngine;
+ delete fontCacheManager;
+ delete renderer_bin;
+ delete renderer_aa;
+ delete scanlineP8;
+ delete rasterizer;
+ delete renderer_base;
+ }
return result;
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-cairo/include/osmscoutmapcairo/MapPainterCairo.h
^
|
@@ -216,7 +216,9 @@
bool DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- cairo_t *draw);
+ cairo_t *draw,
+ RenderSteps startStep=RenderSteps::FirstStep,
+ RenderSteps endStep=RenderSteps::LastStep);
};
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-cairo/src/osmscoutmapcairo/MapPainterCairo.cpp
^
|
@@ -1392,7 +1392,9 @@
bool MapPainterCairo::DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- cairo_t *draw)
+ cairo_t *draw,
+ RenderSteps startStep,
+ RenderSteps endStep)
{
std::lock_guard<std::mutex> guard(mutex);
@@ -1402,6 +1404,8 @@
return Draw(projection,
parameter,
- data);
+ data,
+ startStep,
+ endStep);
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/include/meson.build
^
|
@@ -1,8 +1,8 @@
osmscoutmapgdiIncDir = include_directories('.')
-osmscoutmapsvgHeader = [
+osmscoutmapgdiHeader = [
'osmscoutmapgdi/MapGDIImportExport.h',
- 'osmscoutmapgdi/MapPainterGDI.h'
+ 'osmscoutmapgdi/MapPainterGDI.h',
'osmscoutmapgdi/MapPainterGDIWindow.h'
]
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/include/osmscoutmapgdi/MapPainterGDI.h
^
|
@@ -20,22 +20,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef UNICODE
-#define UNICODE
-#endif
-#define WIN32_LEAN_AND_MEAN
-#ifndef NOMINMAX
-#define NOMINMAX
-#endif
-#include <Windows.h>
-
#include <osmscoutmapgdi/MapGDIImportExport.h>
#include <osmscoutmap/MapPainter.h>
namespace osmscout {
- class OSMSCOUT_MAP_GDI_API MapPainterGDI : public MapPainter
+ class OSMSCOUT_MAP_GDI_API MapPainterGDI : public MapPainter
{
public:
struct NativeLabel {
@@ -43,11 +34,13 @@
void* font;
void* render;
};
+
struct NativeGlyph {
std::string character;
double width;
double height;
};
+
using GdiLabel = Label<NativeGlyph, NativeLabel>;
private:
@@ -57,123 +50,128 @@
friend GdiLabelLayouter;
GdiLabelLayouter m_labelLayouter;
- void *m_pBuffer;
+ void *m_pBuffer;
static ULONG_PTR m_gdiplusToken;
static DWORD m_gdiplusInstCount;
private:
- osmscout::DoubleRectangle GlyphBoundingBox(const NativeGlyph &glyph) const;
+ osmscout::DoubleRectangle GlyphBoundingBox(const NativeGlyph &glyph) const;
- std::shared_ptr<GdiLabel> Layout(const Projection& projection,
- const MapParameter& parameter,
- const std::string& text,
- double fontSize,
- double objectWidth,
- bool enableWrapping = false,
- bool contourLabel = false);
-
- void DrawLabel(const Projection& projection,
- const MapParameter& parameter,
- const DoubleRectangle& labelRectangle,
- const LabelData& label,
- const NativeLabel& layout);
-
- void DrawGlyphs(const Projection &projection,
- const MapParameter ¶meter,
- const osmscout::PathTextStyleRef& style,
- const std::vector<GdiGlyph> &glyphs);
+ std::shared_ptr<GdiLabel> Layout(const Projection &projection,
+ const MapParameter ¶meter,
+ const std::string &text,
+ double fontSize,
+ double objectWidth,
+ bool enableWrapping = false,
+ bool contourLabel = false);
+
+ void DrawLabel(const Projection &projection,
+ const MapParameter ¶meter,
+ const DoubleRectangle &labelRectangle,
+ const LabelData &label,
+ const NativeLabel &layout);
+
+ void DrawGlyphs(const Projection &projection,
+ const MapParameter ¶meter,
+ const osmscout::PathTextStyleRef &style,
+ const std::vector<GdiGlyph> &glyphs);
protected:
- void AfterPreprocessing(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- const MapData& data) override;
-
- void BeforeDrawing(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- const MapData& data) override;
-
- void AfterDrawing(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- const MapData& data) override;
-
- bool HasIcon(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- IconStyle& style) override;
-
- double GetFontHeight(const Projection& projection,
- const MapParameter& parameter,
- double fontSize) override;
-
- void DrawGround(const Projection& projection,
- const MapParameter& parameter,
- const FillStyle& style) override;
-
- /**
- Register regular label with given text at the given pixel coordinate
- in a style defined by the given LabelStyle.
- */
- void RegisterRegularLabel(const Projection &projection,
- const MapParameter ¶meter,
- const std::vector<LabelData> &labels,
- const Vertex2D &position,
- double objectWidth) override;
-
- /**
- * Register contour label
- */
- void RegisterContourLabel(const Projection &projection,
- const MapParameter ¶meter,
- const PathLabelData &label,
- const LabelPath &labelPath) override;
-
- void DrawLabels(const Projection& projection,
- const MapParameter& parameter,
- const MapData& data) override;
-
- void DrawSymbol(const Projection& projection,
- const MapParameter& parameter,
- const Symbol& style,
- double x, double y) override;
-
- void DrawIcon(const IconStyle* style,
- double centerX, double centerY,
- double width, double height) override;
-
- void DrawPath(const Projection& projection,
- const MapParameter& parameter,
- const Color& color,
- double width,
- const std::vector<double>& dash,
- LineStyle::CapStyle startCap,
- LineStyle::CapStyle endCap,
- size_t transStart, size_t transEnd) override;
-
- void DrawWayOutline(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- const WayData& data);
-
- void DrawWay(const StyleConfig& styleConfig,
- const Projection& projection,
- const MapParameter& parameter,
- const WayData& data) override;
-
- void DrawContourSymbol(const Projection& projection,
- const MapParameter& parameter,
- const Symbol& symbol,
- double space,
- size_t transStart, size_t transEnd) override;
-
- void DrawArea(const Projection& projection,
- const MapParameter& parameter,
- const AreaData& area) override;
+ void AfterPreprocessing(const StyleConfig &styleConfig,
+ const Projection &projection,
+ const MapParameter ¶meter,
+ const MapData &data) override;
+
+ void BeforeDrawing(const StyleConfig &styleConfig,
+ const Projection &projection,
+ const MapParameter ¶meter,
+ const MapData &data) override;
+
+ void AfterDrawing(const StyleConfig &styleConfig,
+ const Projection &projection,
+ const MapParameter ¶meter,
+ const MapData &data) override;
+
+ bool HasIcon(const StyleConfig &styleConfig,
+ const Projection &projection,
+ const MapParameter ¶meter,
+ IconStyle &style) override;
+
+ double GetFontHeight(const Projection &projection,
+ const MapParameter ¶meter,
+ double fontSize) override;
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/include/osmscoutmapgdi/MapPainterGDIWindow.h
^
|
@@ -20,15 +20,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef UNICODE
-#define UNICODE
-#endif
-#define WIN32_LEAN_AND_MEAN
-#ifndef NOMINMAX
-#define NOMINMAX
-#endif
#include <osmscoutmapgdi/MapGDIImportExport.h>
+
#include <osmscoutmapgdi/MapPainterGDI.h>
+
#include <mutex>
namespace osmscout {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/include/osmscoutmapgdi/meson.build
^
|
@@ -1 +1,5 @@
mapgdiFeaturesCfg = configuration_data()
+
+configure_file(output: 'MapGDIFeatures.h',
+ configuration: mapgdiFeaturesCfg)
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/meson.build
^
|
@@ -17,7 +17,7 @@
osmscoutmapgdiSrc,
include_directories: [osmscoutmapgdiIncDir, osmscoutmapIncDir, osmscoutIncDir],
cpp_args: cppArgs,
- dependencies: [mathDep, threadDep],
+ dependencies: [mathDep, threadDep, gdiplusDep],
link_with: [osmscoutmap, osmscout],
install: true)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/src/osmscoutmapgdi/MapPainterGDI.cpp
^
|
@@ -17,832 +17,872 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <osmscoutmapgdi/MapPainterGDI.h>
+// Including Windows and Gdiplus is a pain
+// We get compiler errors in gdi, if someone includes
+// Windows headers before us using other settings...
+#ifndef UNICODE
+#define UNICODE
+#endif
+#define WIN32_LEAN_AND_MEAN
+
+#include <windows.h>
+#include <objidl.h>
+#include <gdiplus.h>
-#include <iostream>
-#include <iomanip>
-#include <limits>
-#include <list>
-#include <cmath>
+#undef min
+#undef max
+
+#include <osmscoutmapgdi/MapPainterGDI.h>
-#include <osmscout/system/Assert.h>
-#include <osmscout/system/Math.h>
#include <osmscout/util/String.h>
#include <osmscout/util/File.h>
-#include <osmscout/util/Base64.h>
-
-#define min(a,b) (a<b?a:b)
-#define max(a,b) (a>b?a:b)
-#include <objidl.h>
-#include <gdiplus.h>
namespace osmscout {
- DWORD MapPainterGDI::m_gdiplusInstCount = 0;
- ULONG_PTR MapPainterGDI::m_gdiplusToken = 0;
+ DWORD MapPainterGDI::m_gdiplusInstCount = 0;
+ ULONG_PTR MapPainterGDI::m_gdiplusToken = 0;
+
+ class PointFBuffer {
+ public:
+ std::vector<Gdiplus::PointF> m_Data;
+
+ public:
+ PointFBuffer() = default;
+
+ void ResetAndReserve(size_t bufferSize) {
+ m_Data.clear();
+ m_Data.reserve(bufferSize);
+ }
+
+ void AddPoint(const Gdiplus::PointF &pt) {
+ m_Data.push_back(pt);
+ }
+
+ inline void AddPoint(double x, double y) {
+ AddPoint(Gdiplus::PointF((Gdiplus::REAL) x, (Gdiplus::REAL) y));
+ }
+
+ double GetLength() const {
+ double result = 0;
+
+ for (size_t i = 1; i < m_Data.size(); i++) {
+ result += sqrt((m_Data[i].X - m_Data[i - 1].X) * (m_Data[i].X - m_Data[i - 1].X) +
+ (m_Data[i].Y - m_Data[i - 1].Y) * (m_Data[i].Y - m_Data[i - 1].Y));
+ }
+
+ return result;
+ }
+ };
+
+ struct PENDEF {
+ BYTE a;
+ BYTE r;
+ BYTE g;
+ BYTE b;
+ float width;
+ float dashs;
+ WORD size;
+ BYTE sc;
+ BYTE ec;
+
+ bool operator<(const PENDEF &rhs) const {
+ if (this == &rhs) {
+ return false;
+ }
+
+ if (Gdiplus::Color::MakeARGB(this->a, this->r, this->g, this->b) ==
+ Gdiplus::Color::MakeARGB(rhs.a, rhs.r, rhs.g, rhs.b)) {
+ if (this->width == rhs.width) {
+ if (this->dashs == rhs.dashs) {
+ if (this->size == rhs.size) {
+ if (this->sc == rhs.sc) {
+ return this->ec < rhs.ec;
+ }
- class GdiRender
- {
- public:
- typedef struct _PENDEF
- {
- BYTE a;
- BYTE r;
- BYTE g;
- BYTE b;
- float width;
- float dashs;
- WORD size;
- BYTE sc;
- BYTE ec;
-
- bool operator<(const _PENDEF& rhs) const {
- if (*this == rhs) return false;
- if (Gdiplus::Color::MakeARGB(this->a, this->r, this->g, this->b) == Gdiplus::Color::MakeARGB(rhs.a, rhs.r, rhs.g, rhs.b))
- {
- if (this->width == rhs.width)
- {
- if (this->dashs == rhs.dashs)
- {
- if (this->size == rhs.size)
- {
- if (this->sc == rhs.sc)
- return this->ec < rhs.ec;
- else
- return this->sc < rhs.sc;
- }
- else
- return this->size < rhs.size;
- }
- else
- return this->dashs < rhs.dashs;
- }
- else
- return this->width < rhs.width;
- }
- else
- return Gdiplus::Color::MakeARGB(this->a, this->r, this->g, this->b) < Gdiplus::Color::MakeARGB(rhs.a, rhs.r, rhs.g, rhs.b);
- }
-
- bool operator==(const _PENDEF& rhs) const {
- return this->a == rhs.a && this->r == rhs.r && this->r == rhs.r && this->b == rhs.b && this->width == rhs.width && this->dashs == rhs.dashs && this->size == rhs.size && this->sc == rhs.sc && this->ec == rhs.ec;
- }
- } PENDEF;
- typedef struct _FONTDEF
- {
- std::string name;
- float size;
-
- bool operator<(const _FONTDEF& rhs) const {
- if (*this == rhs) return false;
- return this->name.compare(rhs.name) < 0 || (this->name.compare(rhs.name) == 0 && this->size < rhs.size);
- }
-
- bool operator==(const _FONTDEF& rhs) const {
- return this->name == rhs.name && this->size == rhs.size;
- }
- } FONTDEF;
-
- private:
- Gdiplus::Bitmap* m_pMemBitmap;
- INT m_width;
- INT m_height;
-
- std::map<Gdiplus::ARGB, Gdiplus::SolidBrush*> m_SolidBrushes;
- std::map<PENDEF, Gdiplus::Pen*> m_Pens;
- std::map<FONTDEF, Gdiplus::Font*> m_Fonts;
- std::map<size_t, Gdiplus::Image*> m_Images;
-
- public:
- Gdiplus::Graphics* m_pGraphics;
-
- GdiRender(INT width, INT height)
- : m_pMemBitmap(nullptr)
- , m_width(width)
- , m_height(height)
- {
- m_pMemBitmap = new Gdiplus::Bitmap(width, height);
- m_pGraphics = Gdiplus::Graphics::FromImage(m_pMemBitmap);
- m_pGraphics->SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias);
- m_pGraphics->SetInterpolationMode(Gdiplus::InterpolationModeHighQualityBicubic);
- m_pGraphics->SetTextRenderingHint(Gdiplus::TextRenderingHintAntiAlias);
- }
-
- ~GdiRender()
- {
- Release();
- }
-
- void Release()
- {
- for (auto brush : m_SolidBrushes) delete brush.second;
- m_SolidBrushes.clear();
- for (auto pen : m_Pens) delete pen.second;
- m_Pens.clear();
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-gdi/src/osmscoutmapgdi/MapPainterGDIWindow.cpp
^
|
@@ -17,6 +17,17 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+// Including Windows and Gdiplus is a pain
+// We get compiler errors in gdi, if someone includes
+// Windows headers before us using other settings...
+#ifndef UNICODE
+#define UNICODE
+#endif
+#define NOMINMAX // msvc issue with std::max/min
+#define WIN32_LEAN_AND_MEAN
+
+#include <windows.h>
+
#include <osmscoutmapgdi/MapPainterGDIWindow.h>
namespace osmscout {
@@ -217,24 +228,35 @@
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hwnd,
- &ps);
+ &ps);
- log.Info() << "Drawing rect: [" << ps.rcPaint.left << " - " << ps.rcPaint.right << "] x [" << ps.rcPaint.top << " - " << ps.rcPaint.bottom << "]";
+ log.Info() << "Drawing rect: [" << ps.rcPaint.left << " - " << ps.rcPaint.right << "] x [" << ps.rcPaint.top << " - " << ps.rcPaint.bottom << "]";
if (m_pPainter != nullptr &&
- m_pProjection != nullptr &&
- m_pParameter != nullptr &&
- m_pData != nullptr)
+ m_pProjection != nullptr &&
+ m_pParameter != nullptr &&
+ m_pData != nullptr)
{
- /*bool result = */m_pPainter->DrawMap(*m_pProjection,
- *m_pParameter,
- *m_pData,
- hdc,
- ps.rcPaint);
- }
+ RECT rc;
+ GetClientRect(hwnd, &rc);
+ HDC memdc = CreateCompatibleDC(hdc);
+ HBITMAP hbitmap = CreateCompatibleBitmap(hdc, rc.right, rc.bottom);
+ HGDIOBJ oldbmp = SelectObject(memdc, hbitmap);
+
+ /*bool result = */m_pPainter->DrawMap(*m_pProjection,
+ *m_pParameter,
+ *m_pData,
+ memdc);
+
+ BitBlt(hdc, 0, 0, rc.right, rc.bottom, memdc, 0, 0, SRCCOPY);
+
+ SelectObject(memdc, oldbmp);
+ DeleteObject(hbitmap);
+ DeleteDC(memdc);
+ }
EndPaint(hwnd, &ps);
- log.Info() << "WM_PAINT done";
+ log.Info() << "WM_PAINT done";
}
return 0;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm
^
|
@@ -34,7 +34,7 @@
MapPainterIOS::MapPainterIOS(const StyleConfigRef& styleConfig)
: MapPainter(styleConfig), labelLayouter(this){
-#if TARGET_OS_IPHONE
+#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
contentScale = [[UIScreen mainScreen] scale];
#else
contentScale = [[NSScreen mainScreen] backingScaleFactor];
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/CMakeLists.txt
^
|
@@ -4,6 +4,7 @@
include/osmscoutmapopengl/MapPainterOpenGL.h
include/osmscoutmapopengl/Triangulate.h
include/osmscoutmapopengl/PNGLoaderOpenGL.h
+ include/osmscoutmapopengl/ShaderUtils.h
include/osmscoutmapopengl/TextLoader.h
include/poly2tri/poly2tri.h
include/poly2tri/sweep/cdt.h
@@ -17,6 +18,7 @@
src/osmscoutmapopengl/MapPainterOpenGL.cpp
src/osmscoutmapopengl/Triangulate.cpp
src/osmscoutmapopengl/PNGLoaderOpenGL.cpp
+ src/osmscoutmapopengl/ShaderUtils.cpp
src/osmscoutmapopengl/TextLoader.cpp
src/poly2tri/sweep/cdt.cc
src/poly2tri/common/shapes.cc
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/AreaVertexShader.vert
^
|
@@ -8,110 +8,10 @@
uniform mat4 Model;
uniform mat4 View;
uniform mat4 Projection;
-uniform float minLon;
-uniform float minLat;
-uniform float maxLon;
-uniform float maxLat;
-uniform float windowWidth;
-uniform float windowHeight;
-uniform float centerLat;
-uniform float centerLon;
-uniform float magnification;
-uniform float dpi;
+vec2 PixelToGeo(in float x, in float y, in float latOffset);
-uniform float PI = 3.1415926535897;
-
-/**
-* Converts a screen pixel to geographic coordinates
-*/
-vec2 PixelToGeo(in float x, in float y, in float latOffset)
-{
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- x-=windowWidth/2;
- y=windowHeight/2-y;
-
- float lon=centerLon+x/scaleGradtorad;
- float lat=atan(sinh(y/scale+latOffset))/gradtorad;
-
- vec2 result = vec2(lon,lat);
- return (result);
-}
-
-/**
-* Converts a geographic coordinate to screen pixel
-*/
-vec2 GeoToPixel(in float posx, in float posy){
- //Calculations for Mercator projection
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
- float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
-
- float latOffset=atanh(sin(centerLat*gradtorad));
-
- vec2 tl = PixelToGeo(0.0,0.0,latOffset);
- vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
- vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
- vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
-
- float MaxLat = +85.0511;
- float MinLat = -85.0511;
- float MaxLon = +180.0;
- float MinLon = -180.0;
-
- float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
- float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
-
- float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
- float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
- float scaledLatDeriv = latDeriv * gradtorad * scale;
-
- float windowPosX=(posx-centerLon)*scaledLatDeriv;
- float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
-
- // Window position in pixel
- windowPosY=windowHeight/2-windowPosY;
- windowPosX += windowWidth/2;
-
- float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
- float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
- float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
- float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
-
- float newWidth = windowWidth/windowHeight;
- float newHeight = 1;
-
- // OpenGL position
- float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
- float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
-
- vec2 result = vec2(screenX, screenY);
- return(result);
-}
+vec2 GeoToPixel(in float posx, in float posy);
void main() {
Color = color;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/GroundVertexShader.vert
^
|
@@ -8,104 +8,10 @@
uniform mat4 Model;
uniform mat4 View;
uniform mat4 Projection;
-uniform float windowWidth;
-uniform float windowHeight;
-uniform float centerLat;
-uniform float centerLon;
-uniform float magnification;
-uniform float dpi;
-uniform float PI = 3.1415926535897;
+vec2 PixelToGeo(in float x, in float y, in float latOffset);
-/**
-* Converts a screen pixel to geographic coordinates
-*/
-vec2 PixelToGeo(in float x, in float y, in float latOffset)
-{
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- x-=windowWidth/2;
- y=windowHeight/2-y;
-
- float lon=centerLon+x/scaleGradtorad;
- float lat=atan(sinh(y/scale+latOffset))/gradtorad;
-
- vec2 result = vec2(lon,lat);
- return (result);
-}
-
-/**
-* Converts a geographic coordinate to screen pixel
-*/
-vec2 GeoToPixel(in float posx, in float posy){
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
- float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
-
- float latOffset=atanh(sin(centerLat*gradtorad));
-
- vec2 tl = PixelToGeo(0.0,0.0,latOffset);
- vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
- vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
- vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
-
- float MaxLat = +85.0511;
- float MinLat = -85.0511;
- float MaxLon = +180.0;
- float MinLon = -180.0;
-
- float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
- float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
-
- float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
- float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
- float scaledLatDeriv = latDeriv * gradtorad * scale;
-
- float windowPosX=(posx-centerLon)*scaledLatDeriv;
- float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
-
- // Window position in pixel
- windowPosY=windowHeight/2-windowPosY;
- windowPosX += windowWidth/2;
-
- float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
- float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
- float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
- float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
-
- float newWidth = windowWidth/windowHeight;
- float newHeight = 1;
-
- // OpenGL position
- float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
- float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
-
- vec2 result = vec2(screenX, screenY);
- return(result);
-}
+vec2 GeoToPixel(in float posx, in float posy);
void main() {
Color = color;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/PathVertexShader.vert
^
|
@@ -34,110 +34,12 @@
uniform mat4 Model;
uniform mat4 View;
uniform mat4 Projection;
-uniform float minLon;
-uniform float minLat;
-uniform float maxLon;
-uniform float maxLat;
-uniform float windowWidth;
-uniform float windowHeight;
-uniform float centerLat;
-uniform float centerLon;
-
-uniform float magnification;
-uniform float dpi = 96.0;
-
-uniform float PI = 3.1415926535897;
-
-/**
-* Converts a screen pixel to geographic coordinates
-*/
-vec2 PixelToGeo(in float x, in float y, in float latOffset)
-{
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- x-=windowWidth/2;
- y=windowHeight/2-y;
-
- float lon=centerLon+x/scaleGradtorad;
- float lat=atan(sinh(y/scale+latOffset))/gradtorad;
-
- vec2 result = vec2(lon,lat);
- return (result);
-}
-
-/**
-* Converts a geographic coordinate to screen pixel
-*/
-vec2 GeoToPixel(in float posx, in float posy){
- //Calculations for Mercator projection
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
- float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
-
- float latOffset=atanh(sin(centerLat*gradtorad));
- vec2 tl = PixelToGeo(0.0,0.0,latOffset);
- vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
- vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
- vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
-
- float MaxLat = +85.0511;
- float MinLat = -85.0511;
- float MaxLon = +180.0;
- float MinLon = -180.0;
-
- float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
- float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
-
- float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
- float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
- float scaledLatDeriv = latDeriv * gradtorad * scale;
-
- float windowPosX=(posx-centerLon)*scaledLatDeriv;
- float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
-
- // Window position in pixel
- windowPosY=windowHeight/2-windowPosY;
- windowPosX += windowWidth/2;
-
- float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
- float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
- float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
- float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
-
- float newWidth = windowWidth/windowHeight;
- float newHeight = 1;
+uniform float windowWidth;
- // OpenGL position
- float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
- float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
+vec2 PixelToGeo(in float x, in float y, in float latOffset);
- vec2 result = vec2(screenX, screenY);
- return(result);
-}
+vec2 GeoToPixel(in float posx, in float posy);
void main() {
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/Projection.vert
^
|
@@ -0,0 +1,107 @@
+#version 150 core
+
+uniform float minLon;
+uniform float minLat;
+uniform float maxLon;
+uniform float maxLat;
+uniform float windowWidth;
+uniform float windowHeight;
+uniform float centerLat;
+uniform float centerLon;
+
+uniform float magnification;
+uniform float dpi = 96.0;
+
+uniform float PI = 3.1415926535897;
+
+/**
+ * Converts a screen pixel to geographic coordinates
+ */
+vec2 PixelToGeo(in float x, in float y, in float latOffset)
+{
+ float tileDPI=96.0;
+ float gradtorad=2*PI/360;
+ float earthRadiusMeter=6378137.0;
+ float earthExtentMeter=2*PI*earthRadiusMeter;
+ float tileWidthZoom0Aquator=earthExtentMeter;
+ float equatorTileWidth=tileWidthZoom0Aquator/magnification;
+ float equatorTileResolution=equatorTileWidth/256.0;
+ float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
+ float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
+
+ float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
+ float scaleGradtorad=scale*gradtorad;
+
+ x-=windowWidth/2;
+ y=windowHeight/2-y;
+
+ float lon=centerLon+x/scaleGradtorad;
+ float lat=atan(sinh(y/scale+latOffset))/gradtorad;
+
+ vec2 result = vec2(lon,lat);
+ return (result);
+}
+
+/**
+ * Converts a geographic coordinate to screen pixel
+ */
+vec2 GeoToPixel(in float posx, in float posy){
+ //Calculations for Mercator projection
+ float tileDPI=96.0;
+ float gradtorad=2*PI/360;
+ float earthRadiusMeter=6378137.0;
+ float earthExtentMeter=2*PI*earthRadiusMeter;
+ float tileWidthZoom0Aquator=earthExtentMeter;
+ float equatorTileWidth=tileWidthZoom0Aquator/magnification;
+ float equatorTileResolution=equatorTileWidth/256.0;
+ float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
+ float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
+ float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
+
+ float latOffset=atanh(sin(centerLat*gradtorad));
+
+ vec2 tl = PixelToGeo(0.0,0.0,latOffset);
+ vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
+ vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
+ vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
+
+ float MaxLat = +85.0511;
+ float MinLat = -85.0511;
+ float MaxLon = +180.0;
+ float MinLon = -180.0;
+
+ float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
+ float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
+
+ float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
+ float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
+
+ float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
+ float scaleGradtorad=scale*gradtorad;
+
+ float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
+ float scaledLatDeriv = latDeriv * gradtorad * scale;
+
+ float windowPosX=(posx-centerLon)*scaledLatDeriv;
+ float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
+
+ // Window position in pixel
+ windowPosY=windowHeight/2-windowPosY;
+ windowPosX += windowWidth/2;
+
+ float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
+ float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
+ float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
+ float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
+
+ float newWidth = windowWidth/windowHeight;
+ float newHeight = 1;
+
+ // OpenGL position
+ float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
+ float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
+
+ vec2 result = vec2(screenX, screenY);
+ return(result);
+}
+
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/QuadVertexShader.vert
^
|
@@ -8,112 +8,17 @@
uniform mat4 Model;
uniform mat4 View;
uniform mat4 Projection;
-uniform float minLon;
-uniform float minLat;
-uniform float maxLon;
-uniform float maxLat;
+
uniform float windowWidth;
uniform float windowHeight;
-uniform float centerLat;
-uniform float centerLon;
uniform float quadWidth;
uniform float textureWidthSum;
-uniform float magnification;
-uniform float dpi = 96.0;
uniform float z;
-uniform float PI = 3.1415926535897;
+vec2 PixelToGeo(in float x, in float y, in float latOffset);
-/**
-* Converts a screen pixel to geographic coordinates
-*/
-vec2 PixelToGeo(in float x, in float y, in float latOffset)
-{
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- x-=windowWidth/2;
- y=windowHeight/2-y;
-
- float lon=centerLon+x/scaleGradtorad;
- float lat=atan(sinh(y/scale+latOffset))/gradtorad;
-
- vec2 result = vec2(lon,lat);
- return (result);
-}
-
-/**
-* Converts a geographic coordinate to screen pixel
-*/
-vec2 GeoToPixel(in float posx, in float posy){
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
- float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
-
- float latOffset=atanh(sin(centerLat*gradtorad));
-
- vec2 tl = PixelToGeo(0.0,0.0,latOffset);
- vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
- vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
- vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
-
- float MaxLat = +85.0511;
- float MinLat = -85.0511;
- float MaxLon = +180.0;
- float MinLon = -180.0;
-
- float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
- float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
-
- float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
- float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
- float scaledLatDeriv = latDeriv * gradtorad * scale;
-
- float windowPosX=(posx-centerLon)*scaledLatDeriv;
- float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
-
- // Window position in pixel
- windowPosY=windowHeight/2-windowPosY;
- windowPosX += windowWidth/2;
-
- float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
- float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
- float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
- float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
-
- float newWidth = windowWidth/windowHeight;
- float newHeight = 1;
-
- // OpenGL position
- float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
- float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
-
- vec2 result = vec2(screenX, screenY);
- return(result);
-}
+vec2 GeoToPixel(in float posx, in float posy);
void main() {
float width_norm = (ceil(quadWidth)/windowWidth);
@@ -125,7 +30,7 @@
float i = (unit*textureStart) + (unit*textureWidth);
float j = (unit*textureStart);
-gl_Position = pos;
+ gl_Position = pos;
if(index == 1.0){
gl_Position = pos;
Texcoord = vec2(j, 1.0);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/data/shaders/TextVertexShader.vert
^
|
@@ -13,110 +13,17 @@
uniform mat4 Model;
uniform mat4 View;
uniform mat4 Projection;
-uniform float minLon;
-uniform float minLat;
-uniform float maxLon;
-uniform float maxLat;
+
uniform float windowWidth;
uniform float windowHeight;
-uniform float centerLat;
-uniform float centerLon;
uniform float textureHeight;
uniform float textureWidthSum;
-uniform float magnification;
-uniform float dpi = 96.0;
uniform float z;
-uniform float PI = 3.1415926535897;
-
-/**
-* Converts a screen pixel to geographic coordinates
-*/
-vec2 PixelToGeo(in float x, in float y, in float latOffset)
-{
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- x-=windowWidth/2;
- y=windowHeight/2-y;
-
- float lon=centerLon+x/scaleGradtorad;
- float lat=atan(sinh(y/scale+latOffset))/gradtorad;
-
- vec2 result = vec2(lon,lat);
- return (result);
-}
-
-/**
-* Converts a geographic coordinate to screen pixel
-*/
-vec2 GeoToPixel(in float posx, in float posy){
- float tileDPI=96.0;
- float gradtorad=2*PI/360;
- float earthRadiusMeter=6378137.0;
- float earthExtentMeter=2*PI*earthRadiusMeter;
- float tileWidthZoom0Aquator=earthExtentMeter;
- float equatorTileWidth=tileWidthZoom0Aquator/magnification;
- float equatorTileResolution=equatorTileWidth/256.0;
- float equatorCorrectedEquatorTileResolution=equatorTileResolution*tileDPI/dpi;
- float groundWidthEquatorMeter=windowWidth*equatorCorrectedEquatorTileResolution;
- float groundWidthVisibleMeter=groundWidthEquatorMeter*cos(posy*gradtorad);
-
- float latOffset=atanh(sin(centerLat*gradtorad));
-
- vec2 tl = PixelToGeo(0.0,0.0,latOffset);
- vec2 tr = PixelToGeo(windowWidth,0.0,latOffset);
- vec2 bl = PixelToGeo(0.0,windowHeight,latOffset);
- vec2 br = PixelToGeo(windowWidth,windowHeight,latOffset);
-
- float MaxLat = +85.0511;
- float MinLat = -85.0511;
- float MaxLon = +180.0;
- float MinLon = -180.0;
-
- float latMin=max(MinLat,min(min(tl.y,tr.y),min(bl.y,br.y)));
- float latMax=min(MaxLat,max(max(tl.y,tr.y),max(bl.y,br.y)));
-
- float lonMin=max(MinLon,min(min(tl.x,tr.x),min(bl.x,br.x)));
- float lonMax=min(MaxLon,max(max(tl.x,tr.x),max(bl.x,br.x)));
-
- float scale=windowWidth/(2*PI*groundWidthEquatorMeter/earthExtentMeter);
- float scaleGradtorad=scale*gradtorad;
-
- float latDeriv = 1.0 / sin( (2 * centerLat * gradtorad + PI) / 2);
- float scaledLatDeriv = latDeriv * gradtorad * scale;
-
- float windowPosX=(posx-centerLon)*scaledLatDeriv;
- float windowPosY=(atanh(sin(posy*gradtorad))-latOffset)*scale;
-
- windowPosY=windowHeight/2-windowPosY;
- windowPosX += windowWidth/2;
-
- float MinX = (lonMin-centerLon)*scaledLatDeriv + windowWidth/2;
- float MinY = windowHeight/2 - (atanh(sin(latMin*gradtorad))-latOffset)*scale;
- float MaxX = (lonMax-centerLon)*scaledLatDeriv + windowWidth/2;
- float MaxY = windowHeight/2 - (atanh(sin(latMax*gradtorad))-latOffset)*scale;
-
- float newWidth = windowWidth/windowHeight;
- float newHeight = 1;
-
- float screenX = ((2*newWidth)*(windowPosX - (MinX))/((MaxX)-(MinX)))-newWidth;
- float screenY = ((2*newHeight)*(windowPosY - (MinY))/((MaxY)-(MinY)))-newHeight;
+vec2 PixelToGeo(in float x, in float y, in float latOffset);
- vec2 result = vec2(screenX, screenY);
- return(result);
-}
+vec2 GeoToPixel(in float posx, in float posy);
void main() {
Color = color;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/include/meson.build
^
|
@@ -6,6 +6,7 @@
'osmscoutmapopengl/OpenGLMapData.h',
'osmscoutmapopengl/Triangulate.h',
'osmscoutmapopengl/PNGLoaderOpenGL.h',
+ 'osmscoutmapopengl/ShaderUtils.h',
'osmscoutmapopengl/TextLoader.h',
'poly2tri/poly2tri.h',
'poly2tri/sweep/cdt.h',
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/include/osmscoutmapopengl/MapPainterOpenGL.h
^
|
@@ -58,9 +58,6 @@
int height;
double dpi;
- int screenWidth;
- int screenHeight;
-
float minLon;
float minLat;
float maxLon;
@@ -69,6 +66,8 @@
float lookX;
float lookY;
+ GLuint projectionShader=0;
+
OpenGLMapData<GL_RGBA, 4> areaRenderer;
OpenGLMapData<GL_RGBA, 4> groundTileRenderer;
OpenGLMapData<GL_RGBA, 4> groundRenderer;
@@ -98,6 +97,11 @@
void ProcessGround(const osmscout::MapData &data, const osmscout::MapParameter ¶meter,
const osmscout::Projection &projection, const osmscout::StyleConfigRef &styleConfig);
+ void ProcessWay(const osmscout::WayRef &way,
+ const osmscout::Projection &projection,
+ const osmscout::StyleConfigRef &styleConfig,
+ const WidthFeatureValueReader &widthReader);
+
/**
* Processes OSM way data, and converts to the format required by the OpenGL pipeline
*/
@@ -105,6 +109,12 @@
const osmscout::Projection &projection,
const osmscout::StyleConfigRef &styleConfig);
+ void ProcessNode(const osmscout::NodeRef &node,
+ const osmscout::MapParameter ¶meter,
+ const osmscout::Projection &projection,
+ const osmscout::StyleConfigRef &styleConfig,
+ std::vector<int> &icons);
+
/**
* Processes OSM node data, and converts to the format required by the OpenGL pipeline
*/
@@ -143,11 +153,11 @@
public:
- MapPainterOpenGL(int width, int height, double dpi, int screenWidth, int screenHeight,
+ MapPainterOpenGL(int width, int height, double dpi,
const std::string &fontPath, const std::string &shaderDir,
long defaultTextSize=12);
- ~MapPainterOpenGL() = default;
+ ~MapPainterOpenGL();
bool IsInitialized() const
{
@@ -159,6 +169,8 @@
*/
void OnZoom(float zoomDirection);
+ void SetSize(int width, int height);
+
/**
* Translates the map to the given direction.
*/
@@ -176,14 +188,15 @@
const osmscout::Projection &projection, const osmscout::StyleConfigRef &styleConfig);
/**
- * Swaps currently drawn data and processed data.
- */
+ * Swaps currently drawn data and processed data.
+ */
void SwapData();
/**
- * OpenGL draw call. Draws all feature of the map to the context.
- */
- void DrawMap();
+ * OpenGL draw call. Draws all feature of the map to the context.
+ */
+ void DrawMap(RenderSteps startStep=RenderSteps::FirstStep,
+ RenderSteps endStep=RenderSteps::LastStep);
};
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/include/osmscoutmapopengl/OpenGLMapData.h
^
|
@@ -20,12 +20,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
-#include <GL/glew.h>
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-#include <glm/gtc/type_ptr.hpp>
-#include <glm/ext.hpp>
+#include <osmscoutmapopengl/ShaderUtils.h>
#include <osmscoutmap/MapParameter.h>
#include <osmscoutmap/MapPainter.h>
@@ -34,6 +29,12 @@
#include <iostream>
#include <fstream>
+#include <GL/glew.h>
+#include <glm/glm.hpp>
+#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/type_ptr.hpp>
+#include <glm/ext.hpp>
+
namespace osmscout {
class OpenGLTexture {
@@ -72,66 +73,42 @@
class OpenGLMapData {
private:
- std::vector<GLfloat> Vertices;
- std::vector<GLfloat> VerticesBuffer;
- std::vector<GLuint> Elements;
- std::vector<GLuint> ElementsBuffer;
- unsigned char *Textures=nullptr;
- std::vector<OpenGLTextureRef> TexturesBuffer;
+ std::vector<GLfloat> vertices;
+ std::vector<GLfloat> verticesBuffer;
+ std::vector<GLuint> elements;
+ std::vector<GLuint> elementsBuffer;
+ unsigned char *textures=nullptr;
+ std::vector<OpenGLTextureRef> texturesBuffer;
int textureSize=0;
int textureSizeBuffer=0;
int textureWidth=0;
int textureWidthBuffer=0;
int textureHeight=14;
- GLuint shaderProgram;
- GLuint VAO;
- GLuint VBO;
- GLuint EBO;
- GLuint Tex;
+ GLuint shaderProgram=0;
+ GLuint vao=0;
+ GLuint vbo=0;
+ GLuint ebo=0;
+ GLuint tex=0;
- int VerticesSize;
+ int verticesSize;
float zoom;
- GLuint VertexShader;
- GLuint FragmentShader;
+ GLuint vertexShader=0;
+ GLuint fragmentShader=0;
- std::string VertexShaderSource;
- std::string FragmentShaderSource;
-
- glm::mat4 Model;
- glm::mat4 View;
- glm::mat4 Projection;
-
- bool LoadShader(const std::string &dirPath, const std::string &name, std::string &result) {
- std::string filePath = dirPath + "/" + name;
- if (!ExistsInFilesystem(filePath)) {
- log.Error() << "Shader file " << filePath << " doesn't exists";
- return false;
- }
-
- std::string line;
- std::ifstream myfile(filePath);
- if (!myfile.is_open()) {
- return false;
- }
-
- while (getline(myfile, line)) {
- result.append(line + "\n");
- }
- myfile.close();
-
- return true;
- }
+ glm::mat4 model;
+ glm::mat4 view;
+ glm::mat4 projection;
void LoadVBO() {
- glBindBuffer(GL_ARRAY_BUFFER, VBO);
- glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * Vertices.size(), &Vertices[0], GL_DYNAMIC_DRAW);
+ glBindBuffer(GL_ARRAY_BUFFER, vbo);
+ glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * vertices.size(), &vertices[0], GL_DYNAMIC_DRAW);
}
void LoadEBO() {
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, EBO);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLfloat) * Elements.size(), &Elements[0], GL_DYNAMIC_DRAW);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ebo);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(GLfloat) * elements.size(), &elements[0], GL_DYNAMIC_DRAW);
}
public:
@@ -141,14 +118,26 @@
{
clearData();
- glDeleteProgram(shaderProgram);
- glDeleteShader(FragmentShader);
- glDeleteShader(VertexShader);
+ if (shaderProgram!=0) {
+ glDeleteProgram(shaderProgram);
+ }
+ if (fragmentShader!=0) {
+ glDeleteShader(fragmentShader);
+ }
+ if (vertexShader!=0) {
+ glDeleteShader(vertexShader);
+ }
- glDeleteBuffers(1, &EBO);
- glDeleteBuffers(1, &VBO);
+ if (ebo!=0) {
+ glDeleteBuffers(1, &ebo);
+ }
+ if (vbo!=0) {
+ glDeleteBuffers(1, &vbo);
+ }
- glDeleteVertexArrays(1, &VAO);
+ if (vao!=0) {
+ glDeleteVertexArrays(1, &vao);
+ }
}
OpenGLMapData(const OpenGLMapData&) = delete;
@@ -157,114 +146,108 @@
OpenGLMapData &operator=(OpenGLMapData&&) = delete;
void SwapData() {
- delete[] Textures;
- Vertices = std::move(VerticesBuffer);
- VerticesBuffer.clear();
- Elements = std::move(ElementsBuffer);
- ElementsBuffer.clear();
+ delete[] textures;
+ vertices = std::move(verticesBuffer);
+ verticesBuffer.clear();
+ elements = std::move(elementsBuffer);
+ elementsBuffer.clear();
textureSize = textureSizeBuffer;
textureSizeBuffer = 0;
textureWidth = textureWidthBuffer;
textureWidthBuffer = 0;
- Textures = new unsigned char[textureWidth*textureHeight*TexturePixelSize];
+ textures = new unsigned char[textureWidth * textureHeight * TexturePixelSize];
int index = 0;
for (int i = 0; i < textureHeight; i++) {
- for (unsigned int j = 0; j < TexturesBuffer.size(); j++) {
- int start = i * TexturesBuffer[j]->width * TexturePixelSize;
- for (unsigned int k = start; k < start + (TexturesBuffer[j]->width * TexturePixelSize); k++) {
- Textures[index] = (TexturesBuffer[j]->data[k]);
+ for (unsigned int j = 0; j < texturesBuffer.size(); j++) {
+ int start = i * texturesBuffer[j]->width * TexturePixelSize;
+ for (unsigned int k = start; k < start + (texturesBuffer[j]->width * TexturePixelSize); k++) {
+ textures[index] = (texturesBuffer[j]->data[k]);
index++;
}
}
}
- TexturesBuffer.clear();
+ texturesBuffer.clear();
}
void clearData() {
- Vertices.clear();
- Elements.clear();
- if (Textures != nullptr) {
- delete[] Textures;
- Textures = nullptr;
+ vertices.clear();
+ elements.clear();
+ if (textures != nullptr) {
+ delete[] textures;
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/include/osmscoutmapopengl/ShaderUtils.h
^
|
@@ -0,0 +1,40 @@
+#ifndef LIBOSMSCOUT_SHADERUTILS_H
+#define LIBOSMSCOUT_SHADERUTILS_H
+
+/*
+ This source is part of the libosmscout-map library
+ Copyright (C) 2017 Fanny Monori
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include <osmscoutmapopengl/MapOpenGLImportExport.h>
+
+#include <string>
+
+#include <GL/glew.h>
+
+namespace osmscout {
+
+bool OSMSCOUT_MAP_OPENGL_API LoadShaderSource(const std::string &dirPath, const std::string &name, std::string &result);
+
+bool OSMSCOUT_MAP_OPENGL_API LoadShader(GLuint &shader,
+ GLenum type,
+ const std::string &name,
+ const std::string &shaderSource);
+
+}
+
+#endif //LIBOSMSCOUT_SHADERUTILS_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/include/osmscoutmapopengl/TextLoader.h
^
|
@@ -79,8 +79,8 @@
private:
bool initialized = false;
- FT_Library ft;
- FT_Face face;
+ FT_Library ft=nullptr;
+ FT_Face face=nullptr;
long defaultFontSize;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/src/meson.build
^
|
@@ -2,6 +2,7 @@
'src/osmscoutmapopengl/MapPainterOpenGL.cpp',
'src/osmscoutmapopengl/Triangulate.cpp',
'src/osmscoutmapopengl/PNGLoaderOpenGL.cpp',
+ 'src/osmscoutmapopengl/ShaderUtils.cpp',
'src/osmscoutmapopengl/TextLoader.cpp',
'src/poly2tri/sweep/cdt.cc',
'src/poly2tri/common/shapes.cc',
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/src/osmscoutmapopengl/MapPainterOpenGL.cpp
^
|
@@ -26,19 +26,18 @@
#include <osmscoutmapopengl/MapPainterOpenGL.h>
#include <osmscoutmapopengl/Triangulate.h>
#include <osmscoutmapopengl/PNGLoaderOpenGL.h>
+#include <osmscoutmapopengl/ShaderUtils.h>
#include <GL/glew.h>
namespace osmscout {
- MapPainterOpenGL::MapPainterOpenGL(int width, int height, double dpi, int screenWidth, int screenHeight,
+ MapPainterOpenGL::MapPainterOpenGL(int width, int height, double dpi,
const std::string &fontPath, const std::string &shaderDir,
long defaultTextSize)
: width(width),
height(height),
dpi(dpi),
- screenWidth(screenWidth),
- screenHeight(screenHeight),
textLoader(fontPath, defaultTextSize, dpi)
{
if (!textLoader.IsInitialized()) {
@@ -53,44 +52,57 @@
return;
}
- if (!(areaRenderer.LoadVertexShader(shaderDir, "AreaVertexShader.vert") &&
- areaRenderer.LoadFragmentShader(shaderDir, "AreaFragmentShader.frag") &&
- areaRenderer.InitContext())) {
+ if (std::string projectionSource;
+ !(LoadShaderSource(shaderDir, "Projection.vert", projectionSource) &&
+ LoadShader(projectionShader, GL_VERTEX_SHADER, "projection", projectionSource))) {
+ log.Error() << "Could not load projection shader!";
+ return;
+ }
+
+ if (!areaRenderer.InitContext(shaderDir,
+ "AreaVertexShader.vert",
+ "AreaFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for area rendering!";
return;
}
- if (!(groundTileRenderer.LoadVertexShader(shaderDir, "GroundVertexShader.vert") &&
- groundTileRenderer.LoadFragmentShader(shaderDir, "GroundFragmentShader.frag") &&
- groundTileRenderer.InitContext())) {
+ if (!groundTileRenderer.InitContext(shaderDir,
+ "GroundVertexShader.vert",
+ "GroundFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for ground tile rendering!";
return;
}
- if (!(groundRenderer.LoadVertexShader(shaderDir, "GroundVertexShader.vert") &&
- groundRenderer.LoadFragmentShader(shaderDir, "GroundFragmentShader.frag") &&
- groundRenderer.InitContext())) {
+ if (!groundRenderer.InitContext(shaderDir,
+ "GroundVertexShader.vert",
+ "GroundFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for ground rendering!";
return;
}
- if (!(wayRenderer.LoadVertexShader(shaderDir, "PathVertexShader.vert") &&
- wayRenderer.LoadFragmentShader(shaderDir, "PathFragmentShader.frag") &&
- wayRenderer.InitContext())) {
+ if (!wayRenderer.InitContext(shaderDir,
+ "PathVertexShader.vert",
+ "PathFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for area rendering!";
return;
}
- if (!(imageRenderer.LoadVertexShader(shaderDir, "QuadVertexShader.vert") &&
- imageRenderer.LoadFragmentShader(shaderDir, "QuadFragmentShader.frag") &&
- imageRenderer.InitContext())) {
+ if (!imageRenderer.InitContext(shaderDir,
+ "QuadVertexShader.vert",
+ "QuadFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for image rendering!";
return;
}
- if (!(textRenderer.LoadVertexShader(shaderDir, "TextVertexShader.vert") &&
- textRenderer.LoadFragmentShader(shaderDir, "TextFragmentShader.frag") &&
- textRenderer.InitContext())) {
+ if (!textRenderer.InitContext(shaderDir,
+ "TextVertexShader.vert",
+ "TextFragmentShader.frag",
+ projectionShader)) {
log.Error() << "Could not initialize context for text rendering!";
return;
}
@@ -112,6 +124,13 @@
initialized = true;
}
+ osmscout::MapPainterOpenGL::~MapPainterOpenGL()
+ {
+ if (projectionShader!=0) {
+ glDeleteShader(projectionShader);
+ }
+ }
+
void osmscout::MapPainterOpenGL::ProcessData(const osmscout::MapData &data, const osmscout::MapParameter ¶meter,
const osmscout::Projection &projection,
const osmscout::StyleConfigRef &styleConfig) {
@@ -145,7 +164,7 @@
areaRenderer.SwapData();
areaRenderer.BindBuffers();
- areaRenderer.LoadProgram();
+ areaRenderer.UseProgram();
areaRenderer.LoadVertices();
areaRenderer.SetProjection(width, height);
@@ -166,7 +185,7 @@
groundTileRenderer.SwapData();
groundTileRenderer.BindBuffers();
- groundTileRenderer.LoadProgram();
+ groundTileRenderer.UseProgram();
groundTileRenderer.LoadVertices();
groundTileRenderer.SetProjection(width, height);
@@ -186,7 +205,7 @@
groundRenderer.BindBuffers();
- groundRenderer.LoadProgram();
+ groundRenderer.UseProgram();
groundRenderer.LoadVertices();
groundRenderer.SetProjection(width, height);
@@ -205,7 +224,7 @@
imageRenderer.SwapData();
imageRenderer.BindBuffers();
- imageRenderer.LoadProgram();
+ imageRenderer.UseProgram();
imageRenderer.LoadVertices();
imageRenderer.LoadTextures();
@@ -231,7 +250,7 @@
textRenderer.SwapData();
textRenderer.BindBuffers();
- textRenderer.LoadProgram();
+ textRenderer.UseProgram();
textRenderer.LoadVertices();
textRenderer.LoadTextures();
@@ -261,7 +280,7 @@
wayRenderer.SwapData();
wayRenderer.BindBuffers();
- wayRenderer.LoadProgram();
+ wayRenderer.UseProgram();
wayRenderer.LoadVertices();
wayRenderer.SetProjection(width, height);
@@ -293,9 +312,12 @@
const osmscout::Projection &projection,
const osmscout::StyleConfigRef &styleConfig) {
- osmscout::log.Info() << "Area: " << data.areas.size();
+ //osmscout::log.Info() << "Area: " << data.areas.size();
- std::vector<AreaRef> areas = data.areas;
+ std::vector<AreaRef> areas;
+ areas.reserve(data.areas.size() + data.poiAreas.size());
+ areas.insert(areas.end(), data.areas.begin(), data.areas.end());
+ areas.insert(areas.end(), data.poiAreas.begin(), data.poiAreas.end());
std::sort(areas.begin(), areas.end(),
[](const AreaRef &a, const AreaRef &b) -> bool {
@@ -548,178 +570,188 @@
yMax < 0);
}
- void
- osmscout::MapPainterOpenGL::ProcessWays(const osmscout::MapData &data,
- const osmscout::MapParameter &/*parameter*/,
- const osmscout::Projection &projection,
- const osmscout::StyleConfigRef &styleConfig) {
+ void osmscout::MapPainterOpenGL::ProcessWay(const osmscout::WayRef &way,
+ const osmscout::Projection &projection,
+ const osmscout::StyleConfigRef &styleConfig,
+ const WidthFeatureValueReader &widthReader)
+ {
+ std::vector<LineStyleRef> lineStyles;
- WidthFeatureValueReader widthReader(*styleConfig->GetTypeConfig());
- LayerFeatureValueReader layerReader(*styleConfig->GetTypeConfig());
+ styleConfig->GetWayLineStyles(way->GetFeatureValueBuffer(),
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/src/osmscoutmapopengl/ShaderUtils.cpp
^
|
@@ -0,0 +1,85 @@
+/*
+ This source is part of the libosmscout-map library
+ Copyright (C) 2017 Fanny Monori
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#include <osmscoutmapopengl/ShaderUtils.h>
+#include <osmscout/util/File.h>
+#include <osmscout/util/Logger.h>
+
+#include <string>
+#include <fstream>
+
+#include <GL/glew.h>
+#include <glm/glm.hpp>
+#include <glm/gtc/matrix_transform.hpp>
+#include <glm/gtc/type_ptr.hpp>
+#include <glm/ext.hpp>
+
+namespace osmscout {
+
+bool LoadShaderSource(const std::string &dirPath, const std::string &name, std::string &result) {
+ std::string filePath = dirPath + "/" + name;
+ if (!ExistsInFilesystem(filePath)) {
+ log.Error() << "Shader file " << filePath << " doesn't exists";
+ return false;
+ }
+
+ std::string line;
+ std::ifstream myfile(filePath);
+ if (!myfile.is_open()) {
+ return false;
+ }
+
+ while (getline(myfile, line)) {
+ result.append(line + "\n");
+ }
+ myfile.close();
+
+ return true;
+}
+
+bool LoadShader(GLuint &shader,
+ GLenum type,
+ const std::string &name,
+ const std::string &shaderSource)
+{
+ static_assert(std::is_same<GLchar, char>::value, "GLchar must be char for usage with logger");
+
+ shader = glCreateShader(type);
+ const char *sourceC = shaderSource.c_str();
+ int shaderLength = shaderSource.length();
+ glShaderSource(shader, 1, &sourceC, &shaderLength);
+ glCompileShader(shader);
+
+ GLint isCompiled = 0;
+ glGetShaderiv(shader, GL_COMPILE_STATUS, &isCompiled);
+ if (isCompiled == GL_FALSE) {
+ GLint maxLength = 0;
+ glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &maxLength);
+
+ std::vector<GLchar> errorLog(maxLength);
+ glGetShaderInfoLog(shader, maxLength, &maxLength, errorLog.data());
+ assert(!errorLog.empty() && errorLog.back() == 0);
+ log.Error() << "Error while loading " << name << " shader: " << errorLog.data();
+
+ return false;
+ }
+ return true;
+}
+
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-opengl/src/osmscoutmapopengl/TextLoader.cpp
^
|
@@ -189,8 +189,12 @@
}
TextLoader::~TextLoader() {
- FT_Done_Face(face);
- FT_Done_FreeType(ft);
+ if (face!=nullptr) {
+ FT_Done_Face(face);
+ }
+ if (ft!=nullptr) {
+ FT_Done_FreeType(ft);
+ }
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-qt/include/osmscoutmapqt/MapPainterQt.h
^
|
@@ -230,7 +230,9 @@
bool DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- QPainter* painter);
+ QPainter* painter,
+ RenderSteps startStep=RenderSteps::FirstStep,
+ RenderSteps endStep=RenderSteps::LastStep);
};
/**
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map-qt/src/osmscoutmapqt/MapPainterQt.cpp
^
|
@@ -1158,7 +1158,9 @@
bool MapPainterQt::DrawMap(const Projection& projection,
const MapParameter& parameter,
const MapData& data,
- QPainter* painter)
+ QPainter* painter,
+ RenderSteps startStep,
+ RenderSteps endStep)
{
std::lock_guard<std::mutex> guard(mutex);
@@ -1169,7 +1171,9 @@
return Draw(projection,
parameter,
- data);
+ data,
+ startStep,
+ endStep);
}
template<> std::vector<QtGlyph> QtLabel::ToGlyphs() const
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map/include/osmscoutmap/MapPainter.h
^
|
@@ -22,6 +22,7 @@
#include <list>
#include <string>
+#include <optional>
#include <osmscoutmap/MapImportExport.h>
@@ -178,6 +179,7 @@
FillStyleRef fillStyle; //!< Fill style
BorderStyleRef borderStyle; //!< Border style
GeoBox boundingBox; //!< Bounding box of the area
+ std::optional<GeoCoord> center; //!< "visual" polygon center (pole of inaccessibility)
bool isOuter; //!< flag if this area is outer ring of some relation
CoordBufferRange coordRange; //!< Range of coordinates in transformation buffer
std::list<CoordBufferRange> clippings; //!< Clipping polygons to be used during drawing of this area
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map/include/osmscoutmap/MapPainterNoOp.h
^
|
@@ -101,7 +101,9 @@
bool DrawMap(const Projection& projection,
const MapParameter& parameter,
- const MapData& data);
+ const MapData& data,
+ RenderSteps startStep=RenderSteps::FirstStep,
+ RenderSteps endStep=RenderSteps::LastStep);
};
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map/src/osmscoutmap/MapPainter.cpp
^
|
@@ -789,13 +789,23 @@
projection.GeoToPixel(areaData.boundingBox.GetMaxCoord(),
x2,y2);
+ double labelX;
+ double labelY;
+ if (areaData.center.has_value()){
+ projection.GeoToPixel(areaData.center.value(),
+ labelX, labelY);
+ } else {
+ labelX = (x1+x2)/2;
+ labelY = (y1+y2)/2;
+ }
+
LayoutPointLabels(projection,
parameter,
*areaData.buffer,
iconStyle,
textStyles,
- (x1+x2)/2,
- (y1+y2)/2,
+ labelX,
+ labelY,
std::max(x1, x2) - std::min(x1, x2),
std::max(y1, y2) - std::min(y1, y2));
}
@@ -1290,7 +1300,7 @@
double borderWidth=borderStyle ? borderStyle->GetWidth() : 0.0;
a.boundingBox=ring.GetBoundingBox();
- a.isOuter = ring.IsOuter();
+ a.isOuter=ring.IsOuter();
if (!IsVisibleArea(projection,
a.boundingBox,
@@ -1313,6 +1323,7 @@
a.ref=area.GetObjectFileRef();
a.type=type;
a.buffer=&ring.GetFeatureValueBuffer();
+ a.center=ring.center;
a.fillStyle=fillStyle;
a.borderStyle=borderStyle;
a.coordRange=coordRanges[i];
@@ -2065,6 +2076,7 @@
{
assert(startStep>=RenderSteps::FirstStep);
assert(startStep<=RenderSteps::LastStep);
+ assert(startStep<=endStep);
for (size_t step=startStep; step<=endStep; step++) {
StepMethod stepMethod=stepMethods[step];
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout-map/src/osmscoutmap/MapPainterNoOp.cpp
^
|
@@ -129,11 +129,15 @@
bool MapPainterNoOp::DrawMap(const Projection& projection,
const MapParameter& parameter,
- const MapData& data)
+ const MapData& data,
+ RenderSteps startStep,
+ RenderSteps endStep)
{
Draw(projection,
parameter,
- data);
+ data,
+ startStep,
+ endStep);
return true;
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/CMakeLists.txt
^
|
@@ -90,6 +90,7 @@
include/osmscout/util/NumberSet.h
include/osmscout/util/ObjectPool.h
include/osmscout/util/Parsing.h
+ include/osmscout/util/PolygonCenter.h
include/osmscout/util/ProcessingQueue.h
include/osmscout/util/Progress.h
include/osmscout/util/Projection.h
@@ -164,6 +165,7 @@
src/osmscout/util/Number.cpp
src/osmscout/util/NumberSet.cpp
src/osmscout/util/Parsing.cpp
+ src/osmscout/util/PolygonCenter.cpp
src/osmscout/util/Progress.cpp
src/osmscout/util/Projection.cpp
src/osmscout/util/StopClock.cpp
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/include/meson.build
^
|
@@ -33,6 +33,7 @@
'osmscout/util/NumberSet.h',
'osmscout/util/ObjectPool.h',
'osmscout/util/Parsing.h',
+ 'osmscout/util/PolygonCenter.h',
'osmscout/util/ProcessingQueue.h',
'osmscout/util/Progress.h',
'osmscout/util/Projection.h',
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/include/osmscout/Area.h
^
|
@@ -21,6 +21,7 @@
*/
#include <memory>
+#include <optional>
#include <osmscout/GeoCoord.h>
#include <osmscout/Point.h>
@@ -106,6 +107,8 @@
std::vector<Point> nodes; //!< The array of coordinates
std::vector<SegmentGeoBox> segments; //!< Precomputed (cache) segment bounding boxes for optimisation
GeoBox bbox; //!< Precomputed (cache) bounding box
+ std::optional<GeoCoord> center; //!< "visual" polygon center (pole of inaccessibility).
+ //!< It is computed just for rings when center is far from bounding box center
public:
Ring() = default;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/include/osmscout/TypeConfig.h
^
|
@@ -26,6 +26,7 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
+#include <array>
#include <osmscout/CoreImportExport.h>
@@ -37,6 +38,7 @@
#include <osmscout/util/FileScanner.h>
#include <osmscout/util/FileWriter.h>
#include <osmscout/util/TagErrorReporter.h>
+#include <osmscout/util/Number.h>
#include <osmscout/system/Assert.h>
@@ -832,23 +834,183 @@
const ObjectOSMRef& object,
const TagMap& tags);
+ /**
+ * Read the FeatureValueBuffer from the given FileScanner.
+ *
+ * @throws IOException
+ */
void Read(FileScanner& scanner);
+
+ /**
+ * Reads the FeatureValueBuffer to the given FileScanner.
+ * It also reads the value of the special flag as passed to the Write method.
+ *
+ * @throws IOException
+ */
void Read(FileScanner& scanner,
bool& specialFlag);
+
+ /**
+ * Reads the FeatureValueBuffer to the given FileScanner.
+ * It also reads the value of two special flags as passed to the Write method.
+ *
+ * @throws IOException
+ */
void Read(FileScanner& scanner,
bool& specialFlag1,
bool& specialFlag2);
+
+ /**
+ * Reads the FeatureValueBuffer to the given FileScanner.
+ * It also reads the value of three special flags as passed to the Write method.
+ *
+ * @throws IOException
+ */
+ void Read(FileScanner& scanner,
+ bool& specialFlag1,
+ bool& specialFlag2,
+ bool& specialFlag3);
+
+ /**
+ * Writes the FeatureValueBuffer to the given FileWriter.
+ *
+ * @throws IOException
+ */
void Write(FileWriter& writer) const;
+
+ /**
+ * Writes the FeatureValueBuffer to the given FileWriter.
+ * It also writes the value of the special flag passed. The flag can later be retrieved
+ * by using the matching Read method.
+ *
+ * @throws IOException
+ */
void Write(FileWriter& writer,
bool specialFlag) const;
+
+ /**
+ * Writes the FeatureValueBuffer to the given FileWriter.
+ * It also writes the value of the special flag passed. The flag can later be retrieved
+ * by using the matching Read method.
+ *
+ * @throws IOException
+ */
void Write(FileWriter& writer,
bool specialFlag1,
bool specialFlag2) const;
+
+ /**
+ * Writes the FeatureValueBuffer to the given FileWriter.
+ * It also writes the value of the special flag passed. The flag can later be retrieved
+ * by using the matching Read method.
+ *
+ * @throws IOException
+ */
+ void Write(FileWriter& writer,
+ bool specialFlag1,
+ bool specialFlag2,
+ bool specialFlag3) const;
+
FeatureValueBuffer& operator=(const FeatureValueBuffer& other);
bool operator==(const FeatureValueBuffer& other) const;
bool operator!=(const FeatureValueBuffer& other) const;
+ /**
+ * Reads the FeatureValueBuffer to the given FileScanner.
+ * It also reads the array of special flags (up to 8) as passed to the Write method.
+ *
+ * @throws IOException
+ */
+ template<std::size_t FlagCnt>
+ void Read(FileScanner& scanner, std::array<bool,FlagCnt> &specialFlags)
+ {
+ for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
+ featureBits[i]=scanner.ReadUInt8();
+ }
+
+ if (!specialFlags.empty()) {
+ static_assert(FlagCnt <= 8);
+ uint8_t flagByte;
+ if (BitsToBytes(type->GetFeatureCount()) == BitsToBytes(type->GetFeatureCount() + specialFlags.size())) {
+ flagByte = featureBits[type->GetFeatureMaskBytes() - 1];
+ } else {
+ flagByte = scanner.ReadUInt8();
+ }
+ uint8_t mask=0x80;
+ for (bool &specialFlag: specialFlags) {
+ specialFlag = (flagByte & mask) != 0;
+ mask = mask >> 1;
+ }
+ }
+
+ for (const auto &feature : type->GetFeatures()) {
+ size_t idx=feature.GetIndex();
+
+ if (HasFeature(idx) &&
+ feature.GetFeature()->HasValue()) {
+ FeatureValue* value=feature.GetFeature()->AllocateValue(GetValueAndAllocateBuffer(idx));
+
+ value->Read(scanner);
+ }
+ }
+ }
+
+ /**
+ * Writes the FeatureValueBuffer to the given FileWriter.
+ * It also writes the value of the special flags passed. The flag can later be retrieved
+ * by using the matching Read method.
+ *
+ * @throws IOException
+ */
+ template<std::size_t FlagCnt>
+ void Write(FileWriter& writer,
+ const std::array<bool,FlagCnt> &specialFlags) const
+ {
+ static_assert(FlagCnt <= 8);
+ if (BitsToBytes(type->GetFeatureCount()) == BitsToBytes(type->GetFeatureCount() + specialFlags.size())) {
+ uint8_t mask=0x80;
+ for (const bool &specialFlag: specialFlags) {
+ if (specialFlag) {
+ featureBits[type->GetFeatureMaskBytes() - 1] |= mask;
+ } else {
+ featureBits[type->GetFeatureMaskBytes() - 1] &= ~mask;
+ }
+ mask = mask >> 1;
+ }
+
+ for (size_t i = 0; i < type->GetFeatureMaskBytes(); i++) {
+ writer.Write(featureBits[i]);
+ }
+ } else {
+ for (size_t i = 0; i < type->GetFeatureMaskBytes(); i++) {
+ writer.Write(featureBits[i]);
+ }
+
+ uint8_t flagByte = 0;
+ uint8_t mask=0x80;
+ for (const bool &specialFlag: specialFlags) {
+ if (specialFlag) {
+ flagByte |= mask;
+ }
+ mask = mask >> 1;
+ }
+
+ writer.Write(flagByte);
+ }
+
+ for (const auto &feature : type->GetFeatures()) {
+ size_t idx=feature.GetIndex();
+
+ if (HasFeature(idx) &&
+ feature.GetFeature()->HasValue()) {
+ FeatureValue* value=GetValue(idx);
+
+ value->Write(writer);
+ }
+ }
+ }
+
template<class T> const T* findValue() const
{
for (const auto& featureInstance :GetType()->GetFeatures()) {
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/include/osmscout/util/PolygonCenter.h
^
|
@@ -0,0 +1,49 @@
+#ifndef OSMSCOUT_POLYGONCENTER_H
+#define OSMSCOUT_POLYGONCENTER_H
+
+/*
+ This source is part of the libosmscout library
+ Copyright (C) 2022 Lukas Karas
+ Copyright (C) 2016 Mapbox
+
+ ISC License (compatible with GNU LGPL)
+
+ Permission to use, copy, modify, and/or distribute this software for any purpose
+ with or without fee is hereby granted, provided that the above copyright notice
+ and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+ IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+ */
+
+#include <osmscout/CoreImportExport.h>
+#include <osmscout/GeoCoord.h>
+#include <osmscout/Point.h>
+#include <osmscout/Area.h>
+
+#include <vector>
+
+namespace osmscout {
+
+/**
+ * \ingroup Util
+ *
+ * A fast algorithm for finding polygon pole of inaccessibility, the most distant internal point from the polygon
+ * outline (not to be confused with centroid).
+ * Useful for optimal placement of a text label on a polygon.
+ *
+ * Based on PolyLabel algorithm from Mapbox
+ * - https://blog.mapbox.com/a-new-algorithm-for-finding-a-visual-center-of-a-polygon-7c77e6492fbc
+ * - https://github.com/mapbox/polylabel
+ */
+extern OSMSCOUT_API GeoCoord PolygonCenter(const Area& area, double precision = 1);
+
+extern OSMSCOUT_API GeoCoord PolygonCenter(const std::vector<Point>& polygon, double precision = 1);
+
+}
+#endif //OSMSCOUT_POLYGONCENTER_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/src/meson.build
^
|
@@ -24,6 +24,7 @@
'src/osmscout/util/Number.cpp',
'src/osmscout/util/NumberSet.cpp',
'src/osmscout/util/Parsing.cpp',
+ 'src/osmscout/util/PolygonCenter.cpp',
'src/osmscout/util/Progress.cpp',
'src/osmscout/util/Projection.cpp',
'src/osmscout/util/StopClock.cpp',
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/src/osmscout/Area.cpp
^
|
@@ -222,6 +222,7 @@
TypeId ringType;
bool multipleRings;
bool hasMaster;
+ bool hasCenter;
uint32_t ringCount=1;
FeatureValueBuffer featureValueBuffer;
@@ -233,9 +234,17 @@
featureValueBuffer.SetType(type);
- featureValueBuffer.Read(scanner,
- multipleRings,
- hasMaster);
+ if (typeConfig.GetFileFormatVersion()<=23) {
+ featureValueBuffer.Read(scanner,
+ multipleRings,
+ hasMaster);
+ hasCenter=false;
+ } else {
+ featureValueBuffer.Read(scanner,
+ multipleRings,
+ hasMaster,
+ hasCenter);
+ }
if (multipleRings) {
ringCount=scanner.ReadUInt32Number();
@@ -255,6 +264,9 @@
rings[0].MarkAsOuterRing();
}
+ if (hasCenter) {
+ rings[0].center=scanner.ReadCoord();
+ }
scanner.Read(rings[0].nodes,
rings[0].segments,
rings[0].bbox,
@@ -269,7 +281,15 @@
ring.SetType(type);
if (ring.GetType()->GetAreaId()!=typeIgnore) {
- ring.featureValueBuffer.Read(scanner);
+ if (typeConfig.GetFileFormatVersion()<=23) {
+ ring.featureValueBuffer.Read(scanner);
+ hasCenter=false;
+ } else {
+ ring.featureValueBuffer.Read(scanner, hasCenter);
+ }
+ if (hasCenter) {
+ ring.center=scanner.ReadCoord();
+ }
}
ring.ring=scanner.ReadUInt8();
@@ -364,6 +384,7 @@
TypeId ringType;
bool multipleRings;
bool hasMaster;
+ bool hasCenter;
uint32_t ringCount=1;
FeatureValueBuffer featureValueBuffer;
@@ -375,9 +396,17 @@
featureValueBuffer.SetType(type);
- featureValueBuffer.Read(scanner,
- multipleRings,
- hasMaster);
+ if (typeConfig.GetFileFormatVersion()<=23) {
+ featureValueBuffer.Read(scanner,
+ multipleRings,
+ hasMaster);
+ hasCenter = false;
+ } else {
+ featureValueBuffer.Read(scanner,
+ multipleRings,
+ hasMaster,
+ hasCenter);
+ }
if (multipleRings) {
ringCount=scanner.ReadUInt32Number();
@@ -397,6 +426,9 @@
rings[0].MarkAsOuterRing();
}
+ if (hasCenter) {
+ rings[0].center=scanner.ReadCoord();
+ }
scanner.Read(rings[0].nodes,
rings[0].segments,
rings[0].bbox,
@@ -411,7 +443,15 @@
ring.SetType(type);
if (ring.featureValueBuffer.GetType()->GetAreaId()!=typeIgnore) {
- ring.featureValueBuffer.Read(scanner);
+ if (typeConfig.GetFileFormatVersion()<=23) {
+ ring.featureValueBuffer.Read(scanner);
+ hasCenter=false;
+ } else {
+ ring.featureValueBuffer.Read(scanner, hasCenter);
+ }
+ if (hasCenter) {
+ ring.center=scanner.ReadCoord();
+ }
}
ring.ring=scanner.ReadUInt8();
@@ -452,12 +492,16 @@
ring->featureValueBuffer.Write(writer,
multipleRings,
- hasMaster);
+ hasMaster,
+ ring->center.has_value());
if (multipleRings) {
writer.WriteNumber((uint32_t)(rings.size()-1));
}
+ if (ring->center.has_value()) {
+ writer.WriteCoord(ring->center.value());
+ }
writer.Write(ring->nodes,
ring->GetType()->CanRoute());
@@ -470,7 +514,11 @@
typeConfig.GetAreaTypeIdBytes());
if (ring->GetType()->GetAreaId()!=typeIgnore) {
- ring->featureValueBuffer.Write(writer);
+ ring->featureValueBuffer.Write(writer,
+ ring->center.has_value());
+ if (ring->center.has_value()) {
+ writer.WriteCoord(ring->center.value());
+ }
}
writer.Write(ring->ring);
@@ -550,12 +598,16 @@
ring->featureValueBuffer.Write(writer,
multipleRings,
- hasMaster);
+ hasMaster,
+ ring->center.has_value());
if (multipleRings) {
writer.WriteNumber((uint32_t)(rings.size()-1));
}
+ if (ring->center.has_value()) {
+ writer.WriteCoord(ring->center.value());
+ }
writer.Write(ring->nodes,
false);
@@ -568,7 +620,11 @@
typeConfig.GetAreaTypeIdBytes());
if (ring->GetType()->GetAreaId()!=typeIgnore) {
- ring->featureValueBuffer.Write(writer);
+ ring->featureValueBuffer.Write(writer,
+ ring->center.has_value());
+ if (ring->center.has_value()) {
+ writer.WriteCoord(ring->center.value());
+ }
}
writer.Write(ring->ring);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/src/osmscout/TypeConfig.cpp
^
|
@@ -465,224 +465,66 @@
}
}
- /**
- * Read the FeatureValueBuffer from the given FileScanner.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Read(FileScanner& scanner)
{
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- featureBits[i]=scanner.ReadUInt8();
- }
- for (const auto &feature : type->GetFeatures()) {
- size_t idx=feature.GetIndex();
-
- if (HasFeature(idx) &&
- feature.GetFeature()->HasValue()) {
- FeatureValue* value=feature.GetFeature()->AllocateValue(GetValueAndAllocateBuffer(idx));
-
- value->Read(scanner);
- }
- }
+ std::array<bool,0> specialFlags;
+ Read<0>(scanner, specialFlags);
}
- /**
- * Reads the FeatureValueBuffer to the given FileScanner.
- * It also reads the value of the special flag as passed to the Write method.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Read(FileScanner& scanner,
bool& specialFlag)
{
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- featureBits[i]=scanner.ReadUInt8();
- }
-
- if (BitsToBytes(type->GetFeatureCount())==BitsToBytes(type->GetFeatureCount()+1)) {
- specialFlag=(featureBits[type->GetFeatureMaskBytes()-1] & 0x80)!=0;
- }
- else {
- uint8_t addByte=scanner.ReadUInt8();
-
- specialFlag=(addByte & 0x80)!=0;
- }
-
- for (const auto &feature : type->GetFeatures()) {
- size_t idx=feature.GetIndex();
-
- if (HasFeature(idx) &&
- feature.GetFeature()->HasValue()) {
- FeatureValue* value=feature.GetFeature()->AllocateValue(GetValueAndAllocateBuffer(idx));
-
- value->Read(scanner);
- }
- }
+ std::array<bool,1> specialFlags;
+ Read<1>(scanner, specialFlags);
+ specialFlag=specialFlags[0];
}
- /**
- * Reads the FeatureValueBuffer to the given FileScanner.
- * It also reads the value of two special flags as passed to the Write method.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Read(FileScanner& scanner,
bool& specialFlag1,
bool& specialFlag2)
{
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- featureBits[i]=scanner.ReadUInt8();
- }
-
- if (BitsToBytes(type->GetFeatureCount())==BitsToBytes(type->GetFeatureCount()+2)) {
- specialFlag1=(featureBits[type->GetFeatureMaskBytes()-1] & 0x80)!=0;
- specialFlag2=(featureBits[type->GetFeatureMaskBytes()-1] & 0x40)!=0;
- }
- else {
- uint8_t addByte=scanner.ReadUInt8();
-
- specialFlag1=(addByte & 0x80)!=0;
- specialFlag2=(addByte & 0x40)!=0;
- }
-
- for (const auto &feature : type->GetFeatures()) {
- size_t idx=feature.GetIndex();
-
- if (HasFeature(idx) &&
- feature.GetFeature()->HasValue()) {
- FeatureValue* value=feature.GetFeature()->AllocateValue(GetValueAndAllocateBuffer(idx));
+ std::array<bool,2> specialFlags;
+ Read<2>(scanner, specialFlags);
+ specialFlag1=specialFlags[0];
+ specialFlag2=specialFlags[1];
+ }
- value->Read(scanner);
- }
- }
+ void FeatureValueBuffer::Read(FileScanner& scanner,
+ bool& specialFlag1,
+ bool& specialFlag2,
+ bool& specialFlag3)
+ {
+ std::array<bool,3> specialFlags;
+ Read<3>(scanner, specialFlags);
+ specialFlag1=specialFlags[0];
+ specialFlag2=specialFlags[1];
+ specialFlag3=specialFlags[2];
}
- /**
- * Writes the FeatureValueBuffer to the given FileWriter.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Write(FileWriter& writer) const
{
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- writer.Write(featureBits[i]);
- }
-
- for (const auto &feature : type->GetFeatures()) {
- size_t idx=feature.GetIndex();
-
- if (HasFeature(idx) &&
- feature.GetFeature()->HasValue()) {
- FeatureValue* value=GetValue(idx);
-
- value->Write(writer);
- }
- }
+ Write<0>(writer, std::array<bool,0>());
}
- /**
- * Writes the FeatureValueBuffer to the given FileWriter.
- * It also writes the value of the special flag passed. The flag can later be retrieved
- * by using the matching Read method.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Write(FileWriter& writer,
bool specialFlag) const
{
- if (BitsToBytes(type->GetFeatureCount())==BitsToBytes(type->GetFeatureCount()+1)) {
- if (specialFlag) {
- featureBits[type->GetFeatureMaskBytes()-1]|=0x80;
- }
- else {
- featureBits[type->GetFeatureMaskBytes()-1]&=~0x80;
- }
-
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- writer.Write(featureBits[i]);
- }
- }
- else {
- for (size_t i=0; i<type->GetFeatureMaskBytes(); i++) {
- writer.Write(featureBits[i]);
- }
-
- uint8_t addByte=specialFlag ? 0x80 : 0x00;
-
- writer.Write(addByte);
- }
-
- for (const auto &feature : type->GetFeatures()) {
- size_t idx=feature.GetIndex();
-
- if (HasFeature(idx) &&
- feature.GetFeature()->HasValue()) {
- FeatureValue* value=GetValue(idx);
-
- value->Write(writer);
- }
- }
+ Write<1>(writer, std::array<bool,1>{specialFlag});
}
- /**
- * Writes the FeatureValueBuffer to the given FileWriter.
- * It also writes the value of the special flag passed. The flag can later be retrieved
- * by using the matching Read method.
- *
- * @throws IOException
- */
void FeatureValueBuffer::Write(FileWriter& writer,
bool specialFlag1,
bool specialFlag2) const
{
- if (BitsToBytes(type->GetFeatureCount())==BitsToBytes(type->GetFeatureCount()+2)) {
- if (specialFlag1) {
- featureBits[type->GetFeatureMaskBytes()-1]|=0x80;
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/src/osmscout/util/PolygonCenter.cpp
^
|
@@ -0,0 +1,209 @@
+/*
+ This source is part of the libosmscout library
+ Copyright (C) 2022 Lukas Karas
+ Copyright (C) 2016 Mapbox
+
+ ISC License (compatible with GNU LGPL)
+
+ Permission to use, copy, modify, and/or distribute this software for any purpose
+ with or without fee is hereby granted, provided that the above copyright notice
+ and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO
+ THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
+ IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+ */
+
+#include <osmscout/Area.h>
+#include <osmscout/GeoCoord.h>
+#include <osmscout/Point.h>
+
+#include <osmscout/util/GeoBox.h>
+#include <osmscout/util/Geometry.h>
+#include <osmscout/util/PolygonCenter.h>
+#include <osmscout/util/Logger.h>
+
+#include <queue>
+#include <vector>
+
+namespace osmscout {
+
+// get squared distance from a point to a segment
+double getSegDistSq(const GeoCoord& p,
+ const Point& a,
+ const Point& b) {
+ auto x = a.GetLon();
+ auto y = a.GetLat();
+ auto dx = b.GetLon() - x;
+ auto dy = b.GetLat() - y;
+
+ if (dx != 0 || dy != 0) {
+
+ auto t = ((p.GetLon() - x) * dx + (p.GetLat() - y) * dy) / (dx * dx + dy * dy);
+
+ if (t > 1) {
+ x = b.GetLon();
+ y = b.GetLat();
+ } else if (t > 0) {
+ x += dx * t;
+ y += dy * t;
+ }
+ }
+
+ dx = p.GetLon() - x;
+ dy = p.GetLat() - y;
+
+ return dx * dx + dy * dy;
+}
+
+using Ring = std::vector<Point>;
+using Polygon = std::vector<const Ring*>;
+
+// signed distance from point to polygon outline (negative if point is outside)
+auto pointToPolygonDist(const GeoCoord& point, const Polygon& polygon) {
+ bool inside = false;
+ auto minDistSq = std::numeric_limits<double>::infinity();
+
+ for (const auto& ring : polygon) {
+ for (std::size_t i = 0, len = ring->size(), j = len - 1; i < len; j = i++) {
+ const auto& a = (*ring)[i];
+ const auto& b = (*ring)[j];
+
+ if ((a.GetLat() > point.GetLat()) != (b.GetLat() > point.GetLat()) &&
+ (point.GetLon() < (b.GetLon() - a.GetLon()) * (point.GetLat() - a.GetLat()) / (b.GetLat() - a.GetLat()) + a.GetLon())) {
+ inside = !inside;
+ }
+
+ minDistSq = std::min(minDistSq, getSegDistSq(point, a, b));
+ }
+ }
+
+ return (inside ? 1 : -1) * std::sqrt(minDistSq);
+}
+
+struct Cell {
+ Cell(const GeoCoord& c_, double h_, const Polygon& polygon)
+ : c(c_),
+ h(h_),
+ d(pointToPolygonDist(c, polygon)),
+ max(d + h * std::sqrt(2))
+ {}
+
+ GeoCoord c; // cell center
+ double h; // half the cell size
+ double d; // distance from cell center to polygon
+ double max; // max distance to polygon within a cell
+};
+
+// get polygon centroid (of first top-level outer ring)
+Cell getCentroidCell(const Polygon& polygon) {
+ assert(!polygon.empty());
+ double area = 0;
+ GeoCoord c { 0, 0 };
+ const auto &ring = (*polygon[0]);
+
+ for (std::size_t i = 0, len = ring.size(), j = len - 1; i < len; j = i++) {
+ const Point& a = ring[i];
+ const Point& b = ring[j];
+ auto f = a.GetLon() * b.GetLat() - b.GetLon() * a.GetLat();
+ c.Set(
+ c.GetLat() + (a.GetLat() + b.GetLat()) * f,
+ c.GetLon() + (a.GetLon() + b.GetLon()) * f);
+ area += f * 3;
+ }
+
+ assert(!ring.empty());
+ return Cell(area == 0 ? ring[0].GetCoord() : GeoCoord(c.GetLat() / area, c.GetLon() / area),
+ 0,
+ polygon);
+}
+
+GeoCoord PolygonCenter(const Polygon &polygon, const GeoBox &envelope, double precision)
+{
+ const GeoCoord size{envelope.GetHeight(), envelope.GetWidth()};
+
+ const double cellSize = std::min(size.GetLat(), size.GetLon());
+ double h = cellSize / 2;
+
+ // a priority queue of cells in order of their "potential" (max distance to polygon)
+ auto compareMax = [] (const Cell& a, const Cell& b) {
+ return a.max < b.max;
+ };
+ using Queue = std::priority_queue<Cell, std::vector<Cell>, decltype(compareMax)>;
+ Queue cellQueue(compareMax);
+
+ if (cellSize == 0) {
+ return envelope.GetMinCoord();
+ }
+
+ // cover polygon with initial cells
+ for (double lon = envelope.GetMinLon(); lon < envelope.GetMaxLon(); lon += cellSize) {
+ for (double lat = envelope.GetMinLat(); lat < envelope.GetMaxLat(); lat += cellSize) {
+ cellQueue.push(Cell({lat + h, lon + h}, h, polygon));
+ }
+ }
+
+ // take centroid as the first best guess
+ auto bestCell = getCentroidCell(polygon);
+
+ // second guess: bounding box centroid
+ Cell bboxCell(envelope.GetCenter(), 0, polygon);
+ if (bboxCell.d > bestCell.d) {
+ bestCell = bboxCell;
+ }
+
+ auto numProbes = cellQueue.size();
+ while (!cellQueue.empty()) {
+ // pick the most promising cell from the queue
+ auto cell = cellQueue.top();
+ cellQueue.pop();
+
+ // update the best cell if we found a better one
+ if (cell.d > bestCell.d) {
+ bestCell = cell;
+ log.Debug() << "found best " << ::round(1e4 * cell.d) / 1e4 << " after " << numProbes << " probes";
+ }
+
+ // do not drill down further if there's no chance of a better solution
+ if (cell.max - bestCell.d <= precision) {
+ continue;
+ }
+
+ // split the cell into four cells
+ h = cell.h / 2;
+ cellQueue.push(Cell({cell.c.GetLat() - h, cell.c.GetLon() - h}, h, polygon));
+ cellQueue.push(Cell({cell.c.GetLat() - h, cell.c.GetLon() + h}, h, polygon));
+ cellQueue.push(Cell({cell.c.GetLat() + h, cell.c.GetLon() - h}, h, polygon));
+ cellQueue.push(Cell({cell.c.GetLat() + h, cell.c.GetLon() + h}, h, polygon));
+ numProbes += 4;
+ }
+
+ log.Debug() << "num probes: " << numProbes;
+ log.Debug() << "best distance: " << bestCell.d;
+
+ return bestCell.c;
+}
+
+GeoCoord PolygonCenter(const Area &area, double precision)
+{
+ Polygon polygon;
+ area.VisitRings([&](size_t, const Area::Ring &ring, const TypeInfoRef&) -> bool {
+ polygon.push_back(&ring.nodes);
+ return false; // visit just top-level outer rings
+ });
+ return PolygonCenter(polygon, area.GetBoundingBox(), precision);
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/libosmscout/src/osmscout/util/utf8helper.cpp
^
|
@@ -50,39 +50,40 @@
return ch->code;
}
-codepoint TransformUpper(const character* ch, int context) {
- (void)context;
+codepoint TransformUpper(const character* ch, [[maybe_unused]] int context) {
return ch->upper;
}
-codepoint TransformLower(const character* ch, int context) {
- (void)context;
+codepoint TransformLower(const character* ch, [[maybe_unused]] int context) {
return ch->lower;
}
codepoint TransformNormalize(const character* ch, int context) {
- if (((IsSpace | IsBreaker) & ch->category)) {
- if (((IsSpace | IsBreaker) & context))
+ if ((IsSpace | IsBreaker) & ch->category) {
+ if ((IsSpace | IsBreaker) & context) {
return NullCodepoint;
+ }
return 0x20;
}
- if ((ch->category & IsControl))
+ if (ch->category & IsControl) {
return NullCodepoint;
+ }
return ch->lower;
}
codepoint TransformCapitalize(const character* ch, int context) {
- if ((context & (IsSpace | IsBreaker | IsControl)))
+ if (context & (IsSpace | IsBreaker | IsControl)) {
return ch->upper;
+ }
return ch->lower;
}
codepoint TransformTransliterate(const character* ch, int context) {
codepoint c = NullCodepoint;
- if ((IsSpace & context & ch->category))
+ if (IsSpace & context & ch->category) {
return c;
- const char* b = ch->translate;
- for (; *b; ++b) {
+ }
+ for (const char* b = ch->translate; *b; ++b) {
c <<= 8;
c |= static_cast<byte>(*b);
}
@@ -158,13 +159,15 @@
bool UTF8String::Remove(size_t pos, size_t n) {
if (pos < Size()) {
- if (n > (store.size() - pos))
+ if (n > (store.size() - pos)) {
n = store.size() - pos;
+ }
size_t bc = 0;
storage_type::const_iterator beg = store.cbegin() + pos;
storage_type::const_iterator end = beg + n;
- for (storage_type::const_iterator it = beg; it != end; ++it)
+ for (storage_type::const_iterator it = beg; it != end; ++it) {
bc += _u_size(*it);
+ }
store.erase(beg, end);
rawSize -= bc;
return true;
@@ -269,8 +272,9 @@
std::string UTF8String::Substr(size_t pos, size_t n) const {
if (pos < store.size()) {
- if (n > (store.size() - pos))
+ if (n > (store.size() - pos)) {
n = store.size() - pos;
+ }
std::string tmp(sizeof(codepoint) * n, '$');
storage_type::const_iterator it = store.cbegin() + pos;
char* b = &tmp[0];
@@ -318,11 +322,12 @@
if (bb < 0x80) {
const character* c = &charmap_us7ascii[bb];
codepoint u = p->func(c, p->context);
- if (u == NullCodepoint)
+ if (u == NullCodepoint) {
return Parser::Continue;
+ }
p->u = u;
p->context = c->category;
- p->u_size = 1;
+ p->u_size = _u_size(p->u);
return Parser::Done;
}
else if (bb < 0xc2) {
@@ -365,7 +370,7 @@
p->u = (p->b[0] << 8) | bb;
p->context = None;
}
- p->u_size = 2;
+ p->u_size = _u_size(p->u);
return Parser::Done;
}
// invalid codepoint: restart
@@ -412,7 +417,7 @@
p->u = (p->b[0] << 16) | (p->b[1] << 8) | bb;
p->context = None;
}
- p->u_size = 3;
+ p->u_size = _u_size(p->u);
return Parser::Done;
}
// invalid codepoint: restart
@@ -476,7 +481,7 @@
p->u = (p->b[0] << 24) | (p->b[1] << 16) | (p->b[2] << 8) | bb;
p->context = None;
}
- p->u_size = 4;
+ p->u_size = _u_size(p->u);
return Parser::Done;
}
// invalid codepoint: restart
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/meson.build
^
|
@@ -8,7 +8,7 @@
if build_machine.system()=='darwin'
add_languages(['objcpp'])
# Workarounds...
- add_project_arguments(['-fobjc-arc', '-std=c++11'], language: 'objcpp')
+ add_project_arguments(['-fobjc-arc', '-std=c++17'], language: 'objcpp')
add_project_link_arguments(['-dynamiclib'], language: 'objcpp')
endif
@@ -159,12 +159,14 @@
gobjectDep = dependency('gobject-2.0',required: false)
# DirectX
-
d2d1Dep = compiler.find_library('d2d1', required: false)
dwriteDep = compiler.find_library('dwrite', required: false)
winCodecsDep = compiler.find_library('Windowscodecs', required: false)
d2dlHeaderAvailable = compiler.has_header('d2d1.h')
+# GdiPlus
+gdiplusDep = compiler.find_library('gdiplus', required: false)
+
# Qt
qt5 = import('qt5')
qt5GuiDep = dependency('qt5', modules: [ 'Core', 'Gui'], required: false)
@@ -224,13 +226,19 @@
endif
# DirectX
-
if d2d1Dep.found() and dwriteDep.found() and winCodecsDep.found() and d2dlHeaderAvailable and get_option('enableMapDirectX')
buildMapDirectX=true
else
buildMapDirectX=false
endif
+# GDI
+if build_machine.system()=='windows' and gdiplusDep.found()
+ buildMapGDI=true
+else
+ buildMapGDI=false
+endif
+
# GPX
if xml2Dep.found() and get_option('enableGpx')
buildGpx=true
@@ -299,6 +307,7 @@
message('libosmscout-map-agg: @0@'.format(buildMapAgg))
message('libosmscout-map-cairo: @0@'.format(buildMapCairo))
message('libosmscout-map-directx: @0@'.format(buildMapDirectX))
+message('libosmscout-map-gdi: @0@'.format(buildMapGDI))
message('libosmscout-map-iosx: @0@'.format(buildMapIOSX))
message('libosmscout-map-opengl: @0@'.format(buildMapOpenGL))
message('libosmscout-map-qt: @0@'.format(buildMapQt))
@@ -332,6 +341,10 @@
subdir('libosmscout-map-directx')
endif
+if buildMapGDI
+ subdir('libosmscout-map-gdi')
+endif
+
if buildMapIOSX
# Does not yet work, because we are not able to active std11 support, fixed in meson trunk
subdir('libosmscout-map-iosx')
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/dependencies/libosmscout/stylesheets/standard.oss
^
|
@@ -371,6 +371,19 @@
COLOR turnSymbolColor = #ffffff80;
COLOR turnSymbolOutlineColor = #a0a0a080;
+ IF daylight {
+ COLOR aerodromeColor = #d5ddbd;
+ COLOR aerodromeTerminalColor = #cc99ff;
+ COLOR aerodromeRunwayColor = #bbbbcc;
+ COLOR aerodromeApron = #e8d1fe;
+ }
+ ELSE {
+ COLOR aerodromeColor = darken(#d5ddbd, 0.6);
+ COLOR aerodromeTerminalColor = darken(#cc99ff, 0.6);
+ COLOR aerodromeRunwayColor = darken(#bbbbcc, 0.6);
+ COLOR aerodromeApron = darken(#e8d1fe, 0.6);
+ }
+
SYMBOL viaFerrataEasyCross
POLYGON -0.5,-0.5 0.5,0.5 {
AREA.BORDER { width: 0.1mm; color: @viaFerrataEasyColor; }
@@ -2218,16 +2231,16 @@
[MAG city-] {
[TYPE aeroway_aerodrome,
- aeroway_helipad] AREA { color: #d5ddbd; }
+ aeroway_helipad] AREA { color: @aerodromeColor; }
- [TYPE aeroway_terminal] AREA { color: #cc99ff; }
- [TYPE aeroway_runway] AREA { color: #bbbbcc; }
- [TYPE aeroway_apron] AREA { color: #e8d1fe; }
+ [TYPE aeroway_terminal] AREA { color: @aerodromeTerminalColor; }
+ [TYPE aeroway_runway] AREA { color: @aerodromeRunwayColor; }
+ [TYPE aeroway_apron] AREA { color: @aerodromeApron; }
}
[MAG suburb-] {
- [TYPE aeroway_runway] WAY {color: #bbbbcc; displayWidth: 0.5mm; width: 20m;}
- [TYPE aeroway_taxiway] WAY {color: #bbbbcc; displayWidth: 0.5mm; width: 15m;}
+ [TYPE aeroway_runway] WAY {color: @aerodromeRunwayColor; displayWidth: 0.5mm; width: 20m;}
+ [TYPE aeroway_taxiway] WAY {color: @aerodromeRunwayColor; displayWidth: 0.5mm; width: 15m;}
}
[MAG close-] {
|
[-]
[+]
|
Added |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/graphics/cover-2.22.svg
^
|
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="845"
+ height="422"
+ id="svg2054"
+ version="1.1"
+ sodipodi:docname="cover-2.17.svg"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <metadata
+ id="metadata14">
+ <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 />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs12">
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect68354"
+ is_visible="true"
+ lpeversion="1" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect67275"
+ is_visible="true"
+ lpeversion="1" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect61307"
+ is_visible="true"
+ lpeversion="1" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect60161"
+ is_visible="true"
+ lpeversion="1" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect58467"
+ is_visible="true"
+ lpeversion="1" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect52944"
+ is_visible="true"
+ lpeversion="1" />
+ <filter
+ inkscape:collect="always"
+ style="color-interpolation-filters:sRGB"
+ id="filter51493"
+ x="-0.2313123"
+ y="-0.37891728"
+ width="1.4626246"
+ height="1.7578346">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="3.0860482"
+ id="feGaussianBlur51495" />
+ </filter>
+ <meshgradient
+ inkscape:collect="always"
+ id="meshgradient21283"
+ gradientUnits="userSpaceOnUse"
+ x="-332.61957"
+ y="814.60327">
+ <meshrow
+ id="meshrow47633">
+ <meshpatch
+ id="meshpatch47635">
+ <stop
+ path="c 5.2076,-5.43232e-05 13.5814,1.93095 18.7891,1.93095"
+ style="stop-color:#ffffff;stop-opacity:1"
+ id="stop47637" />
+ <stop
+ path="c 0.22361,7.77765 -1.84395,8.97825 -1.84406,16.3893"
+ style="stop-color:#a17e34;stop-opacity:1"
+ id="stop47639" />
+ <stop
+ path="c -5.20756,0.000281765 -8.57128,5.84397 -13.779,5.84397"
+ style="stop-color:#a17e34;stop-opacity:1"
+ id="stop47641" />
+ <stop
+ path="c 0,-7.41092 -3.16582,-16.7528 -3.16604,-24.1642"
+ style="stop-color:#a17e34;stop-opacity:1"
+ id="stop47643" />
+ </meshpatch>
+ <meshpatch
+ id="meshpatch47645">
+ <stop
+ path="c 5.2077,0 9.81985,0.929076 15.0274,0.929122"
+ id="stop47647" />
+ <stop
+ path="c 0.000144097,7.41081 0.595604,13.893 0.595604,21.3039"
+ style="stop-color:#5b471d;stop-opacity:1"
+ id="stop47649" />
+ <stop
+ path="c -2.11035,-6.44281 -10.3606,-5.23983 -17.4671,-5.84374"
+ style="stop-color:#a17e34;stop-opacity:1"
+ id="stop47651" />
+ </meshpatch>
+ </meshrow>
+ <meshrow
+ id="meshrow47653">
+ <meshpatch
+ id="meshpatch47655">
+ <stop
+ path="c -1.68717,14.2356 1.43271,21.6624 1.84406,28.0763"
+ id="stop47657" />
+ <stop
+ path="c -5.2077,0 -10.4154,0 -15.6231,1.13687e-13"
+ style="stop-color:#a17e34;stop-opacity:1"
+ id="stop47659" />
+ <stop
+ path="c -5.68434e-14,-7.41092 -5.68434e-14,-14.8218 4e-05,-22.2324"
+ style="stop-color:#cbb55e;stop-opacity:1"
+ id="stop47661" />
+ </meshpatch>
+ <meshpatch
+ id="meshpatch47663">
+ <stop
+ path="c 0,7.41092 -4.3727,6.98682 -4.37276,14.3978"
+ id="stop47665" />
+ <stop
+ path="c -5.20757,-0.000164599 -6.04249,7.83479 -11.2502,7.83478"
+ style="stop-color:#1f180a;stop-opacity:1"
+ id="stop47667" />
+ </meshpatch>
+ </meshrow>
+ </meshgradient>
+ <filter
+ inkscape:collect="always"
+ style="color-interpolation-filters:sRGB"
+ id="filter48085"
+ x="-0.011683676"
+ y="-0.0082102014"
+ width="1.0233674"
+ height="1.0164204">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="0.1521128"
+ id="feGaussianBlur48087" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1136"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="0.87407407"
+ inkscape:cx="353.51695"
+ inkscape:cy="253.98305"
+ inkscape:window-x="1920"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2054"
+ inkscape:pagecheckerboard="0" />
+ <image
+ sodipodi:absref="/home/karry/SailfishOS/projects/osmscout-sailfish/graphics/cover-2.17.jpg"
+ xlink:href="cover-2.17.jpg"
+ y="0"
+ x="0"
+ id="image892"
+ style="image-rendering:optimizeSpeed"
+ preserveAspectRatio="none"
+ height="422"
+ width="845" />
+ <g
+ id="label"
+ transform="matrix(1.4841993,0,0,1.4841993,49.48781,-1166.5396)"
+ style="opacity:1">
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:50px;line-height:99%;font-family:Arial;-inkscape-font-specification:Arial;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none"
+ x="263.37292"
+ y="835.81036"
+ id="text4187"><tspan
+ style="fill:#411f11;fill-opacity:0.734982"
|
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/pics/cover.jpg
^
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout-2.22.tar.bz2/translations/de.ts
^
|
@@ -827,11 +827,11 @@
</message>
<message>
<source>Unsupported url %1</source>
- <translation type="unfinished"></translation>
+ <translation>Nicht unsterstützte url%1</translation>
</message>
<message>
<source>Cannot parse url %1</source>
- <translation type="unfinished"></translation>
+ <translation>Kann url %1 nicht parsen</translation>
</message>
</context>
<context>
@@ -1235,12 +1235,12 @@
<message>
<source>Automatic night mode</source>
<extracomment>automatic night mode during navigation</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Automatischer Nacht-Modus</translation>
</message>
<message>
<source>Night mode</source>
<extracomment>Setting toggle for button on main screen for night/daylight mode</extracomment>
- <translation type="unfinished"></translation>
+ <translation>Nacht-Modus</translation>
</message>
</context>
<context>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout.changes.in
^
|
@@ -533,3 +533,7 @@
- fast toggle for day / night mode
- improve night style of standard and winter-sports stylesheet
- support for opening "geo:" links. It requires installation of separate package harbour-osmscout-open-url from OpenRepos.net
+
+* 2022-02-27 Lukáš Karas <lukas.karas@centrum.cz> 2.22
+- update translations (German)
+- improve label positioning for areas
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-osmscout.yaml
^
|
@@ -1,6 +1,6 @@
Name: harbour-osmscout
Summary: OSMScout for Sailfish
-Version: 2.21
+Version: 2.22
Release: 1
# The contents of the Group field should be one of the groups listed here:
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
|