diff options
author | Patrick Höhn <hoehnp@users.noreply.github.com> | 2018-02-12 23:18:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-12 23:18:33 +0100 |
commit | 16b8f12237b20d9d9775c18e3c664f26ed3748e3 (patch) | |
tree | d5bef973dd2d442fa8280078a8ddcddf1b5f6ebf | |
parent | 4f5c0caeb6810745dfb8ebb897cf8634fe7bc5c6 (diff) | |
parent | dbc50091a289b6f99aae0a9f23311fba22f85685 (diff) | |
download | navit-16b8f12237b20d9d9775c18e3c664f26ed3748e3.tar.gz |
Merge branch 'trunk' into fix_compiler_warning
-rw-r--r-- | .circleci/config.yml | 22 | ||||
-rw-r--r-- | ci/build_linux.sh | 2 | ||||
-rw-r--r-- | ci/build_win32.sh | 4 | ||||
-rw-r--r-- | ci/update_doxygen.sh | 15 | ||||
-rw-r--r-- | config.h.cmake | 2 | ||||
-rw-r--r-- | navit/android/libs/TTS_library_stub.jar | bin | 31633 -> 0 bytes | |||
-rw-r--r-- | navit/android/src/org/navitproject/navit/NavitSpeech.java | 53 | ||||
-rw-r--r-- | navit/icons/car_wash.svg | 48 | ||||
-rw-r--r-- | navit/icons/danger_area.svg | 112 | ||||
-rw-r--r-- | navit/maptool/CMakeLists.txt | 2 | ||||
-rw-r--r-- | navit/maptool/osm_psql.c | 126 | ||||
-rw-r--r-- | navit/speech/android/speech_android.c | 37 |
12 files changed, 267 insertions, 156 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 923bb9137..f4c9956d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,21 +28,7 @@ jobs: command: cd navit && doxygen - run: name: Update results to Github - command: | - mkdir /root/.ssh - chmod 0600 /root/.ssh - echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts - git clone -b gh-pages git@github.com:navit-gps/navit.git /root/navit-doc - cd /root/navit-doc - git config --global push.default simple - git config user.name "Circle CI" - git config user.email "circleci@navit-project.org" - rsync -vrtza --exclude '.git' --delete /root/project/doc/html/ /root/navit-doc/ - echo "" > .nojekyll - echo "doxygen.navit-project.org" > CNAME - git add . - git commit -am "update:doc:Doxygen update for commit ${CIRCLE_SHA1} [ci skip]" || true - git push + command: bash ci/update_doxygen.sh - store_artifacts: path: /root/project/doc build_android_arm: @@ -62,7 +48,7 @@ jobs: command: | bash ci/build_android.sh - store_artifacts: - path: android-arm/navit + path: android-arm/navit/android/bin build_android_x86: <<: *defaults steps: @@ -80,7 +66,7 @@ jobs: command: | bash ci/build_android_x86.sh - store_artifacts: - path: android-x86/navit + path: android-x86/navit/android/bin build_win32: <<: *defaults steps: @@ -90,6 +76,8 @@ jobs: command: | bash ci/setup_common_requirements.sh bash ci/build_win32.sh + - store_artifacts: + path: win32/navit.exe build_wince: docker: - image: navit/wince:8.04 diff --git a/ci/build_linux.sh b/ci/build_linux.sh index 4105cc1d7..dd3846710 100644 --- a/ci/build_linux.sh +++ b/ci/build_linux.sh @@ -11,7 +11,7 @@ pushd $BUILD_PATH if [[ "${CIRCLE_PROJECT_USERNAME}" == "navit-gps" && "${CIRCLE_BRANCH}" == "trunk" ]]; then # If we are building the official trunk code, push an update to coverity - wget -nv -c -O /tmp/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz http://sd-55475.dedibox.fr/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz + wget --progress=dot:giga -c -O /tmp/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz http://sd-55475.dedibox.fr/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz tar xfz /tmp/cov-analysis-linux64-${COVERITY_VERSION}.tar.gz --no-same-owner -C /usr/local/share/ export PATH=/usr/local/share/cov-analysis-linux64-${COVERITY_VERSION}/bin:$PATH diff --git a/ci/build_win32.sh b/ci/build_win32.sh index 47b05b9d2..cb05c9b49 100644 --- a/ci/build_win32.sh +++ b/ci/build_win32.sh @@ -1,8 +1,8 @@ -apt-get update && apt-get install -y mingw32 mingw32-binutils mingw32-runtime default-jdk nsis +apt-get update && apt-get install -y mingw32 mingw32-binutils mingw32-runtime default-jdk nsis libsaxonb-java mkdir win32 pushd win32 -cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ && make -j $(nproc --all) && make -j $(nproc --all) package +cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ && make -j $(nproc --all) && make -j $(nproc --all) package popd cp win32/*.exe $CIRCLE_ARTIFACTS/ diff --git a/ci/update_doxygen.sh b/ci/update_doxygen.sh new file mode 100644 index 000000000..7a76f1fd1 --- /dev/null +++ b/ci/update_doxygen.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e +mkdir -p ~/.ssh/ +ssh-keyscan github.com >> ~/.ssh/known_hosts +git clone -b gh-pages git@github.com:navit-gps/navit.git /root/navit-doc +cd /root/navit-doc +git config --global push.default simple +git config user.name "Circle CI" +git config user.email "circleci@navit-project.org" +rsync -vrtza --exclude '.git' --delete /root/project/doc/html/ /root/navit-doc/ +echo "" > .nojekyll +echo "doxygen.navit-project.org" > CNAME +git add . +git commit -am "update:doc:Doxygen update for commit ${CIRCLE_SHA1} [ci skip]" || true +git push diff --git a/config.h.cmake b/config.h.cmake index dd27d1ee5..c759e69c1 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -93,3 +93,5 @@ #cmakedefine HAVE_IMLIB2 1 #cmakedefine HAS_IFADDRS 1 + +#cmakedefine HAVE_POSTGRESQL 1 diff --git a/navit/android/libs/TTS_library_stub.jar b/navit/android/libs/TTS_library_stub.jar Binary files differdeleted file mode 100644 index 194b82733..000000000 --- a/navit/android/libs/TTS_library_stub.jar +++ /dev/null diff --git a/navit/android/src/org/navitproject/navit/NavitSpeech.java b/navit/android/src/org/navitproject/navit/NavitSpeech.java deleted file mode 100644 index ac6b5de4c..000000000 --- a/navit/android/src/org/navitproject/navit/NavitSpeech.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Navit, a modular navigation system. - * Copyright (C) 2005-2008 Navit Team - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the - * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -package org.navitproject.navit; - -import android.util.Log; - -import com.google.tts.TTS; - - -public class NavitSpeech implements Runnable { - private TTS tts; - private TTS.InitListener ttsInitListener; - private String what; - private Thread thread; - - NavitSpeech(Navit navit) - { - ttsInitListener = new TTS.InitListener() { - public void onInit(int version) { - } - }; - tts=new TTS(navit, ttsInitListener, true); - } - public void run() - { - Log.e("NavitSpeech","In "+what); - tts.speak(what, 0, null); - } - public void say(String what) - { - this.what=what; - thread = new Thread(this, "speech thread"); - thread.start(); - } -} - diff --git a/navit/icons/car_wash.svg b/navit/icons/car_wash.svg index 2c17087f6..ff2fd30e5 100644 --- a/navit/icons/car_wash.svg +++ b/navit/icons/car_wash.svg @@ -9,14 +9,16 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="22" + height="200" id="svg2" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" sodipodi:docname="car_wash.svg" sodipodi:version="0.32" version="1.0" - width="22"> + width="200" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> <defs id="defs22"> <inkscape:perspective @@ -49,15 +51,15 @@ guidetolerance="10.0" id="base" inkscape:current-layer="svg2" - inkscape:cx="19.318319" - inkscape:cy="15.792438" + inkscape:cx="1" + inkscape:cy="14" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="705" inkscape:window-width="1366" inkscape:window-x="-8" inkscape:window-y="-8" - inkscape:zoom="16.78664" + inkscape:zoom="1" objecttolerance="10.0" pagecolor="#ffffff" showgrid="false" @@ -66,16 +68,16 @@ inkscape:measure-end="0,0" /> <g id="g1327" - transform="matrix(0.04083073,0,0,0.04083073,-0.1767767,-1.0602338)"> + transform="matrix(0.33570938,0,0,0.33570938,-0.1767767,5.6565586)"> <path - d="M 66.275,1.768 C 24.94,1.768 1.704,23.139 1.704,66.804 l 0,450.123 c 0,40.844 20.894,62.229 62.192,62.229 l 452.024,0 c 41.307,0 62.229,-20.316 62.229,-62.229 l 0,-450.123 c 0,-42.601 -20.922,-65.036 -63.522,-65.036 -0.003,0 -448.494,-0.143 -448.352,0 z" + d="M 66.275,1.768 C 24.94,1.768 1.704,23.139 1.704,66.804 v 450.123 c 0,40.844 20.894,62.229 62.192,62.229 H 515.92 c 41.307,0 62.229,-20.316 62.229,-62.229 V 66.804 c 0,-42.601 -20.922,-65.036 -63.522,-65.036 -0.003,0 -448.494,-0.143 -448.352,0 z" id="path1329" style="fill:#111111;fill-opacity:0;stroke:#eeeeee;stroke-width:3.40799999;stroke-opacity:0" inkscape:connector-curvature="0" /> </g> <g id="g2319" - transform="matrix(0.04083073,0,0,0.04083073,35.725326,0.442546)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> <path d="" id="path2323" @@ -84,7 +86,7 @@ </g> <g id="g2325" - transform="matrix(0.04083073,0,0,0.04083073,35.725326,0.442546)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> <path d="" id="path2329" @@ -92,43 +94,43 @@ inkscape:connector-curvature="0" /> </g> <path - d="m 8.6250917,8.7062005 c -0.9707376,0 -1.4856922,0.5299594 -1.7234264,1.150296 L 5.6397034,13.114997 C 5.1394385,13.179143 4.252621,13.766362 4.252621,14.878783 l 0,4.143757 1.228328,0 0,1.325194 c 0,1.630379 2.307318,1.611179 2.3073187,0 l 0,-1.325194 4.1504833,0 0.0013,0 4.150481,0 0,1.325194 c 0,1.611179 2.307307,1.630379 2.307321,0 l 0,-1.325194 1.228326,0 0,-4.143757 c 0,-1.11242 -0.886811,-1.699639 -1.387085,-1.763786 L 16.975831,9.8564965 C 16.738097,9.2361599 16.223146,8.7062005 15.252402,8.7062005 l -1.783964,0 -3.037862,0 -1.8054905,0 z m -0.0148,1.1866209 3.3257684,0 0.0027,0 0.0013,0 3.327111,0 c 0.41601,0.00392 0.594182,0.2640376 0.713049,0.6242546 l 0.951179,2.564285 -4.991339,0 -0.0013,0 -0.0027,0 -4.9899972,0 0.9511803,-2.564285 C 8.0161106,10.156859 8.1942372,9.8966951 8.6102916,9.8928214 z M 6.6716065,14.328524 c 0.5886503,0 1.0655371,0.491138 1.0655371,1.097826 -4e-7,0.606733 -0.4768868,1.099172 -1.0655371,1.099172 -0.5886073,0 -1.0655378,-0.492439 -1.0655378,-1.099172 0,-0.606687 0.4769305,-1.097826 1.0655378,-1.097826 z m 10.5356355,0 c 0.58865,0 1.06554,0.491139 1.065537,1.097826 0,0.606733 -0.476887,1.099172 -1.065537,1.099172 -0.588608,0 -1.066886,-0.492439 -1.066886,-1.099172 0,-0.606688 0.478278,-1.097826 1.066886,-1.097826 z" + d="m 72.114087,74.542193 c -9.296155,0 -14.227557,5.075099 -16.504191,11.015712 L 43.524867,116.76254 c -4.790728,0.61385 -13.283232,6.23768 -13.283232,16.89063 v 39.68224 h 11.762938 v 12.69052 c 0,15.61315 22.09576,15.42928 22.095767,0 v -12.69052 h 39.74662 0.0125 39.74658 v 12.69052 c 0,15.42928 22.09566,15.61315 22.0958,0 v -12.69052 h 11.76292 v -39.68224 c 0,-10.65295 -8.49244,-16.27639 -13.28327,-16.89063 L 152.08396,85.557905 c -2.27663,-5.940613 -7.208,-11.015712 -16.50421,-11.015712 H 118.49582 89.404094 72.114027 Z M 71.972355,85.90572 h 31.848825 0.0259 0.0124 31.86169 c 3.98387,0.03831 5.69011,2.528548 6.82843,5.978151 l 9.10885,24.556529 h -47.79897 -0.0124 -0.0259 -47.786116 l 9.108867,-24.556529 c 1.138319,-3.449603 2.844128,-5.940995 6.828424,-5.978151 z m -18.565589,42.47796 c 5.63714,0 10.20399,4.70334 10.20399,10.51324 -4e-6,5.81027 -4.56685,10.52607 -10.20399,10.52607 -5.636729,0 -10.203998,-4.7158 -10.203998,-10.52607 0,-5.8099 4.567269,-10.51324 10.203998,-10.51324 z m 100.893274,0 c 5.63714,0 10.20402,4.70334 10.20399,10.51324 0,5.81027 -4.56685,10.52607 -10.20399,10.52607 -5.63673,0 -10.21692,-4.7158 -10.21692,-10.52607 0,-5.8099 4.58019,-10.51324 10.21692,-10.51324 z" id="path2301" - style="fill:#0089cd;stroke:none" + style="fill:#0089cd;stroke:none;stroke-width:9.57638168" inkscape:connector-curvature="0" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="m 11.932901,3.8702621 c 0.468232,0.00558 0.754143,-0.4345529 0.754143,-0.7483631 0,-0.6031582 -0.536638,-1.4794288 -0.754143,-1.9211706 -0.149172,0.3574271 -0.745857,1.3180124 -0.745857,1.9211706 0,0.2683029 0.277625,0.7427784 0.745857,0.7483631 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 103.79093,28.231383 c 4.48397,0.05746 7.22197,-4.161418 7.22197,-7.166582 0,-5.776091 -5.13906,-14.1675881 -7.22197,-18.3978583 -1.42853,3.4227899 -7.14261,12.6217673 -7.14261,18.3978583 0,2.569344 2.65864,7.113145 7.14261,7.166582 z" id="path833" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="m 11.9329,7.3962952 c 0.468232,0.00558 0.754143,-0.4345529 0.754143,-0.7483631 0,-0.6031582 -0.536638,-1.4794288 -0.754143,-1.9211706 -0.149172,0.3574271 -0.745857,1.3180124 -0.745857,1.9211706 0,0.2683029 0.277625,0.7427784 0.745857,0.7483631 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 103.79092,61.997994 c 4.48398,0.05746 7.22196,-4.161418 7.22196,-7.166582 0,-5.77609 -5.13905,-14.167587 -7.22196,-18.397858 -1.42852,3.422886 -7.14261,12.621768 -7.14261,18.397858 0,2.569344 2.65865,7.113145 7.14261,7.166582 z" id="path833-3" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 14.340396,3.8007984 C 14.790477,3.6715713 14.937829,3.1678357 14.847638,2.8672653 14.674288,2.2895546 13.908447,1.6044866 13.57316,1.2438939 c -0.04016,0.385219 -0.335589,1.4767665 -0.162235,2.054478 0.07711,0.2569829 0.479389,0.6316494 0.929471,0.5024265 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 126.84602,27.566207 c 4.31015,-1.237556 5.72125,-6.061467 4.85755,-8.939937 -1.66006,-5.532371 -8.99405,-12.0927672 -12.20488,-15.5460114 -0.3846,3.6890146 -3.21374,14.1421144 -1.55364,19.6744864 0.73844,2.461035 4.59082,6.048922 8.90097,4.811462 z" id="path833-3-0" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 15.315677,7.2964848 C 15.757504,7.1413637 15.875383,6.6299279 15.767906,6.3350962 15.561332,5.7684156 14.757036,5.128932 14.401394,4.7883985 c -0.01774,0.3868997 -0.249348,1.4937484 -0.04277,2.0604297 0.09189,0.2520764 0.515228,0.6027736 0.957053,0.4476566 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 136.18569,61.04227 c 4.2311,-1.485583 5.35995,-6.383232 4.33072,-9.206637 -1.97824,-5.426745 -9.68048,-11.550746 -13.08624,-14.811791 -0.16989,3.705102 -2.38786,14.304721 -0.40959,19.731466 0.87998,2.413918 4.93403,5.772356 9.16511,4.286962 z" id="path833-3-0-1" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 9.5336905,3.8007984 C 9.0836095,3.6715713 8.9362575,3.1678357 9.0264485,2.8672653 c 0.17335,-0.5777107 0.939191,-1.2627787 1.2744785,-1.6233714 0.04016,0.385219 0.335589,1.4767665 0.162235,2.054478 -0.07711,0.2569829 -0.4793895,0.6316494 -0.9294715,0.5024265 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 80.815176,27.566207 C 76.505028,26.328651 75.093929,21.50474 75.957633,18.62627 77.617699,13.093899 84.951685,6.5335028 88.162526,3.0802586 c 0.384588,3.6890146 3.213729,14.1421144 1.553624,19.6744864 -0.738435,2.461035 -4.590817,6.048922 -8.900974,4.811462 z" id="path833-3-0-0" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> <path - style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:0.64602429px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="m 8.5584095,7.2964849 c -0.441827,-0.155121 -0.559706,-0.666557 -0.452229,-0.961389 0.206574,-0.5666804 1.01087,-1.206164 1.366512,-1.5466975 0.01774,0.3868997 0.249348,1.4937485 0.04277,2.0604295 -0.09189,0.252077 -0.515228,0.602774 -0.957053,0.447657 z" + style="fill:#0089cd;fill-opacity:1;stroke:none;stroke-width:6.18657589px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 71.475512,61.04227 c -4.231104,-1.485583 -5.359959,-6.383232 -4.330718,-9.206637 1.978232,-5.426745 9.680478,-11.550746 13.086242,-14.811791 0.169885,3.705102 2.387852,14.304721 0.409581,19.731466 -0.879973,2.413918 -4.934019,5.772356 -9.165105,4.286962 z" id="path833-3-0-1-1" inkscape:connector-curvature="0" sodipodi:nodetypes="zscsz" /> diff --git a/navit/icons/danger_area.svg b/navit/icons/danger_area.svg new file mode 100644 index 000000000..7cd766e0d --- /dev/null +++ b/navit/icons/danger_area.svg @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + height="200" + id="svg2" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" + sodipodi:docname="danger_area.svg" + sodipodi:version="0.32" + version="1.0" + width="200"> + <defs + id="defs22"> + <inkscape:perspective + id="perspective24" + inkscape:persp3d-origin="290 : 193.33333 : 1" + inkscape:vp_x="0 : 290 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="580 : 290 : 1" + sodipodi:type="inkscape:persp3d" /> + </defs> + <metadata + id="metadata10"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <cc:license + rdf:resource="http://web.resource.org/cc/PublicDomain" /> + <dc:language>en</dc:language> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <sodipodi:namedview + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10.0" + guidetolerance="10.0" + id="base" + inkscape:current-layer="svg2" + inkscape:cx="17.694641" + inkscape:cy="94.483413" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:window-height="705" + inkscape:window-width="1366" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:zoom="2.1796875" + objecttolerance="10.0" + pagecolor="#ffffff" + showgrid="false" + inkscape:window-maximized="1" + inkscape:measure-start="0,0" + inkscape:measure-end="0,0" + inkscape:lockguides="true" /> + <g + id="g1327" + transform="matrix(0.04083073,0,0,0.04083073,-0.1767767,176.93977)"> + <path + d="M 66.275,1.768 C 24.94,1.768 1.704,23.139 1.704,66.804 v 450.123 c 0,40.844 20.894,62.229 62.192,62.229 H 515.92 c 41.307,0 62.229,-20.316 62.229,-62.229 V 66.804 c 0,-42.601 -20.922,-65.036 -63.522,-65.036 -0.003,0 -448.494,-0.143 -448.352,0 z" + id="path1329" + style="fill:#111111;fill-opacity:0;stroke:#eeeeee;stroke-width:3.40799999;stroke-opacity:0" + inkscape:connector-curvature="0" /> + </g> + <g + id="g2319" + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> + <path + d="" + id="path2323" + style="fill:#0089cd;stroke:none" + inkscape:connector-curvature="0" /> + </g> + <g + id="g2325" + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> + <path + d="" + id="path2329" + style="fill:#0089cd;stroke:none" + inkscape:connector-curvature="0" /> + </g> + <circle + style="fill:#ffff45;fill-opacity:1;stroke:none;stroke-width:17.50965309;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path1494" + cx="99.503998" + cy="100.1497" + r="97.5" /> + <path + style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:9.33368969px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 98.59712,119.69848 c 9.53147,0 19.97069,-73.346332 19.51679,-82.894368 -0.45393,-9.548036 -15.43187,-10.416064 -19.51679,-10.416064 -4.0849,0 -17.24738,2.604086 -17.70125,9.982049 -0.45394,7.378105 10.43922,83.328383 17.70125,83.328383 z" + id="path1010" + inkscape:connector-curvature="0" /> + <circle + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:6.23048878;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path1012" + cx="99.503998" + cy="158.81961" + r="13.928572" /> +</svg> diff --git a/navit/maptool/CMakeLists.txt b/navit/maptool/CMakeLists.txt index 0c006daee..e208eeea5 100644 --- a/navit/maptool/CMakeLists.txt +++ b/navit/maptool/CMakeLists.txt @@ -2,7 +2,7 @@ if(BUILD_MAPTOOL) add_definitions( -DMODULE=maptool ${NAVIT_COMPILE_FLAGS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - SET(MAPTOOL_SOURCE boundaries.c buffer.c ch.c coastline.c itembin.c itembin_buffer.c misc.c osm.c osm_o5m.c osm_relations.c sourcesink.c tempfile.c tile.c zip.c osm_xml.c) + SET(MAPTOOL_SOURCE boundaries.c buffer.c ch.c coastline.c itembin.c itembin_buffer.c misc.c osm.c osm_o5m.c osm_psql.c osm_relations.c sourcesink.c tempfile.c tile.c zip.c osm_xml.c) if(NOT MSVC) SET(MAPTOOL_SOURCE ${MAPTOOL_SOURCE} osm_protobuf.c osm_protobufdb.c generated-code/fileformat.pb-c.c generated-code/osmformat.pb-c.c google/protobuf-c/protobuf-c.c) endif(NOT MSVC) diff --git a/navit/maptool/osm_psql.c b/navit/maptool/osm_psql.c index 53ba780bc..8e8ded6c5 100644 --- a/navit/maptool/osm_psql.c +++ b/navit/maptool/osm_psql.c @@ -25,15 +25,13 @@ #include "linguistics.h" #include "file.h" #ifdef HAVE_POSTGRESQL -#include <libpq-fe.h> +#include <postgresql/libpq-fe.h> int map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm) { PGconn *conn; - PGresult *res,*node,*way,*tag; - int count,tagged,i,j,k; - long min, max, id, tag_id, node_id; + PGresult *res; char query[256]; sig_alrm(0); @@ -42,6 +40,7 @@ map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm) fprintf(stderr,"Failed to connect to database with '%s'\n",dbstr); exit(1); } + fprintf(stderr,"connected to database with '%s'\n",dbstr); res=PQexec(conn, "begin"); if (! res) { fprintf(stderr, "Cannot begin transaction: %s\n", PQerrorMessage(conn)); @@ -54,53 +53,56 @@ map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm) PQclear(res); exit(1); } - res=PQexec(conn, "declare node cursor for select id,x(coordinate),y(coordinate) from node order by id"); + res=PQexec(conn, "declare nodes cursor for select id, ST_Y(geom), ST_X(geom) from nodes order by id"); if (! res) { fprintf(stderr, "Cannot setup cursor for nodes: %s\n", PQerrorMessage(conn)); PQclear(res); exit(1); } - res=PQexec(conn, "declare way cursor for select id from way order by id"); + res=PQexec(conn, "declare ways cursor for select id from ways order by id"); if (! res) { - fprintf(stderr, "Cannot setup cursor for nodes: %s\n", PQerrorMessage(conn)); + fprintf(stderr, "Cannot setup cursor for ways: %s\n", PQerrorMessage(conn)); PQclear(res); exit(1); } - res=PQexec(conn, "declare relation cursor for select id from relation order by id"); + res=PQexec(conn, "declare relations cursor for select id from relations order by id"); if (! res) { - fprintf(stderr, "Cannot setup cursor for nodes: %s\n", PQerrorMessage(conn)); + fprintf(stderr, "Cannot setup cursor for relations: %s\n", PQerrorMessage(conn)); PQclear(res); exit(1); } + for (;;) { - node=PQexec(conn, "fetch 100000 from node"); + int j=0, count=0; + long min, max, id, tag_id; + PGresult *node, *tag; + node=PQexec(conn, "fetch 100000 from nodes"); if (! node) { fprintf(stderr, "Cannot setup cursor for nodes: %s\n", PQerrorMessage(conn)); PQclear(node); exit(1); } count=PQntuples(node); + fprintf(stderr, "fetch got %i nodes\n", count); if (! count) break; min=atol(PQgetvalue(node, 0, 0)); max=atol(PQgetvalue(node, count-1, 0)); - sprintf(query,"select node_id,name,value from node_tag where node_id >= %ld and node_id <= %ld order by node_id", min, max); + sprintf(query,"select node_id,k,v from node_tags where node_id >= %ld and node_id <= %ld order by node_id", min, max); tag=PQexec(conn, query); if (! tag) { fprintf(stderr, "Cannot query node_tag: %s\n", PQerrorMessage(conn)); exit(1); } - j=0; - for (i = 0 ; i < count ; i++) { + fprintf(stderr, "query node_tag got : %i tuples\n", PQntuples(tag)); + for (int i = 0 ; i < count ; i++) { id=atol(PQgetvalue(node, i, 0)); osm_add_node(id, atof(PQgetvalue(node, i, 1)), atof(PQgetvalue(node, i, 2))); - tagged=0; processed_nodes++; while (j < PQntuples(tag)) { tag_id=atol(PQgetvalue(tag, j, 0)); if (tag_id == id) { osm_add_tag(PQgetvalue(tag, j, 1), PQgetvalue(tag, j, 2)); - tagged=1; j++; } if (tag_id < id) @@ -113,33 +115,37 @@ map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm) PQclear(tag); PQclear(node); } + for (;;) { - way=PQexec(conn, "fetch 100000 from way"); + int j=0, k=0, count=0, tagged=0; + long min, max, id, tag_id, node_id; + PGresult *node,*way,*tag; + way=PQexec(conn, "fetch 25000 from ways"); if (! way) { fprintf(stderr, "Cannot setup cursor for ways: %s\n", PQerrorMessage(conn)); - PQclear(node); + PQclear(way); exit(1); } count=PQntuples(way); + fprintf(stderr, "fetch got %i ways\n", count); if (! count) break; min=atol(PQgetvalue(way, 0, 0)); max=atol(PQgetvalue(way, count-1, 0)); - sprintf(query,"select way_id,node_id from way_node where way_id >= %ld and way_id <= %ld order by way_id,sequence_id", min, max); + fprintf(stderr, "continue with %i ways\n", count); + sprintf(query,"select way_id,node_id from way_nodes where way_id >= %ld and way_id <= %ld order by way_id,sequence_id", min, max); node=PQexec(conn, query); if (! node) { fprintf(stderr, "Cannot query way_node: %s\n", PQerrorMessage(conn)); exit(1); } - sprintf(query,"select way_id,name,value from way_tag where way_id >= %ld and way_id <= %ld order by way_id", min, max); + sprintf(query,"select way_id,k,v from way_tags where way_id >= %ld and way_id <= %ld order by way_id", min, max); tag=PQexec(conn, query); if (! tag) { fprintf(stderr, "Cannot query way_tag: %s\n", PQerrorMessage(conn)); exit(1); } - j=0; - k=0; - for (i = 0 ; i < count ; i++) { + for (int i = 0 ; i < count ; i++) { id=atol(PQgetvalue(way, i, 0)); osm_add_way(id); tagged=0; @@ -175,7 +181,81 @@ map_collect_data_osm_db(char *dbstr, struct maptool_osm *osm) PQclear(node); PQclear(way); } - + + for (;;) { + int j=0, k=0, count=0, tagged=0; + long min, max, id; + PGresult *tag, *relation, *member; + relation=PQexec(conn, "fetch 40000 from relations"); + if (! relation) { + fprintf(stderr, "Cannot setup cursor for relations: %s\n", PQerrorMessage(conn)); + PQclear(relation); + exit(1); + } + count=PQntuples(relation); + fprintf(stderr, "Got %i relations\n", count); + if (! count) + break; + min=atol(PQgetvalue(relation, 0, 0)); + max=atol(PQgetvalue(relation, count-1, 0)); + sprintf(query,"select relation_id,k,v from relation_tags where relation_id >= %ld and relation_id <= %ld order by relation_id", min, max); + tag=PQexec(conn, query); + if (! tag) { + fprintf(stderr, "Cannot query relation_tag: %s\n", PQerrorMessage(conn)); + exit(1); + } + sprintf(query,"select relation_id, member_id, member_type, member_role from relation_members where relation_id >= %ld and relation_id <= %ld order by relation_id, sequence_id", min, max); + member=PQexec(conn, query); + if (! member) { + fprintf(stderr, "Cannot query relation_members: %s\n", PQerrorMessage(conn)); + exit(1); + } + for (int i = 0 ; i < count ; i++) { + id=atol(PQgetvalue(relation, i, 0)); + osm_add_relation(id); + tagged = 0; + while (j < PQntuples(tag)) { + long tag_relation_id=atol(PQgetvalue(tag, j, 0)); + if (tag_relation_id == id) { + osm_add_tag(PQgetvalue(tag, j, 1), PQgetvalue(tag, j, 2)); + tagged=1; + j++; + } + if (tag_relation_id < id) + j++; + if (tag_relation_id > id) + break; + } + while (k < PQntuples(member)) { + long member_relation_id=atol(PQgetvalue(member, k, 0)); + if (member_relation_id == id) { + int relmember_type=0; //type unknown + if (!strcmp(PQgetvalue(member,k, 2),"W")){ + relmember_type=2; + }else{ + if (!strcmp(PQgetvalue(member,k, 2),"N")){ + relmember_type=1; + }else{ + if (!strcmp(PQgetvalue(member,k, 2),"R")){ + relmember_type=3; + } + } + } + osm_add_member(relmember_type,atoll(PQgetvalue(member,k, 1)),PQgetvalue(member,k, 3)); + k++; + } + if (member_relation_id < id) + k++; + if (member_relation_id > id) + break; + } + if (tagged) + osm_end_relation(osm); + } + PQclear(relation); + PQclear(member); + PQclear(tag); + } res=PQexec(conn, "commit"); if (! res) { fprintf(stderr, "Cannot commit transaction: %s\n", PQerrorMessage(conn)); diff --git a/navit/speech/android/speech_android.c b/navit/speech/android/speech_android.c index 2b3f2612c..e9a206ebf 100644 --- a/navit/speech/android/speech_android.c +++ b/navit/speech/android/speech_android.c @@ -39,39 +39,7 @@ speech_android_say(struct speech_priv *this, const char *text) char *str=g_strdup(text); jstring string; int i; - - if (this->flags & 2) { - for (i = 0 ; i < strlen(str) ; i++) { - if (str[i] == 0xc3 && str[i+1] == 0x84) { - str[i]='A'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0x96) { - str[i]='O'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0x9c) { - str[i]='U'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0xa4) { - str[i]='a'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0xb6) { - str[i]='o'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0xbc) { - str[i]='u'; - str[i+1]='e'; - } - if (str[i] == 0xc3 && str[i+1] == 0x9f) { - str[i]='s'; - str[i+1]='s'; - } - } - } + string = (*jnienv)->NewStringUTF(jnienv, str); dbg(lvl_debug,"enter %s\n",str); (*jnienv)->CallVoidMethod(jnienv, this->NavitSpeech, this->NavitSpeech_say, string); @@ -97,9 +65,6 @@ speech_android_init(struct speech_priv *ret) jmethodID cid; char *class="org/navitproject/navit/NavitSpeech2"; - if (ret->flags & 1) - class="org/navitproject/navit/NavitSpeech"; - if (!android_find_class_global(class, &ret->NavitSpeechClass)) { dbg(lvl_error,"No class found\n"); return 0; |