diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000000..1c483387e8f --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,14 @@ +Checks: > + google-*, + -google-readability-casting, + clang-analyzer-*, + clang-diagnostic-*, + cppcoreguidelines-avoid-capturing-lambda-coroutines, + cppcoreguidelines-avoid-goto, + cppcoreguidelines-avoid-non-const-global-variables, + cppcoreguidelines-avoid-reference-coroutine-parameters + +WarningsAsErrors: '' +HeaderFilterRegex: './include' +FormatStyle: none +InheritParentConfig: true diff --git a/.github/scripts/tidy-vs-commit.sh b/.github/scripts/tidy-vs-commit.sh deleted file mode 100755 index ae8328a74ae..00000000000 --- a/.github/scripts/tidy-vs-commit.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# Runs clang-tidy only on changed files - -readonly BASE=$1 -readonly BUILD_DIR=build - -MODIFIED_FILES=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.c') -MODIFIED_HEADERS=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.h') -POSTGRES_SERVER=$(grep -o -m1 '\-isystem .*' "${BUILD_DIR}/compile_commands.json" | head -1 | awk '{print $2}') - -echo "POSTGRES_SERVER ${POSTGRES_SERVER}" - -CHECKS="-checks=clang-analyzer-*" - -if [ -z "${MODIFIED_FILES}" ] && [ -z "${MODIFIED_HEADERS}" ]; then - echo "No paths modified" - exit 0 -fi - -# C/C++ use the compile command -if [ ${#MODIFIED_FILES[@]} != 0 ] ; then - for f in ${MODIFIED_FILES} - do - if [ "${f##*.}" == 'conf' ]; then continue; fi - echo "${f}" - clang-tidy -p "${BUILD_DIR}" "${CHECKS}" -header-filter="^$(pwd).*" "${f}" - done -fi - -# H/HPP do not have a compile command -# workaround: add the includes -if [ ${#MODIFIED_HEADERS[@]} != 0 ] ; then - for f in ${MODIFIED_HEADERS} - do - echo "${f}" - clang-tidy "${CHECKS}" -header-filter=.* "${f}" \ - -- -I./include -isystem "${POSTGRES_SERVER}" - done -fi diff --git a/tools/transifex/update_locale.sh b/.github/scripts/update_locale.sh similarity index 93% rename from tools/transifex/update_locale.sh rename to .github/scripts/update_locale.sh index 95684f7a129..31010017a80 100755 --- a/tools/transifex/update_locale.sh +++ b/.github/scripts/update_locale.sh @@ -20,14 +20,13 @@ # ------------------------------------------------------------------------------ - DIR=$(git rev-parse --show-toplevel) pushd "${DIR}" > /dev/null || exit 1 mkdir -p build pushd build > /dev/null || exit 1 -cmake -DWITH_DOC=ON -DCMAKE_BUILD_TYPE=Release -DLOCALE=ON .. +cmake -DBUILD_HTML=OFF -DBUILD_LOCALE=ON .. make locale popd > /dev/null || exit 1 @@ -39,7 +38,9 @@ perl -ne '/\/en\// && print' build/doc/locale_changes_po.txt | \ perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' >> build/doc/locale_changes_po_pot.txt # .pot files # Remove obsolete entries #~ from .po files -bash tools/transifex/remove_obsolete_entries.sh +find locale -type f -name '*.po' -exec sh -c ' + msgattrib --no-obsolete -o "$f" "$f" + ' sh {} \; while read -r f; do git add "$f"; done < build/doc/locale_changes_po_pot.txt diff --git a/.github/workflows/boost_version.yml b/.github/workflows/boost_version.yml index 141dc3e6738..0d940b5501a 100644 --- a/.github/workflows/boost_version.yml +++ b/.github/workflows/boost_version.yml @@ -36,13 +36,11 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' - tags: [] - pull_request: paths: - '.github/workflows/boost_version.yml' @@ -50,7 +48,7 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' @@ -131,5 +129,5 @@ jobs: sudo service postgresql start psql -c "CREATE DATABASE ___pgr___test___;" DIR=$(git rev-parse --show-toplevel) - bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "3.8.0" + bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "4.0.0" pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap" diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index 76a8beda9da..e3c3af437a2 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -12,7 +12,7 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' diff --git a/.github/workflows/check-files.yml b/.github/workflows/check-files.yml index 0ee5da26372..452a4bc3f85 100644 --- a/.github/workflows/check-files.yml +++ b/.github/workflows/check-files.yml @@ -63,7 +63,7 @@ jobs: steps: - name: Checkout uses: actions/checkout@v5 - - name: Install Requirements + - name: Checkout cpplint uses: actions/checkout@v5 with: repository: 'cpplint/cpplint' diff --git a/.github/workflows/check-queries.yml b/.github/workflows/check-queries.yml index 7f86380988a..bc5addea6e4 100644 --- a/.github/workflows/check-queries.yml +++ b/.github/workflows/check-queries.yml @@ -26,8 +26,6 @@ on: branches-ignore: - 'gh-pages' - tags: [] - pull_request: paths: - '.github/workflows/check-queries.yml' @@ -50,7 +48,7 @@ permissions: jobs: build: - name: Check queries + name: Build runs-on: ubuntu-latest strategy: @@ -78,6 +76,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y \ + doxygen graphviz \ libboost-graph-dev \ libtap-parser-sourcehandler-pgtap-perl \ postgresql-${PGVER} \ @@ -91,7 +90,7 @@ jobs: export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug .. + cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DBUILD_DOXY=ON .. - name: Build run: | @@ -121,3 +120,11 @@ jobs: done ./tools/testers/doc_queries_generator.pl -pgver "${PGVER}" + + - name: Check Developers Documentation + run: | + cd build + make doxy + more DOXYLOG + [ ! -s DOXYLOG ] || echo "There are Doxygen warnings" + [ ! -s DOXYLOG ] || exit 1 diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 2a5891b23ea..d3d3317f2b7 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -19,13 +19,11 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' - tags: [] - pull_request: paths: - '.github/workflows/clang.yml' @@ -33,7 +31,7 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' @@ -48,10 +46,13 @@ permissions: jobs: Test_clang: name: Ubuntu clang - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false + matrix: + release: [Debug, Release] + os: [ubuntu-latest, ubuntu-22.04] steps: - uses: actions/checkout@v5 @@ -64,12 +65,21 @@ jobs: echo "PGIS=3" >> $GITHUB_ENV echo "PGPORT=5432" >> $GITHUB_ENV + - name: 'Raise Priority for apt.postgresql.org' + run: | + cat << EOF >> ./pgdg.pref + Package: * + Pin: release o=apt.postgresql.org + Pin-Priority: 600 + EOF + sudo mv ./pgdg.pref /etc/apt/preferences.d/ + sudo apt update + - name: Add PostgreSQL APT repository run: | - sudo apt-get install curl ca-certificates gnupg - curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + sudo apt-get -y purge postgresql-* + sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${PGVER}" > /etc/apt/sources.list.d/pgdg.list' + curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null - name: Install dependencies run: | @@ -84,12 +94,14 @@ jobs: postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} - - name: Configure + - name: Configure for clang run: | export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF .. + CXX=clang++ CC=clang cmake -DPOSTGRESQL_VERSION=${PGVER} \ + -DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF \ + -DUSE_CLANG_TIDY=ON .. - name: Build run: | diff --git a/.github/workflows/doc-check.yml b/.github/workflows/doc-check.yml index 8fe743a72a8..5cbd97ae19a 100644 --- a/.github/workflows/doc-check.yml +++ b/.github/workflows/doc-check.yml @@ -25,8 +25,6 @@ on: branches-ignore: - 'gh-pages' - tags: [] - pull_request: paths: - '.github/workflows/doc-check.yml' @@ -52,7 +50,7 @@ jobs: strategy: fail-fast: false matrix: - language: [en,es,zh_Hans] + language: [en, es, zh_Hans, sv] steps: - uses: actions/checkout@v5 @@ -62,7 +60,7 @@ jobs: - name: check modified files id: check_files run: | - # allways processing english, no matter what the change was + # always processing english, no matter what the change was if [[ "${{ matrix.language }}" == "en" ]]; then echo "PROCESS=true" >> $GITHUB_ENV; exit 0; fi # when this file changes all languages are tested @@ -93,7 +91,7 @@ jobs: - name: Install python if: env.PROCESS == 'true' - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -103,14 +101,11 @@ jobs: sudo apt-get update sudo apt-get install -y \ libboost-graph-dev \ + python3-sphinx \ + python3-sphinx-bootstrap-theme \ postgresql-${PGVER} \ postgresql-server-dev-${PGVER} \ - graphviz \ - doxygen - python -m pip install --upgrade pip - pip install -r requirements.txt - pip list - + graphviz - name: Configure if: env.PROCESS == 'true' @@ -118,9 +113,9 @@ jobs: export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DLINKCHECK=ON -DWITH_DOC=ON \ - -DES=ON -DZH_HANS=ON -DBUILD_DOXY=ON \ - -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release .. + cmake -DBUILD_LINKCHECK=ON \ + -DSPHINX_FLAGS='-W -v -j auto --keep-going' \ + -DPOSTGRESQL_VERSION=${PGVER} .. - name: Check Documentation if: env.PROCESS == 'true' @@ -128,13 +123,6 @@ jobs: cd build make html-${{ matrix.language }} - - name: Check Developers Documentation - if: env.PROCESS == 'true' - run: | - cd build - make doxy - [ ! -s build/doxygen/LOG ] || exit 1 - - name: Check Links if: env.CHK_LINK == 'true' run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c3283b5afdb..e43a7254c33 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,13 +12,11 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' - tags: [] - pull_request: paths: - '.github/workflows/macos.yml' @@ -26,7 +24,7 @@ on: - 'include/**' - 'pgtap/**' - 'tools/testers/**' - - './CMakeLists.txt' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b0447cdb5a..e7c02369763 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,7 @@ jobs: $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - name: Install python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -70,33 +70,26 @@ jobs: sudo apt-get update sudo apt-get install -y \ libboost-graph-dev \ + python3-sphinx \ + python3-sphinx-bootstrap-theme \ postgresql-${PGVER} \ postgresql-${PGVER}-postgis-${PGIS} \ postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} \ graphviz \ doxygen - python -m pip install --upgrade pip - pip install Sphinx - pip install sphinx-bootstrap-theme - pip install sphinx-collapse - pip list - - name: Configure + - name: Configure and build run: | export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON -DCMAKE_BUILD_TYPE=Release \ - -DES=ON -DZH_HANS=ON .. - - - name: Build - run: | - cd build + cmake -DPOSTGRESQL_VERSION=${PGVER} \ + -DDOC_USE_BOOTSTRAP=ON \ + -DCMAKE_BUILD_TYPE=Release .. make doc - make -j 4 - sudo make install make doxy + sudo make -j 4 install - name: Update Users Documentation run: | @@ -104,7 +97,7 @@ jobs: git checkout -b gh-pages PGROUTING_MAJOR_MINOR="${PGROUTING_VERSION%.*}" rm -rf ${PGROUTING_MAJOR_MINOR} - cp -r build/doc/html ${PGROUTING_MAJOR_MINOR} + cp -r build/doc/_build/html ${PGROUTING_MAJOR_MINOR} git add ${PGROUTING_MAJOR_MINOR} git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PGROUTING_VERSION}: commit ${{ env.GIT_HASH }}" git fetch origin @@ -136,7 +129,7 @@ jobs: run: | cd build/doc - cp -r html doc-v${PGROUTING_VERSION} + cp -r _build/html doc-v${PGROUTING_VERSION} tar -zcvf doc-v${PGROUTING_VERSION}.tar.gz doc-v${PGROUTING_VERSION} cd ../.. diff --git a/.github/workflows/tidy-check.yml b/.github/workflows/tidy-check.yml deleted file mode 100644 index fb43554d5ed..00000000000 --- a/.github/workflows/tidy-check.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: clang-tidy check - -on: - workflow_dispatch: - pull_request: - branches-ignore: - - 'gh-pages' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - check-changelog: - name: Check for changelog entry - runs-on: ubuntu-latest - env: - PR_BASE: ${{ github.base_ref }} - - steps: - - - uses: actions/checkout@v5 - - - name: Get postgres version - run: | - sudo service postgresql start - pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()') - echo "PGVER=${pgver}" >> $GITHUB_ENV - echo "PGPORT=5432" >> $GITHUB_ENV - - - name: Add PostgreSQL APT repository - run: | - sudo apt-get install curl ca-certificates gnupg - curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \ - $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - libboost-graph-dev \ - postgresql-${PGVER} \ - postgresql-server-dev-${PGVER} - - - name: Configure - run: | - export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH - mkdir build - cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_DOC=OFF .. - - - name: Add upstream - run: | - git remote add upstream https://github.com/pgRouting/pgrouting - git fetch upstream ${PR_BASE} - - - name: do clang-tidy - run: .github/scripts/tidy-vs-commit.sh "upstream/${PR_BASE}" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 4cd08f42ef0..329704b063f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -10,6 +10,11 @@ on: push: paths: - '.github/workflows/ubuntu.yml' + - 'src/**' + - 'include/**' + - 'pgtap/**' + - 'tools/testers/**' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' @@ -31,6 +36,7 @@ jobs: matrix: psql: [13, 14, 15, 16, 17, 18] postgis: [3] + release: [Debug, Release] os: [ubuntu-latest, ubuntu-22.04] steps: @@ -45,10 +51,10 @@ jobs: EOF sudo mv ./pgdg.pref /etc/apt/preferences.d/ sudo apt update - + - name: Add PostgreSQL APT repository run: | - sudo apt-get purge postgresql-* + sudo apt-get -y purge postgresql-* sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg-testing main ${{ matrix.psql }}" > /etc/apt/sources.list.d/pgdg.list' curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null @@ -69,7 +75,8 @@ jobs: export PATH=/usr/lib/postgresql/${{ matrix.psql }}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF .. + cmake -DPOSTGRESQL_VERSION=${{ matrix.psql }} \ + -DCMAKE_BUILD_TYPE=${{ matrix.release }} -DBUILD_HTML=OFF -DBUILD_DOXY=OFF .. - name: Build run: | diff --git a/.github/workflows/update-locale.yml b/.github/workflows/update-locale.yml index d74cef36547..c94fae3c960 100644 --- a/.github/workflows/update-locale.yml +++ b/.github/workflows/update-locale.yml @@ -34,22 +34,18 @@ jobs: with: fetch-depth: 0 - - name: Get postgres version - run: | - sudo service postgresql start - PGVER=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()') - PROJECT_VERSION=$(grep -Po '(?<=project\(PGROUTING VERSION )[^;]+' CMakeLists.txt) - echo "PGVER=${PGVER}" >> $GITHUB_ENV - echo "PGPORT=5432" >> $GITHUB_ENV - echo "PGIS=3" >> $GITHUB_ENV - echo "PROJECT_VERSION=${PROJECT_VERSION}" >> $GITHUB_ENV - - name: Extract branch name and commit hash run: | branch=${GITHUB_REF#refs/heads/} git_hash=$(git rev-parse --short "$GITHUB_SHA") echo "GIT_HASH=$git_hash" >> $GITHUB_ENV + - name: Get postgres version + run: | + sudo service postgresql start + pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()') + echo "PGVER=${pgver}" >> $GITHUB_ENV + - name: Add PostgreSQL APT repository run: | sudo apt-get install curl ca-certificates gnupg @@ -58,7 +54,7 @@ jobs: $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - name: Install python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -67,18 +63,12 @@ jobs: sudo apt-get update sudo apt-get install -y \ libboost-graph-dev \ + python3-sphinx \ + python3-sphinx-bootstrap-theme \ + sphinx-intl \ postgresql-${PGVER} \ - postgresql-${PGVER}-postgis-${PGIS} \ - postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} \ - graphviz \ - doxygen - python -m pip install --upgrade pip - pip install Sphinx - pip install sphinx-bootstrap-theme - pip install sphinx-intl[transifex] - pip install sphinx-collapse - pip list + graphviz - name: Initialize mandatory git config run: | @@ -87,7 +77,7 @@ jobs: - name: Update locale run: | - bash tools/transifex/update_locale.sh + bash .github/scripts/update_locale.sh # Add the files, commit and push git diff --staged --quiet || git commit -m "Update locale: commit ${{ env.GIT_HASH }}" diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 81df0be5798..94f96b34e46 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -8,7 +8,26 @@ on: workflow_dispatch: push: paths: - - '.github/workflows/update.yml' + - '.github/workflows/ubuntu.yml' + - 'src/**' + - 'include/**' + - 'sql/**' + - 'pgtap/**' + - 'tools/testers/**' + - 'CMakeLists.txt' + + branches-ignore: + - 'gh-pages' + + pull_request: + paths: + - '.github/workflows/check-queries.yml' + - 'src/**' + - 'include/**' + - 'sql/**' + - 'pgtap/**' + - 'tools/testers/**' + - 'CMakeLists.txt' branches-ignore: - 'gh-pages' @@ -29,7 +48,7 @@ jobs: fail-fast: false matrix: boost_minor: [56] - old_pgr: [3.7.3, 3.7.2, 3.7.1, 3.7.0, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2] + old_pgr: [3.8.0, 3.7.3, 3.7.2, 3.7.1, 3.7.0, 3.6.3, 3.6.2, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2] steps: - uses: actions/checkout@v5 @@ -56,7 +75,7 @@ jobs: $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - name: Install python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -71,11 +90,8 @@ jobs: postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} - python -m pip install --upgrade pip - pip install -r requirements.txt - - wget https://sourceforge.net/projects/boost/files/boost/1.${{ matrix.boost_minor }}.0/boost_1_${{ matrix.boost_minor }}_0.tar.bz2 - sudo tar --bzip2 -xf boost_1_${{ matrix.boost_minor }}_0.tar.bz2 + wget -q https://sourceforge.net/projects/boost/files/boost/1.${{ matrix.boost_minor }}.0/boost_1_${{ matrix.boost_minor }}_0.tar.bz2 + sudo tar --bzip2 -xf boost_1_${{ matrix.boost_minor }}_0.tar.bz2 sudo mv boost_1_${{ matrix.boost_minor }}_0/boost /usr/include/ - name: get old version @@ -111,7 +127,7 @@ jobs: export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF .. + cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Release .. make -j 4 sudo make install @@ -129,6 +145,6 @@ jobs: run: | sudo service postgresql start psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();" - psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '3.8.0';" + psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '4.0.0';" psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();" pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap" diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 021f0260237..46a892461bb 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -57,7 +57,7 @@ jobs: $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - name: Install python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.x' @@ -66,26 +66,23 @@ jobs: sudo apt-get update sudo apt-get install -y \ libboost-graph-dev \ + python3-sphinx \ + python3-sphinx-bootstrap-theme \ postgresql-${PGVER} \ postgresql-${PGVER}-postgis-${PGIS} \ postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} \ graphviz \ doxygen - python -m pip install --upgrade pip - pip install Sphinx - pip install sphinx-bootstrap-theme - pip install sphinx-intl[transifex] - pip install sphinx-collapse - pip list - name: Configure and build documentation run: | export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DDOC_USE_BOOTSTRAP=ON -DWITH_DOC=ON -DBUILD_DOXY=ON \ - -DCMAKE_BUILD_TYPE=Release -DES=ON -DZH_HANS=ON .. + cmake -DPOSTGRESQL_VERSION=${PGVER} \ + -DDOC_USE_BOOTSTRAP=ON \ + -DCMAKE_BUILD_TYPE=Release .. make doc - name: Initialize mandatory git config @@ -102,7 +99,7 @@ jobs: git checkout -b gh-pages DIRECTORY="${PROJECT_VERSION%.*}" rm -rf ${DIRECTORY} - cp -r build/doc/html ${DIRECTORY} + cp -r build/doc/_build/html ${DIRECTORY} git add ${DIRECTORY} git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PROJECT_VERSION} for develop branch: commit ${{ env.GIT_HASH }}" git fetch origin @@ -120,7 +117,7 @@ jobs: git checkout -b gh-pages DIRECTORY="main" rm -rf ${DIRECTORY} - cp -r build/doc/html ${DIRECTORY} + cp -r build/doc/_build/html ${DIRECTORY} git add ${DIRECTORY} git diff-index --quiet HEAD || git commit -m "Update users documentation for ${PROJECT_VERSION} for main branch: commit ${{ env.GIT_HASH }}" git fetch origin diff --git a/.gitignore b/.gitignore index 70f98d92739..bc3f78f9cc9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,15 @@ build fix_typos code_linter -src/version/version.h - -.DS_Store -.vagrant +/.DS_Store +/.vagrant .directory -notUsed *.swp +/.vscode + +# created files during build +src/version/version.h -.vscode -taptest.sh +# helper files +/taptest.sh +/run.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 58a4e0c0f4a..29e7aca6420 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,9 +30,9 @@ include(pgr/BuildType) #--------------------------------------------- #--------------------------------------------- -project(PGROUTING VERSION 3.8.0 +project(PGROUTING VERSION 4.0.0 LANGUAGES C CXX ) -set(PROJECT_VERSION_DEV "") +set(PROJECT_VERSION_DEV "-alpha1") string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) include(pgr/GitInfo) @@ -43,21 +43,16 @@ set(PROJECT_LIB_NAME "${PROJECT_NAME_LOWER}-${PROJECT_LIB_VERSION}") string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d" UTC) -set(MINORS 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6) +# uncomment to show the NOTICE/WARNING of deprecated internal C functions +# add_compile_definitions(SHOWMSG=1) + +set(MINORS 4.0 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6) set(OLD_SIGNATURES - 3.7.3 - 3.7.2 - 3.7.1 - 3.7.0 - 3.6.3 - 3.6.2 - 3.6.1 - 3.6.0 - 3.5.1 - 3.5.0 - 3.4.2 - 3.4.1 - 3.4.0 + 3.8.0 + 3.7.3 3.7.2 3.7.1 3.7.0 + 3.6.3 3.6.2 3.6.1 3.6.0 + 3.5.1 3.5.0 + 3.4.2 3.4.1 3.4.0 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 @@ -78,7 +73,7 @@ include(pgr/Configure) #--------------------------------------------- set(DOXYGEN_MINIMUM_VERSION "1.7") set(SPHINX_MINIMUM_VERSION "4.0") -set(POSTGRESQL_MINIMUM_VERSION "13.0.0") +set(POSTGRESQL_MINIMUM_VERSION "13") set(BOOST_MINIMUM_VERSION "1.56.0") set(POSTGIS_MINIMUM_VERSION "3.0.0") @@ -94,49 +89,56 @@ if(WIN32 AND MSVC) set(CMAKE_CXX_FLAGS "") endif() -#----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- -# C/C++ Compiler requirements -#----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- +#--------------------------------------------- +# Boost +#--------------------------------------------- find_package(Boost ${BOOST_MINIMUM_VERSION} REQUIRED) if (NOT Boost_VERSION_MACRO) set(Boost_VERSION_MACRO ${Boost_VERSION}) endif() set(BOOST_VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") +add_definitions(-DBOOST_ALLOW_DEPRECATED_HEADERS) -include(CheckCCompilerFlag) -include(CheckCXXCompilerFlag) -if (BOOST_VERSION VERSION_LESS "1.75.0") - CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) - if(COMPILER_SUPPORTS_CXX11) - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) +include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) + +#--------------------------------------------- +# Clang tidy +#--------------------------------------------- + +option(USE_CLANG_TIDY "Use clang-tidy." OFF) + +if(USE_CLANG_TIDY) + find_program(CLANG_TIDY_COMMAND NAMES clang-tidy NO_CACHE) + if (CLANG_TIDY_COMMAND) + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_COMMAND};--config-file=${CMAKE_SOURCE_DIR}/.clang-tidy") else() - CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) - if(COMPILER_SUPPORTS_CXX0X) - add_compile_options("-std=c++0x") - message(STATUS "Using -std=c++0x.") - else() - message(WARNING "The compiler ${CMAKE_CXX_COMPILER} has no C++0x or C++11 flags support. - Using: callback compiler's standard") - endif() + message(WARNING "Set to use clang-tidy, but not found.") endif() -else() - set(CMAKE_CXX_STANDARD 14) endif() -add_definitions(-DBOOST_ALLOW_DEPRECATED_HEADERS) +#----------------------------------------------------------------------------- +# C/C++ Compiler requirements +#----------------------------------------------------------------------------- + +include(CheckCCompilerFlag) +include(CheckCXXCompilerFlag) + +set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard version to use (minimum requirement is c++17)") + set(COMPILER_VERSION "${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}") +#----------------------------------------------------------------------------- +# C++ language version and compilation flags +#----------------------------------------------------------------------------- +message(STATUS "pgRouting: Require C++${CMAKE_CXX_STANDARD}") +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) #--------------------------------------------- # Windows compiler flags #--------------------------------------------- - if(WIN32 AND NOT MSVC) set(OS_BUILD $ENV{OS_BUILD}) if(NOT OS_BUILD) @@ -165,37 +167,25 @@ if(WIN32 AND MSVC) -EHsc) endif() -#----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # Finding prerequisites #----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- -#----------------------------------------------------------------------------- -#--------------------------------------------- -#--------------------------------------------- -# Perl -#--------------------------------------------- -#--------------------------------------------- -include(FindPerl) -if(NOT PERL_EXECUTABLE) - message(FATAL_ERROR "perl NOT FOUND - Please check your Perl installation.") -endif() +find_package(Perl REQUIRED) #--------------------------------------------- #--------------------------------------------- # PostgreSQL #--------------------------------------------- #--------------------------------------------- -find_package(PostgreSQL "${POSTGRESQL_MINIMUM_VERSION}") +find_package(PostgreSQL "${POSTGRESQL_MINIMUM_VERSION}" REQUIRED) # removing type of release on postgres version # for XbetaY XalphaY XrcY -> X.Y -string(REGEX REPLACE "([0-9]+)[beta|alpha|rc|devel].*" "\\1.0" POSTGRESQL_VERSION_STRING ${POSTGRESQL_VERSION_STRING}) +string(REGEX REPLACE "([0-9]+)[beta|alpha|rc|devel].*" "\\1.0" POSTGRESQL_VERSION_STRING "${POSTGRESQL_VERSION_STRING}") message(STATUS "POSTGRESQL_VERSION_STRING=${POSTGRESQL_VERSION_STRING}") -# calcualte mayor.micro +# calculate major.minor STRING(REGEX MATCH "([0-9]+)\.([0-9]+)" POSTGRESQL_VERSION "${POSTGRESQL_VERSION_STRING}") message(STATUS "POSTGRESQL_VERSION=${POSTGRESQL_VERSION}") @@ -220,16 +210,6 @@ endif() add_definitions(-DPGSQL_VERSION=${PGSQL_VERSION}) message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}") - -#--------------------------------------------- -#--------------------------------------------- -# Boost -#--------------------------------------------- -#--------------------------------------------- - -include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) - - #--------------------------------------------- if (PROJECT_DEBUG) message(STATUS "PERL_VERSION_STRING = ${PERL_VERSION_STRING}") @@ -346,7 +326,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") endif() - #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if (PROJECT_DEBUG) diff --git a/NEWS.md b/NEWS.md index 1eccbd6ae0d..979ed7f65e9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,1234 +1,560 @@ To read all history of releases go to the latest [release notes](https://docs.pgrouting.org/latest/en/release_notes.html) -# pgRouting 3 +# pgRouting 4 -## pgRouting 3.8 +## pgRouting 4.0 -### pgRouting 3.8.0 Release Notes +pgRouting 4.0.0-alpha1 Release Notes -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.8.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.8.0%22) +To see all issues & pull requests closed by this release see the +[#4.0.0](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%204.0.0%22) -**Promotion to official function of pgRouting.** -**Metric** +Build -* [#2760](https://github.com/pgRouting/pgrouting/issues/2760): - Promoted to official pgr_degree in version 3.8 +* C++ standard is std17 - * Error messages adjustment. - * New signature with only Edges SQL. - * Function promoted to official. - -**Utilities** + * Using this standard, all supported toolchains across our CI matrix will work. + * The code is not yet modified to use std17: -* [#2772](https://github.com/pgRouting/pgrouting/issues/2772): - Promoted to official pgr_extractVertices in version 3.8 + * If needed: ``-DCMAKE_CXX_STANDARD=14`` to lower the standard. - * Error messages adjustment. - * Function promoted to official. +* The user's documentation is built by default. +* The doxygen documentation is built by default. -* [#2774](https://github.com/pgRouting/pgrouting/issues/2774): - Promoted to official pgr_findCloseEdges in version 3.8 +For developers: - * Error messages adjustment. - * ``partial`` option is removed. - * Function promoted to official. +* Set `-DUSE_CLANG_TIDY=ON` for clang tidy checks. +* Tidy checks are done on CI. -* [#2873](https://github.com/pgRouting/pgrouting/issues/2873): - Promoted to official pgr_separateCrossing in version 3.8 +Documentation build - * Function promoted to official. - * Proposed function. +* The doxygen documentation is built by default +* The HTML documentation is built by default +* The translated languages (en, es, sv, zh_Hans) HTML documentation are built by + default +* `WITH-DOC` is not used anymore -* [#2874](https://github.com/pgRouting/pgrouting/issues/2874): - Promoted to official pgr_separateTouching in version 3.8 +User Documentation is not built when - * Function promoted to official. - * Proposed function. +* Sphinx is not found +* When all Sphinx formats are OFF -**Proposed functions** + * To not build HTML default format: `-DBUILD_HTML=OFF` -**Contraction** +* When all languages are OFF -* [#2790](https://github.com/pgRouting/pgrouting/issues/2790): - pgr_contractionDeadEnd new contraction function -* [#2791](https://github.com/pgRouting/pgrouting/issues/2791): - pgr_contractionLinear new contraction function -* [#2536](https://github.com/pgRouting/pgrouting/issues/2536): - Support for contraction hierarchies (pgr_contractionHierarchies) + * To build only English: `-DES=OFF -DSV=OFF -DZH_HANS=OFF` -**Utilities** +* Documentation output location: [`build/doc/_build/](format)` -* [#2848](https://github.com/pgRouting/pgrouting/issues/2848): - Create pgr_separateCrossing new utility function -* [#2849](https://github.com/pgRouting/pgrouting/issues/2849): - Create of pgr_separateTouching new utility function + * For example: for HTML output is on `build/doc/_build/html` directory -**Official functions changes** +Developers' Documentation is not built when -* [#2786](https://github.com/pgRouting/pgrouting/issues/2786): - pgr_contraction(edges) new signature +* Doxygen is not found +* To not build Doxygen documentation: `-DBUILD_DOXY=OFF` - * New signature: - * Previously compulsory parameter **Contraction order** is now optional with - name ``methods``. - * New name and order of optional parameters. - * Deprecated signature pgr_contraction(text,bigint[],integer,bigint[],boolean) +Summary of changes by function -**C/C++ code enhancements** +* pgr_aStar -* [#2802](https://github.com/pgRouting/pgrouting/issues/2802): - Code reorganization on pgr_contraction -* Other enhancements: - [#2869](https://github.com/pgRouting/pgrouting/issues/2869) + * Combinations signature promoted to official. -**SQL code enhancements** +* pgr_aStarCost -* [#2850](https://github.com/pgRouting/pgrouting/issues/2850): - Rewrite pgr_nodeNetwork + * Combinations signature promoted to official. -**Deprecation of SQL functions** +* pgr_bandwidth -* [#2749](https://github.com/pgRouting/pgrouting/issues/2749): - Deprecate pgr_AlphaShape in 3.8 -* [#2750](https://github.com/pgRouting/pgrouting/issues/2750): - Deprecate pgr_CreateTopology in 3.8 -* [#2753](https://github.com/pgRouting/pgrouting/issues/2753): - Deprecate pgr_analyzeGraph in 3.8 -* [#2754](https://github.com/pgRouting/pgrouting/issues/2754): - Deprecate pgr_analyzeOneWay in 3.8 -* [#2826](https://github.com/pgRouting/pgrouting/issues/2826): - Deprecate pgr_createVerticesTable in 3.8 -* [#2847](https://github.com/pgRouting/pgrouting/issues/2847): - Deprecate pgr_nodeNetwork in 3.8 + * New experimental function. -In the deprecated functions: +* pgr_bdAstar -- Migration section is created. -- The use of the functions is removed in the documentation. + * Combinations signature promoted to official. -## pgRouting 3.7 +* pgr_bdAstarCost + * Combinations signature promoted to official. -
pgRouting 3.7.3 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.7.3 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.7.3%22) - -* [#2731](https://github.com/pgRouting/pgrouting/pull/2731) Build Failure on Ubuntu 22 - -
- -
pgRouting 3.7.2 Release Notes +* pgr_bdDijkstra -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.7.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.7.2%22) + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` + * Combinations signature promoted to official. -**Build** +* pgr_bdDijkstraCost -* [#2713](https://github.com/pgRouting/pgrouting/pull/2713) cmake missing - some policies and min version + * Combinations signature promoted to official. - - Using OLD policies: CMP0148, CMP0144, CMP0167 - - Minimum cmake version 3.12 +* pgr_bellmanFord -**Bug fixes** + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` -* [#2707](https://github.com/pgRouting/pgrouting/pull/2707) Build failure in - pgRouting 3.7.1 on Alpine -* [#2706](https://github.com/pgRouting/pgrouting/pull/2706) winnie crashing - on pgr_betweennessCentrality - -
- -
pgRouting 3.7.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.7.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.7.1%22) - -**Bug fixes** - -* [#2680](https://github.com/pgRouting/pgrouting/pull/2680) fails to compile - under mingw64 gcc 13.2 -* [#2689](https://github.com/pgRouting/pgrouting/pull/2689) When point is a - vertex, the withPoints family do not return results. - -**C/C++ code enhancemet** - -* TRSP family - -
+* pgr_binaryBreadthFirstSearch -
pgRouting 3.7.0 Release Notes + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.7.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.7.0%22) - -**Support** - -* [#2656](https://github.com/pgRouting/pgrouting/pull/2656) Stop support of - PostgreSQL12 on pgrouting v3.7 - - * Stopping support of PostgreSQL 12 - * CI does not test for PostgreSQL 12 - -**New experimental functions** - -* Metrics - - * pgr_betweennessCentrality +* pgr_bipartite -**Official functions changes** + * Output columns standardized to ``(node, color)`` -* [#2605](https://github.com/pgRouting/pgrouting/pull/2605) Standardize - spanning tree functions output +* pgr_boykovKolmogorov - * Functions: + * Combinations signature promoted to official. - * ``pgr_kruskalDD`` - * ``pgr_kruskalDFS`` - * ``pgr_kruskalBFS`` - * ``pgr_primDD`` - * ``pgr_primDFS`` - * ``pgr_primBFS`` +* pgr_breadthFirstSearch * Standardizing output columns to ``(seq, depth, start_vid, pred, node, edge, cost, agg_cost)`` - * Added ``pred`` result columns. - -**Experimental promoted to proposed.** - -* [#2635](https://github.com/pgRouting/pgrouting/pull/2635) pgr_LineGraph - ignores directed flag and use negative values for identifiers. - - * ``pgr_lineGraph`` - - * Function promoted to proposed. - * Works for directed and undirected graphs. - -**Code enhancement** - -* [#2599](https://github.com/pgRouting/pgrouting/pull/2599) Driving distance - cleanup -* [#2607](https://github.com/pgRouting/pgrouting/pull/2607) Read postgresql - data on C++ -* [#2614](https://github.com/pgRouting/pgrouting/pull/2614) Clang tidy does - not work - -
- -## pgRouting 3.6 - - -
pgRouting 3.6.3 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.6.3 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.3%22) - -**Build** - -* Explicit minimum requirements: - - * postgres 11.0.0 - * postgis 3.0.0 - -* g++ 13+ is supported - -**Code fixes** - -* Fix warnings from cpplint. -* Fix warnings from clang 18. - -**CI tests** - -* Add a clang tidy test on changed files. -* Update test not done on versions: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1, - 3.1.2 - -**Documentation** - -* Results of documentation queries adujsted to 1.83.0 version: - - * pgr_edgeDisjointPaths - * pgr_stoerWagner - -**pgtap tests** - -* bug fixes - - -
- -
pgRouting 3.6.2 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.6.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.2%22) - -**Upgrade fix** - -* The upgrade was failing for same minor - -**Code fixes** - -* Fix warnings from cpplint - -**Others** - -* Adjust NEWS generator - - * Name change to `NEWS.md` for better visualization on GitHub - -
- -
pgRouting 3.6.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.6.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.1%22) - -* [#2588](https://github.com/pgRouting/pgrouting/pull/2588) pgrouting 3.6.0 - fails to build on OSX - -
- -
pgRouting 3.6.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.6.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.0%22) - -**Official functions changes** - -* [#2516](https://github.com/pgRouting/pgrouting/pull/2516) Standardize output - pgr_aStar - - * Standardize output columns to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - - * pgr_aStar(One to One) added ``start_vid`` and ``end_vid`` columns. - * pgr_aStar(One to Many) added ``end_vid`` column. - * pgr_aStar(Many to One) added ``start_vid`` column. - -* [#2523](https://github.com/pgRouting/pgrouting/pull/2523) Standardize output - pgr_bdAstar - - * Standardize output columns to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - * pgr_bdAstar(One to One) added ``start_vid`` and ``end_vid`` - columns. - * pgr_bdAstar(One to Many) added ``end_vid`` column. - * pgr_bdAstar(Many to One) added ``start_vid`` column. +* pgr_contraction -* [#2547](https://github.com/pgRouting/pgrouting/pull/2547) Standardize output - and modifying signature pgr_KSP + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_contraction(text,bigint[],integer,bigint[],boolean) - * Standardizing output columns to ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - * pgr_ksp(One to One) - * Added ``start_vid`` and ``end_vid`` result columns. - * New proposed signatures: - * pgr_ksp(One to Many) - * pgr_ksp(Many to One) - * pgr_ksp(Many to Many) - * pgr_ksp(Combinations) +* pgr_dagShortestPath -* [#2548](https://github.com/pgRouting/pgrouting/pull/2548) Standardize output - pgr_drivingDistance + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - * Standardizing output columns to ``(seq, depth, start_vid, pred, node, edge, cost, agg_cost)`` - * pgr_drivingDistance(Single vertex) - * Added ``depth`` and ``start_vid`` result columns. - * pgr_drivingDistance(Multiple vertices) - * Result column name change: ``from_v`` to ``start_vid``. - * Added ``depth`` and ``pred`` result columns. - -**Proposed functions changes** - -* [#2544](https://github.com/pgRouting/pgrouting/pull/2544) Standardize output - and modifying signature pgr_withPointsDD +* pgr_depthFirstSearch - * Signature change: ``driving_side`` parameter changed from named optional to - unnamed compulsory **driving side**. - * pgr_withPointsDD(Single vertex) - * pgr_withPointsDD(Multiple vertices) * Standardizing output columns to ``(seq, depth, start_vid, pred, node, edge, cost, agg_cost)`` - * pgr_withPointsDD(Single vertex) - * Added ``depth``, ``pred`` and ``start_vid`` column. - * pgr_withPointsDD(Multiple vertices) - * Added ``depth``, ``pred`` columns. - * When ``details`` is ``false``: - * Only points that are visited are removed, that is, points reached within the - distance are included - * Deprecated signatures - * pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) - * pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean) - -* [#2546](https://github.com/pgRouting/pgrouting/pull/2546) Standardize output - and modifying signature pgr_withPointsKSP - - * Standardizing output columns to ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - * pgr_withPointsKSP(One to One) - * Signature change: ``driving_side`` parameter changed from named optional to - unnamed compulsory **driving side**. - * Added ``start_vid`` and ``end_vid`` result columns. - * New proposed signatures: - * pgr_withPointsKSP(One to Many) - * pgr_withPointsKSP(Many to One) - * pgr_withPointsKSP(Many to Many) - * pgr_withPointsKSP(Combinations) - * Deprecated signature - * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,char,boolean)`` - -**C/C++ code enhancements** - -* [#2504](https://github.com/pgRouting/pgrouting/pull/2504) To C++ pg data get, - fetch and check. - - * Stopping support for compilation with MSVC. - -* [#2505](https://github.com/pgRouting/pgrouting/pull/2505) Using namespace. -* [#2512](https://github.com/pgRouting/pgrouting/pull/2512) [Dijkstra] Removing - duplicate code on Dijkstra. -* [#2517](https://github.com/pgRouting/pgrouting/pull/2517) Astar code - simplification. -* [#2521](https://github.com/pgRouting/pgrouting/pull/2521) Dijkstra code - simplification. -* [#2522](https://github.com/pgRouting/pgrouting/pull/2522) bdAstar code - simplification. - -**Documentation** - -* [#2490](https://github.com/pgRouting/pgrouting/pull/2490) Automatic page - history links. - -* ..rubric:: Standardize SQL - -* [#2555](https://github.com/pgRouting/pgrouting/pull/2555) Standardize - deprecated messages -* On new internal function: do not use named parameters and default parameters. - -
- -## pgRouting 3.5 - - -
pgRouting 3.5.1 Release Notes -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.5.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.5.1%22) - -**Documentation fixes** - -Changes on the documentation to the following: - -* pgr_degree * pgr_dijkstra -* pgr_ksp -* Automatic page history links - - * using bootstrap_version 2 because 3+ does not do dropdowns - -**Issue fixes** - -* [#2565](https://github.com/pgRouting/pgrouting/issues/2565) - pgr_lengauerTarjanDominatorTree triggers an assertion - -**SQL enhancements** - -* [#2561](https://github.com/pgRouting/pgrouting/issues/2561) Not use - wildcards on SQL - -**pgtap tests** - -* [#2559](https://github.com/pgRouting/pgrouting/issues/2559) pgtap test using sampledata - -**Build fixes** - -* Fix winnie build - -**Code fixes** - -* Fix clang warnings - - * Grouping headers of postgres readers - -
- -
pgRouting 3.5.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.5.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.5.0%22) - -**Official functions changes** - -* Dijkstra - - * Standardize output columns to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` - - * pgr_dijkstra(One to One) added ``start_vid`` and ``end_vid`` columns. - * pgr_dijkstra(One to Many) added ``end_vid`` column. - * pgr_dijkstra(Many to One) added ``start_vid`` column. - -
- -## pgRouting 3.4 - - -
pgRouting 3.4.2 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.4.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.4.2%22) - -**Issue fixes** - -* [#2394](https://github.com/pgRouting/pgrouting/issues/2394): - pgr_bdAstar accumulates heuristic cost in visited node cost. -* [#2427](https://github.com/pgRouting/pgrouting/issues/2427): - pgr_createVerticesTable & pgr_createTopology, variable should be of type Record. - -
- -
pgRouting 3.4.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.4.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.4.1%22) - -**Issue fixes** - -* [#2401](https://github.com/pgRouting/pgrouting/issues/2401): - pgRouting 3.4.0 do not build docs when sphinx is too low or missing -* [#2398](https://github.com/pgRouting/pgrouting/issues/2398): - v3.4.0 does not upgrade from 3.3.3 - -
- -
pgRouting 3.4.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.4.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.4.0%22) - -**Issue fixes** - -* [#1891](https://github.com/pgRouting/pgrouting/issues/1891): - pgr_ksp doesn't give all correct shortest path - -**New proposed functions.** - -* With points - - * pgr_withPointsVia(One Via) - -* Turn Restrictions - - * Via with turn restrictions - - * pgr_trspVia(One Via) - * pgr_trspVia_withPoints(One Via) - - * pgr_trsp - - * pgr_trsp(One to One) - * pgr_trsp(One to Many) - * pgr_trsp(Many to One) - * pgr_trsp(Many to Many) - * pgr_trsp(Combinations) - - * ``pgr_trsp_withPoints`` - - * pgr_trsp_withPoints(One to One) - * pgr_trsp_withPoints(One to Many) - * pgr_trsp_withPoints(Many to One) - * pgr_trsp_withPoints(Many to Many) - * pgr_trsp_withPoints(Combinations) - -* Topology - - * pgr_degree - -* Utilities - - * pgr_findCloseEdges(One point) - * pgr_findCloseEdges(Many points) - -**New experimental functions** - -* Ordering - * pgr_cuthillMckeeOrdering + * Combinations signature promoted to official. -* Unclassified +* pgr_dijkstraCost - * pgr_hawickCircuits + * Combinations signature promoted to official. -**Official functions changes** +* pgr_edgeColoring -* Flow functions + * Output columns standardized to ``(edge, color)`` - * pgr_maxCardinalityMatch(text) +* pgr_edgeDisjointPaths - * Deprecating: pgr_maxCardinalityMatch(text,boolean) + * Output columns standardized to ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` -**Deprecated Functions** +* pgr_edmondsKarp -* Turn Restrictions + * Combinations signature promoted to official. - * pgr_trsp(text,integer,integer,boolean,boolean,text) - * pgr_trsp(text,integer,float8,integer,float8,boolean,boolean,text) - * pgr_trspViaVertices(text,anyarray,boolean,boolean,text) - * pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) +* pgr_edwardMoore -
- -## pgRouting 3.3 - - -
pgRouting 3.3.5 Release Notes - -* [#2401](https://github.com/pgRouting/pgrouting/issues/2401): - pgRouting 3.4.0 do not build docs when sphinx is too low or missing - -
- -
pgRouting 3.3.4 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.3.4 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.3.4%22) - -**Issue fixes** - -* [#2400](https://github.com/pgRouting/pgrouting/issues/2400): - pgRouting 3.3.3 does not build in focal - -
- -
pgRouting 3.3.3 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.3.3 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.3.3%22) - -**Issue fixes** - -* [#1891](https://github.com/pgRouting/pgrouting/issues/1891): - pgr_ksp doesn't give all correct shortest path - -**Official functions changes** - -* Flow functions - - * pgr_maxCardinalityMatch(text,boolean) - - * Ignoring optional boolean parameter, as the algorithm works only for - undirected graphs. - - -
- -
pgRouting 3.3.2 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.3.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.3.2%22) - -* Revised documentation - - * Simplifying table names and table columns, for example: - - * ``edges`` instead of ``edge_table`` - - * Removing unused columns ``category_id`` and ``reverse_category_id``. - - * ``combinations`` instead of ``combinations_table`` - - * Using PostGIS standard for geometry column. - - * ``geom`` instead of ``the_geom`` - - * Avoiding usage of functions that modify indexes, columns etc on tables. - - * Using ``pgr_extractVertices`` to create a routing topology - - * Restructure of the pgRouting concepts page. - - -**Issue fixes** - -* [#2276](https://github.com/pgRouting/pgrouting/issues/2276): - edgeDisjointPaths issues with start_vid and combinations -* [#2312](https://github.com/pgRouting/pgrouting/issues/2312): - pgr_extractVertices error when target is not BIGINT -* [#2357](https://github.com/pgRouting/pgrouting/issues/2357): - Apply clang-tidy performance-* - -
- -
pgRouting 3.3.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.3.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.3.1%22) -on Github. - -**Issue fixes** - -* [#2216](https://github.com/pgRouting/pgrouting/issues/2216): Warnings when using clang -* [#2266](https://github.com/pgRouting/pgrouting/issues/2266): Error processing restrictions - - -
- -
pgRouting 3.3.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.3.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.3.0%22) -on Github. - -**Issue fixes** - -* [#2057](https://github.com/pgRouting/pgrouting/issues/2057): trspViaEdges columns in different order -* [#2087](https://github.com/pgRouting/pgrouting/issues/2087): pgr_extractVertices to proposed -* [#2201](https://github.com/pgRouting/pgrouting/issues/2201): pgr_depthFirstSearch to proposed -* [#2202](https://github.com/pgRouting/pgrouting/issues/2202): pgr_sequentialVertexColoring to proposed -* [#2203](https://github.com/pgRouting/pgrouting/issues/2203): pgr_dijkstraNear and pgr_dijkstraNearCost to proposed - -**New experimental functions** - -* Coloring - - * pgr_edgeColoring - -**Experimental promoted to Proposed** - -* Dijkstra - - * pgr_dijkstraNear - - * pgr_dijkstraNear(Combinations) - * pgr_dijkstraNear(Many to Many) - * pgr_dijkstraNear(Many to One) - * pgr_dijkstraNear(One to Many) - - * pgr_dijkstraNearCost - - * pgr_dijkstraNearCost(Combinations) - * pgr_dijkstraNearCost(Many to Many) - * pgr_dijkstraNearCost(Many to One) - * pgr_dijkstraNearCost(One to Many) - -* Coloring - - * pgr_sequentialVertexColoring - -* Topology - - * pgr_extractVertices - -* Traversal - - * pgr_depthFirstSearch(Multiple vertices) - * pgr_depthFirstSearch(Single vertex) - -
- -## pgRouting 3.2 - - -
pgRouting 3.2.2 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.2.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.2.2%22) -on Github. - -**Issue fixes** - -* [#2093](https://github.com/pgRouting/pgrouting/issues/2093): Compilation on Visual Studio -* [#2189](https://github.com/pgRouting/pgrouting/issues/2189): Build error on RHEL 7 - -
- -
pgRouting 3.2.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.2.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.2.1%22) -on Github. - -**Issue fixes** - -* [#1883](https://github.com/pgRouting/pgrouting/issues/1883): pgr_TSPEuclidean crashes connection on Windows + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` + .. rubric:: Version 3.2.0 + * New experimental signature: + * pgr_edwardMoore(Combinations) + .. rubric:: Version 3.0.0 + * New experimental function. - * The solution is to use Boost::graph::metric_tsp_approx - * To not break user's code the optional parameters related to the TSP Annaeling are ignored - * The function with the annaeling optional parameters is deprecated +* pgr_kingOrdering + * New experimental function. -
- -
pgRouting 3.2.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.2.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.2.0%22) -on Github. +* pgr_KSP -**Build** + * All signatures promoted to official. -* [#1850](https://github.com/pgRouting/pgrouting/issues/1850): Change Boost - min version to 1.56 +* pgr_maxFlow - * Removing support for Boost v1.53, v1.54 & v1.55 + * Combinations signature promoted to official. -**New experimental functions** - -* pgr_bellmanFord(Combinations) -* pgr_binaryBreadthFirstSearch(Combinations) -* pgr_bipartite -* pgr_dagShortestPath(Combinations) -* pgr_depthFirstSearch -* Dijkstra Near +* pgr_pushRelabel - * pgr_dijkstraNear + * Combinations signature promoted to official. - * pgr_dijkstraNear(One to Many) - * pgr_dijkstraNear(Many to One) - * pgr_dijkstraNear(Many to Many) - * pgr_dijkstraNear(Combinations) +* pgr_sloanOrdering - * pgr_dijkstraNearCost - - * pgr_dijkstraNearCost(One to Many) - * pgr_dijkstraNearCost(Many to One) - * pgr_dijkstraNearCost(Many to Many) - * pgr_dijkstraNearCost(Combinations) - -* pgr_edwardMoore(Combinations) -* pgr_isPlanar -* pgr_lengauerTarjanDominatorTree -* pgr_makeConnected -* Flow - - * pgr_maxFlowMinCost(Combinations) - * pgr_maxFlowMinCost_Cost(Combinations) + * New experimental function. * pgr_sequentialVertexColoring -**New proposed functions.** - -* Astar - - * pgr_aStar(Combinations) - * pgr_aStarCost(Combinations) - -* Bidirectional Astar - - * pgr_bdAstar(Combinations) - * pgr_bdAstarCost(Combinations) - -* Bidirectional Dijkstra - - * pgr_bdDijkstra(Combinations) - * pgr_bdDijkstraCost(Combinations) - -* Flow - - * pgr_boykovKolmogorov(Combinations) - * pgr_edgeDisjointPaths(Combinations) - * pgr_edmondsKarp(Combinations) - * pgr_maxFlow(Combinations) - * pgr_pushRelabel(Combinations) - -* pgr_withPoints(Combinations) -* pgr_withPointsCost(Combinations) - -
- -## pgRouting 3.1 - - -
pgRouting 3.1.4 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.1.4 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.1.4%22) -on Github. - -**Issues fixes** - -* [#2189](https://github.com/pgRouting/pgrouting/issues/2189): Build error on - RHEL 7 - - -
- -
pgRouting 3.1.3 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.1.3 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.1.3%22) -on Github. - -**Issues fixes** - -* [#1825](https://github.com/pgRouting/pgrouting/issues/1825): Boost versions - are not honored -* [#1849](https://github.com/pgRouting/pgrouting/issues/1849): Boost 1.75.0 - geometry "point_xy.hpp" build error on macOS environment -* [#1861](https://github.com/pgRouting/pgrouting/issues/1861): vrp functions - crash server - - -
- -
pgRouting 3.1.2 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.1.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.1.2%22) -on Github. - -**Issues fixes** - -* [#1304](https://github.com/pgRouting/pgrouting/issues/1304): FreeBSD 12 - 64-bit crashes on pgr_vrOneDepot tests Experimental Function -* [#1356](https://github.com/pgRouting/pgrouting/issues/1356): - tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed -* [#1725](https://github.com/pgRouting/pgrouting/issues/1725): Server crash - on pgr_pickDeliver and pgr_vrpOneDepot on openbsd -* [#1760](https://github.com/pgRouting/pgrouting/issues/1760): TSP server - crash on ubuntu 20.04 #1760 -* [#1770](https://github.com/pgRouting/pgrouting/issues/1770): Remove - warnings when using clang compiler - + * Output columns standardized to ``(node, color)`` -
- -
pgRouting 3.1.1 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.1.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.1.1%22) -on Github. - -**Issues fixes** - -* [#1733](https://github.com/pgRouting/pgrouting/issues/1733): pgr_bdAstar - fails when source or target vertex does not exist in the graph -* [#1647](https://github.com/pgRouting/pgrouting/issues/1647): Linear - Contraction contracts self loops -* [#1640](https://github.com/pgRouting/pgrouting/issues/1640): pgr_withPoints - fails when points_sql is empty -* [#1616](https://github.com/pgRouting/pgrouting/issues/1616): Path - evaluation on C++ not updated before the results go back to C -* [#1300](https://github.com/pgRouting/pgrouting/issues/1300): - pgr_chinesePostman crash on test data - - - -
- -
pgRouting 3.1.0 Release Notes - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.1.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.1.0%22) -on Github. +* pgr_topologicalSort -**New proposed functions.** + * Standardize output to ``(seq, node)`` -* pgr_dijkstra(combinations) -* pgr_dijkstraCost(combinations) +* pgr_transitiveClosure -**Build changes** + * Standardized output to ``(node,targets)`` -* Minimal requirement for Sphinx: version 1.8 +* pgr_trsp -
+ * Function promoted to official. + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_trsp(text,integer,integer,boolean,boolean,text) + * pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) -## pgRouting 3.0 +* pgr_trspVia + * Function promoted to official. + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_trspviavertices(text,anyarray,boolean,boolean,text) -
pgRouting 3.0.6 Release Notes +* pgr_trspVia_withPoints -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.6 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.6%22) -on Github. + * Function promoted to official. + * **Driving side** parameter is positional unnamed. + * Valid values depend on kind of graph + * Breaking change, signatures no longer available: + * pgr_trspvia_withpoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) + * pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text) -**Issues fixes** +* pgr_trsp_withPoints -* [#2189](https://github.com/pgRouting/pgrouting/issues/2189): Build error on - RHEL 7 + * Function promoted to official. + * **Driving side** parameter is positional unnamed and compulsory. + * Valid values depend on kind of graph + * Breaking change, signatures no longer available: + * pgr_trsp_withpoints(text,text,text,anyarray,anyarray,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,anyarray,bigint,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,bigint,anyarray,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,bigint,bigint,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,text,boolean,character,boolean) +* pgr_turnRestrictedPath -
+ * Output columns standardized to ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` -
pgRouting 3.0.5 Release Notes +* pgr_withPoints -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.5 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.5%22) -on Github. + * Function promoted to official. + * **Driving side** parameter is positional unnamed and compulsory. + * Valid values depend on kind of graph + * Output columns standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean) + * pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean) + * pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean) + * pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean) + * pgr_withpoints(text,text,text,boolean,character,boolean) + +* pgr_withPointsCost -**Backport issue fixes** + * Function promoted to official. + * **Driving side** parameter is unnamed and compulsory. + * Valid values depend on kind of graph + * Output columns standardized to ``(start_vid, end_vid, agg_cost)`` + * Breaking change, signatures no longer available: + * pgr_withpointscost(text,text,anyarray,anyarray,boolean,character) + * pgr_withpointscost(text,text,anyarray,bigint,boolean,character) + * pgr_withpointscost(text,text,bigint,anyarray,boolean,character) + * pgr_withpointscost(text,text,bigint,bigint,boolean,character) + * pgr_withpointscost(text,text,text,boolean,character) + +* pgr_withPointsCostMatrix -* [#1825](https://github.com/pgRouting/pgrouting/issues/1825): Boost versions - are not honored -* [#1849](https://github.com/pgRouting/pgrouting/issues/1849): Boost 1.75.0 - geometry "point_xy.hpp" build error on macOS environment -* [#1861](https://github.com/pgRouting/pgrouting/issues/1861): vrp functions - crash server + * Function promoted to official. + * **Driving side** parameter is positional unnamed and compulsory. + * Valid values depend on kind of graph + * Output columns standardized to ``(start_vid, end_vid, agg_cost)`` + * Breaking change, signatures no longer available: + * pgr_withpointscostmatrix(text,text,anyarray,boolean,character) +* pgr_withPointsDD -
+ * Function promoted to official. + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) + * pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean) -
pgRouting 3.0.4 Release Notes +* pgr_withPointsKSP -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.4 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.4%22) -on Github. + * Function promoted to official. + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) -**Backport issue fixes** +* pgr_withPointsVia -* [#1304](https://github.com/pgRouting/pgrouting/issues/1304): FreeBSD 12 - 64-bit crashes on pgr_vrOneDepot tests Experimental Function -* [#1356](https://github.com/pgRouting/pgrouting/issues/1356): - tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed -* [#1725](https://github.com/pgRouting/pgrouting/issues/1725): Server crash - on pgr_pickDeliver and pgr_vrpOneDepot on openbsd -* [#1760](https://github.com/pgRouting/pgrouting/issues/1760): TSP server - crash on ubuntu 20.04 #1760 -* [#1770](https://github.com/pgRouting/pgrouting/issues/1770): Remove - warnings when using clang compiler + * Function promoted to official. + * **Driving side** parameter is positional unnamed and compulsory. + * Valid values depend on kind of graph + .. Breaking change + * Breaking change, signatures no longer available: + * pgr_withpointsvia(text,text,anyarray,boolean,boolean,boolean,character,boolean) + +Functions promoted to official + +* [#2701](https://github.com/pgRouting/pgrouting/issues/2701): pgr_trsp +* [#2701](https://github.com/pgRouting/pgrouting/issues/2701): pgr_trspVia +* [#2701](https://github.com/pgRouting/pgrouting/issues/2701): pgr_trspVia_withPoints +* [#2701](https://github.com/pgRouting/pgrouting/issues/2701): pgr_trsp_withPoints +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPoints +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsCost +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsCostMatrix +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsDD +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsKSP +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsVia + +Signatures promoted to official + +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_aStar(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_aStarCost(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_bdAstar(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_bdAstarCost(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_bdDijkstra(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_bdDijkstraCost(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_dijkstra(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_dijkstraCost(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_KSP(All signatures) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_boykovKolmogorov(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_edmondsKarp(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_maxFlow(Combinations) +* [#2718](https://github.com/pgRouting/pgrouting/issues/2718): pgr_pushRelabel(Combinations) + +New experimental functions. +* Metrics + * [#2951](https://github.com/pgRouting/pgrouting/issues/2951): pgr_bandwidth -
+* Ordering -
pgRouting 3.0.3 Release Notes + * [#2954](https://github.com/pgRouting/pgrouting/issues/2954): pgr_kingOrdering + * [#2955](https://github.com/pgRouting/pgrouting/issues/2955): pgr_sloanOrdering -**Backport issue fixes** +SQL signatures and output standardization -* [#1733](https://github.com/pgRouting/pgrouting/issues/1733): pgr_bdAstar - fails when source or target vertex does not exist in the graph -* [#1647](https://github.com/pgRouting/pgrouting/issues/1647): Linear - Contraction contracts self loops -* [#1640](https://github.com/pgRouting/pgrouting/issues/1640): pgr_withPoints - fails when points_sql is empty -* [#1616](https://github.com/pgRouting/pgrouting/issues/1616): Path - evaluation on C++ not updated before the results go back to C -* [#1300](https://github.com/pgRouting/pgrouting/issues/1300): - pgr_chinesePostman crash on test data +[#2904](https://github.com/pgRouting/pgrouting/issues/2904): Standardize output columns of functions with different output + columns within overloads +**Standardized to ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``** +* [#2905](https://github.com/pgRouting/pgrouting/issues/2905): pgr_withPoints +* [#2906](https://github.com/pgRouting/pgrouting/issues/2906): pgr_bdDijkstra +* [#2907](https://github.com/pgRouting/pgrouting/issues/2907): pgr_bellmanFord +* [#2908](https://github.com/pgRouting/pgrouting/issues/2908): pgr_binaryBreadthFirstSearch +* [#2910](https://github.com/pgRouting/pgrouting/issues/2910): pgr_edwardMoore +* [#2913](https://github.com/pgRouting/pgrouting/issues/2913): pgr_dagShortestPath -
+**Standardized to ``(start_vid, end_vid, agg_cost)``** -
pgRouting 3.0.2 Release Notes +* [#2905](https://github.com/pgRouting/pgrouting/issues/2905): pgr_withPointsCost +* [#2905](https://github.com/pgRouting/pgrouting/issues/2905): pgr_withPointsCostMatrix -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.2 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.2%22) -on Github. +**Standardized to ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)``** -**Issues fixes** +* [#2909](https://github.com/pgRouting/pgrouting/issues/2909): pgr_edgeDisjointPaths +* [#2909](https://github.com/pgRouting/pgrouting/issues/2909): pgr_turnRestrictedPath -* [#1378](https://github.com/pgRouting/pgrouting/issues/1378): Visual Studio - build failing +**Standardized to ``(edge, color)``** +* [#2924](https://github.com/pgRouting/pgrouting/issues/2924): pgr_edgeColoring -
+**Standardized to ``(node, color)``** -
pgRouting 3.0.1 Release Notes +* [#2924](https://github.com/pgRouting/pgrouting/issues/2924): pgr_bipartite +* [#2927](https://github.com/pgRouting/pgrouting/issues/2927): pgr_sequentialVertexColoring -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.1 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.1%22) -on Github. +**Standardized to ``(seq, depth, start_vid, pred, node, edge, cost, agg_cost)``** -**Issues fixes** +* [#2931](https://github.com/pgRouting/pgrouting/issues/2931): pgr_breadthFirstSearch +* [#2931](https://github.com/pgRouting/pgrouting/issues/2931): pgr_depthFirstSearch -* [#232](https://github.com/pgRouting/pgrouting/issues/232): Honor client - cancel requests in C /C++ code +**Standardized to ``(seq, node)``** +* [#2934](https://github.com/pgRouting/pgrouting/issues/2934): pgr_topologicalSort -
+**Standardized to ``(node,targets)``** -
pgRouting 3.0.0 Release Notes - - -To see all issues & pull requests closed by this release see the [Git closed -milestone for 3.0.0 -](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.0.0%22) -on Github. - -**Fixed Issues** - -* [#1153](https://github.com/pgRouting/pgrouting/issues/1153): Renamed - pgr_eucledianTSP to pgr_TSPeuclidean -* [#1188](https://github.com/pgRouting/pgrouting/issues/1188): Removed CGAL - dependency -* [#1002](https://github.com/pgRouting/pgrouting/issues/1002): Fixed - contraction issues: - - * [#1004](https://github.com/pgRouting/pgrouting/issues/1004): Contracts - when forbidden vertices do not belong to graph - * [#1005](https://github.com/pgRouting/pgrouting/issues/1005): Intermideate - results eliminated - * [#1006](https://github.com/pgRouting/pgrouting/issues/1006): No loss of - information - -**New Functions** - -* Kruskal family - - * pgr_kruskal - * pgr_kruskalBFS - * pgr_kruskalDD - * pgr_kruskalDFS - -* Prim family - - * pgr_prim - * pgr_primDD - * pgr_primDFS - * pgr_primBFS - - -**Proposed moved to official on pgRouting** - -* aStar Family - - * pgr_aStar(One to Many) - * pgr_aStar(Many to One) - * pgr_aStar(Many to Many) - * pgr_aStarCost(One to One) - * pgr_aStarCost(One to Many) - * pgr_aStarCost(Many to One) - * pgr_aStarCost(Many to Many) - * pgr_aStarCostMatrix - -* bdAstar Family - - * pgr_bdAstar(One to Many) - * pgr_bdAstar(Many to One) - * pgr_bdAstar(Many to Many) - * pgr_bdAstarCost(One to One) - * pgr_bdAstarCost(One to Many) - * pgr_bdAstarCost(Many to One) - * pgr_bdAstarCost(Many to Many) - * pgr_bdAstarCostMatrix - -* bdDijkstra Family - - * pgr_bdDijkstra(One to Many) - * pgr_bdDijkstra(Many to One) - * pgr_bdDijkstra(Many to Many) - * pgr_bdDijkstraCost(One to One) - * pgr_bdDijkstraCost(One to Many) - * pgr_bdDijkstraCost(Many to One) - * pgr_bdDijkstraCost(Many to Many) - * pgr_bdDijkstraCostMatrix - -* Flow Family - - * pgr_pushRelabel(One to One) - * pgr_pushRelabel(One to Many) - * pgr_pushRelabel(Many to One) - * pgr_pushRelabel(Many to Many) - * pgr_edmondsKarp(One to One) - * pgr_edmondsKarp(One to Many) - * pgr_edmondsKarp(Many to One) - * pgr_edmondsKarp(Many to Many) - * pgr_boykovKolmogorov (One to One) - * pgr_boykovKolmogorov (One to Many) - * pgr_boykovKolmogorov (Many to One) - * pgr_boykovKolmogorov (Many to Many) - * pgr_maxCardinalityMatching - * pgr_maxFlow - * pgr_edgeDisjointPaths(One to One) - * pgr_edgeDisjointPaths(One to Many) - * pgr_edgeDisjointPaths(Many to One) - * pgr_edgeDisjointPaths(Many to Many) - -* Components family - - * pgr_connectedComponents - * pgr_strongComponents - * pgr_biconnectedComponents - * pgr_articulationPoints - * pgr_bridges - -* Contraction: - - * Removed unnecessary column seq - * Bug Fixes - - -**New experimental functions** - -* pgr_maxFlowMinCost -* pgr_maxFlowMinCost_Cost -* pgr_extractVertices -* pgr_turnRestrictedPath -* pgr_stoerWagner -* pgr_dagShortestpath -* pgr_topologicalSort -* pgr_transitiveClosure -* VRP category +* [#2934](https://github.com/pgRouting/pgrouting/issues/2934): pgr_transitiveClosure - * pgr_pickDeliverEuclidean - * pgr_pickDeliver +Removal of SQL deprecated signatures -* Chinese Postman family +* [#2798](https://github.com/pgRouting/pgrouting/issues/2798): pgr_contraction - * pgr_chinesePostman - * pgr_chinesePostmanCost + * pgr_contraction(text,bigint[],integer,bigint[],boolean) -* Breadth First Search family +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683): pgr_trsp - * pgr_breadthFirstSearch - * pgr_binaryBreadthFirstSearch + * pgr_trsp(text,integer,integer,boolean,boolean,text) + * pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) -* Bellman Ford family +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683): pgr_trspVia - * pgr_bellmanFord - * pgr_edwardMoore + * pgr_trspviavertices(text,anyarray,boolean,boolean,text) -**Moved to legacy** +* [#2700](https://github.com/pgRouting/pgrouting/issues/2700): pgr_withPointsVia -* Experimental functions + * pgr_withpointsvia(text,text,anyarray,boolean,boolean,boolean,character,boolean) - * pgr_labelGraph - Use the components family of functions instead. - * Max flow - functions were renamed on v2.5.0 +* [#2888](https://github.com/pgRouting/pgrouting/issues/2888): pgr_findCloseEdges - * pgr_maxFlowPushRelabel - * pgr_maxFlowBoykovKolmogorov - * pgr_maxFlowEdmondsKarp - * pgr_maximumcardinalitymatching + * pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean) + * pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean) - * VRP +* [#2890](https://github.com/pgRouting/pgrouting/issues/2890): pgr_withPointsDD - * pgr_gsoc_vrppdtw + * pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) + * pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean) -* TSP old signatures -* pgr_pointsAsPolygon -* pgr_alphaShape old signature +* [#2895](https://github.com/pgRouting/pgrouting/issues/2895): pgr_withPointsKSP + + * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) + +* [#2899](https://github.com/pgRouting/pgrouting/issues/2899): pgr_maxCardinalityMatch + + * pgr_maxCardinalityMatch(text,boolean) + +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901): pgr_TSP + + * pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double + precision,double precision,double precision,boolean) + +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901): pgr_TSPeuclidean + + * pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer, + integer,double precision,double precision,double precision,boolean) + + +Removal of SQL deprecated functions + +* [#2681](https://github.com/pgRouting/pgrouting/issues/2681): pgr_trspViaedges +* [#2682](https://github.com/pgRouting/pgrouting/issues/2682): pgr_trspViaVertices +* [#2748](https://github.com/pgRouting/pgrouting/issues/2748): pgr_alphaShape +* [#2751](https://github.com/pgRouting/pgrouting/issues/2751): pgr_createTopology +* [#2752](https://github.com/pgRouting/pgrouting/issues/2752): pgr_analyzeGraph +* [#2755](https://github.com/pgRouting/pgrouting/issues/2755): pgr_analyzeOneWay +* [#2827](https://github.com/pgRouting/pgrouting/issues/2827): pgr_createVerticesTable +* [#2886](https://github.com/pgRouting/pgrouting/issues/2886): pgr_nodeNetwork + +Removal of SQL deprecated internal functions + +* [#2748](https://github.com/pgRouting/pgrouting/issues/2748) _pgr_alphaShape(text,double precision) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_checkVertTab(text,text[],integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_createIndex(text,text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_createIndex(text,text,text,text,integer,text) +* [#2913](https://github.com/pgRouting/pgrouting/issues/2913) _pgr_dagShortestPath(text,anyarray,anyarray,boolean,boolean) +* [#2913](https://github.com/pgRouting/pgrouting/issues/2913) _pgr_dagShortestPath(text,text,boolean,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstraNear(text,anyarray,anyarray,bigint,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstraNear(text,anyarray,bigint,bigint,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstraNear(text,bigint,anyarray,bigint,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstra(text,text,boolean,boolean,bigint,boolean) +* [#2730](https://github.com/pgRouting/pgrouting/issues/2730) _pgr_dijkstra(text,text,boolean,boolean,boolean) +* [#2735](https://github.com/pgRouting/pgrouting/issues/2735) _pgr_drivingDistance(text,anyarray,double precision,boolean,boolean) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_endPoint(geometry) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) __pgr_getColumnName(text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) __pgr_getColumnName(text,text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) __pgr_getColumnType(text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) __pgr_getColumnType(text,text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) __pgr_getTableName(text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_isColumnIndexed(text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_isColumnIndexed(text,text,text,integer,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_isColumnIntable(text,text) +* [#2745](https://github.com/pgRouting/pgrouting/issues/2745) _pgr_kruskal(text,anyarray,text,bigint,double precision) +* [#2897](https://github.com/pgRouting/pgrouting/issues/2897) _pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean,boolean) +* [#2897](https://github.com/pgRouting/pgrouting/issues/2897) _pgr_ksp(text,bigint,bigint,integer,boolean,boolean) +* [#2897](https://github.com/pgRouting/pgrouting/issues/2897) _pgr_ksp(text,text,integer,boolean,boolean) +* [#2899](https://github.com/pgRouting/pgrouting/issues/2899) _pgr_maxCardinalityMatch(text,boolean) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_msg(integer,text,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_onerror(boolean,integer,text,text,text,text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_pointtoid(geometry,double precision,text,integer) +* [#2743](https://github.com/pgRouting/pgrouting/issues/2743) _pgr_prim(text,anyarray,text,bigint,double precision) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_quote_ident(text) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_startPoint(geometry) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _pgr_trsp(text,text,anyarray,anyarray,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _pgr_trsp(text,text,anyarray,bigint,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _pgr_trsp(text,text,bigint,anyarray,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _pgr_trsp(text,text,bigint,bigint,boolean) +* [#2682](https://github.com/pgRouting/pgrouting/issues/2682) _pgr_trspViaVertices(text,integer[],boolean,boolean,text) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) _pgr_trspVia_withPoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) _pgr_trsp_withPoints(text,text,text,anyarray,anyarray,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) _pgr_trsp_withPoints(text,text,text,text,boolean,character,boolean) +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901) _pgr_tspEuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901) _pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* [#2861](https://github.com/pgRouting/pgrouting/issues/2861) _pgr_versionLess(text,text) +* [#2890](https://github.com/pgRouting/pgrouting/issues/2890) _pgr_withPointsDD(text,text,anyarray,double precision,boolean,character,boolean,boolean) +* [#2895](https://github.com/pgRouting/pgrouting/issues/2895) _pgr_withPointsKSP(text,text,anyarray,anyarray,integer,character,boolean,boolean,boolean,boolean) +* [#2895](https://github.com/pgRouting/pgrouting/issues/2895) _pgr_withPointsKSP(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) +* [#2895](https://github.com/pgRouting/pgrouting/issues/2895) _pgr_withPointsKSP(text,text,text,integer,character,boolean,boolean,boolean) +* [#2741](https://github.com/pgRouting/pgrouting/issues/2741) _pgr_withPointsVia(text,bigint[],double precision[],boolean) +* [#2741](https://github.com/pgRouting/pgrouting/issues/2741) _pgr_withPointsVia(text,text,anyarray,boolean,boolean,boolean,character,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _trsp(text,text,anyarray,anyarray,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _v4trsp(text,text,anyarray,anyarray,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _v4trsp(text,text,text,boolean) + +Summary of functions and signatures no longer on pgrouting + +* [#2748](https://github.com/pgRouting/pgrouting/issues/2748) pgr_alphashape(geometry,double precision) +* [#2752](https://github.com/pgRouting/pgrouting/issues/2752) pgr_analyzegraph(text,double precision,text,text,text,text,text) +* [#2755](https://github.com/pgRouting/pgrouting/issues/2755) pgr_analyzeoneway(text,text[],text[],text[],text[],boolean,text,text,text) +* [#2798](https://github.com/pgRouting/pgrouting/issues/2798) pgr_contraction(text,bigint[],integer,bigint[],boolean) +* [#2751](https://github.com/pgRouting/pgrouting/issues/2751) pgr_createtopology(text,double precision,text,text,text,text,text,boolean) +* [#2827](https://github.com/pgRouting/pgrouting/issues/2827) pgr_createverticestable(text,text,text,text,text) +* [#2888](https://github.com/pgRouting/pgrouting/issues/2888) pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean) +* [#2888](https://github.com/pgRouting/pgrouting/issues/2888) pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean) +* [#2899](https://github.com/pgRouting/pgrouting/issues/2899) pgr_maxCardinalityMatch(text,boolean) +* [#2886](https://github.com/pgRouting/pgrouting/issues/2886) pgr_nodenetwork(text,double precision,text,text,text,text,boolean) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) pgr_trsp(text,integer,integer,boolean,boolean,text) +* [#2681](https://github.com/pgRouting/pgrouting/issues/2681) pgr_trspViaedges(text,integer[],double precision[],boolean,boolean,text) +* [#2682](https://github.com/pgRouting/pgrouting/issues/2682) pgr_trspViaVertices(text,anyarray,boolean,boolean,text) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trspVia_withPoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trsp_withPoints(text,text,text,anyarray,anyarray,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trsp_withPoints(text,text,text,anyarray,bigint,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trsp_withPoints(text,text,text,bigint,anyarray,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trsp_withPoints(text,text,text,bigint,bigint,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_trsp_withPoints(text,text,text,text,boolean,character,boolean) +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901) pgr_tspEuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* [#2901](https://github.com/pgRouting/pgrouting/issues/2901) pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCostMatrix(text,text,anyarray,boolean,character) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCost(text,text,anyarray,anyarray,boolean,character) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCost(text,text,anyarray,bigint,boolean,character) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCost(text,text,bigint,anyarray,boolean,character) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCost(text,text,bigint,bigint,boolean,character) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsCost(text,text,text,boolean,character) +* [#2890](https://github.com/pgRouting/pgrouting/issues/2890) pgr_withPointsDD(text,text,anyarray,double precision,boolean,character,boolean,boolean) +* [#2890](https://github.com/pgRouting/pgrouting/issues/2890) pgr_withPointsDD(text,text,bigint,double precision,boolean,character,boolean) +* [#2895](https://github.com/pgRouting/pgrouting/issues/2895) pgr_withPointsKSP(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPoints(text,text,anyarray,anyarray,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPoints(text,text,anyarray,bigint,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPoints(text,text,bigint,anyarray,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPoints(text,text,bigint,bigint,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPoints(text,text,text,boolean,character,boolean) +* [#2919](https://github.com/pgRouting/pgrouting/issues/2919) pgr_withPointsVia(text,text,anyarray,boolean,boolean,boolean,character,boolean) + +Code enhancements + +* Removal of unused C/C++ code +* Refactor the Script to build the update PostgreSQL file. +* One process & driver for: + + * allpairs: johnson and Floyd-Warshall + * Shortest path: Dijkstra and withPoints using Dijkstra + +**Deprecation of internal C/C++ functions** + +Deprecated functions are substituted by new function. + +* _pgr_drivingDistance => _pgr_drivingDistancev4 +* _pgr_withPointsDD => _pgr_withPointsddv4 +* _pgr_kruskal => _pgr_kruskalv4 +* _pgr_prim => _pgr_primv4 +* _pgr_dijkstra => _pgr_dijkstra_v4 +* _pgr_withPointsKSP => _pgr_withPointsKSP_v4 +* _pgr_trspVia_withPoints => _pgr_trspVia_withPoints_v4 +* _pgr_trsp_withPoints => _pgr_trsp_withPoints_v4 +* _pgr_withPointsVia => _pgr_withPointsvia_v4 + +**Internal C/C++ functions in legacy** + +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _trsp +* [#2683](https://github.com/pgRouting/pgrouting/issues/2683) _v4trsp +* [#2748](https://github.com/pgRouting/pgrouting/issues/2748) _pgr_alphaShape +* [#2913](https://github.com/pgRouting/pgrouting/issues/2913) _pgr_dagShortestPath
diff --git a/README.md b/README.md index e3c85bb1fcc..1f563b4b009 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ https://gitter.im/pgRouting/pgrouting](https://badges.gitter.im/Join%20Chat.svg) [Join discourse](https://discourse.osgeo.org/c/pgrouting/15) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15004469.svg)](https://doi.org/10.5281/zenodo.15004469) - ## Branches * The *main* branch has the development of the next micro release @@ -60,7 +59,7 @@ The latest documentation: https://docs.pgrouting.org/latest * Not supporting v12 & under * The Boost Graph Library (BGL) >= 1.56 * CMake >= 3.12 -* 7.0 > Sphinx >= 4.0.0 +* 4.0.0 <= Sphinx < 7.0 ### User's requirements @@ -106,13 +105,13 @@ To cite pgRouting in publications use: **BibTeX entry**: ```bibtex -@Manual{, - title = {{pgRouting: Routing on PostgreSQL}}, - author = {{pgRouting contributors}}, - year = {2025}, - doi = {10.5281/zenodo.15004469}, - url = {https://pgrouting.org/}, -} + @Manual{, + title = {{pgRouting: Routing on PostgreSQL}}, + author = {{pgRouting contributors}}, + year = {2025}, + doi = {10.5281/zenodo.15004469}, + url = {https://pgrouting.org/}, + } ``` ## LICENSE diff --git a/ci/winnie/build_pgrouting.sh b/ci/winnie/build_pgrouting.sh index bf820df0d74..a9f2018d93e 100644 --- a/ci/winnie/build_pgrouting.sh +++ b/ci/winnie/build_pgrouting.sh @@ -73,7 +73,7 @@ if [ $JENKINS_DEBUG -eq 1 ] then echo echo "***************************" - echo Recived variables used in this script + echo Received variables used in this script echo "**************************" echo "OS_BUILD ${OS_BUILD}" diff --git a/configuration.conf b/configuration.conf index ea4e8bc3f28..cc6da5e29cf 100644 --- a/configuration.conf +++ b/configuration.conf @@ -14,12 +14,12 @@ common | Y | Y | N # Has the command needed to link with prostgresl #---------------------- dijkstra | Y | Y | Y +legacy | Y | N | N allpairs | Y | Y | Y astar | Y | Y | Y driving_distance | Y | Y | Y ksp | Y | Y | Y tsp | Y | Y | Y -alpha_shape | Y | Y | Y bdAstar | Y | Y | Y bdDijkstra | Y | Y | Y trsp | Y | Y | Y @@ -52,5 +52,4 @@ categories | N | N | Y #---------------------- # SQL only directories #---------------------- -topology | N | Y | Y utilities | N | Y | Y diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 9608406041e..f5ca9064e79 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,163 +1,95 @@ -# -# Find Sphinx -# Find Sphinx executable to build documentation -# Source: https://ericscottbarr.com/blog/2012/03/sphinx-and-cmake-beautiful-documentation-for-c-projects/ -# -# Daniel Kastl 03/2013 -# +# Relevant changes from 3.8 to 4.0 -#--------------------------------------------- -# Kind of sphinx output -#--------------------------------------------- - -option(WITH_DOC - "Set ON|OFF (default=OFF) to build Documentation library tree" OFF) - -option(LOCALE - "Set ON|OFF (default=OFF) to build ithe latest pot/po files" OFF) - -option(WITH_ALL_DOC - "Set ON|OFF (default=OFF) to build Documentation library tree" OFF) - -#option(PDF -# "Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF) - -option(BUILD_LATEX - "Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF) - -option(SINGLEHTML - "Set ON|OFF (default=OFF) to build Documentation library tree as SINGLE HTML" OFF) - -option(BUILD_HTML - "Set ON|OFF (default=OFF) to build Documentation library tree as HTML" ON) - -option(BUILD_MAN - "Set ON|OFF (default=OFF) to build Documentation library tree as MAN page" OFF) +# WITH-DOC is not used anymore +# * The HTML documentation is build by default +# * The translated languages (en, es, zh_Hans) HTML documentation is build by default -option(LINKCHECK - "Set ON|OFF (default=OFF) to build Documentation library tree as LINKCHECK page" OFF) +# Documentation is not build when +# * Sphinx is not found +# * When all Sphinx formats are OFF +# * When all languages are OFF -option(EPUB - "Set ON|OFF (default=OFF) to build Documentation library tree as EPUB page" OFF) +# Output is on build/doc/_build/ directory -option(DUMMY - "Set ON|OFF (default=OFF) for debugging purposes" OFF) - -if (LOCALE) - set(WITH_DOC ON) -endif() +#--------------------------------------------- +# Checking for prerequisites +#--------------------------------------------- +find_program(SPHINX_EXECUTABLE + NAMES sphinx-build + DOC "Sphinx Documentation Builder (sphinx-doc.org)" +) -if (NOT WITH_DOC) - return() +if (NOT SPHINX_EXECUTABLE) + message(WARNING "Sphinx not found. + Building without user's documentation") + return() endif() -foreach(opt BUILD_HTML BUILD_LATEX BUILD_MAN SINGLEHTML EPUB DUMMY LINKCHECK) - if (${${opt}} OR WITH_ALL_DOC) - string(TOLOWER ${opt} val) - string(REPLACE "build_" "" val ${val}) - list(APPEND PROJECT_DOC_TARGETS ${val}) - set(WITH_DOC ON) - endif() +set(SPHINX_FLAGS "" CACHE STRING "Flags to pass to sphinx-build") +separate_arguments(sphinx_flags UNIX_COMMAND "${SPHINX_FLAGS}") + +option(BUILD_HTML "Set ON|OFF (default=OFF) to build Documentation library tree as HTML" ON) +option(BUILD_PDF "Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF) +option(BUILD_LOCALE "Set ON|OFF (default=OFF) to build the locale files" OFF) +option(BUILD_LINKCHECK "Set ON|OFF (default=OFF) to build Documentation library tree as LINKCHECK page" OFF) + + +# not quite sure how these look +option(BUILD_LATEX "Set ON|OFF (default=OFF) to build Documentation library tree as PDF" OFF) +option(BUILD_SINGLEHTML "Set ON|OFF (default=OFF) to build Documentation library tree as SINGLE HTML" OFF) +option(BUILD_MAN "Set ON|OFF (default=OFF) to build Documentation library tree as MAN page" OFF) +option(BUILD_EPUB "Set ON|OFF (default=OFF) to build Documentation library tree as EPUB page" OFF) +option(BUILD_DUMMY "Set ON|OFF (default=OFF) for debugging purposes" OFF) + +# get the ON options of the Sphinx formats +foreach(opt BUILD_HTML BUILD_LATEX BUILD_MAN BUILD_SINGLEHTML BUILD_EPUB BUILD_DUMMY BUILD_LINKCHECK BUILD_LOCALE) + if (${${opt}} OR WITH_ALL_DOC) + string(TOLOWER ${opt} val) + string(REPLACE "build_" "" val ${val}) + list(APPEND PROJECT_DOC_TARGETS ${val}) + endif() endforeach() +if("${PROJECT_DOC_TARGETS}" STREQUAL "") + message(WARNING "No documentation targets found + Building without documentation") + return() +endif() - -message(STATUS "PROJECT_DOC_TARGETS = ${PROJECT_DOC_TARGETS}") - -#--------------------------------------------- -#--------------------------------------------- -#--------------------------------------------- - -# LANGUAGES SETINGS - -#--------------------------------------------- -#--------------------------------------------- -#--------------------------------------------- +add_custom_target(doc ALL COMMENT "Building documentation with Sphinx") #--------------------------------------------- -# Available Languages -# English is always built +# LANGUAGES SETTINGS #--------------------------------------------- -set(PROJECT_SUPPORTED_LANGUAGES "de" "es" "fr" "it" "ja" "zh_Hans") -set(PROJECT_ENGLISH "en") +list(APPEND PROJECT_LANGUAGES_TRANSLATED "EN" "ES" "SV" "ZH_HANS") +list(APPEND PROJECT_LANGUAGES "de" "en" "es" "ja" "ko" "sv" "zh_Hans") -#--------------------------------------------- -# Language options -#--------------------------------------------- -option(WITH_ALL_LANG - "Set ON|OFF (default=OFF) to build all the supported languages: - Main Language will always be built: - ${PROJECT_ENGLISH} - Optional languages: - ${PROJECT_SUPPORTED_LANGUAGES} - - When OFF and want to build specific optional language, use the language code in capital letters: - -D ES=ON - " - OFF - ) - -foreach(lang ${PROJECT_SUPPORTED_LANGUAGES}) - string(TOUPPER ${lang} val) - option(${val} - "Set ON|OFF (default=OFF) build ${lang} Documentation" OFF) +foreach(lang ${PROJECT_LANGUAGES}) + string(TOUPPER ${lang} val) + if ("${val}" IN_LIST PROJECT_LANGUAGES_TRANSLATED) + option(${val} "Set ON|OFF (default=ON) build ${lang} Documentation" ON) + else() + option(${val} "Set ON|OFF (default=OFF) build ${lang} Documentation" OFF) + endif() endforeach() #--------------------------------------------- # Catching the language options to be build #--------------------------------------------- -foreach(lang ${PROJECT_SUPPORTED_LANGUAGES}) - string(TOUPPER ${lang} opt) - if (${opt} OR WITH_ALL_LANG) - set (langFound "1") - list(APPEND PROJECT_BUILD_LANGUAGES ${lang}) - endif() +foreach(lang ${PROJECT_LANGUAGES}) + string(TOUPPER ${lang} opt) + if (${opt}) + list(APPEND PROJECT_BUILD_LANGUAGES ${lang}) + endif() endforeach() - -#--------------------------------------------- -# All languages po files are to be generated -#--------------------------------------------- - -set (SPHINXINTL_LANGUAGE ${PROJECT_ENGLISH}) -foreach(lang ${PROJECT_BUILD_LANGUAGES}) - set(SPHINXINTL_LANGUAGE "${SPHINXINTL_LANGUAGE},${lang}") -endforeach() - - -list(APPEND PROJECT_BUILD_LANGUAGES ${PROJECT_ENGLISH}) -message(STATUS "PROJECT_BUILD_LANGUAGES = ${PROJECT_BUILD_LANGUAGES}") -message(STATUS "SPHINXINTL_LANGUAGE = ${SPHINXINTL_LANGUAGE}") - - -if(NOT WITH_DOC) - return() -endif() - -option(DOC_USE_BOOTSTRAP - "Set ON|OFF (default=ON) to build Documentation library with bootstrap" OFF) - -#--------------------------------------------- -# Checking for prerequisites -#--------------------------------------------- -find_package(Sphinx ${SPHINX_MINIMUM_VERSION}) - -if (NOT SPHINX_FOUND) - message(WARNING "Sphinx not found. - building without documentation") - return() +if("${PROJECT_BUILD_LANGUAGES}" STREQUAL "") + message(WARNING "No documentation languages found + Building without documentation") + return() endif() -if (SPHINX_VERSION VERSION_LESS ${SPHINX_MINIMUM_VERSION}) - message(WARNING "Found Sphinx v${SPHINX_VERSION}! - This project requires Sphinx at least v${SPHINX_MINIMUM_VERSION} - building without documentation") - return() -endif() - -#pip install rst2pdf - - +message(STATUS "PROJECT_BUILD_LANGUAGES = ${PROJECT_BUILD_LANGUAGES}") #--------------------------------------------- # Kind of "looks" @@ -198,26 +130,22 @@ else() set(THEME_HISTORY "") endif() - - - # configured documentation tools and intermediate build results -# TODO for 3.0 Use _build -# set(PGR_DOCUMENTATION_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") -set(PGR_DOCUMENTATION_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}") +set(PGR_DOCUMENTATION_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") set(PGR_DOCUMENTATION_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}") message(STATUS "PGR_DOCUMENTATION_BUILD_DIR = ${PGR_DOCUMENTATION_BUILD_DIR}") +message(STATUS "PGR_DOCUMENTATION_SOURCE_DIR = ${PGR_DOCUMENTATION_SOURCE_DIR}") #--------------------------------------------- # Adding documentation directories #--------------------------------------------- foreach (subdir ${PROJECT_DOC_DIRECTORIES} "src") - add_subdirectory("${subdir}") - if (EXISTS "../docqueries/${subdir}") - add_subdirectory("../docqueries/${subdir}" "build/doc/${subdir}") - endif() + add_subdirectory("${subdir}") + if (EXISTS "${CMAKE_SOURCE_DIR}/docqueries/${subdir}") + add_subdirectory("${CMAKE_SOURCE_DIR}/docqueries/${subdir}" "docqueries/${subdir}") + endif() endforeach() add_subdirectory("images") @@ -226,113 +154,73 @@ add_subdirectory("images") configure_file("../tools/testers/sampledata.sql" "${PGR_DOCUMENTATION_SOURCE_DIR}/sampledata/sampledata.sql") -#TODO ??? -#add_subdirectory("static") -#add_subdirectory("themes") -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/_static" DESTINATION "${PGR_DOCUMENTATION_SOURCE_DIR}") -file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/_themes" DESTINATION "${PGR_DOCUMENTATION_SOURCE_DIR}") -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/_templates/layout.html" - "${PGR_DOCUMENTATION_SOURCE_DIR}/_templates/layout.html" @ONLY) - +add_subdirectory("_static") +add_subdirectory("_templates") -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" - "${PGR_DOCUMENTATION_SOURCE_DIR}/conf.py" - @ONLY) +configure_file("conf.py.in" "${PGR_DOCUMENTATION_SOURCE_DIR}/conf.py" @ONLY) -# Add documentation to targets +foreach (format ${PROJECT_DOC_TARGETS}) +message(STATUS "format=${format}") + if ("${format}" STREQUAL "locale") -#if (LATEX) -if (FALSE) - find_package(LATEX) - if (NOT LATEX_COMPILER) - message("Couldn't find Latex, can't build latex docs using Sphinx") - else() - message(STATUS "LATEX_COMPILER = ${LATEX_COMPILER}") - endif() -endif() + find_program(SPHINX_INTL_EXECUTABLE + NAMES sphinx-intl + DOC "Sphinx Documentation Builder (sphinx-doc.org)" + ) -set(ENV{SPHINXINTL_LANGUAGE} ${SPHINXINTL_LANGUAGE}) + if (SPHINX_INTL_EXECUTABLE) -if (LOCALE) - add_custom_target(locale + add_custom_target(locale COMMAND ${SPHINX_EXECUTABLE} -b gettext - -j auto -c "${PGR_DOCUMENTATION_SOURCE_DIR}" "${PGR_DOCUMENTATION_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/locale/pot" - COMMAND sphinx-intl update -p ${CMAKE_SOURCE_DIR}/locale/pot -d ${CMAKE_SOURCE_DIR}/locale -l en > locale_changes.txt - #COMMAND sphinx-intl update -p ${CMAKE_SOURCE_DIR}/locale/pot -d ${CMAKE_SOURCE_DIR}/locale --language=${SPHINXINTL_LANGUAGE} - #COMMAND sphinx-intl update-txconfig-resources --locale-dir ${CMAKE_SOURCE_DIR}/locale --pot-dir ${CMAKE_SOURCE_DIR}/locale/pot --transifex-project-name pgrouting + COMMAND ${SPHINX_INTL_EXECUTABLE} update + -d ${CMAKE_SOURCE_DIR}/locale + -l en > locale_changes.txt + COMMENT "Generating POT and PO files" + SOURCES ${PROJECT_DOC_FILES}) - COMMENT "Generating POT files ..." - SOURCES ${PROJECT_DOC_FILES} - ) -endif() + else() + message(WARNING "sphinx-intl not found. + Not building the pot and po locale files") -# The doc target will build all documentation targets. -add_custom_target(doc - COMMENT "Building documentation with Sphinx") + endif() + else() -foreach (target ${PROJECT_DOC_TARGETS}) - add_custom_target("${target}" - COMMENT "Building ${target} documentation with Sphinx") + add_custom_target("${format}" + COMMENT "Building ${format} documentation with Sphinx") configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/forward.html" - "${PGR_DOCUMENTATION_BUILD_DIR}/${target}/index.html") + "${CMAKE_CURRENT_SOURCE_DIR}/forward.html" + "${PGR_DOCUMENTATION_BUILD_DIR}/${format}/index.html") foreach (lang ${PROJECT_BUILD_LANGUAGES}) - add_custom_target( - "${target}-${lang}" - COMMAND ${SPHINX_EXECUTABLE} - #-q # Enable for quiet mode - #-Q # Enable for even more quiet mode - -v # increase verbosity - -n # warn about all missing references - --color - -W - --keep-going - -j auto - #-E # don't use a saved environment, always read all file - #-a # write all files; default is to only write new and changed files - -b ${target} - -D language='${lang}' - -c "${PGR_DOCUMENTATION_SOURCE_DIR}" - "${PGR_DOCUMENTATION_SOURCE_DIR}" - "${PGR_DOCUMENTATION_BUILD_DIR}/${target}/${lang}" - - COMMENT "Generating ${target}/${lang} documentation ..." - SOURCES ${PROJECT_DOC_FILES} ${PROJECT_IMG_FILES} - DEPENDS ${PROJECT_DOC_FILES} ${PROJECT_IMG_FILES} - ) - add_dependencies(${target} "${target}-${lang}") - - endforeach() - add_dependencies(doc "${target}") -endforeach() - - - -if(FALSE) - # AND ${target} MATCHES "latex" AND LATEX_COMPILER) - add_custom_target(pdf-${lang} - COMMENT "Building documentation with Sphinx") + add_custom_target( + "${format}-${lang}" + COMMAND ${SPHINX_EXECUTABLE} + -c ${CMAKE_CURRENT_BINARY_DIR} + -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees + -b ${format} + -D language='${lang}' + ${sphinx_flags} + "${PGR_DOCUMENTATION_SOURCE_DIR}" + "${PGR_DOCUMENTATION_BUILD_DIR}/${format}/${lang}" - add_custom_command( - TARGET pdf-${lang} POST_BUILD - #fixes: Underfull \hbox (badness 10000) in paragraph - #perl -pi -e 's/warning/warning /' pgRoutingDocumentation.tex - COMMAND pdflatex -interaction=nonstopmode "pgRoutingDocumentation.tex" > /dev/null 2>&1 - WORKING_DIRECTORY "${PGR_DOCUMENTATION_BUILD_DIR}/pdf/${lang}" - DEPENDS ${target}-${lang} - COMMENT "Converting Latex to PDF format") + COMMENT "Generating ${format}/${lang} documentation" + SOURCES ${PROJECT_DOC_FILES} ${PROJECT_IMG_FILES} + DEPENDS ${PROJECT_DOC_FILES} ${PROJECT_IMG_FILES} + ) + add_dependencies(${format} "${format}-${lang}") -endif() + endforeach() + add_dependencies(doc "${format}") + endif() +endforeach() diff --git a/doc/_static/CMakeLists.txt b/doc/_static/CMakeLists.txt new file mode 100644 index 00000000000..cf6f71a2294 --- /dev/null +++ b/doc/_static/CMakeLists.txt @@ -0,0 +1,16 @@ + +set(LOCAL_FILES + custom.css + page_history.js +) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} ${f} @ONLY) + list(APPEND LOCAL_DOC_FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}) +endforeach() + +configure_file(favicon.ico favicon.ico COPYONLY) +list(APPEND LOCAL_DOC_FILES ${CMAKE_CURRENT_BINARY_DIR}/favicon.ico) + +add_subdirectory(images) +set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/doc/_static/custom.css b/doc/_static/custom.css index 19da7b807b1..10b254f4ba0 100644 --- a/doc/_static/custom.css +++ b/doc/_static/custom.css @@ -36,6 +36,7 @@ div.note { div.warning { background-color: white; background-image: none; + border: 2px solid orange; } div.signatures { diff --git a/doc/_static/images/CMakeLists.txt b/doc/_static/images/CMakeLists.txt new file mode 100644 index 00000000000..10c96ba90d8 --- /dev/null +++ b/doc/_static/images/CMakeLists.txt @@ -0,0 +1,13 @@ +set(LOCAL_FILES + ccbysa.png + pgrouting.png + favicon.ico +) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} ${f} COPYONLY) + list(APPEND LOCAL_IMG_FILES "${CMAKE_CURRENT_BINARY_DIR}/${f}") +endforeach() + +add_subdirectory(developers) +set(PROJECT_IMG_FILES ${PROJECT_IMG_FILES} ${LOCAL_IMG_FILES} PARENT_SCOPE) diff --git a/doc/_static/images/developers/CMakeLists.txt b/doc/_static/images/developers/CMakeLists.txt new file mode 100644 index 00000000000..037a5ca92dc --- /dev/null +++ b/doc/_static/images/developers/CMakeLists.txt @@ -0,0 +1,13 @@ +set(LOCAL_FILES + "disconnectEdgeDirected.png" + "disconnectEdgeUndirected.png" + "disconnectVertexDirected.png" + "disconnectVertexUndirected.png" +) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} ${f} COPYONLY) + list(APPEND LOCAL_IMG_FILES "${CMAKE_CURRENT_BINARY_DIR}/${f}") +endforeach() + +set(PROJECT_IMG_FILES ${PROJECT_IMG_FILES} ${LOCAL_IMG_FILES} PARENT_SCOPE) diff --git a/doc/_static/images/developers/disconnectEdgeDirected.graphmlz b/doc/_static/images/developers/disconnectEdgeDirected.graphmlz deleted file mode 100644 index 9b555386d70..00000000000 Binary files a/doc/_static/images/developers/disconnectEdgeDirected.graphmlz and /dev/null differ diff --git a/doc/_static/images/developers/disconnectEdgeUndirected.graphmlz b/doc/_static/images/developers/disconnectEdgeUndirected.graphmlz deleted file mode 100644 index d091120c6b9..00000000000 Binary files a/doc/_static/images/developers/disconnectEdgeUndirected.graphmlz and /dev/null differ diff --git a/doc/_static/images/developers/disconnectVertexDirected.graphmlz b/doc/_static/images/developers/disconnectVertexDirected.graphmlz deleted file mode 100644 index 80ac5711c73..00000000000 Binary files a/doc/_static/images/developers/disconnectVertexDirected.graphmlz and /dev/null differ diff --git a/doc/_static/images/developers/disconnectVertexUndirected.graphmlz b/doc/_static/images/developers/disconnectVertexUndirected.graphmlz deleted file mode 100644 index 2570357cd21..00000000000 Binary files a/doc/_static/images/developers/disconnectVertexUndirected.graphmlz and /dev/null differ diff --git a/doc/_static/page_history.js b/doc/_static/page_history.js index 2daf6dc1ce7..6fca23a5c90 100644 --- a/doc/_static/page_history.js +++ b/doc/_static/page_history.js @@ -5,16 +5,19 @@ function createInfo(file, newat, altnames = '', removedat = '') { this.removedat = removedat; } -const versionsArr = ['3.8','3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0']; -var unsuportedArr = ['2.6', '2.5', '2.4', '2.3', '2.2', '2.1', '2.0']; +const versionsArr = ['4.0']; +var unsuportedArr = ['3.8','3.7', '3.6', '3.5', '3.4', '3.3', '3.2', '3.1', '3.0','2.6', '2.5', '2.4', '2.3', '2.2', '2.1', '2.0']; var titles = [ {k: 'en', v: ['Supported versions', 'Unsupported versions']}, {k: 'es', v: ['Versiones soportadas', 'Versiones no soportadas']}, + {k: 'sv', v: ['understödda versioner', 'Viversioner som inte stöds']}, {k: 'zh-Hans', v: ['Supported versions', 'Unsupported versions']}, ]; var newpages = [ + {v: '4.0', pages: ['pgr_bandwidth', 'pgr_kingOrdering', 'pgr_sloanOrdering']}, + {v: '3.8', pages: ['pgr_contractionDeadEnd', 'pgr_contractionLinear', 'pgr_separateCrossing', 'pgr_separateTouching']}, @@ -207,29 +210,10 @@ var filesArr = [ { v: '2.1', n: 'src/apsp_johnson/doc/index'}, { v: '2.3', n: 'src/allpairs/doc/pgr_johnson'} ]), - new createInfo('pgr_nodeNetwork', '2.0', [ - { v: '2.1', n: 'src/common/doc/functions/node_network'}, - { v: '2.3', n: 'src/topology/doc/pgr_nodeNetwork'} , 3.8, - ]), - new createInfo('topology-functions', '2.0', [ + new createInfo('utilities-family', '2.0', [ { v: '2.1', n: 'src/common/doc/functions/index'}, { v: '2.3', n: 'src/topology/doc/topology'}, - ]), - new createInfo('pgr_createVerticesTable', '2.0', [ - { v: '2.1', n: 'src/common/doc/functions/create_vert_table'}, - { v: '2.3', n: 'src/topology/doc/pgr_createVerticesTable'}, 3.8 - ]), - new createInfo('pgr_createTopology', '2.0', [ - { v: '2.1', n: 'src/common/doc/functions/create_topology'}, - { v: '2.3', n: 'src/topology/doc/pgr_createTopology'}, 3.8 - ]), - new createInfo('pgr_analyzeOneWay', '2.0', [ - { v: '2.1', n: 'src/common/doc/functions/analyze_oneway'}, - { v: '2.3', n: 'src/topology/doc/pgr_analyzeOneWay'}, 3.8 - ]), - new createInfo('pgr_analyzeGraph', '2.0', [ - { v: '2.1', n: 'src/common/doc/functions/analyze_graph'}, - { v: '2.3', n: 'src/topology/doc/pgr_analyzeGraph'}, + { v: '3.8', n: 'topology-functions'}, ]), new createInfo('pgRouting-concepts', '2.0', [ { v: '2.3', n: 'doc/src/tutorial/tutorial'}, @@ -260,6 +244,27 @@ var filesArr = [ { v: '2.1', n: 'src/driving_distance/doc/dd_driving_distance_v3'}, { v: '2.3', n: 'src/driving_distance/doc/pgr_drivingDistance'} ]), + + new createInfo('pgr_nodeNetwork', '2.0', [ + { v: '2.1', n: 'src/common/doc/functions/node_network'}, + { v: '2.3', n: 'src/topology/doc/pgr_nodeNetwork'}, 3.8 + ]), + new createInfo('pgr_createVerticesTable', '2.0', [ + { v: '2.1', n: 'src/common/doc/functions/create_vert_table'}, + { v: '2.3', n: 'src/topology/doc/pgr_createVerticesTable'}, 3.8 + ]), + new createInfo('pgr_createTopology', '2.0', [ + { v: '2.1', n: 'src/common/doc/functions/create_topology'}, + { v: '2.3', n: 'src/topology/doc/pgr_createTopology'}, 3.8 + ]), + new createInfo('pgr_analyzeOneWay', '2.0', [ + { v: '2.1', n: 'src/common/doc/functions/analyze_oneway'}, + { v: '2.3', n: 'src/topology/doc/pgr_analyzeOneWay'}, 3.8 + ]), + new createInfo('pgr_analyzeGraph', '2.0', [ + { v: '2.1', n: 'src/common/doc/functions/analyze_graph'}, + { v: '2.3', n: 'src/topology/doc/pgr_analyzeGraph'}, 3.8 + ]), new createInfo('pgr_alphaShape', '2.0', [ { v: '2.1', n: 'src/driving_distance/doc/dd_alphashape'}, { v: '2.3', n: 'src/alpha_shape/doc/pgr_alphaShape'}, 3.8 @@ -319,9 +324,6 @@ function get_history(name, lang) { if (versionsArr[i] < data.newat) break; if (data.removedat != '' && versionsArr[i] > data.newat) break; - /* for zh-Hans non translated versions use english */ - validlang = (lang == 'zh-Hans' && versionsArr[i] >= '3.7')? 'zh_Hans' : 'en'; - let link = `${home}${versionsArr[i]}/` link += get_vdata(data.altnames, versionsArr[i], data.file, validlang); if (versionsArr[i] == latest) result += '(' + link + ') '; @@ -338,6 +340,10 @@ function get_history(name, lang) { /* for spanish non translated versions use english */ validlang = (lang == 'es' && unsuportedArr[i] == '2.0')? 'es' : validlang; + /* for zh-Hans non translated versions use english */ + validlang = (lang == 'zh-Hans' && versionsArr[i] >= '3.7')? 'zh_Hans' : 'en'; + /* for swedish non translated versions use english */ + validlang = (lang == 'sv' && versionsArr[i] >= '4.0')? 'sv' : 'en'; if (data.newat > unsuportedArr[i]) break; var link = home + unsuportedArr[i] + '/'; @@ -347,4 +353,3 @@ function get_history(name, lang) { } return result; } - diff --git a/doc/_templates/CMakeLists.txt b/doc/_templates/CMakeLists.txt new file mode 100644 index 00000000000..38e5ec2c2b0 --- /dev/null +++ b/doc/_templates/CMakeLists.txt @@ -0,0 +1,11 @@ + +set(LOCAL_FILES + layout.html +) + +foreach (f ${LOCAL_FILES}) + configure_file(${f} ${f} @ONLY) + list(APPEND LOCAL_DOC_FILES ${CMAKE_CURRENT_BINARY_DIR}/${f}) +endforeach() + +set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/doc/allpairs/CMakeLists.txt b/doc/allpairs/CMakeLists.txt index 4d36733a41b..402eb9e006e 100644 --- a/doc/allpairs/CMakeLists.txt +++ b/doc/allpairs/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES allpairs-family.rst pgr_floydWarshall.rst pgr_johnson.rst diff --git a/doc/allpairs/pgr_floydWarshall.rst b/doc/allpairs/pgr_floydWarshall.rst index c9709d91c2d..8e73e322251 100644 --- a/doc/allpairs/pgr_floydWarshall.rst +++ b/doc/allpairs/pgr_floydWarshall.rst @@ -100,7 +100,7 @@ See Also * :doc:`pgr_johnson` * :doc:`sampledata` -* Boost `floyd-Warshall +* Boost `Floyd-Warshall `_ .. rubric:: Indices and tables diff --git a/doc/allpairs/pgr_johnson.rst b/doc/allpairs/pgr_johnson.rst index a182800b778..e171236004c 100644 --- a/doc/allpairs/pgr_johnson.rst +++ b/doc/allpairs/pgr_johnson.rst @@ -17,7 +17,7 @@ =============================================================================== ``pgr_johnson`` - Returns the sum of the costs of the shortest path for each -pair of nodes in the graph using Floyd-Warshall algorithm. +pair of nodes in the graph using Johnson algorithm. .. rubric:: Availability diff --git a/doc/alpha_shape/CMakeLists.txt b/doc/alpha_shape/CMakeLists.txt deleted file mode 100644 index 313dff3d04b..00000000000 --- a/doc/alpha_shape/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -SET(LOCAL_FILES - pgr_alphaShape.rst - ) - -foreach (f ${LOCAL_FILES}) - configure_file(${f} "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}") - list(APPEND LOCAL_DOC_FILES ${PGR_DOCUMENTATION_SOURCE_DIR}/${f}) -endforeach() - -set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) - diff --git a/doc/alpha_shape/pgr_alphaShape.rst b/doc/alpha_shape/pgr_alphaShape.rst deleted file mode 100644 index 4601ef9ec03..00000000000 --- a/doc/alpha_shape/pgr_alphaShape.rst +++ /dev/null @@ -1,121 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - - -.. index:: - single: alphaShape - -| - -``pgr_alphaShape`` -=============================================================================== - -``pgr_alphaShape`` — Polygon part of an alpha shape. - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - -* Version 3.0.0 - - * Breaking change on signature - * Old signature no longer supported - * **Boost 1.54** & **Boost 1.55** are supported - * **Boost 1.56+** is preferable - - * Boost Geometry is stable on Boost 1.56 - -* Version 2.1.0 - - * Added alpha argument with default 0 (use optimal value) - * Support to return multiple outer/inner ring - -* Version 2.0.0 - - * New official function. - * Renamed from version 1.x - - -.. include:: migration.rst - :start-after: migrate_pgr_alphaShape_start - :end-before: migrate_pgr_alphaShape_end - -Description -------------------------------------------------------------------------------- - -Returns the polygon part of an alpha shape. - -Characteristics - -* Input is a *geometry* and returns a *geometry* -* Uses PostGis ST_DelaunyTriangles -* Instead of using CGAL's definition of `alpha` it use the ``spoon_radius`` - - * :math:`spoon\_radius = \sqrt alpha` - -* A Triangle area is considered part of the alpha shape when - :math:`circumcenter\ radius < spoon\_radius` -* The ``alpha`` parameter is the **spoon radius** -* When the total number of points is less than 3, returns an EMPTY geometry - - -|Boost| Boost Graph Inside - -Signatures -------------------------------------------------------------------------------- - - -.. admonition:: \ \ - :class: signatures - - | pgr_alphaShape(**geometry**, [alpha]) - - | RETURNS ``geometry`` - - -:Example: passing a geometry collection with spoon radius :math:`1.5` using the - return variable ``geom`` - -.. literalinclude:: alphashape.queries - :start-after: -- q1 - :end-before: -- q2 - - -Parameters -------------------------------------------------------------------------------- - -============= ============= ======== ======================================== -Parameter Type Default Description -============= ============= ======== ======================================== -**geometry** ``geometry`` Geometry with at least :math:`3` points -``alpha`` ``FLOAT`` 0 The radius of the spoon. -============= ============= ======== ======================================== - -Return Value -------------------------------------------------------------------------------- - -==================== ======================== -Kind of geometry Description -==================== ======================== -GEOMETRY COLLECTION A Geometry collection of Polygons -==================== ======================== - -See Also -------------------------------------------------------------------------------- - -* :doc:`pgr_drivingDistance` -* :doc:`sampledata` -* `ST_ConcaveHull `__ - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/astar/CMakeLists.txt b/doc/astar/CMakeLists.txt index f86a6077d90..3d6a2d575da 100644 --- a/doc/astar/CMakeLists.txt +++ b/doc/astar/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES aStar-family.rst pgr_aStarCost.rst pgr_aStarCostMatrix.rst diff --git a/doc/astar/pgr_aStar.rst b/doc/astar/pgr_aStar.rst index 4f5baf3a28d..10921d699d9 100644 --- a/doc/astar/pgr_aStar.rst +++ b/doc/astar/pgr_aStar.rst @@ -20,41 +20,45 @@ .. rubric:: Availability -* Version 3.6.0 +.. rubric:: Version 4.0.0 - * Standardizing output columns to |short-generic-result| +* Combinations signature promoted to official. - * pgr_aStar(One to One) added ``start_vid`` and ``end_vid`` columns. - * pgr_aStar(One to Many) added ``end_vid`` column. - * pgr_aStar(Many to One) added ``start_vid`` column. +.. rubric:: Version 3.6.0 -* Version 3.2.0 +* Standardizing output columns to |short-generic-result| - * New proposed signature: + * pgr_aStar(One to One) added ``start_vid`` and ``end_vid`` columns. + * pgr_aStar(One to Many) added ``end_vid`` column. + * pgr_aStar(Many to One) added ``start_vid`` column. - * pgr_aStar(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_aStar(Combinations) + +.. rubric:: Version 3.0.0 + +* Function promoted to official. -* Version 2.4.0 +.. rubric:: Version 2.4.0 - * New proposed signatures: +* New proposed signatures: - * pgr_aStar(One to Many) - * pgr_aStar(Many to One) - * pgr_aStar(Many to Many) + * pgr_aStar(One to Many) + * pgr_aStar(Many to One) + * pgr_aStar(Many to Many) -* Version 2.3.0 +.. rubric:: Version 2.3.0 - * Signature change on pgr_aStar(One to One) +* Signature change on pgr_aStar(One to One) - * Old signature no longer supported + * Old signature no longer supported -* Version 2.0.0 +.. rubric:: Version 2.0.0 - * New official function. +* New official function. Description ------------------------------------------------------------------------------- @@ -184,7 +188,7 @@ Many to Many :end-before: -- q51 .. index:: - single: aStar ; Combinations - Proposed on v3.2 + single: aStar ; Combinations Combinations ............................................................................... @@ -255,8 +259,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/astar/pgr_aStarCost.rst b/doc/astar/pgr_aStarCost.rst index efc69ccb6e7..f1676ad577a 100644 --- a/doc/astar/pgr_aStarCost.rst +++ b/doc/astar/pgr_aStarCost.rst @@ -21,24 +21,28 @@ .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_aStarCost(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_aStarCost(Combinations) -* Version 2.4.0 +.. rubric:: Version 3.0.0 - * New proposed function. +* Function promoted to official. + +.. rubric:: Version 2.4.0 + +* New proposed function. Description ------------------------------------------------------------------------------- -The ``pgr_aStarCost`` function summarizes of the cost of the shortest path +The ``pgr_aStarCost`` function summarizes the cost of the shortest path using the A* algorithm. **The main characteristics are:** @@ -171,7 +175,7 @@ Many to Many :end-before: -- q51 .. index:: - single: aStarCost ; Combinations - Proposed on v3.2 + single: aStarCost ; Combinations Combinations ............................................................................... diff --git a/doc/bdAstar/CMakeLists.txt b/doc/bdAstar/CMakeLists.txt index 3687a8b4b8f..b37921efc6e 100644 --- a/doc/bdAstar/CMakeLists.txt +++ b/doc/bdAstar/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES bdAstar-family.rst pgr_bdAstar.rst pgr_bdAstarCost.rst diff --git a/doc/bdAstar/bdAstar-family.rst b/doc/bdAstar/bdAstar-family.rst index 71086c8d0f8..b0a6e78abe0 100644 --- a/doc/bdAstar/bdAstar-family.rst +++ b/doc/bdAstar/bdAstar-family.rst @@ -50,10 +50,10 @@ The main Characteristics are: :start-after: astar general info start :end-before: astar general info end -* For large graphs where there is a path bewtween the starting vertex and ending +* For large graphs where there is a path between the starting vertex and ending vertex: - * It is expected to terminate faster than pgr_aStar + * It is expected to terminate faster than doc:`pgr_aStar` See :ref:`heuristics ` available and :ref:`factor ` handling. diff --git a/doc/bdAstar/pgr_bdAstar.rst b/doc/bdAstar/pgr_bdAstar.rst index 8d514c12acc..3d709efab3c 100644 --- a/doc/bdAstar/pgr_bdAstar.rst +++ b/doc/bdAstar/pgr_bdAstar.rst @@ -20,39 +20,43 @@ .. rubric:: Availability -* Version 3.6.0 +.. rubric:: Version 4.0.0 - * Standardizing output columns to |short-generic-result| +* Combinations signature promoted to official. - * pgr_bdAstar(One to One) added ``start_vid`` and ``end_vid`` columns. - * pgr_bdAstar(One to Many) added ``end_vid`` column. - * pgr_bdAstar(Many to One) added ``start_vid`` column. +.. rubric:: Version 3.6.0 -* Version 3.2.0 +* Standardizing output columns to |short-generic-result| - * New proposed signature: + * pgr_bdAstar(One to One) added ``start_vid`` and ``end_vid`` columns. + * pgr_bdAstar(One to Many) added ``end_vid`` column. + * pgr_bdAstar(Many to One) added ``start_vid`` column. - * pgr_bdAstar(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_bdAstar(Combinations) + +.. rubric:: Version 3.0.0 + +* Function promoted to official. -* Version 2.5.0 +.. rubric:: Version 2.5.0 - * New proposed signatures: +* New proposed signatures: - * pgr_bdAstar(One to Many) - * pgr_bdAstar(Many to One) - * pgr_bdAstar(Many to Many) + * pgr_bdAstar(One to Many) + * pgr_bdAstar(Many to One) + * pgr_bdAstar(Many to Many) - * Signature change on pgr_bdAstar(One to One) +* Signature change on pgr_bdAstar(One to One) - * Old signature no longer supported + * Old signature no longer supported -* Version 2.0.0 +.. rubric:: Version 2.0.0 - * New official function. +* New official function. Description ------------------------------------------------------------------------------- @@ -63,8 +67,8 @@ Description :start-after: astar general info start :end-before: astar general info end -* The results are equivalent to the union of the results of the - pgr_bdAStar(One to One) on the: +* The results are equivalent to the union of the results of pgr_bdAStar(One to + One) on the: * pgr_bdAstar(One to Many) * pgr_bdAstar(Many to One) @@ -182,7 +186,7 @@ Many to Many :end-before: -- q51 .. index:: - single: bdAstar ; Combinations - Proposed on v3.2 + single: bdAstar ; Combinations Combinations ............................................................................... @@ -253,8 +257,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/bdAstar/pgr_bdAstarCost.rst b/doc/bdAstar/pgr_bdAstarCost.rst index 38d58eb901e..98417c6406c 100644 --- a/doc/bdAstar/pgr_bdAstarCost.rst +++ b/doc/bdAstar/pgr_bdAstarCost.rst @@ -21,24 +21,28 @@ A* algorithm. .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_bdAstarCost(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_bdAstarCost(Combinations) -* Version 2.4.0 +.. rubric:: Version 3.0.0 - * New proposed function. +* Function promoted to official. + +.. rubric:: Version 2.4.0 + +* New proposed function. Description ------------------------------------------------------------------------------- -The ``pgr_bdAstarCost`` function summarizes of the cost of the shortest path +The ``pgr_bdAstarCost`` function summarizes the cost of the shortest path using the bidirectional A* algorithm. **The main characteristics are:** @@ -171,7 +175,7 @@ Many to Many :end-before: -- q51 .. index:: - single: bdAstarCost ; Combinations - Proposed on v3.2 + single: bdAstarCost ; Combinations Combinations ............................................................................... diff --git a/doc/bdAstar/pgr_bdAstarCostMatrix.rst b/doc/bdAstar/pgr_bdAstarCostMatrix.rst index 8006756656e..eac76c13fce 100644 --- a/doc/bdAstar/pgr_bdAstarCostMatrix.rst +++ b/doc/bdAstar/pgr_bdAstarCostMatrix.rst @@ -17,7 +17,7 @@ ``pgr_bdAstarCostMatrix`` =============================================================================== -``pgr_bdAstarCostMatrix`` - Calculates the a cost matrix using :doc:`pgr_aStar`. +``pgr_bdAstarCostMatrix`` - Calculates the cost matrix using :doc:`pgr_bdAstar`. .. rubric:: Availability @@ -34,7 +34,7 @@ Description **The main characteristics are:** -* Using internally the :doc:`pgr_bdAstar` algorithm +* Internally uses the :doc:`pgr_bdAstar` algorithm. * Returns a cost matrix. * No ordering is performed * let `v` and `u` are nodes on the graph: diff --git a/doc/bdDijkstra/CMakeLists.txt b/doc/bdDijkstra/CMakeLists.txt index 77229aec42f..0e9dc82bc84 100644 --- a/doc/bdDijkstra/CMakeLists.txt +++ b/doc/bdDijkstra/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES bdDijkstra-family.rst pgr_bdDijkstraCost.rst pgr_bdDijkstraCostMatrix.rst diff --git a/doc/bdDijkstra/bdDijkstra-family.rst b/doc/bdDijkstra/bdDijkstra-family.rst index e2c3dbf8f49..768af33ab5f 100644 --- a/doc/bdDijkstra/bdDijkstra-family.rst +++ b/doc/bdDijkstra/bdDijkstra-family.rst @@ -84,6 +84,8 @@ The main Characteristics are: See Also ------------------------------------------------------------------------------- +* `Boost `__ + .. rubric:: Indices and tables * :ref:`genindex` diff --git a/doc/bdDijkstra/pgr_bdDijkstra.rst b/doc/bdDijkstra/pgr_bdDijkstra.rst index 67379e72bdb..d182d006f8d 100644 --- a/doc/bdDijkstra/pgr_bdDijkstra.rst +++ b/doc/bdDijkstra/pgr_bdDijkstra.rst @@ -21,33 +21,38 @@ algorithm. .. rubric:: Availability: -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Output columns standardized to |short-generic-result| +* Combinations signature promoted to official. - * pgr_bdDijkstra(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_bdDijkstra(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * New proposed signatures: +* Function promoted to official. - * pgr_bdDijkstra(One to Many) - * pgr_bdDijkstra(Many to One) - * pgr_bdDijkstra(Many to Many) +.. rubric:: Version 2.5.0 -* Version 2.4.0 +* New proposed signatures: - * Signature change on pgr_bdDijsktra(One to One) + * pgr_bdDijkstra(One to Many) + * pgr_bdDijkstra(Many to One) + * pgr_bdDijkstra(Many to Many) - * Old signature no longer supported +.. rubric:: Version 2.4.0 -* Version 2.0.0 +* Signature change on pgr_bdDijkstra(One to One) - * New official function. + * Old signature no longer supported + +.. rubric:: Version 2.0.0 + +* New official function. Description @@ -75,7 +80,7 @@ Signatures | pgr_bdDijkstra(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) | pgr_bdDijkstra(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |old-generic-result| + | Returns set of |short-generic-result| | OR EMPTY SET .. index:: @@ -89,7 +94,7 @@ One to One | pgr_bdDijkstra(`Edges SQL`_, **start vid**, **end vid**, [``directed``]) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertex :math:`10` on a **directed** graph @@ -109,7 +114,7 @@ One to Many | pgr_bdDijkstra(`Edges SQL`_, **start vid**, **end vids**, [``directed``]) - | Returns set of |result-1-m| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertices :math:`\{10, 17\}` on a **directed** @@ -130,7 +135,7 @@ Many to One | pgr_bdDijkstra(`Edges SQL`_, **start vids**, **end vid**, [``directed``]) - | Returns set of |result-m-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a **directed** @@ -162,7 +167,7 @@ Many to Many :end-before: -- q51 .. index:: - single: bdDijkstra ; Combinations - Proposed on v3.2 + single: bdDijkstra ; Combinations Combinations ............................................................................... @@ -224,8 +229,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/bdDijkstra/pgr_bdDijkstraCost.rst b/doc/bdDijkstra/pgr_bdDijkstraCost.rst index 2f3384314ae..d63fa3f82fe 100644 --- a/doc/bdDijkstra/pgr_bdDijkstraCost.rst +++ b/doc/bdDijkstra/pgr_bdDijkstraCost.rst @@ -21,25 +21,29 @@ Dijkstra algorithm. .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_bdDijkstraCost(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_bdDijkstraCost(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * New proposed function. +* Function promoted to official. + +.. rubric:: Version 2.5.0 + +* New proposed function. Description ------------------------------------------------------------------------------- -The ``pgr_bdDijkstraCost`` function summarizes of the cost of the shortest path +The ``pgr_bdDijkstraCost`` function summarizes the cost of the shortest path using the bidirectional Dijkstra Algorithm. .. include:: bdDijkstra-family.rst @@ -153,7 +157,7 @@ Many to Many :end-before: -- q51 .. index:: - single: bdDijkstraCost ; Combinations - Proposed on v3.2 + single: bdDijkstraCost ; Combinations Combinations ............................................................................... diff --git a/doc/bellman_ford/CMakeLists.txt b/doc/bellman_ford/CMakeLists.txt index dc536bd81ea..98483a4f962 100644 --- a/doc/bellman_ford/CMakeLists.txt +++ b/doc/bellman_ford/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_bellmanFord.rst pgr_edwardMoore.rst ) diff --git a/doc/bellman_ford/pgr_bellmanFord.rst b/doc/bellman_ford/pgr_bellmanFord.rst index 9c185a95a42..2f824be66ec 100644 --- a/doc/bellman_ford/pgr_bellmanFord.rst +++ b/doc/bellman_ford/pgr_bellmanFord.rst @@ -22,17 +22,21 @@ :start-after: warning-begin :end-before: end-warning -.. rubric:: Availability +.. rubric:: Availability: -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New experimental signature: +* Output columns standardized to |short-generic-result| - * pgr_bellmanFord(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New experimental signature: - * New experimental function. + * pgr_bellmanFord(Combinations) + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -87,7 +91,7 @@ Signatures | pgr_bellmanFord(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) | pgr_bellmanFord(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |old-generic-result| + | Returns set of |short-generic-result| | OR EMPTY SET .. index:: @@ -101,7 +105,7 @@ One to One | pgr_bellmanFord(`Edges SQL`_, **start vid**, **end vid**, [``directed``]) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertex :math:`10` on a **directed** graph @@ -121,11 +125,11 @@ One to Many | pgr_bellmanFord(`Edges SQL`_, **start vid**, **end vids**, [``directed``]) - | Returns set of |result-1-m| + | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From vertex :math:`6` to vertices :math:`\{ 10, 17\}` on a - **directed** graph +:Example: From vertex :math:`6` to vertices :math:`\{10, 17\}` on a directed + graph .. literalinclude:: bellmanFord.queries :start-after: -- q3 @@ -142,10 +146,10 @@ Many to One | pgr_bellmanFord(`Edges SQL`_, **start vids**, **end vid**, [``directed``]) - | Returns set of |result-m-1| + | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a **directed** +:Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a directed graph .. literalinclude:: bellmanFord.queries @@ -167,7 +171,7 @@ Many to Many | OR EMPTY SET :Example: From vertices :math:`\{6, 1\}` to vertices :math:`\{10, 17\}` on an - **undirected** graph + undirected graph .. literalinclude:: bellmanFord.queries :start-after: -- q5 @@ -187,7 +191,7 @@ Combinations | Returns set of |short-generic-result| | OR EMPTY SET -:Example: Using a combinations table on an **undirected** graph. +:Example: Using a combinations table on an undirected graph The combinations table: @@ -236,8 +240,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- @@ -267,9 +271,6 @@ See Also * `Boost: Bellman Ford `__ * https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm - Boost Graph Inside - - .. rubric:: Indices and tables * :ref:`genindex` diff --git a/doc/bellman_ford/pgr_edwardMoore.rst b/doc/bellman_ford/pgr_edwardMoore.rst index 2073f17bcc5..4e718bc34b0 100644 --- a/doc/bellman_ford/pgr_edwardMoore.rst +++ b/doc/bellman_ford/pgr_edwardMoore.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -25,15 +25,19 @@ .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New experimental signature: +* Output columns standardized to |short-generic-result| - * pgr_edwardMoore(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New experimental signature: - * New experimental function. + * pgr_edwardMoore(Combinations) + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -95,7 +99,7 @@ Signatures | pgr_edwardMoore(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) | pgr_edwardMoore(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |old-generic-result| + | Returns set of |short-generic-result| | OR EMPTY SET .. index:: @@ -109,7 +113,7 @@ One to One | pgr_edwardMoore(`Edges SQL`_, **start vid**, **end vid**, [``directed``]) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertex :math:`10` on a **directed** graph @@ -129,11 +133,11 @@ One to Many | pgr_edwardMoore(`Edges SQL`_, **start vid**, **end vids**, [``directed``]) - | Returns set of |result-1-m| + | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From vertex :math:`6` to vertices :math:`\{ 10, 17\}` on a - **directed** graph +:Example: From vertex :math:`6` to vertices :math:`\{10, 17\}` on a **directed** + graph .. literalinclude:: edwardMoore.queries :start-after: -- q3 @@ -150,7 +154,7 @@ Many to One | pgr_edwardMoore(`Edges SQL`_, **start vids**, **end vid**, [``directed``]) - | Returns set of |result-m-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a **directed** @@ -244,8 +248,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/categories/CMakeLists.txt b/doc/categories/CMakeLists.txt index ccb9af99eea..5001561f921 100644 --- a/doc/categories/CMakeLists.txt +++ b/doc/categories/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES BFS-category.rst cost-category.rst costMatrix-category.rst diff --git a/doc/categories/KSP-category.rst b/doc/categories/KSP-category.rst index 8416fcb0b83..5b96d59240f 100644 --- a/doc/categories/KSP-category.rst +++ b/doc/categories/KSP-category.rst @@ -17,19 +17,9 @@ K shortest paths - Category .. official-start * :doc:`pgr_KSP` - Yen's algorithm based on pgr_dijkstra - -.. official-end - -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed-start - * :doc:`pgr_withPointsKSP` - Yen's algorithm based on pgr_withPoints -.. proposed-end - +.. official-end .. rubric:: Indices and tables diff --git a/doc/categories/VRP-category.rst b/doc/categories/VRP-category.rst index a4bef028417..a79164284c1 100644 --- a/doc/categories/VRP-category.rst +++ b/doc/categories/VRP-category.rst @@ -65,7 +65,7 @@ Characteristics locations. -.. Rubric:: Limitations +.. rubric:: Limitations - No multiple time windows for a location. - Less vehicle used is considered better. diff --git a/doc/categories/cost-category.rst b/doc/categories/cost-category.rst index 305cda32776..3f775a3a688 100644 --- a/doc/categories/cost-category.rst +++ b/doc/categories/cost-category.rst @@ -22,7 +22,7 @@ Cost - Category * :doc:`pgr_bdAstarCost` * :doc:`pgr_dijkstraCost` * :doc:`pgr_bdDijkstraCost` -* :doc:`pgr_dijkstraNearCost` +* :doc:`pgr_withPointsCost` .. official-end @@ -32,7 +32,7 @@ Cost - Category .. proposed-start -* :doc:`pgr_withPointsCost` +* :doc:`pgr_dijkstraNearCost` .. proposed-end diff --git a/doc/categories/costMatrix-category.rst b/doc/categories/costMatrix-category.rst index 1ea0a043803..6a934ccb351 100644 --- a/doc/categories/costMatrix-category.rst +++ b/doc/categories/costMatrix-category.rst @@ -20,19 +20,9 @@ Cost Matrix - Category * :doc:`pgr_dijkstraCostMatrix` * :doc:`pgr_bdAstarCostMatrix` * :doc:`pgr_bdDijkstraCostMatrix` - -.. official-end - - -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed-start - * :doc:`pgr_withPointsCostMatrix` -.. proposed-end +.. official-end General Information ------------------------------------------------------------------------------- diff --git a/doc/categories/drivingDistance-category.rst b/doc/categories/drivingDistance-category.rst index 3439eb3c352..e8b8b88b6f3 100644 --- a/doc/categories/drivingDistance-category.rst +++ b/doc/categories/drivingDistance-category.rst @@ -19,27 +19,9 @@ Driving Distance - Category * :doc:`pgr_drivingDistance` - Driving Distance based on Dijkstra's algorithm * :doc:`pgr_primDD` - Driving Distance based on Prim's algorithm * :doc:`pgr_kruskalDD` - Driving Distance based on Kruskal's algorithm -* Post processing - - * :doc:`pgr_alphaShape` - Alpha shape computation - -.. official-end - -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed-start - * :doc:`pgr_withPointsDD` - Driving Distance based on pgr_withPoints -.. proposed-end - -.. toctree:: - :hidden: - - pgr_alphaShape.rst - +.. official-end Calculate nodes that are within a distance. @@ -105,53 +87,9 @@ Edges SQL Result columns ............................................................................... -.. spantree-result-columns-start - -Returns set of |result-spantree| - -.. list-table:: - :width: 81 - :widths: auto - :header-rows: 1 - - * - Parameter - - Type - - Description - * - ``seq`` - - ``BIGINT`` - - Sequential value starting from :math:`1`. - * - ``depth`` - - ``BIGINT`` - - Depth of the ``node``. - - - :math:`0` when ``node`` = ``start_vid``. - - :math:`depth-1` is the depth of ``pred`` - - * - ``start_vid`` - - ``BIGINT`` - - Identifier of the root vertex. - * - ``pred`` - - ``BIGINT`` - - Predecessor of ``node``. - - - When ``node`` = ``start_vid`` then has the value ``node``. - * - ``node`` - - ``BIGINT`` - - Identifier of ``node`` reached using ``edge``. - * - ``edge`` - - ``BIGINT`` - - Identifier of the ``edge`` used to arrive from ``pred`` to ``node``. - - - :math:`-1` when ``node`` = ``start_vid``. - - * - ``cost`` - - ``FLOAT`` - - Cost to traverse ``edge``. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from ``start_vid`` to ``node``. - -.. spantree-result-columns-end +.. include:: pgRouting-concepts.rst + :start-after: spantree-result-columns-start + :end-before: spantree-result-columns-end See Also ------------------------------------------------------------------------------- diff --git a/doc/categories/via-category.rst b/doc/categories/via-category.rst index 6fec87e3d83..65da171f39e 100644 --- a/doc/categories/via-category.rst +++ b/doc/categories/via-category.rst @@ -14,18 +14,14 @@ Via - Category =============================================================================== -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed start +.. official-start * :doc:`pgr_dijkstraVia` * :doc:`pgr_withPointsVia` * :doc:`pgr_trspVia` * :doc:`pgr_trspVia_withPoints` -.. proposed end +.. official-end General Information ------------------------------------------------------------------------------- @@ -47,72 +43,34 @@ Parameters **Used in:** * :doc:`pgr_dijkstraVia` -* :doc:`pgr_trspVia` -.. via_parameters_start +.. include:: pgr_dijkstraVia.rst + :start-after: via_parameters_start + :end-before: via_parameters_end -.. list-table:: - :width: 81 - :widths: 14 20 7 40 - :header-rows: 1 +**Used in:** - * - Parameter - - Type - - Default - - Description - * - `Edges SQL`_ - - ``TEXT`` - - - - SQL query as described. - * - **via vertices** - - ``ARRAY`` [ **ANY-INTEGER** ] - - - - Array of ordered vertices identifiers that are going to be visited. +* :doc:`pgr_withPointsVia` + +.. include:: pgr_withPointsVia.rst + :start-after: via_withPoints_parameters_start + :end-before: via_withPoints_parameters_end -Where: +**Used in:** -:ANY-INTEGER: SMALLINT, INTEGER, BIGINT +* :doc:`pgr_trspVia` -.. via_parameters_end +.. include:: TRSP-family.rst + :start-after: via_parameters_start + :end-before: via_parameters_end **Used in:** -* :doc:`pgr_withPointsVia` * :doc:`pgr_trspVia_withPoints` -.. via_withPoints_parameters_start - -.. list-table:: - :width: 81 - :widths: 14 20 7 40 - :header-rows: 1 - - * - Parameter - - Type - - Default - - Description - * - `Edges SQL`_ - - ``TEXT`` - - - - SQL query as described. - * - `Points SQL`_ - - ``TEXT`` - - - - SQL query as described. - * - **via vertices** - - ``ARRAY`` [ **ANY-INTEGER** ] - - - - Array of ordered vertices identifiers that are going to be visited. - - * When positive it is considered a vertex identifier - * When negative it is considered a point identifier - -Where: - -:ANY-INTEGER: SMALLINT, INTEGER, BIGINT -:ANY-NUMERICAL: SMALLINT, INTEGER, BIGINT, REAL, FLOAT - -.. via_withPoints_parameters_end +.. include:: /pgr_trspVia_withPoints.rst + :start-after: trspvia_withPoints_parameters_start + :end-before: trspvia_withPoints_parameters_end Besides the compulsory parameters each function has, there are optional parameters that exist due to the kind of function. diff --git a/doc/categories/withPoints-category.rst b/doc/categories/withPoints-category.rst index 2ed13d18b01..c2edbfc2aed 100644 --- a/doc/categories/withPoints-category.rst +++ b/doc/categories/withPoints-category.rst @@ -16,11 +16,7 @@ withPoints - Category When points are added to the graph. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed start +.. official-start - :doc:`withPoints-family` - Functions based on Dijkstra algorithm. - From the :doc:`TRSP-family`: @@ -28,7 +24,7 @@ When points are added to the graph. - :doc:`pgr_trsp_withPoints` - Vertex/Point routing with restrictions. - :doc:`pgr_trspVia_withPoints` - Via Vertex/point routing with restrictions. -.. proposed end +.. official-end Introduction ------------------------------------------------------------------------------- @@ -129,6 +125,32 @@ Parameters .. withPoints_parameters_end +.. driving_side_start + +.. list-table:: + :width: 81 + :widths: 14 14 44 + + * - [**driving side**] + - ``CHAR`` + - Value in [``r``, ``R``, ``l``, ``L``, ``b``, ``B``] indicating if the driving side is: + + - For directed graph: + + - [``r``, ``R``] for right driving side + - [``l``, ``L``] for left driving side + + - For undirected graph: + + - [``b``, ``B``] for both driving sides + + - Default values when parameter is missing: + + - [``r``, ``R``] for directed graph + - [``l``, ``L``] for undirected graph + +.. driving_side_end + Optional parameters ............................................................................... @@ -143,18 +165,12 @@ Optional parameters - Type - Default - Description - * - ``driving_side`` - - ``CHAR`` - - ``r`` - - Value in [``r``, ``l``] indicating if the driving side is: - - - ``r`` for right driving side - - ``l`` for left driving side - - Any other value will be considered as ``r`` * - ``details`` - ``BOOLEAN`` - ``false`` - - - When ``true`` the results will include the points that are in the path. + - For showing points stops. + + - When ``true`` the results will include the points that are in the path. - When ``false`` the results will not include the points that are in the path. @@ -201,7 +217,7 @@ Points SQL * - ``fraction`` - **ANY-NUMERICAL** - - - Value in <0,1> that indicates the relative postition from the first end + - Value in <0,1> that indicates the relative position from the first end point of the edge. * - ``side`` - ``CHAR`` diff --git a/doc/chinese/CMakeLists.txt b/doc/chinese/CMakeLists.txt index 8de08a644dd..22aa2f402c4 100644 --- a/doc/chinese/CMakeLists.txt +++ b/doc/chinese/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES chinesePostmanProblem-family.rst pgr_chinesePostmanCost.rst pgr_chinesePostman.rst diff --git a/doc/circuits/CMakeLists.txt b/doc/circuits/CMakeLists.txt index 7bfc18eca1a..892f58cabda 100644 --- a/doc/circuits/CMakeLists.txt +++ b/doc/circuits/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_hawickCircuits.rst ) diff --git a/doc/circuits/pgr_hawickCircuits.rst b/doc/circuits/pgr_hawickCircuits.rst index b44cf15428f..742f49202e1 100644 --- a/doc/circuits/pgr_hawickCircuits.rst +++ b/doc/circuits/pgr_hawickCircuits.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: diff --git a/doc/coloring/CMakeLists.txt b/doc/coloring/CMakeLists.txt index 41170eb98ef..d09a9651c52 100644 --- a/doc/coloring/CMakeLists.txt +++ b/doc/coloring/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES coloring-family.rst pgr_sequentialVertexColoring.rst pgr_bipartite.rst diff --git a/doc/coloring/coloring-family.rst b/doc/coloring/coloring-family.rst index 38014ae0d45..14e2bc1dc52 100644 --- a/doc/coloring/coloring-family.rst +++ b/doc/coloring/coloring-family.rst @@ -49,37 +49,37 @@ Coloring - Family of functions Result columns ------------------------------------------------------------------------------- -.. result columns start +.. result-edge-color-start -Returns set of ``(vertex_id, color_id)`` +Returns set of |result_edge_color| =============== =========== ====================================== Column Type Description =============== =========== ====================================== -``vertex_id`` ``BIGINT`` Identifier of the vertex. -``color_id`` ``BIGINT`` Identifier of the color of the vertex. +``edge`` ``BIGINT`` Identifier of the edge. +``color`` ``BIGINT`` Color of the edge. - The minimum value of color is 1. =============== =========== ====================================== -.. result columns end +.. result-edge-color-end -.. result columns start edgeColoring +.. result-node-color-start -Returns set of ``(edge_id, color_id)`` +Returns set of |result_node_color| -=============== =========== ===================================== +============ =========== ===================================== Column Type Description -=============== =========== ===================================== -``edge_id`` ``BIGINT`` Identifier of the edge. -``color_id`` ``BIGINT`` Identifier of the color of the edge. +============ =========== ===================================== +``node`` ``BIGINT`` Identifier of the node. +``color`` ``BIGINT`` Color of the node. - - The minimum value of color is 1. + - The minimum value of color is 1. -=============== =========== ===================================== +============ =========== ===================================== -.. result columns end edgeColoring +.. result-node-color-end See Also ------------------------------------------------------------------------------- diff --git a/doc/coloring/images/CMakeLists.txt b/doc/coloring/images/CMakeLists.txt index 9f5eb53301e..2392d9d1b1b 100644 --- a/doc/coloring/images/CMakeLists.txt +++ b/doc/coloring/images/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LOCAL_FILES +set(LOCAL_FILES bipartite.png ) diff --git a/doc/coloring/pgr_bipartite.rst b/doc/coloring/pgr_bipartite.rst index 971b9d0c4bc..9ed9b836958 100644 --- a/doc/coloring/pgr_bipartite.rst +++ b/doc/coloring/pgr_bipartite.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -25,9 +25,13 @@ the same set are adjacent. .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Output columns standardized to |result_node_color| + +.. rubric:: Version 3.2.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -56,7 +60,7 @@ Signatures | pgr_bipartite(`Edges SQL`_) - | Returns set of |result-node-color| + | Returns set of |result_node_color| | OR EMPTY SET :Example: When the graph is bipartite @@ -86,8 +90,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: coloring-family.rst - :start-after: result columns start - :end-before: result columns end + :start-after: result-node-color-start + :end-before: result-node-color-end Additional Example -------------------------------------------------------------------------------- diff --git a/doc/coloring/pgr_edgeColoring.rst b/doc/coloring/pgr_edgeColoring.rst index b4968f9f63b..320c6784524 100644 --- a/doc/coloring/pgr_edgeColoring.rst +++ b/doc/coloring/pgr_edgeColoring.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -25,9 +25,13 @@ graphs .. rubric:: Availability -* Version 3.3.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Output columns standardized to |result_edge_color| + +.. rubric:: Version 3.3.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -77,7 +81,7 @@ Signatures | pgr_edgeColoring(`Edges SQL`_) - | Returns set of |result-edge-color| + | Returns set of |result_edge_color| | OR EMPTY SET :Example: Graph coloring of pgRouting :doc:`sampledata` @@ -109,8 +113,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: coloring-family.rst - :start-after: result columns start edgeColoring - :end-before: result columns end edgeColoring + :start-after: result-edge-color-start + :end-before: result-edge-color-end See Also diff --git a/doc/coloring/pgr_sequentialVertexColoring.rst b/doc/coloring/pgr_sequentialVertexColoring.rst index 6d027eb00dc..caff1580be7 100644 --- a/doc/coloring/pgr_sequentialVertexColoring.rst +++ b/doc/coloring/pgr_sequentialVertexColoring.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -25,14 +25,17 @@ graph, using greedy approach. .. rubric:: Availability -* Version 3.3.0 +.. rubric:: Version 4.0.0 - * Function promoted to proposed. +* Output columns standardized to |result_node_color| -* Version 3.2.0 +.. rubric:: Version 3.3.0 - * New experimental function. +* Function promoted to proposed. +.. rubric:: Version 3.2.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -68,7 +71,7 @@ Signatures | pgr_sequentialVertexColoring(`Edges SQL`_) - | Returns set of |result-node-color| + | Returns set of |result_node_color| | OR EMPTY SET :Example: Graph coloring of pgRouting :doc:`sampledata` @@ -100,8 +103,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: coloring-family.rst - :start-after: result columns start - :end-before: result columns end + :start-after: result-node-color-start + :end-before: result-node-color-end See Also diff --git a/doc/components/CMakeLists.txt b/doc/components/CMakeLists.txt index 1c685b8c22c..23cd91ceb4f 100644 --- a/doc/components/CMakeLists.txt +++ b/doc/components/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES components-family.rst pgr_connectedComponents.rst pgr_strongComponents.rst diff --git a/doc/components/images/CMakeLists.txt b/doc/components/images/CMakeLists.txt index 0e859f9b9f3..1c79bf755dd 100644 --- a/doc/components/images/CMakeLists.txt +++ b/doc/components/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES cc_sampledata.png scc_sampledata.png bcc_sampledata.png diff --git a/doc/components/pgr_makeConnected.rst b/doc/components/pgr_makeConnected.rst index f58c7d762d8..2a95d2ef29f 100644 --- a/doc/components/pgr_makeConnected.rst +++ b/doc/components/pgr_makeConnected.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: diff --git a/doc/conf.py.in b/doc/conf.py.in index 4db503d38f8..fc1744da03f 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -54,7 +54,6 @@ extensions = [ 'sphinx.ext.mathjax', 'sphinx.ext.graphviz', 'sphinx.ext.autosectionlabel', - 'sphinx_collapse', ] autosectionlabel_prefix_document = True @@ -333,7 +332,11 @@ linkcheck_ignore = [ r'https://github.com/pgRouting/pgrouting/issues/*', # limit only pgrouting r'https://github.com/pgRouting/pgrouting/archive/*', r'https://docs.pgrouting.org/3.8/*', - r'https://www.overpass-api.de/*' + # Currently has a problem + 'https://www.boost.org/doc/libs/1_78_0/libs/graph/doc/hawick_circuits.html', + r'https://www.overpass-api.de/*', + # 403 Client error + 'https://gis.stackexchange.com/questions/tagged/pgrouting' ] linkcheck_timeout = 20 @@ -347,56 +350,38 @@ rst_epilog=""" .. |short-generic-result| replace:: ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` .. |via-result| replace:: ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost, route_agg_cost)`` .. |matrix-result| replace:: ``(start_vid, end_vid, agg_cost)`` -.. |matrix-pid| replace:: ``(start_pid, end_pid, agg_cost)`` .. |ksp-result| replace:: ``(seq, path_id, path_seq, node, edge, cost, agg_cost)`` .. |tsp-result| replace:: ``(seq, node, cost, agg_cost)`` .. |nksp-result| replace:: ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` -.. |old-generic-result| replace:: ``(seq, path_seq, [start_vid], [end_vid], node, edge, cost, agg_cost)`` -.. |old-pid-result| replace:: ``(seq, path_seq, [start_pid], [end_pid], node, edge, cost, agg_cost)`` -.. |pid-1-m| replace:: ``(seq, path_seq, end_pid, node, edge, cost, agg_cost)`` -.. |pid-m-1| replace:: ``(seq, path_seq, start_pid, node, edge, cost, agg_cost)`` -.. |pid-m-m| replace:: ``(seq, path_seq, start_pid, end_pid, node, edge, cost, agg_cost)`` -.. |result-1-1| replace:: ``(seq, path_seq, node, edge, cost, agg_cost)`` -.. |result-1-m| replace:: ``(seq, path_seq, end_vid, node, edge, cost, agg_cost)`` -.. |result-m-1| replace:: ``(seq, path_seq, start_vid, node, edge, cost, agg_cost)`` -.. |result-bfs| replace:: ``(seq, depth, start_vid, node, edge, cost, agg_cost)`` .. |result-spantree| replace:: ``(seq, depth, start_vid, pred, node, edge, cost, agg_cost)`` .. |result-mst| replace:: ``(edge, cost)`` .. |result-generic-no-seq| replace:: ``(seq, [start_vid], node, edge, cost, agg_cost)`` .. |result-1-1-no-seq| replace:: ``(seq, node, edge, cost, agg_cost)`` .. |result-m-1-no-seq| replace:: ``(seq, start_vid, node, edge, cost, agg_cost)`` -.. |result-node-color| replace:: ``(vertex_id, color_id)`` -.. |result-edge-color| replace:: ``(edge_id, color_id)`` +.. |result_node_color| replace:: ``(node, color)`` +.. |result_edge_color| replace:: ``(edge, color)`` .. |result-node| replace:: ``(node)`` .. |result-edge| replace:: ``(edge)`` .. |result-separate| replace:: ``(seq,id,sub_id,geom)`` -.. |result-node-order| replace:: ``(seq, node)`` +.. |result_node_order| replace:: ``(seq, node)`` .. |result-degree| replace:: ``(node, degree)`` .. |result-extract| replace:: ``(id, in_edges, out_edges, x, y, geom)`` .. |result-find| replace:: ``(edge_id, fraction, side, distance, geom, edge)`` .. |result-version| replace:: ``(version, build_type, compile_date, library, system, PostgreSQL, compiler, boost, hash)`` -.. |result-toposort| replace:: ``(seq, sorted_v)`` -.. |result-closure| replace:: ``(seq, vid, target_array)`` +.. |result-closure| replace:: ``(node,targets)`` .. |result-component-E| replace:: ``(seq, component, edge)`` .. |result-component-V| replace:: ``(seq, component, node)`` .. |result-component-make| replace:: ``(seq, start_vid, end_vid)`` .. |result-contract| replace:: ``(type, id, contracted_vertices, source, target, cost)`` .. |result-contraction-hierarchies| replace:: ``(type, id, contracted_vertices, source, target, cost, metric, vertex_order)`` .. |result-idom| replace:: ``(seq, vertex_id, idom)`` -.. |result-dij-dd| replace:: ``(seq, [from_v,] node, edge, cost, agg_cost)`` -.. |result-dij-dd-m| replace:: ``(seq, from_v, node, edge, cost, agg_cost)`` .. |result-linegf| replace:: ``(seq, source, target, cost, edge)`` .. |result-lineg| replace:: ``(seq, source, target, cost, reverse_cost)`` .. |result-flow| replace:: ``(seq, edge, start_vid, end_vid, flow, residual_capacity)`` .. |result-flow-mincost| replace:: ``(seq, edge, source, target, flow, residual_capacity, cost, agg_cost)`` -.. |result-disjoint| replace:: ``(seq, path_id, path_seq, [start_vid,] [end_vid,] node, edge, cost, agg_cost)`` -.. |result-disjoint-1-1| replace:: ``(seq, path_id, path_seq, node, edge, cost, agg_cost)`` -.. |result-disjoint-1-m| replace:: ``(seq, path_id, path_seq, end_vid, node, edge, cost, agg_cost)`` -.. |result-disjoint-m-1| replace:: ``(seq, path_id, path_seq, start_vid, node, edge, cost, agg_cost)`` -.. |result-disjoint-m-m| replace:: ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` .. |result-mincut| replace:: ``(seq, edge, cost, mincut)`` .. |result-pickdrop| replace:: ``(seq, vehicle_number, vehicle_id, stop, order_id, stop_type, cargo, travel_time, arrival_time, wait_time, service_time, departure_time)`` -.. |boost| image:: images/boost-inside.jpeg +.. |Boost| image:: images/boost-inside.jpeg :target: https://www.boost.org/libs/graph :alt: Boost Graph inside :height: 18 diff --git a/doc/contraction/CMakeLists.txt b/doc/contraction/CMakeLists.txt index 1844f926ea6..84cc196c054 100644 --- a/doc/contraction/CMakeLists.txt +++ b/doc/contraction/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES contraction-family.rst pgr_contraction.rst pgr_contractionDeadEnd.rst diff --git a/doc/contraction/images/CMakeLists.txt b/doc/contraction/images/CMakeLists.txt index 1750d2bea91..762cbc7fce5 100644 --- a/doc/contraction/images/CMakeLists.txt +++ b/doc/contraction/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES undirected_sampledata_b.png undirected_sampledata_c.png newgraph.png diff --git a/doc/contraction/pgr_contraction.rst b/doc/contraction/pgr_contraction.rst index 2f9dcdf430c..999a0122436 100644 --- a/doc/contraction/pgr_contraction.rst +++ b/doc/contraction/pgr_contraction.rst @@ -22,6 +22,14 @@ vertices and edges. .. rubric:: Availability +.. rubric:: Version 4.0.0 + +.. Breaking change + +* Breaking change, signatures no longer available: + + * pgr_contraction(text,bigint[],integer,bigint[],boolean) + .. rubric:: Version 3.8.0 * New signature: diff --git a/doc/contraction/pgr_contractionHierarchies.rst b/doc/contraction/pgr_contractionHierarchies.rst index d2e6a63d977..da443c3b7f3 100644 --- a/doc/contraction/pgr_contractionHierarchies.rst +++ b/doc/contraction/pgr_contractionHierarchies.rst @@ -23,9 +23,9 @@ shortcut edges created. .. rubric:: Availability -* Version 3.8.0 +.. rubric:: Version 3.8.0 - * New **experimental** function +* New experimental function. Description diff --git a/doc/dagShortestPath/CMakeLists.txt b/doc/dagShortestPath/CMakeLists.txt index a205f3ed92a..c6869bb9507 100644 --- a/doc/dagShortestPath/CMakeLists.txt +++ b/doc/dagShortestPath/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_dagShortestPath.rst ) diff --git a/doc/dagShortestPath/pgr_dagShortestPath.rst b/doc/dagShortestPath/pgr_dagShortestPath.rst index 005799c942a..6f26501b8af 100644 --- a/doc/dagShortestPath/pgr_dagShortestPath.rst +++ b/doc/dagShortestPath/pgr_dagShortestPath.rst @@ -27,15 +27,19 @@ In particular, the DAG shortest paths algorithm implemented by Boost.Graph. .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Output columns standardized to |short-generic-result| - * pgr_dagShortestPath(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New experimental function. - * New experimental function. + * pgr_dagShortestPath(Combinations) + +.. rubric:: Version 3.0.0 + +* New experimental function. Description @@ -93,7 +97,7 @@ Signatures | pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vids**) | pgr_dagShortestPath(`Edges SQL`_, `Combinations SQL`_) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET @@ -108,7 +112,7 @@ One to One | pgr_dagShortestPath(`Edges SQL`_, **start vid**, **end vid**) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`5` to vertex :math:`11` on a **directed** graph @@ -128,7 +132,7 @@ One to Many | pgr_dagShortestPath(`Edges SQL`_, **start vid**, **end vids**) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`5` to vertices :math:`\{7, 11\}` @@ -148,7 +152,7 @@ Many to One | pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vid**) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertices :math:`\{5, 10\}` to vertex :math:`11` @@ -168,7 +172,7 @@ Many to Many | pgr_dagShortestPath(`Edges SQL`_, **start vids**, **end vids**) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertices :math:`\{5, 15\}` to vertices :math:`\{11, 17\}` on an @@ -189,7 +193,7 @@ Combinations | pgr_dagShortestPath(`Edges SQL`_, `Combinations SQL`_) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: Using a combinations table on an **undirected** graph @@ -234,8 +238,8 @@ Return columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/dijkstra/CMakeLists.txt b/doc/dijkstra/CMakeLists.txt index 6b303ad3a30..76d2ccd3911 100644 --- a/doc/dijkstra/CMakeLists.txt +++ b/doc/dijkstra/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES dijkstra-family.rst pgr_dijkstraCostMatrix.rst pgr_dijkstraCost.rst diff --git a/doc/dijkstra/pgr_dijkstra.rst b/doc/dijkstra/pgr_dijkstra.rst index eb6ddaa8b03..1e001559235 100644 --- a/doc/dijkstra/pgr_dijkstra.rst +++ b/doc/dijkstra/pgr_dijkstra.rst @@ -21,39 +21,43 @@ .. rubric:: Availability -* Version 3.5.0 +.. rubric:: Version 4.0.0 - * Standardizing output columns to |short-generic-result| +* Combinations signature promoted to official. - * pgr_dijkstra(One to One) added ``start_vid`` and ``end_vid`` columns. - * pgr_dijkstra(One to Many) added ``end_vid`` column. - * pgr_dijkstra(Many to One) added ``start_vid`` column. +.. rubric:: Version 3.5.0 -* Version 3.1.0 +* Standardizing output columns to |short-generic-result| - * New proposed signature: + * pgr_dijkstra(One to One) added ``start_vid`` and ``end_vid`` columns. + * pgr_dijkstra(One to Many) added ``end_vid`` column. + * pgr_dijkstra(Many to One) added ``start_vid`` column. - * pgr_dijkstra(Combinations) +.. rubric:: Version 3.1.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_dijkstra(Combinations) -* Version 2.2.0 +.. rubric:: Version 3.0.0 - * New proposed signatures: +* Function promoted to official. - * pgr_dijkstra(One to Many) - * pgr_dijkstra(Many to One) - * pgr_dijkstra(Many to Many) +.. rubric:: Version 2.2.0 -* Version 2.1.0 +* New proposed signatures: - * Signature change on pgr_dijkstra(One to One) + * pgr_dijkstra(One to Many) + * pgr_dijkstra(Many to One) + * pgr_dijkstra(Many to Many) -* Version 2.0.0 +.. rubric:: Version 2.1.0 - * Official function. +* Signature change on pgr_dijkstra(One to One) + +.. rubric:: Version 2.0.0 + +* Official function. Description @@ -86,12 +90,6 @@ Signatures | Returns set of |short-generic-result| | OR EMPTY SET - -.. Warning:: Breaking change on 3.5.0 - - Read the :doc:`migration` about how to migrate from the old result columns to - the new result columns. - .. index:: single: dijkstra ; One to One @@ -175,7 +173,7 @@ Many to Many :end-before: -- q51 .. index:: - single: dijkstra ; Combinations - Proposed on v3.1 + single: dijkstra ; Combinations Combinations ............................................................................... @@ -237,8 +235,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_short_start - :end-before: return_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/dijkstra/pgr_dijkstraCost.rst b/doc/dijkstra/pgr_dijkstraCost.rst index 8c864904558..3d86b3881eb 100644 --- a/doc/dijkstra/pgr_dijkstraCost.rst +++ b/doc/dijkstra/pgr_dijkstraCost.rst @@ -23,15 +23,19 @@ algorithm. .. rubric:: Availability -* Version 3.1.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_dijkstraCost(Combinations) +.. rubric:: Version 3.1.0 -* Version 2.2.0 +* New proposed signature: - * Official function. + * pgr_dijkstraCost(Combinations) + +.. rubric:: Version 2.2.0 + +* Official function. Description @@ -155,7 +159,7 @@ Many to Many :end-before: -- q51 .. index:: - single: dijkstraCost ; Combinations - Proposed on v3.1 + single: dijkstraCost ; Combinations Combinations ............................................................................... diff --git a/doc/dijkstra/pgr_dijkstraVia.rst b/doc/dijkstra/pgr_dijkstraVia.rst index c410b5938cd..6e9fbacccf3 100644 --- a/doc/dijkstra/pgr_dijkstraVia.rst +++ b/doc/dijkstra/pgr_dijkstraVia.rst @@ -8,13 +8,13 @@ **************************************************************************** .. index:: - single: Dijkstra Family ; pgr_dijkstraVia - Proposed - single: Via Category ; pgr_dijkstraVia - Proposed + single: Dijkstra Family ; pgr_dijkstraVia + single: Via Category ; pgr_dijkstraVia single: dijkstraVia - Proposed | -``pgr_dijkstraVia`` - Proposed +``pgr_dijkstraVia`` =============================================================================== ``pgr_dijkstraVia`` — Route that goes through a list of vertices. @@ -45,7 +45,7 @@ Signatures ------------------------------------------------------------------------------- .. index:: - single: dijkstraVia - Proposed ; One Via - Proposed on 2.2 + single: dijkstraVia ; One Via One Via ............................................................................... @@ -69,9 +69,31 @@ One Via Parameters ------------------------------------------------------------------------------- -.. include:: via-category.rst - :start-after: via_parameters_start - :end-before: via_parameters_end +.. via_parameters_start + +.. list-table:: + :width: 81 + :widths: 14 20 7 40 + :header-rows: 1 + + * - Parameter + - Type + - Default + - Description + * - `Edges SQL`_ + - ``TEXT`` + - + - SQL query as described. + * - **via vertices** + - ``ARRAY`` [ **ANY-INTEGER** ] + - + - Array of ordered vertices identifiers that are going to be visited. + +Where: + +:ANY-INTEGER: SMALLINT, INTEGER, BIGINT + +.. via_parameters_end Optional parameters ............................................................................... diff --git a/doc/dominator/CMakeLists.txt b/doc/dominator/CMakeLists.txt index 5cdef962ecc..1b13935c865 100644 --- a/doc/dominator/CMakeLists.txt +++ b/doc/dominator/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_lengauerTarjanDominatorTree.rst ) diff --git a/doc/dominator/pgr_lengauerTarjanDominatorTree.rst b/doc/dominator/pgr_lengauerTarjanDominatorTree.rst index e493f336d4d..df27c5ac95f 100644 --- a/doc/dominator/pgr_lengauerTarjanDominatorTree.rst +++ b/doc/dominator/pgr_lengauerTarjanDominatorTree.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: diff --git a/doc/driving_distance/CMakeLists.txt b/doc/driving_distance/CMakeLists.txt index 26b87d77974..29d56560e47 100644 --- a/doc/driving_distance/CMakeLists.txt +++ b/doc/driving_distance/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_drivingDistance.rst ) diff --git a/doc/images/CMakeLists.txt b/doc/images/CMakeLists.txt index f691c196b4f..9aa4347b438 100644 --- a/doc/images/CMakeLists.txt +++ b/doc/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES boost-inside.jpeg Fig1-originalData.png Fig2-cost.png diff --git a/doc/ksp/CMakeLists.txt b/doc/ksp/CMakeLists.txt index 8e15236a2d1..ce8fea491de 100644 --- a/doc/ksp/CMakeLists.txt +++ b/doc/ksp/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_KSP.rst ) diff --git a/doc/ksp/pgr_KSP.rst b/doc/ksp/pgr_KSP.rst index c006f0db08c..3a132f47f8e 100644 --- a/doc/ksp/pgr_KSP.rst +++ b/doc/ksp/pgr_KSP.rst @@ -20,6 +20,10 @@ .. rubric:: Availability +.. rubric:: Version 4.0.0 + +* All signatures promoted to official. + .. rubric:: Version 3.6.0 * Standardizing output columns to |nksp-result| @@ -93,7 +97,7 @@ One to One :end-before: --q2 .. index:: - single: KSP ; One to Many - Proposed on 3.6 + single: KSP ; One to Many One to Many ............................................................................... @@ -114,7 +118,7 @@ One to Many :end-before: --q3 .. index:: - single: KSP ; Many to One - Proposed in 3.6 + single: KSP ; Many to One Many to One ............................................................................... @@ -135,7 +139,7 @@ Many to One :end-before: --q4 .. index:: - single: KSP ; Many to Many - Proposed in 3.6 + single: KSP ; Many to Many Many to Many ............................................................................... @@ -156,7 +160,7 @@ Many to Many :end-before: --q5 .. index:: - single: KSP ; Combinations - Proposed in 3.6 + single: KSP ; Combinations Combinations ............................................................................... @@ -269,50 +273,9 @@ Combinations SQL Result columns ------------------------------------------------------------------------------- -.. ksp_returns_start - -Returns set of |nksp-result| - -.. list-table:: - :width: 81 - :widths: auto - :header-rows: 1 - - * - Column - - Type - - Description - * - ``seq`` - - ``INTEGER`` - - Sequential value starting from **1**. - * - ``path_id`` - - ``INTEGER`` - - Path identifier. - - * Has value **1** for the first of a path from ``start_vid`` to - ``end_vid`` - * - ``path_seq`` - - ``INTEGER`` - - Relative position in the path. Has value **1** for the beginning of a - path. - * - ``node`` - - ``BIGINT`` - - Identifier of the node in the path from ``start_vid`` to ``end_vid`` - * - ``edge`` - - ``BIGINT`` - - Identifier of the edge used to go from ``node`` to the next node in the - path sequence. **-1** for the last node of the path. - * - ``cost`` - - ``FLOAT`` - - Cost to traverse from ``node`` using ``edge`` to the next node in the - path sequence. - - * :math:`0` for the last ``node`` of the path. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from **start vid** to ``node``. - -.. ksp_returns_end - +.. include:: pgRouting-concepts.rst + :start-after: return_path_all_columns_start + :end-before: return_path_all_columns_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/lineGraph/CMakeLists.txt b/doc/lineGraph/CMakeLists.txt index 86aa84e5f2f..1c16277a518 100644 --- a/doc/lineGraph/CMakeLists.txt +++ b/doc/lineGraph/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES transformation-family.rst pgr_lineGraphFull.rst pgr_lineGraph.rst diff --git a/doc/lineGraph/images/CMakeLists.txt b/doc/lineGraph/images/CMakeLists.txt index e04c520220c..acbf1820648 100644 --- a/doc/lineGraph/images/CMakeLists.txt +++ b/doc/lineGraph/images/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LOCAL_FILES +set(LOCAL_FILES transformation.png original.png ) diff --git a/doc/max_flow/CMakeLists.txt b/doc/max_flow/CMakeLists.txt index 56027f2bb1d..42da1fa739e 100644 --- a/doc/max_flow/CMakeLists.txt +++ b/doc/max_flow/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES flow-family.rst pgr_maxFlow.rst pgr_boykovKolmogorov.rst diff --git a/doc/max_flow/pgr_boykovKolmogorov.rst b/doc/max_flow/pgr_boykovKolmogorov.rst index 0b82bbe8da0..2bab69ced70 100644 --- a/doc/max_flow/pgr_boykovKolmogorov.rst +++ b/doc/max_flow/pgr_boykovKolmogorov.rst @@ -19,26 +19,30 @@ ``pgr_boykovKolmogorov`` — Calculates the flow on the graph edges that maximizes the flow from the sources to the targets using Boykov Kolmogorov algorithm. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_boykovKolmogorov(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_boykovKolmogorov(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * Renamed from ``pgr_maxFlowBoykovKolmogorov`` - * Function promoted to proposed. +* Function promoted to official. -* Version 2.3.0 +.. rubric:: Version 2.5.0 - * New experimental function. +* Renamed from ``pgr_maxFlowBoykovKolmogorov`` +* Function promoted to proposed. + +.. rubric:: Version 2.3.0 + +* New experimental function. Description @@ -150,7 +154,7 @@ Many to Many :end-before: -- q5 .. index:: - single: boykovKolmogorov ; Combinations - Proposed on v3.2 + single: boykovKolmogorov ; Combinations Combinations ............................................................................... diff --git a/doc/max_flow/pgr_edgeDisjointPaths.rst b/doc/max_flow/pgr_edgeDisjointPaths.rst index 893c63732f1..97d986cdf1f 100644 --- a/doc/max_flow/pgr_edgeDisjointPaths.rst +++ b/doc/max_flow/pgr_edgeDisjointPaths.rst @@ -20,25 +20,29 @@ vertices. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Output columns standardized to |generic-result| - * pgr_edgeDisjointPaths(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_edgeDisjointPaths(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * Function promoted to proposed. +* Function promoted to official. -* Version 2.3.0 +.. rubric:: Version 2.5.0 - * New experimental function. +* Function promoted to proposed. + +.. rubric:: Version 2.3.0 + +* New experimental function. Description @@ -69,7 +73,7 @@ Signatures | pgr_edgeDisjointPaths(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) | pgr_edgeDisjointPaths(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |result-disjoint| + | Returns set of |generic-result| | OR EMPTY SET .. index:: @@ -83,7 +87,7 @@ One to One | pgr_edgeDisjointPaths(`Edges SQL`_, **start vid**, **end vid**, [``directed``]) - | Returns set of |result-disjoint-1-1| + | Returns set of |generic-result| | OR EMPTY SET :Example: From vertex :math:`11` to vertex :math:`12` @@ -103,7 +107,7 @@ One to Many | pgr_edgeDisjointPaths(`Edges SQL`_, **start vid**, **end vids**, [``directed``]) - | Returns set of |result-disjoint-1-m| + | Returns set of |generic-result| | OR EMPTY SET :Example: From vertex :math:`11` to vertices :math:`\{5, 10, 12\}` @@ -124,7 +128,7 @@ Many to One | pgr_edgeDisjointPaths(`Edges SQL`_, **start vids**, **end vid**, [``directed``]) - | Returns set of |result-disjoint-m-1| + | Returns set of |generic-result| | OR EMPTY SET :Example: From vertices :math:`\{11, 3, 17\}` to vertex :math:`12` @@ -144,7 +148,7 @@ Many to Many | pgr_edgeDisjointPaths(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) - | Returns set of |result-disjoint-m-m| + | Returns set of |generic-result| | OR EMPTY SET :Example: From vertices :math:`\{11, 3, 17\}` to vertices :math:`\{5, 10, 12\}` @@ -164,7 +168,7 @@ Combinations | pgr_edgeDisjointPaths(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |result-disjoint-m-m| + | Returns set of |generic-result| | OR EMPTY SET :Example: Using a combinations table, equivalent to calculating result from @@ -218,8 +222,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_start - :end-before: return_path_end + :start-after: return_path_all_columns_start + :end-before: return_path_all_columns_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/max_flow/pgr_edmondsKarp.rst b/doc/max_flow/pgr_edmondsKarp.rst index 4240cbfe6f1..c1190130b4b 100644 --- a/doc/max_flow/pgr_edmondsKarp.rst +++ b/doc/max_flow/pgr_edmondsKarp.rst @@ -19,26 +19,30 @@ ``pgr_edmondsKarp`` — Calculates the flow on the graph edges that maximizes the flow from the sources to the targets using Edmonds Karp Algorithm. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_edmondsKarp(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_edmondsKarp(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * Renamed from ``pgr_maxFlowEdmondsKarp`` - * Function promoted to proposed. +* Function promoted to official. -* Version 2.3.0 +.. rubric:: Version 2.5.0 - * New experimental function. +* Renamed from ``pgr_maxFlowEdmondsKarp`` +* Function promoted to proposed. + +.. rubric:: Version 2.3.0 + +* New experimental function. Description @@ -150,7 +154,7 @@ Many to Many :end-before: -- q5 .. index:: - single: edmondsKarp ; Combinations - Proposed on v3.2 + single: edmondsKarp ; Combinations Combinations ............................................................................... diff --git a/doc/max_flow/pgr_maxCardinalityMatch.rst b/doc/max_flow/pgr_maxCardinalityMatch.rst index 86aac8566ee..b84236964d0 100644 --- a/doc/max_flow/pgr_maxCardinalityMatch.rst +++ b/doc/max_flow/pgr_maxCardinalityMatch.rst @@ -19,35 +19,43 @@ ``pgr_maxCardinalityMatch`` — Calculates a maximum cardinality matching in a graph. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 - * Use ``cost`` and ``reverse_cost`` on the inner query - * Results are ordered - * Works for undirected graphs. - * New signature +.. Breaking change - * pgr_maxCardinalityMatch(text) returns only ``edge`` column. +* Breaking change, signatures no longer available: - * Deprecated signature + * pgr_maxCardinalityMatch(text,boolean) - * pgr_maxCardinalityMatch(text,boolean) +.. rubric:: Version 3.4.0 - * directed => ``false`` when used. +* Use ``cost`` and ``reverse_cost`` on the inner query +* Results are ordered +* Works for undirected graphs. +* New signature -* Version 3.0.0 + * pgr_maxCardinalityMatch(text) returns only ``edge`` column. - * Function promoted to official. +* Deprecated signature -* Version 2.5.0 + * pgr_maxCardinalityMatch(text,boolean) - * Renamed from ``pgr_maximumCardinalityMatching`` - * Function promoted to proposed. + * directed => ``false`` when used. -* Version 2.3.0 +.. rubric:: Version 3.0.0 - * New experimental function. +* Function promoted to official. + +.. rubric:: Version 2.5.0 + +* Renamed from ``pgr_maximumCardinalityMatching`` +* Function promoted to proposed. + +.. rubric:: Version 2.3.0 + +* New experimental function. Description diff --git a/doc/max_flow/pgr_maxFlow.rst b/doc/max_flow/pgr_maxFlow.rst index 0ecd4e1b2de..0589f176634 100644 --- a/doc/max_flow/pgr_maxFlow.rst +++ b/doc/max_flow/pgr_maxFlow.rst @@ -19,21 +19,25 @@ ``pgr_maxFlow`` — Calculates the maximum flow in a directed graph from the source(s) to the targets(s) using the Push Relabel algorithm. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_maxFlow(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_maxFlow(Combinations) -* Version 2.4.0 +.. rubric:: Version 3.0.0 - * New proposed function. +* Function promoted to official. + +.. rubric:: Version 2.4.0 + +* New proposed function. Description @@ -147,7 +151,7 @@ Many to Many :end-before: -- q5 .. index:: - single: maxFlow ; Combinations - Proposed on v3.2 + single: maxFlow ; Combinations Combinations ............................................................................... diff --git a/doc/max_flow/pgr_maxFlowMinCost.rst b/doc/max_flow/pgr_maxFlowMinCost.rst index 4c02e1871cf..95355c528bc 100644 --- a/doc/max_flow/pgr_maxFlowMinCost.rst +++ b/doc/max_flow/pgr_maxFlowMinCost.rst @@ -34,7 +34,7 @@ the maximum flow on a graph Description ------------------------------------------------------------------------------- -|boost| graph inside. +|Boost| Boost Graph Inside. .. include:: flow-family.rst :start-after: characteristics_start diff --git a/doc/max_flow/pgr_pushRelabel.rst b/doc/max_flow/pgr_pushRelabel.rst index 8e9b7d0414a..5b929ed8ced 100644 --- a/doc/max_flow/pgr_pushRelabel.rst +++ b/doc/max_flow/pgr_pushRelabel.rst @@ -19,26 +19,30 @@ ``pgr_pushRelabel`` — Calculates the flow on the graph edges that maximizes the flow from the sources to the targets using Push Relabel Algorithm. -.. Rubric:: Availability +.. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New proposed signature: +* Combinations signature promoted to official. - * pgr_pushRelabel(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New proposed signature: - * Function promoted to official. + * pgr_pushRelabel(Combinations) -* Version 2.5.0 +.. rubric:: Version 3.0.0 - * Renamed from ``pgr_maxFlowPushRelabel`` - * Function promoted to proposed. +* Function promoted to official. -* Version 2.3.0 +.. rubric:: Version 2.5.0 - * New experimental function. +* Renamed from ``pgr_maxFlowPushRelabel`` +* Function promoted to proposed. + +.. rubric:: Version 2.3.0 + +* New experimental function. Description @@ -150,7 +154,7 @@ Many to Many :end-before: -- q5 .. index:: - single: pushRelabel ; Combinations - Proposed on v3.2 + single: pushRelabel ; Combinations Combinations ............................................................................... diff --git a/doc/metrics/CMakeLists.txt b/doc/metrics/CMakeLists.txt index d668b5a950c..d316a09437a 100644 --- a/doc/metrics/CMakeLists.txt +++ b/doc/metrics/CMakeLists.txt @@ -1,8 +1,9 @@ -SET(LOCAL_FILES +set(LOCAL_FILES metrics-family.rst pgr_betweennessCentrality.rst pgr_degree.rst + pgr_bandwidth.rst ) foreach (f ${LOCAL_FILES}) diff --git a/doc/metrics/metrics-family.rst b/doc/metrics/metrics-family.rst index 5b5ec524d6b..2f8499bafb5 100644 --- a/doc/metrics/metrics-family.rst +++ b/doc/metrics/metrics-family.rst @@ -22,17 +22,17 @@ Metrics - Family of functions .. official-end -.. collapse:: Experimental - - .. include:: experimental.rst - :start-after: warning-begin - :end-before: end-warning +.. include:: experimental.rst + :start-after: warning-begin + :end-before: end-warning .. experimental-start * :doc:`pgr_betweennessCentrality` - Calculates relative betweenness centrality using Brandes Algorithm +* :doc:`pgr_bandwidth` - Computes the bandwidth of a graph. + .. experimental-end .. toctree:: @@ -40,6 +40,7 @@ Metrics - Family of functions pgr_degree pgr_betweennessCentrality + pgr_bandwidth See Also ------------------------------------------------------------------------------- diff --git a/doc/metrics/pgr_bandwidth.rst b/doc/metrics/pgr_bandwidth.rst new file mode 100644 index 00000000000..3b9730c6329 --- /dev/null +++ b/doc/metrics/pgr_bandwidth.rst @@ -0,0 +1,165 @@ +.. + **************************************************************************** + pgRouting Manual + Copyright(c) pgRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +.. index:: + single: Metrics Family ; pgr_bandwidth - Experimental + single: bandwidth - Experimental on v4.0 + +| + +``pgr_bandwidth`` - Experimental +=============================================================================== + +``pgr_bandwidth`` - Calculates the bandwidth of the graph + +.. include:: experimental.rst + :start-after: warning-begin + :end-before: end-warning + +.. rubric:: Availability + +.. rubric:: Version 4.0.0 + +* New experimental function. + +Description +------------------------------------------------------------------------------- + +Bandwidth measures how "spread out" the connections are in a graph when vertices +are arranged in a linear order (like numbering them 1, 2, 3, etc.). + +* For each edge in the graph, calculate the distance between the vertex numbers + it connects +* The bandwidth is the maximum of all these distances +* The implementation is for undirected graphs +* Run time is 0.160789 seconds + +|Boost| Boost Graph Inside + +Signatures +------------------------------------------------------------------------------- + +.. rubric:: Summary + +.. admonition:: \ \ + :class: signatures + + pgr_bandwidth(`Edges SQL`_) + + | Returns ``BIGINT`` + +:Example: For an undirected graph with edges. + +.. literalinclude:: bandwidth.queries + :start-after: -- q1 + :end-before: -- q2 + +Parameters +------------------------------------------------------------------------------- + +.. include:: allpairs-family.rst + :start-after: edges_start + :end-before: edges_end + +Inner Queries +------------------------------------------------------------------------------- + +Edges SQL +............................................................................... + +.. include:: pgRouting-concepts.rst + :start-after: basic_edges_sql_start + :end-before: basic_edges_sql_end + +Result columns +------------------------------------------------------------------------------- + +Returns a bigint ``(pgr_bandwidth)`` + +================= =========== ========================================== +Column Type Description +================= =========== ========================================== +``pgr_bandwidth`` ``BIGINT`` gives the bandwidth of the graph. +================= =========== ========================================== + +Additional Examples +------------------------------------------------------------------------------- + +:Example: Undirected graph with edges before optimization. + +.. graphviz:: + + graph G { + node [shape=circle, style=filled, fillcolor=white, color=black, fontcolor=black, fontsize=10]; + edge [color=black, penwidth=1]; + + 4 -- 7; + 7 -- 9; + 7 -- 0; + 0 -- 2; + 2 -- 5; + 5 -- 9; + 9 -- 8; + 9 -- 1; + 5 -- 1; + 9 -- 6; + 6 -- 3; + 1 -- 3; + + {rank=same; 4; 8; 6;} + {rank=same; 7; 9; 3;} + {rank=same; 0; 2; 5; 1;} + } + +.. literalinclude:: bandwidth.queries + :start-after: -- q2 + :end-before: -- q5 + +:Example: Undirected graph with edges after optimization. + +.. graphviz:: + + graph G { + node [shape=circle, style=filled, fillcolor=white, color=black, fontcolor=black, fontsize=12]; + edge [color=black, penwidth=1]; + + 0 -- 1; + 1 -- 3; + 1 -- 2; + 2 -- 4; + 4 -- 8; + 8 -- 3; + 3 -- 5; + 3 -- 6; + 3 -- 7; + 8 -- 7; + 6 -- 9; + 7 -- 9; + + {rank=same; 0; 5; 6;} + {rank=same; 1; 3; 9;} + {rank=same; 2; 4; 8; 7;} + + } + +.. literalinclude:: bandwidth.queries + :start-after: -- q5 + :end-before: -- q8 + +See Also +------------------------------------------------------------------------------- + +* :doc:`sampledata` +* `Boost: bandwidth + `_ + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/metrics/pgr_degree.rst b/doc/metrics/pgr_degree.rst index ace7b58820f..434d2933a39 100644 --- a/doc/metrics/pgr_degree.rst +++ b/doc/metrics/pgr_degree.rst @@ -73,7 +73,7 @@ Signatures | OR EMPTY SET .. index:: - single: degree ; Edges + single: degree ; Edges and Vertices Edges ............................................................................... @@ -92,9 +92,6 @@ Edges :start-after: -- q1 :end-before: -- q2 -.. index:: - single: degree ; Edges and Vertices - Edges and Vertices ............................................................................... @@ -119,6 +116,10 @@ Calculate the degree of the nodes: :start-after: -- q2 :end-before: -- q3 +.. index:: + single: degree ; Edges + + Parameters ------------------------------------------------------------------------------- @@ -377,7 +378,7 @@ If there is a vertices table already built using the ``pgr_extractVertices`` See Also ------------------------------------------------------------------------------- -* :doc:`topology-functions` +* :doc:`utilities-family` * :doc:`pgr_extractVertices` .. rubric:: Indices and tables diff --git a/doc/mincut/CMakeLists.txt b/doc/mincut/CMakeLists.txt index bae0edff943..8d5fb9515d1 100644 --- a/doc/mincut/CMakeLists.txt +++ b/doc/mincut/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_stoerWagner.rst ) diff --git a/doc/ordering/CMakeLists.txt b/doc/ordering/CMakeLists.txt index be5034c16e1..776d7de9bba 100644 --- a/doc/ordering/CMakeLists.txt +++ b/doc/ordering/CMakeLists.txt @@ -1,7 +1,9 @@ -SET(LOCAL_FILES +set(LOCAL_FILES ordering-family.rst pgr_cuthillMckeeOrdering.rst pgr_topologicalSort.rst + pgr_sloanOrdering.rst + pgr_kingOrdering.rst ) foreach (f ${LOCAL_FILES}) diff --git a/doc/ordering/ordering-family.rst b/doc/ordering/ordering-family.rst index 04cd2677b07..1b97a2adbbe 100644 --- a/doc/ordering/ordering-family.rst +++ b/doc/ordering/ordering-family.rst @@ -24,6 +24,8 @@ Ordering - Family of functions * :doc:`pgr_cuthillMckeeOrdering` - Return reverse Cuthill-McKee ordering of an undirected graph. * :doc:`pgr_topologicalSort` - Linear ordering of the vertices for directed acyclic graph. +* :doc:`pgr_sloanOrdering` - Returns the sloan ordering of an undirected graph. +* :doc:`pgr_kingOrdering` - Returns the King ordering of an undirected graph. .. official-end @@ -32,6 +34,8 @@ Ordering - Family of functions pgr_cuthillMckeeOrdering pgr_topologicalSort + pgr_sloanOrdering + pgr_kingOrdering See Also ------------------------------------------------------------------------------- diff --git a/doc/ordering/pgr_cuthillMckeeOrdering.rst b/doc/ordering/pgr_cuthillMckeeOrdering.rst index a09ed6bbcfb..53e3155a674 100644 --- a/doc/ordering/pgr_cuthillMckeeOrdering.rst +++ b/doc/ordering/pgr_cuthillMckeeOrdering.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -63,7 +63,7 @@ Signatures | pgr_cuthillMckeeOrdering(`Edges SQL`_) - | Returns set of |result-node-order| + | Returns set of |result_node_order| | OR EMPTY SET :Example: Graph ordering of pgRouting :doc:`sampledata` @@ -94,6 +94,8 @@ Edges SQL Result columns ------------------------------------------------------------------------------- +.. node_ordering_start + Returns set of ``(seq, node)`` =============== =========== ====================================== @@ -103,6 +105,8 @@ Column Type Description ``node`` ``BIGINT`` New ordering in reverse order. =============== =========== ====================================== +.. node_ordering_end + See Also ------------------------------------------------------------------------------- diff --git a/doc/ordering/pgr_kingOrdering.rst b/doc/ordering/pgr_kingOrdering.rst new file mode 100644 index 00000000000..16549cf7670 --- /dev/null +++ b/doc/ordering/pgr_kingOrdering.rst @@ -0,0 +1,139 @@ +.. + **************************************************************************** + pgRouting Manual + Copyright(c) pgRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +.. index:: + single: Ordering Family ; pgr_kingOrdering + single: kingOrdering - Experimental on v4.0 + +| + +``pgr_kingOrdering`` - Experimental +=============================================================================== + +``pgr_kingOrdering`` — Returns the King ordering of an undirected graph. + +.. include:: experimental.rst + :start-after: warning-begin + :end-before: end-warning + +.. rubric:: Version 4.0.0 + +* New experimental function. + +Description +------------------------------------------------------------------------------- + +In numerical linear algebra and graph theory, the King ordering algorithm +is a heuristic designed to reorder the vertices of a graph so as to reduce +its bandwidth. + +The method follows a breadth-first search (BFS) traversal, but with a refinement: +at each step, the unvisited neighbors of the current vertex are inserted into +the queue in ascending order of their pseudo-degree, where the pseudo-degree of +a vertex is the number of edges connecting it to yet-unvisited vertices. This +prioritization often yields a smaller bandwidth compared to simpler BFS orderings. + +**The main characteristics are:** + +- The implementation targets undirected graphs. +- Bandwidth minimization is an NP-complete problem; King ordering provides a practical local minimization approach. +- The time complexity is: :math:`O(m^2 \log(m)|E|)` + + - where :math:`|E|` is the number of edges, + - :math:`m` is the maximum degree among all vertices. + +|Boost| Boost Graph Inside + +Signatures +------------------------------------------------------------------------------ + +.. index:: + single: kingOrdering - Experimental on v4.0 + +.. admonition:: \ \ + :class: signatures + + | pgr_kingOrdering(`Edges SQL`_) + + | Returns set of |result_node_order| + | OR EMPTY SET + +:Example: Graph ordering of pgRouting :doc:`sampledata` + +.. literalinclude:: kingOrdering.queries + :start-after: -- q1 + :end-before: -- q2 + +Parameters +------------------------------------------------------------------------------- + +.. include:: pgRouting-concepts.rst + :start-after: only_edge_param_start + :end-before: only_edge_param_end + +Inner Queries +------------------------------------------------------------------------------- + +Edges SQL +............................................................................... + +.. include:: pgRouting-concepts.rst + :start-after: basic_edges_sql_start + :end-before: basic_edges_sql_end + +Result columns +------------------------------------------------------------------------------- + +.. include:: pgr_cuthillMckeeOrdering.rst + :start-after: node_ordering_start + :end-before: node_ordering_end + +Additional Examples +------------------------------------------------------------------------------- + +.. graphviz:: + + graph G { + node [shape=circle, style=filled, fillcolor=white, color=black, fontcolor=black, fontsize=10]; + edge [color=black, penwidth=1]; + + 4 -- 7; + 7 -- 9; + 7 -- 0; + 0 -- 2; + 2 -- 5; + 5 -- 9; + 9 -- 8; + 9 -- 1; + 5 -- 1; + 9 -- 6; + 6 -- 3; + 1 -- 3; + + {rank=same; 4; 8; 6;} + {rank=same; 7; 9; 3;} + {rank=same; 0; 2; 5; 1;} + } + +.. literalinclude:: kingOrdering.queries + :start-after: -- q2 + :end-before: -- q3 + +See Also +------------------------------------------------------------------------------- + +* :doc:`sampledata` +* `Boost: King Ordering + `__ + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` + diff --git a/doc/ordering/pgr_sloanOrdering.rst b/doc/ordering/pgr_sloanOrdering.rst new file mode 100644 index 00000000000..204fd63d39e --- /dev/null +++ b/doc/ordering/pgr_sloanOrdering.rst @@ -0,0 +1,152 @@ +.. + **************************************************************************** + pgRouting Manual + Copyright(c) pgRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +.. index:: + single: Ordering Family ; pgr_sloanOrdering + single: pgr_sloanOrdering - Experimental on v4.0 + +| + +``pgr_sloanOrdering`` - Experimental +=============================================================================== + +``pgr_sloanOrdering`` — Returns the Sloan ordering of an undirected graph + +.. include:: experimental.rst + :start-after: warning-begin + :end-before: end-warning + +.. rubric:: Availability + +.. rubric:: Version 4.0.0 + +* New experimental function. + + +Description +------------------------------------------------------------------------------- + +The Sloan ordering algorithm reorders the vertices of a graph to reduce +bandwidth, profile, and wavefront properties, which is particularly useful for +sparse matrix computations and finite element analysis. + +* Finds a pseudoperipheral vertex pair to determine good starting points +* Uses a priority-based algorithm that balances vertex degree and distance from the start vertex. +* Aims to minimize bandwidth (maximum difference between connected vertex indices. +* The implementation is for undirected graphs +* Typically produces better orderings than simple breadth-first approaches. +* Time complexity: :math:`O(V² + E)` where V is the number of vertices and E is + the number of edges. + +|Boost| Boost Graph Inside + +Signatures +------------------------------------------------------------------------------ + +.. index:: + single: sloanOrdering - Experimental on v4.0 + +.. admonition:: \ \ + :class: signatures + + | pgr_sloanOrdering(`Edges SQL`_) + + | Returns set of |result_node_order| + | OR EMPTY SET + +:Example : Sloan ordering without specifying start vertex + +.. literalinclude:: sloanOrdering.queries + :start-after: -- q1 + :end-before: -- q2 + +.. Parameters, Inner Queries & result columns + +Parameters +------------------------------------------------------------------------------- + +.. include:: pgRouting-concepts.rst + :start-after: only_edge_param_start + :end-before: only_edge_param_end + +Inner Queries +------------------------------------------------------------------------------- + +Edges SQL +............................................................................... + +.. include:: pgRouting-concepts.rst + :start-after: basic_edges_sql_start + :end-before: basic_edges_sql_end + +Result columns +------------------------------------------------------------------------------- + +Returns set of ``(seq, node)`` + +=============== =========== ====================================== +Column Type Description +=============== =========== ====================================== +``seq`` ``BIGINT`` Sequence of the order starting from 1. +``node`` ``BIGINT`` New sloan ordering order. +=============== =========== ====================================== + +Additional Examples + +:Example: Sloan ordering of Original graph from Boost example (vertices 0-9). + +.. graphviz:: + + graph G{ + node[shape=circle, style=filled, fillcolor=lightblue, color=black, fontcolor=black, fontsize=12]; + edge[color=black, penwidth=1.5]; + + 0 -- 3; + 0 -- 5; + 1 -- 2; + 1 -- 4; + 1 -- 6; + 1 -- 9; + 2 -- 3; + 2 -- 4; + 3 -- 5; + 3 -- 8; + 4 -- 6; + 5 -- 6; + 5 -- 7; + 6 -- 7; + + {rank=same; 0; 8;} + {rank=same; 3; 5; 7;} + {rank=same; 2; 4; 6;} + {rank=same; 1; 9;} + + } + +.. literalinclude:: sloanOrdering.queries + :start-after: -- q2 + :end-before: --q3 + +.. literalinclude:: sloanOrdering.queries + :start-after: --q3 + :end-before: --q4 + + +See Also +------------------------------------------------------------------------------- + +* :doc:`sampledata` +* `Boost: Sloan Ordering + `__ + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/ordering/pgr_topologicalSort.rst b/doc/ordering/pgr_topologicalSort.rst index c65c30f5347..da5f098b4de 100644 --- a/doc/ordering/pgr_topologicalSort.rst +++ b/doc/ordering/pgr_topologicalSort.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -25,9 +25,13 @@ graphs (DAG). .. rubric:: Availability -* Version 3.0.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Standardize output to |result_node_order| + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -60,7 +64,7 @@ Signatures | pgr_topologicalSort(`Edges SQL`_) - | Returns set of |result-toposort| + | Returns set of |result_node_order| | OR EMPTY SET :Example: Topologically sorting the graph @@ -89,7 +93,7 @@ Edges SQL Result columns ------------------------------------------------------------------------------- -Returns set of |result-toposort| +Returns set of |result_node_order| .. list-table:: :width: 81 @@ -102,7 +106,7 @@ Returns set of |result-toposort| * - ``seq`` - ``INTEGER`` - Sequential value starting from :math:`1` - * - ``sorted_v`` + * - ``node`` - ``BIGINT`` - Linear topological ordering of the vertices diff --git a/doc/pickDeliver/CMakeLists.txt b/doc/pickDeliver/CMakeLists.txt index cfa9258a245..797182ad43c 100644 --- a/doc/pickDeliver/CMakeLists.txt +++ b/doc/pickDeliver/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_pickDeliverEuclidean.rst pgr_pickDeliver.rst pgr_vrpOneDepot.rst diff --git a/doc/planar/CMakeLists.txt b/doc/planar/CMakeLists.txt index ad918eb5854..ff24f8e4f4d 100644 --- a/doc/planar/CMakeLists.txt +++ b/doc/planar/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_isPlanar.rst ) diff --git a/doc/planar/images/CMakeLists.txt b/doc/planar/images/CMakeLists.txt index 330d496d346..9b7491e0fc3 100644 --- a/doc/planar/images/CMakeLists.txt +++ b/doc/planar/images/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LOCAL_FILES +set(LOCAL_FILES nonPlanar.png ) diff --git a/doc/planar/pgr_isPlanar.rst b/doc/planar/pgr_isPlanar.rst index 8e1654a6bf7..07221afa0a4 100644 --- a/doc/planar/pgr_isPlanar.rst +++ b/doc/planar/pgr_isPlanar.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: diff --git a/doc/spanningTree/CMakeLists.txt b/doc/spanningTree/CMakeLists.txt index b209adcc449..57fb9e2c252 100644 --- a/doc/spanningTree/CMakeLists.txt +++ b/doc/spanningTree/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES #pgr_randomSpanTree.rst kruskal-family.rst prim-family.rst diff --git a/doc/spanningTree/pgr_primDD.rst b/doc/spanningTree/pgr_primDD.rst index 1cc8866fb7c..827a08d9552 100644 --- a/doc/spanningTree/pgr_primDD.rst +++ b/doc/spanningTree/pgr_primDD.rst @@ -125,7 +125,7 @@ Edges SQL Result columns ------------------------------------------------------------------------------- -.. include:: drivingDistance-category.rst +.. include:: pgRouting-concepts.rst :start-after: spantree-result-columns-start :end-before: spantree-result-columns-end diff --git a/doc/spanningTree/pgr_primDFS.rst b/doc/spanningTree/pgr_primDFS.rst index a0399ef858e..1263359cfc8 100644 --- a/doc/spanningTree/pgr_primDFS.rst +++ b/doc/spanningTree/pgr_primDFS.rst @@ -127,7 +127,7 @@ Edges SQL Result columns ------------------------------------------------------------------------------- -.. include:: drivingDistance-category.rst +.. include:: pgRouting-concepts.rst :start-after: spantree-result-columns-start :end-before: spantree-result-columns-end diff --git a/doc/src/CMakeLists.txt b/doc/src/CMakeLists.txt index 73890a5f0c2..931af5bdafd 100644 --- a/doc/src/CMakeLists.txt +++ b/doc/src/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES index.rst pgRouting-concepts.rst pgRouting-installation.rst @@ -18,6 +18,19 @@ foreach (f ${LOCAL_FILES}) list(APPEND LOCAL_DOC_FILES ${PGR_DOCUMENTATION_SOURCE_DIR}/${f}) endforeach() +# For the release notes substitution of the links for issues and milestones +file(READ ${PGR_DOCUMENTATION_SOURCE_DIR}/release_notes.rst FILE_CONTENTS) +string(REGEX REPLACE + ":issue:`([0-9]*)`" + "`#\\1 `__" + FILE_CONTENTS "${FILE_CONTENTS}") +string(REGEX REPLACE + ":milestone:`([0-9]*\.[0-9]*\.[0-9]*)`" + "`Github milestone for \\1 `__" + FILE_CONTENTS "${FILE_CONTENTS}") +file(WRITE ${PGR_DOCUMENTATION_SOURCE_DIR}/release_notes.rst "${FILE_CONTENTS}") + + add_subdirectory(images) set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) set(PROJECT_IMG_FILES ${PROJECT_IMG_FILES} PARENT_SCOPE) diff --git a/doc/src/experimental.rst b/doc/src/experimental.rst index 55493cef255..775f88bde61 100644 --- a/doc/src/experimental.rst +++ b/doc/src/experimental.rst @@ -14,11 +14,7 @@ Experimental Functions .. warning-begin -.. collapse:: Experimental - - .. warning:: Possible server crash - - - These functions might create a server crash +.. admonition:: Experimental .. warning:: Experimental functions @@ -30,13 +26,9 @@ Experimental Functions - Signature might change. - Functionality might change. - pgTap tests might be missing. - - Might need c/c++ coding. - - May lack documentation. + - Might need c/c++ review. - Documentation if any might need to be rewritten. - - Documentation examples might need to be automatically generated. - Might need a lot of feedback from the community. - - Might depend on a proposed function of pgRouting - - Might depend on a deprecated function of pgRouting .. end-warning diff --git a/doc/src/images/CMakeLists.txt b/doc/src/images/CMakeLists.txt index 5583fe78984..2803478f259 100644 --- a/doc/src/images/CMakeLists.txt +++ b/doc/src/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES crossing_edges.png touching_edges.png Dijkstra_Animation.gif diff --git a/doc/src/index.rst b/doc/src/index.rst index 34aa2eb40a4..f240d486cac 100644 --- a/doc/src/index.rst +++ b/doc/src/index.rst @@ -91,7 +91,7 @@ Available Functions but not official pgRouting functions .. include:: release_notes.rst :start-after: current - :end-before: pgRouting 3.7 + :end-before: pgRouting 3 All releases ------------------------------------------------------------------------------- diff --git a/doc/src/migration.rst b/doc/src/migration.rst index ec8565a7644..390868664c7 100644 --- a/doc/src/migration.rst +++ b/doc/src/migration.rst @@ -10,6 +10,8 @@ | +.. titles: ==, ++, --, .., ^^ + Migration guide =============================================================================== @@ -22,958 +24,1205 @@ Results can be different because of the changes. All deprecated functions will be removed on next major version 4.0.0 .. contents:: Contents - :depth: 2 + :depth: 3 -.. migrate_pgr_alphaShape_start -Migration of ``pgr_alphaShape`` -------------------------------------------------------------------------------- +Migration to standardized columns ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Starting from `v3.8.0 `__ +.. |old-pid-result| replace:: ``(seq, path_seq, [start_pid], [end_pid], node, edge, cost, agg_cost)`` +.. |pid-1-m| replace:: ``(seq, path_seq, end_pid, node, edge, cost, agg_cost)`` +.. |pid-m-1| replace:: ``(seq, path_seq, start_pid, node, edge, cost, agg_cost)`` +.. |pid-m-m| replace:: ``(seq, path_seq, start_pid, end_pid, node, edge, cost, agg_cost)`` + +.. |old-generic-result| replace:: ``(seq, path_seq, [start_vid], [end_vid], node, edge, cost, agg_cost)`` +.. |result-1-1| replace:: ``(seq, path_seq, node, edge, cost, agg_cost)`` +.. |result-1-m| replace:: ``(seq, path_seq, end_vid, node, edge, cost, agg_cost)`` +.. |result-m-1| replace:: ``(seq, path_seq, start_vid, node, edge, cost, agg_cost)`` + +.. |matrix-pid| replace:: ``(start_pid, end_pid, agg_cost)`` +.. |old-edge-color| replace:: ``(edge_id, color_id)`` +.. |old-node-color| replace:: ``(vertex_id, color_id)`` + +.. |result-bfs| replace:: ``(seq, depth, start_vid, node, edge, cost, agg_cost)`` + +.. |result-dij-dd| replace:: ``(seq, [from_v,] node, edge, cost, agg_cost)`` +.. |result-dij-dd-m| replace:: ``(seq, from_v, node, edge, cost, agg_cost)`` + +.. |result-disjoint| replace:: ``(seq, path_id, path_seq, [start_vid,] [end_vid,] node, edge, cost, agg_cost)`` +.. |result-disjoint-1-m| replace:: ``(seq, path_id, path_seq, end_vid, node, edge, cost, agg_cost)`` +.. |result-disjoint-m-1| replace:: ``(seq, path_id, path_seq, start_vid, node, edge, cost, agg_cost)`` + +.. |result-toposort| replace:: ``(seq, sorted_v)`` +.. |result-old-closure| replace:: ``(seq, vid, target_array)`` + +There has been an effort to standardize function output columns names and +types. + +* :ref:`pgRouting-concepts:Result columns for cost functions` + + * |matrix-result| + +* :ref:`pgRouting-concepts:Result columns for single path functions` + + * |short-generic-result| + +* :ref:`pgRouting-concepts:Result columns for spanning tree functions` + + * |result-spantree| + + +.. list-table:: + :header-rows: 1 + + * - Function + - Migration guide + * - .. versionchanged:: 3.5.0 :doc:`pgr_dijkstra` + - `Migration of single path functions`_ + * - .. versionchanged:: 3.6.0 :doc:`pgr_aStar` + - `Migration of single path functions`_ + * - .. versionchanged:: 3.6.0 :doc:`pgr_bdAstar` + - `Migration of single path functions`_ + * - .. versionchanged:: 3.6.0 :doc:`pgr_drivingDistance` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.6.0 :doc:`pgr_withPointsDD` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_kruskalBFS` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_kruskalDD` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_kruskalDFS` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_primBFS` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_primDD` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 3.7.0 :doc:`pgr_primDFS` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_bdDijkstra` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_bellmanFord` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_binaryBreadthFirstSearch` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_bipartite` + - `Migration of output column name change`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_breadthFirstSearch` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_dagShortestPath` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_depthFirstSearch` + - `Migration of spanning tree functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_edgeColoring` + - `Migration of output column name change`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_edwardMoore` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_edgeDisjointPaths` + - `Migration of multiple paths functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_sequentialVertexColoring` + - `Migration of output column name change`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_topologicalSort` + - `Migration of output column name change`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_withPoints` + - `Migration of single path functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_withPointsCost` + - `Migration of cost functions`_ + * - .. versionchanged:: 4.0.0 :doc:`pgr_withPointsCostMatrix` + - `Migration of cost functions`_ -**Before Deprecation:** The following was calculated: +.. contents:: Contents + :local: -* An alphaShape was calculated +Migration of cost functions +------------------------------------------------------------------------------- -**After Deprecation:** +The standardized :ref:`pgRouting-concepts:Result columns for cost functions` are +|matrix-result| -PostGIS has two ways of generating alphaShape. +The following functions need to be migrated when they are being used in an +application. -If you have SFCGAL, which you can install using +.. list-table:: + :header-rows: 1 -:: + * - Function + - Version + - From + * - ``pgr_withPointsCost`` + - v < 4.0 + - |matrix-pid| + * - ``pgr_withPointsCostMatrix`` + - v < 4.0 + - |matrix-pid| - CREATE EXTENSION postgis_sfcgal +**to** |matrix-result| -* Since PostGIS 3.5+ use `CG_AlphaShape `__ -* For PostGIS 3.5+ use the old name ``ST_AlphaShape`` +.. rubric:: Migration of |matrix-pid| -Other PostGIS options are -* `ST_ConvexHull `__ -* `ST_ConcaveHull `__ +Signatures to be migrated: -.. migrate_pgr_alphaShape_end +* One to One +* One to Many +* Many to One +* Many to Many +* Combinations -.. migrate_pgr_nodeNetwork_start +.. warning:: Breaking change -Migration of ``pgr_nodeNetwork`` -------------------------------------------------------------------------------- + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -Starting from `v3.8.0 `__ +New output columns are |matrix-result| -**Before Deprecation:** A table with `_nodded` was created. with split -edges. +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -**Migration** +.. contents:: Examples + :local: -Use :doc:`pgr_separateTouching` and/or use :doc:`pgr_separateCrossing` +Examples for One to One for cost functions +............................................................................... -.. migrate_pgr_nodeNetwork_end +.. rubric:: Using ``pgr_withPointsCost`` -.. migrate_pgr_createTopology_start +Migrating `this v3.8 +`__ +example. -Migration of ``pgr_createTopology`` -------------------------------------------------------------------------------- +:from: |matrix-pid| +:to: |matrix-result| -Starting from `v3.8.0 `__ +.. literalinclude:: migration.queries + :start-after: --withPointsCost-1-to-1 + :end-before: --withPointsCost-1-to-1-filter -**Before Deprecation:** The following was calculated: +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -* A table with `_vertices_pgr` was created. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-1-to-1-filter + :end-before: --withPointsCost-1-to-m -**After Deprecation:** The user is responsible to create the complete topology. +.. warning:: Breaking change -.. include:: pgRouting-concepts.rst - :start-after: createTopology_start - :end-before: createTopology_end + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -.. migrate_pgr_createTopology_end +Examples for One to Many for cost functions +............................................................................... -.. migrate_pgr_createVerticesTable_start +.. rubric:: Using ``pgr_withPointsCost`` -Migration of ``pgr_createVerticesTable`` -------------------------------------------------------------------------------- +Migrating `this v3.8 +`__ +example. -Starting from `v3.8.0 `__ +:from: |matrix-pid| +:to: |matrix-result| -**Before Deprecation:** The following was calculated: +.. literalinclude:: migration.queries + :start-after: --withPointsCost-1-to-m + :end-before: --withPointsCost-1-to-m-filter -* A table with `_vertices_pgr` was created. +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -**After Deprecation:** The user is responsible to create the vertices table, -indexes, etc. They may use :doc:`pgr_extractVertices` for that purpose. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-1-to-m-filter + :end-before: --withPointsCost-m-to-1 -.. literalinclude:: sampledata.queries - :start-after: -- q1 - :end-before: -- q1-1 +.. warning:: Breaking change -.. migrate_pgr_createVerticesTable_end + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -.. migrate_pgr_analyzeOneWay_start +Examples for Many to One for cost functions +............................................................................... -Migration of ``pgr_analyzeOneWay`` -------------------------------------------------------------------------------- +.. rubric:: Using ``pgr_withPointsCost`` -Starting from `v3.8.0 `__ +Migrating `this v3.8 +`__ +example. -**Before Deprecation:** The following was calculated: +:from: |matrix-pid| +:to: |matrix-result| -* Number of potential problems in directionality +.. literalinclude:: migration.queries + :start-after: --withPointsCost-m-to-1 + :end-before: --withPointsCost-m-to-1-filter -WHERE +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -Directionality problems were calculated based on codes. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-m-to-1-filter + :end-before: --withPointsCost-m-to-m -.. rubric:: Dead ends. +.. warning:: Breaking change -A routing problem can arise when from a vertex there is only a way on or a way -out but not both: + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -Either saving or using directly :doc:`pgr_extractVertices` get the dead ends -information and determine if the adjacent edge is one way or not. +Examples for Many to Many for cost functions +............................................................................... -In this example :doc:`pgr_extractVertices` has already been applied. +.. rubric:: Using ``pgr_withPointsCost`` -.. literalinclude:: migration.queries - :start-after: --OneWay1 - :end-before: --OneWay2 +Migrating `this v3.8 +`__ +example. -.. rubric:: Bridges. +:from: |matrix-pid| +:to: |matrix-result| -Another routing problem can arise when there is an edge of an undirected graph -whose deletion increases its number of connected components, and the bridge is -only one way. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-m-to-m + :end-before: --withPointsCost-m-to-m-filter -To determine if the bridges are or not one way. +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. .. literalinclude:: migration.queries - :start-after: --OneWay2 - :end-before: --OneWay3 + :start-after: --withPointsCost-m-to-m-filter + :end-before: --withPointsCost-c -.. migrate_pgr_analyzeOneWay_end +.. rubric:: Using ``pgr_withPointsCost`` -.. migrate_pgr_analyzeGraph_start +.. warning:: Breaking change -Migration of ``pgr_analyzeGraph`` -------------------------------------------------------------------------------- + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -Starting from `v3.8.0 `__ +Examples for Combinations for cost functions +............................................................................... -**Before Deprecation:** The following was calculated: +.. rubric:: Using ``pgr_withPointsCost`` -* Number of isolated segments. -* Number of dead ends. -* Number of potential gaps found near dead ends. -* Number of intersections. (between 2 edges) +Migrating `this v3.8 +`__ +example. -WHERE +:from: |matrix-pid| +:to: |matrix-result| -:Graph component: A connected subgraph that is not part of any larger connected - subgraph. -:Isolated segment: A graph component with only one segment. -:Dead ends: A vertex that participates in only one edge. -:gaps: Space between two geometries. -:Intersection: Is a topological relationship between two geometries. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-c + :end-before: --withPointsCost-c-filter -.. rubric:: Migration. +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -.. rubric:: Components. +.. literalinclude:: migration.queries + :start-after: --withPointsCost-c-filter + :end-before: --withPointsCost-END -Instead of counting only isolated segments, determine all the components of the -graph. +.. warning:: Breaking change -Depending of the final application requirements use: + If using ``pgr_withPointsCost``: column names must be changed after updating + pgRouting -* :doc:`pgr_connectedComponents` -* :doc:`pgr_strongComponents` -* :doc:`pgr_biconnectedComponents` +Migration of multiple paths functions +------------------------------------------------------------------------------- -For example: +The standardized :ref:`pgRouting-concepts:Result columns for single path +functions` are |nksp-result| -.. literalinclude:: migration.queries - :start-after: --analysis1 - :end-before: --analysis2 +The following functions need to be migrated when they are being used in an +application. -.. rubric:: Dead ends. +.. list-table:: + :header-rows: 1 -Instead of counting the dead ends, determine all the dead ends of the graph -using :doc:`pgr_degree`. + * - Function + - Version + - From + * - ``pgr_KSP`` + - v < 3.6 + - :ref:`from_ksp_result` + * - ``pgr_edgeDisjointPaths`` + - v < 4.0 + - :ref:`from_result_disjoint` -For example: +.. _from_ksp_result: -.. literalinclude:: migration.queries - :start-after: --analysis2 - :end-before: --analysis3 +Migration of |ksp-result| +............................................................................... -.. rubric:: Potential gaps near dead ends. +:to: |nksp-result| -Instead of counting potential gaps between geometries, determine the geometric -gaps in the graph using :doc:`pgr_findCloseEdges`. +Signatures to be migrated: -For example: +* One to One -.. literalinclude:: migration.queries - :start-after: --analysis3 - :end-before: --analysis4 +Before updating pgRouting, enumerate the |ksp-result| -.. rubric:: Topological relationships. +One to One example using ``pgr_KSP`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Instead of counting intersections, determine topological relationships between -geometries. +Using +`this `__ +example. -Several PostGIS functions can be used: -`ST_Intersects `__, -`ST_Crosses `__, -`ST_Overlaps `__, etc. +.. literalinclude:: migration.queries + :start-after: --ksp1 + :end-before: --ksp2 -For example: +Before updating pgRouting, enumerate the |ksp-result| .. literalinclude:: migration.queries - :start-after: --analysis4 - :end-before: --analysis5 - -.. migrate_pgr_analyzeGraph_end + :start-after: --ksp2 + :end-before: --ksp3 -Migration of ``pgr_aStar`` -------------------------------------------------------------------------------- +.. _from_result_disjoint: -Starting from `v3.6.0 `__ +Migration of |result-disjoint| +............................................................................... Signatures to be migrated: -* ``pgr_aStar`` (`One to One`) -* ``pgr_aStar`` (`One to Many`) -* ``pgr_aStar`` (`Many to One`) +* One to One +* One to Many +* Many to One -.. rubric:: Before Migration +Before updating pgRouting, enumerate the |result-disjoint| -* Output columns were |old-generic-result| +* Skip when applicable, ``start_vid`` +* Skip when applicable, ``end_vid`` - * Depending on the overload used, the columns ``start_vid`` and ``end_vid`` - might be missing: +One to One example using ``pgr_edgeDisjointPaths`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - * ``pgr_aStar`` (`One to One`) does not have ``start_vid`` and ``end_vid``. - * ``pgr_aStar`` (`One to Many`) does not have ``start_vid``. - * ``pgr_aStar`` (`Many to One`) does not have ``end_vid``. +Migrating `this v3.8 +`__ example. -:Migration: +.. literalinclude:: migration.queries + :start-after: --EdgeDisjoint1 + :end-before: --EdgeDisjoint2 -* Be aware of the existence of the additional columns. +Before updating pgRouting enumerate the columns: |ksp-result| -* In ``pgr_aStar`` (`One to One`) +.. literalinclude:: migration.queries + :start-after: --EdgeDisjoint2 + :end-before: --EdgeDisjoint3 - * ``start_vid`` contains the **start vid** parameter value. - * ``end_vid`` contains the **end vid** parameter value. +Migration of single path functions +------------------------------------------------------------------------------- -.. literalinclude:: migration.queries - :start-after: --astar1 - :end-before: --astar2 +The standardized :ref:`pgRouting-concepts:Result columns for single path +functions` are |short-generic-result| + +The following functions need to be migrated when they are being used in an +application. + +.. list-table:: + :header-rows: 1 + + * - Function + - Version + - From + * - ``pgr_dijkstra`` + - v < 3.5 + - |old-generic-result| + * - ``pgr_aStar`` + - v < 3.6 + - |old-generic-result| + * - ``pgr_bdDijkstra`` + - v < 4.0 + - |old-generic-result| + * - ``pgr_bellmanFord`` + - v < 4.0 + - |old-generic-result| + * - ``pgr_dagShortestPath`` + - v < 4.0 + - |result-1-1| + * - ``pgr_edwardMoore`` + - v < 4.0 + - |old-generic-result| + * - ``pgr_withPoints`` + - v < 4.0 + - |old-pid-result| + +:to: |short-generic-result| + +.. rubric:: Migration of |old-generic-result| -* In ``pgr_aStar`` (`One to Many`) +Signatures to be migrated: - * ``start_vid`` contains the **start vid** parameter value. +* One to One +* One to Many +* Many to One -.. literalinclude:: migration.queries - :start-after: --astar2 - :end-before: --astar3 +Before updating pgRouting, enumerate the corresponding columns of the signature -* In ``pgr_aStar`` (`Many to One`) +* Skip when applicable, ``start_vid`` +* Skip when applicable, ``end_vid`` - * ``end_vid`` contains the **end vid** parameter value. +.. rubric:: Migration of |old-pid-result| -.. literalinclude:: migration.queries - :start-after: --astar3 - :end-before: --astar4 +Signatures to be migrated: -* If needed filter out the added columns, for example: +* One to One +* One to Many +* Many to One +* Many to Many +* Combinations -.. literalinclude:: migration.queries - :start-after: --astar4 - :end-before: --astar5 +To get the old version column names, depending on the signature: -* If needed add the new columns, similar to the following example where - ``pgr_dijkstra`` is used, and the function had to be modified to be able to - return the new columns: +* Filter out the columns: ``start_vid`` and/or ``end_vid`` +* Rename the columns: - * In `v3.0 - `__ - the function ``my_dijkstra`` uses ``pgr_dijkstra``. - * Starting from `v3.5 - `__ - the function ``my_dijkstra`` returns the new additional columns of - ``pgr_dijkstra``. + * ``start_vid`` to ``start_pid`` + * ``end_vid`` to ``end_pid`` -Migration of ``pgr_bdAstar`` -------------------------------------------------------------------------------- +.. warning:: Breaking change -Starting from `v3.6.0 `__ + If using ``pgr_withPoints``: column names must be changed after updating + pgRouting + +.. rubric:: Migration of |result-1-1| Signatures to be migrated: -* ``pgr_bdAstar`` (`One to One`) -* ``pgr_bdAstar`` (`One to Many`) -* ``pgr_bdAstar`` (`Many to One`) +* One to One +* One to Many +* Many to One +* Many to Many +* Combinations -:Before Migration: +To get the old version column names: -* Output columns were |old-generic-result| +* Filter out the columns: ``start_vid`` and ``end_vid`` - * Depending on the overload used, the columns ``start_vid`` and ``end_vid`` - might be missing: +.. contents:: Examples + :local: - * ``pgr_bdAstar`` (`One to One`) does not have ``start_vid`` and ``end_vid``. - * ``pgr_bdAstar`` (`One to Many`) does not have ``start_vid``. - * ``pgr_bdAstar`` (`Many to One`) does not have ``end_vid``. +Examples with One to One with one route result +............................................................................... -:Migration: +.. rubric:: Using ``pgr_aStar`` -* Be aware of the existence of the additional columns. +Migrating `this v3.5 +`__ +example. -* In ``pgr_bdAstar`` (`One to One`) +.. literalinclude:: migration.queries + :start-after: --astar1 + :end-before: --astar2 - * ``start_vid`` contains the **start vid** parameter value. - * ``end_vid`` contains the **end vid** parameter value. +Before updating pgRouting enumerate the columns: |result-1-1| .. literalinclude:: migration.queries - :start-after: --bdastar1 - :end-before: --bdastar2 + :start-after: --astar4 + :end-before: --astar5 -* In ``pgr_bdAstar`` (`One to Many`) +.. rubric:: Using ``pgr_bdDijkstra`` - * ``start_vid`` contains the **start vid** parameter value. +Migrating `this v3.8 +`__ +example. .. literalinclude:: migration.queries - :start-after: --bdastar2 - :end-before: --bdastar3 - -* In ``pgr_bdAstar`` (`Many to One`) + :start-after: --bdDijkstra-1-to-1 + :end-before: --bdDijkstra-1-to-1-filter - * ``end_vid`` contains the **end vid** parameter value. +Before updating pgRouting enumerate the columns: |result-1-1| .. literalinclude:: migration.queries - :start-after: --bdastar3 - :end-before: --bdastar4 + :start-after: --bdDijkstra-1-to-1-filter + :end-before: --bdDijkstra-1-to-m -* If needed filter out the added columns, for example: +.. rubric:: Using ``pgr_DAGshortestPath`` + +Migrating `this v3.8 +`__ +example. .. literalinclude:: migration.queries - :start-after: --bdastar4 - :end-before: --bdastar5 + :start-after: --DAGshortestPath-1-to-1 + :end-before: --DAGshortestPath-1-to-1-filter -* If needed add the new columns, similar to the following example where - ``pgr_dijkstra`` is used, and the function had to be modified to be able to - return the new columns: +Before updating pgRouting enumerate the columns: |result-1-1| - * In `v3.0 `__ - the function ``my_dijkstra`` uses ``pgr_dijkstra``. - * Starting from `v3.5 `__ - the function ``my_dijkstra`` returns the new additional columns of - ``pgr_dijkstra``. +.. literalinclude:: migration.queries + :start-after: --DAGshortestPath-1-to-1-filter + :end-before: --DAGshortestPath-END +.. note:: This applies to all signatures of ``pgr_DAGshortestPath`` -Migration of ``pgr_dijkstra`` -------------------------------------------------------------------------------- +Examples for One to Many with one route result +............................................................................... -Starting from `v3.5.0 `__ +.. rubric:: Using ``pgr_bdAstar`` -Signatures to be migrated: +Migrating `this v3.5 +`__ +example. -* ``pgr_dijkstra`` (`One to One`) -* ``pgr_dijkstra`` (`One to Many`) -* ``pgr_dijkstra`` (`Many to One`) +.. literalinclude:: migration.queries + :start-after: --bdastar2 + :end-before: --bdastar3 -:Before Migration: +Before updating pgRouting enumerate the columns: |result-1-m| -* Output columns were |old-generic-result| +.. literalinclude:: migration.queries + :start-after: --bdastar3 + :end-before: --bdastar4 - * Depending on the overload used, the columns ``start_vid`` and ``end_vid`` - might be missing: +.. rubric:: Using ``pgr_withPoints`` - * ``pgr_dijkstra`` (`One to One`) does not have ``start_vid`` and - ``end_vid``. - * ``pgr_dijkstra`` (`One to Many`) does not have ``start_vid``. - * ``pgr_dijkstra`` (`Many to One`) does not have ``end_vid``. +Migrating `this v3.8 +`__ +example. -:Migration: +.. literalinclude:: migration.queries + :start-after: --withPoints-1-to-m + :end-before: --withPoints-1-to-m-filter + +.. warning:: Breaking change -* Be aware of the existence of the additional columns. + If using ``pgr_withPoints``: column names must be changed after updating + pgRouting -* In ``pgr_dijkstra`` (`One to One`) + :from: |pid-1-m| + :to: |short-generic-result| - * ``start_vid`` contains the **start vid** parameter value. - * ``end_vid`` contains the **end vid** parameter value. +To get the old signature column names: filter out the +column ``start_vid`` and rename ``end_vid`` to ``end_pid``. .. literalinclude:: migration.queries - :start-after: --dijkstra1 - :end-before: --dijkstra2 + :start-after: --withPoints-1-to-m-filter + :end-before: --withPoints-m-to-1 + +Examples for Many to One with one route result +............................................................................... + +.. rubric:: Using ``pgr_bdDijkstra`` + +Migrating `this v3.8 +`__ +example. -* In ``pgr_dijkstra`` (`One to Many`) +.. literalinclude:: migration.queries + :start-after: --bdDijkstra-m-to-1 + :end-before: --bdDijkstra-m-to-1-filter - * ``start_vid`` contains the **start vid** parameter value. +Before updating pgRouting enumerate the columns: |result-m-1| .. literalinclude:: migration.queries - :start-after: --dijkstra2 - :end-before: --dijkstra3 + :start-after: --bdDijkstra-m-to-1-filter + :end-before: --bdDijkstra-END -* In ``pgr_dijkstra`` (`Many to One`) +.. rubric:: Using ``pgr_dijkstra`` - * ``end_vid`` contains the **end vid** parameter value. +Migrating `this v3.4 +`__ +example. .. literalinclude:: migration.queries :start-after: --dijkstra3 :end-before: --dijkstra4 -* If needed filter out the added columns, for example: +Before updating pgRouting enumerate the columns: |result-m-1| .. literalinclude:: migration.queries :start-after: --dijkstra4 :end-before: --dijkstra5 -* If needed add the new columns, for example: +Examples for Many to Many with one route result +............................................................................... - * In `v3.0 `__ - the function ``my_dijkstra`` uses ``pgr_dijkstra``. - * Starting from `v3.5 `__ - the function ``my_dijkstra`` returns the new additional columns of - ``pgr_dijkstra``. +.. rubric:: Using ``pgr_withPoints`` -Migration of ``pgr_drivingDistance`` -------------------------------------------------------------------------------- +Migrating `this v3.8 +`__ +example. -Starting from `v3.6.0 `__ -:doc:`pgr_drivingDistance` result columns are being standardized. +.. literalinclude:: migration.queries + :start-after: --withPoints-m-to-m + :end-before: --withPoints-m-to-m-filter -:from: |result-dij-dd| -:to: |result-spantree| +.. warning:: Breaking change -Signatures to be migrated: + If using ``pgr_withPoints``: column names must be changed after updating + pgRouting -* pgr_drivingDistance(Single vertex) -* pgr_drivingDistance(Multiple vertices) + :from: |pid-m-m| + :to: |short-generic-result| -:Before Migration: +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -Output columns were |result-dij-dd| +.. literalinclude:: migration.queries + :start-after: --withPoints-m-to-m-filter + :end-before: --withPoints-c -* pgr_drivingDistance(Single vertex) +Examples for combinations with one route result +............................................................................... - * Does not have ``start_vid`` and ``depth`` result columns. +.. rubric:: Using ``pgr_withPoints`` -* pgr_drivingDistance(Multiple vertices) +Migrating `this v3.8 +`this `__ +example. - * Has ``from_v`` instead of ``start_vid`` result column. - * does not have ``depth`` result column. +.. literalinclude:: migration.queries + :start-after: --withPoints-c + :end-before: --withPoints-c-filter -:Migration: +.. warning:: Breaking change -* Be aware of the existence and name change of the result columns. + If using ``pgr_withPoints``: column names must be changed after updating + pgRouting -pgr_drivingDistance(Single vertex) -............................................................................... + :from: |pid-m-m| + :to: |short-generic-result| -Using `this -`__ -example. +To get the old version column names: rename ``start_vid`` to ``start_pid`` and +``end_vid`` to ``end_pid``. -* ``start_vid`` contains the **start vid** parameter value. -* ``depth`` contains the depth of the ``node``. -* ``pred`` contains the predecessor of the ``node``. +.. literalinclude:: migration.queries + :start-after: --withPoints-c-filter + :end-before: --withPoints-END - .. literalinclude:: migration.queries - :start-after: --drivingdistance1 - :end-before: --drivingdistance2 +Migration of spanning tree functions +------------------------------------------------------------------------------- -If needed filter out the added columns, for example, to return the original columns +The standardized :ref:`pgRouting-concepts:Result columns for spanning tree +functions` are |result-spantree| + +.. list-table:: + :header-rows: 1 + + * - Function + - Version + - From + * - ``pgr_drivingDistance`` + - v < 3.6 + - :ref:`from_result_dij_dd` + * - ``pgr_withPointsDD`` + - v < 3.6 + - :ref:`from_result_generic_no_seq` + * - ``pgr_kruskalDD`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_kruskalBFS`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_kruskalDFS`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_primDD`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_primBFS`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_primDFS`` + - v < 3.7 + - :ref:`from_result_bfs` + * - ``pgr_breadthFisrtSearch`` + - v < 4.0.0 + - :ref:`from_result_bfs` + * - ``pgr_depthFisrtSearch`` + - v < 4.0.0 + - :ref:`from_result_bfs` + + +to |result-spantree| + +.. contents:: Examples + :local: -.. literalinclude:: migration.queries - :start-after: --drivingdistance2 - :end-before: --drivingdistance3 +.. _from_result_bfs: -pgr_drivingDistance(Multiple vertices) +Migration from |result-bfs|. ............................................................................... -Using `this -`__ -example. +Signatures to be migrated: -* The ``from_v`` result column name changes to ``start_vid``. -* ``depth`` contains the depth of the ``node``. -* ``pred`` contains the predecessor of the ``node``. +* Single vertex +* Multiple vertices - .. literalinclude:: migration.queries - :start-after: --drivingdistance3 - :end-before: --drivingdistance4 +Before updating pgRouting enumerate the columns: |result-bfs| -If needed filter out and rename columns, for example, to return the original -columns: +Single vertex example using ``pgr_kruskalDD`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Migrating `this v3.6 +`__ example. .. literalinclude:: migration.queries - :start-after: --drivingdistance4 - :end-before: --drivingdistance5 + :start-after: --kruskalDD1 + :end-before: --kruskalDD2 -Migration of ``pgr_kruskalDD`` / ``pgr_kruskalBFS`` / ``pgr_kruskalDFS`` -------------------------------------------------------------------------------- +Before updating pgRouting enumerate the columns: |result-bfs|. -Starting from `v3.7.0 `__ -:doc:`pgr_kruskalDD`, :doc:`pgr_kruskalBFS` and -:doc:`pgr_kruskalDFS` result columns are being standardized. +.. literalinclude:: migration.queries + :start-after: --kruskalDD2 + :end-before: --kruskalDD3 -:from: |result-bfs| -:to: |result-spantree| +Multiple vertices example using ``pgr_kruskalDFS`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -* ``pgr_kruskalDD`` +Migrating `this v3.6 +`__ +example. - * Single vertex - * Multiple vertices +.. literalinclude:: migration.queries + :start-after: --kruskalDD3 + :end-before: --kruskalDD4 + +Before updating pgRouting enumerate the columns: |result-bfs|. -* ``pgr_kruskalDFS`` +.. literalinclude:: migration.queries + :start-after: --kruskalDD4 + :end-before: --kruskalDD5 - * Single vertex - * Multiple vertices +.. _from_result_dij_dd: -* ``pgr_kruskalBFS`` +Migration from |result-dij-dd| +................................................................................. - * Single vertex - * Multiple vertices +Signatures to be migrated: +* Single vertex +* Multiple vertices -:Before Migration: +Migration depends on the signature. -Output columns were |result-bfs| +For single vertex: -* Single vertex and Multiple vertices +* Before updating pgRouting, enumerate |result-1-1| columns - * Do not have ``pred`` result column. +For multiple vertices: -:Migration: +.. warning:: Breaking change -* Be aware of the existence of `pred` result columns. -* If needed filter out the added columns + Changes must be done after updating pgRouting. -Kruskal single vertex -............................................................................... +To get the old version column names |result-dij-dd-m|: -Using ``pgr_KruskalDD`` as example. -Migration is similar to al the affected functions. +* filter out the column ``pred`` and ``depth`` and +* rename ``start_vid`` to ``from_v``. -Comparing with `this -`__ example. +Single vertex example using ``pgr_drivingDistance`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Now column ``pred`` exists and contains the predecessor of the ``node``. +Migrating `this v3.5 +`__ +example. .. literalinclude:: migration.queries - :start-after: --kruskalDD1 - :end-before: --kruskalDD2 + :start-after: --drivingdistance1 + :end-before: --drivingdistance2 -If needed filter out the added columns, for example, to return the original -columns +Before updating pgRouting, enumerate |result-1-1-no-seq| columns .. literalinclude:: migration.queries - :start-after: --kruskalDD2 - :end-before: --kruskalDD3 - -Kruskal multiple vertices -............................................................................... + :start-after: --drivingdistance2 + :end-before: --drivingdistance3 -Using ``pgr_KruskalDD`` as example. -Migration is similar to al the affected functions. +Multiple vertices example using ``pgr_drivingDistance`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Comparing with `this -`__ +Migrating `this v3.5 +`__ example. -Now column ``pred`` exists and contains the predecessor of the ``node``. - .. literalinclude:: migration.queries - :start-after: --kruskalDD3 - :end-before: --kruskalDD4 + :start-after: --drivingdistance3 + :end-before: --drivingdistance4 -If needed filter out the added columns, for example, to return the original -columns +To get the old version column names |result-dij-dd-m|: filter out the column +``pred`` and ``depth`` and rename ``start_vid`` to ``from_v``. .. literalinclude:: migration.queries - :start-after: --kruskalDD4 - :end-before: --kruskalDD5 + :start-after: --drivingdistance4 + :end-before: --drivingdistance5 -Migration of ``pgr_KSP`` -------------------------------------------------------------------------------- +.. _from_result_generic_no_seq: -Starting from `v3.6.0 `__ -:doc:`pgr_KSP` result columns are being standardized. - -:from: |ksp-result| -:from: |nksp-result| +Migration of |result-generic-no-seq| +................................................................................. Signatures to be migrated: -* ``pgr_KSP`` (One to One) +* Single vertex +* Multiple vertices -:Before Migration: +.. warning:: Breaking change -* Output columns were |ksp-result| + Changes must be done after updating pgRouting. - * the columns ``start_vid`` and ``end_vid`` do not exist. +For single vertex: - * ``pgr_KSP`` (One to One) does not have ``start_vid`` and ``end_vid``. +After updating pgRouting: -:Migration: +* Enumerate |result-1-1-no-seq| columns +* Use an unnamed valid value for **driving side** after the **distance** + parameter. -* Be aware of the existence of the additional columns. +For multiple vertices: -``pgr_KSP`` (One to One) -............................................................................... +After updating pgRouting: -Using -`this `__ -example. +* Enumerate |result-m-1-no-seq| columns +* Use an unnamed valid value for **driving side** after the **distance** + parameter. -* ``start_vid`` contains the **start vid** parameter value. -* ``end_vid`` contains the **end vid** parameter value. +.. note:: Default value of **driving side** parameter -.. literalinclude:: migration.queries - :start-after: --ksp1 - :end-before: --ksp2 + **driving side** parameter is unnamed, and valid values differ for + directed and undirected graphs. -If needed filter out the added columns, for example, to return the original -columns: + * In directed graph: valid values are [``r``, ``R``, ``l``, ``L``] -.. literalinclude:: migration.queries - :start-after: --ksp2 - :end-before: --ksp3 + * Default value = 'r'; -Migration of ``pgr_maxCardinalityMatch`` -------------------------------------------------------------------------------- + * In undirected graph: valid values are [``b``, ``B``] -:doc:`pgr_maxCardinalityMatch` works only for undirected graphs, therefore the -``directed`` flag has been removed. + * Default value = 'b'; -Starting from `v3.4.0 `__ +Single vertex example using ``pgr_withPointsDD`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Signature to be migrated: +Migrating `this v3.5 +`__ +example. -.. parsed-literal:: +.. literalinclude:: migration.queries + :start-after: --withpointsdd4 + :end-before: --withpointsdd5 - pgr_maxCardinalityMatch(Edges SQL, [directed]) - RETURNS SETOF (seq, edge, source, target) +After updating pgRouting: -Migration is needed, because: +* Enumerate |result-1-1-no-seq| columns +* Use an unnamed valid value for **driving side** after the **distance** + parameter. -* Use ``cost`` and ``reverse_cost`` on the inner query -* Results are ordered -* Works for undirected graphs. -* New signature +.. literalinclude:: migration.queries + :start-after: --withpointsdd5 + :end-before: --withpointsdd6 - * ``pgr_maxCardinalityMatch(text)`` returns only ``edge`` column. - * The optional flag ``directed`` is removed. +Multiple vertices example using ``pgr_withPointsDD`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -:Before migration: +Migrating `this v3.5 +`__ +example. .. literalinclude:: migration.queries - :start-after: --maxcard1 - :end-before: --maxcard2 + :start-after: --withpointsdd6 + :end-before: --withpointsdd7 -* Columns used are ``going`` and ``coming`` to represent the existence of an - edge. -* Flag ``directed`` was used to indicate if it was for a **directed** or - **undirected** graph. +After updating pgRouting: - * The flag ``directed`` is ignored. +* Enumerate |result-m-1-no-seq| columns +* Use an unnamed valid value for **driving side** after the **distance** + parameter. - * Regardless of it's value it gives the result considering the graph as - **undirected**. +.. literalinclude:: migration.queries + :start-after: --withpointsdd7 + :end-before: --withpointsdd8 -:Migration: +Migration of output column name change +------------------------------------------------------------------------------- -* Use the columns ``cost`` and ``reverse_cost`` to represent the existence of an - edge. -* Do not use the flag ``directed``. -* In the query returns only ``edge`` column. +The standardized result columns: -.. literalinclude:: migration.queries - :start-after: --maxcard2 - :end-before: --maxcard3 +* |result_edge_color| +* |result_node_color| +* |result_node_order| -Migration of ``pgr_primDD`` / ``pgr_primBFS`` / ``pgr_primDFS`` -------------------------------------------------------------------------------- +.. warning:: Breaking change -Starting from `v3.7.0 `__ -:doc:`pgr_primDD`, :doc:`pgr_primBFS` and :doc:`pgr_primDFS` result columns are -being standardized. + Changes on column names must be done after updating pgRouting. -:from: |result-bfs| -:to: |result-spantree| +.. list-table:: + :header-rows: 1 -* ``pgr_primDD`` + * - Function + - Version + - From + * - ``pgr_edgeColoring`` + - v < 4.0.0 + - :ref:`from_old_edge_color` + * - ``pgr_bipartite`` + - v < 4.0.0 + - :ref:`from_old_node_color` + * - ``pgr_sequentialVertexColoring`` + - v < 4.0.0 + - :ref:`from_old_node_color` + * - ``pgr_topologicalSort`` + - v < 4.0.0 + - :ref:`from_toposort` + * - ``pgr_transitiveClosure`` + - v < 4.0.0 + - :ref:`from_old_closure` - * Single vertex - * Multiple vertices +.. _from_old_closure: -* ``pgr_primDFS`` +Migration from |result-old-closure| +................................................................................. - * Single vertex - * Multiple vertices +Migration to: |result-old-closure| -* ``pgr_primBFS`` +.. warning:: Breaking change - * Single vertex - * Multiple vertices + Changes must be done after updating pgRouting. +After update: -:Before Migration: +* Remove column ``seq`` +* Rename ``vid`` to ``node`` and ``target_array`` to ``targets`` -Output columns were |result-bfs| +.. _from_toposort: -* Single vertex and Multiple vertices +Migration from |result-toposort| +................................................................................. - * Do not have ``pred`` result column. +Migration to: |result_node_order| -:Migration: +.. warning:: Breaking change -* Be aware of the existence of `pred` result columns. -* If needed filter out the added columns + Changes must be done after updating pgRouting. -Prim single vertex -............................................................................... +After update: -Using ``pgr_primDD`` as example. -Migration is similar to al the affected functions. +* Rename ``sorted_v`` to ``node`` -Comparing with `this -`__ example. +.. _from_old_edge_color: -Now column ``pred`` exists and contains the predecessor of the ``node``. +Migration from |old-edge-color| +................................................................................. -.. literalinclude:: migration.queries - :start-after: --primDD1 - :end-before: --primDD2 +Migration to: |result_edge_color| -If needed filter out the added columns, for example, to return the original -columns +.. warning:: Breaking change -.. literalinclude:: migration.queries - :start-after: --primDD2 - :end-before: --primDD3 + Changes must be done after updating pgRouting. -Prim multiple vertices -............................................................................... +After update: -Using ``pgr_primDD`` as example. -Migration is similar to al the affected functions. +* Rename ``edge_id`` to ``edge`` and ``color_id`` to ``color``. -Comparing with `this -`__ -example. +.. _from_old_node_color: -Now column ``pred`` exists and contains the predecessor of the ``node``. +Migration from |old-node-color| +................................................................................. -.. literalinclude:: migration.queries - :start-after: --primDD3 - :end-before: --primDD4 +Migration to: |result_node_color| -If needed filter out the added columns, for example, to return the original -columns +.. warning:: Breaking change -.. literalinclude:: migration.queries - :start-after: --primDD4 - :end-before: --primDD5 + Changes must be done after updating pgRouting. + +After update: + +* Rename ``vertex_id`` to ``node`` and ``color_id`` to ``color``. -Migration of ``pgr_withPointsDD`` +Migration of deleted functions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Functions no longer on pgRouting + +.. contents:: Contents + :local: + +Migration of ``pgr_alphaShape`` ------------------------------------------------------------------------------- -Starting from `v3.6.0 `__ -:doc:`pgr_withPointsDD` result columns are being standardized. +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -:from: |result-generic-no-seq| -:to: |result-spantree| +**Before Deprecation:** The following was calculated: -And ``driving_side`` parameter changed from named optional to unnamed compulsory -**driving side** and its validity differ for directed and undirected graphs. +* An alphaShape was calculated -Signatures to be migrated: +**After Deprecation:** -* ``pgr_withPointsDD`` (Single vertex) -* ``pgr_withPointsDD`` (Multiple vertices) +PostGIS has two ways of generating alphaShape. -:Before Migration: +If you have SFCGAL, which you can install using -* ``pgr_withPointsDD`` (Single vertex) +:: - * Output columns were |result-1-1-no-seq| - * Does not have ``start_vid``, ``pred`` and ``depth`` result columns. - * ``driving_side`` parameter was named optional now it is compulsory unnamed. + CREATE EXTENSION postgis_sfcgal -* ``pgr_withPointsDD`` (`Multiple vertices`) +* Since PostGIS 3.5+ use `CG_AlphaShape `__ +* For PostGIS 3.5+ use the old name ``ST_AlphaShape`` - * Output columns were |result-m-1-no-seq| - * Does not have ``depth`` and ``pred`` result columns. - * ``driving_side`` parameter was named optional now it is compulsory unnamed. +Other PostGIS options are -.. rubric:: Driving side was optional +* `ST_ConvexHull `__ +* `ST_ConcaveHull `__ -The default values on this query are: +Migration of ``pgr_nodeNetwork`` +------------------------------------------------------------------------------- -:directed: true -:driving_side: 'b' -:details: false +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -.. literalinclude:: migration.queries - :start-after: --withpointsdd1 - :end-before: --withpointsdd2 +**Before Deprecation:** A table with `_nodded` was created. with split +edges. -.. rubric:: Driving side was named optional +**Migration** -The default values on this query are: +Use :doc:`pgr_separateTouching` and/or use :doc:`pgr_separateCrossing` -:directed: true -:details: false +Migration of ``pgr_createTopology`` +------------------------------------------------------------------------------- -.. literalinclude:: migration.queries - :start-after: --withpointsdd2 - :end-before: --withpointsdd3 +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -.. rubric:: On directed graph ``b`` could be used as **driving side** +**Before Deprecation:** The following was calculated: -The default values on this query are: +* A table with `_vertices_pgr` was created. -:details: false +**After Deprecation:** The user is responsible to create the complete topology. -.. literalinclude:: migration.queries - :start-after: --withpointsdd3 - :end-before: --withpointsdd4 +.. include:: pgRouting-concepts.rst + :start-after: createTopology_start + :end-before: createTopology_end -.. rubric:: On undirected graph ``r`` could be used as **driving side** +Migration of ``pgr_createVerticesTable`` +------------------------------------------------------------------------------- -Also ``l`` could be used as **driving side** +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -.. literalinclude:: migration.queries - :start-after: --withpointsdd4 - :end-before: --withpointsdd5 +**Before Deprecation:** The following was calculated: -:After Migration: +* A table with `_vertices_pgr` was created. -* Be aware of the existence of the additional result Columns. -* New output columns are |result-spantree| -* **driving side** parameter is unnamed compulsory, and valid values differ for - directed and undirected graphs. +**After Deprecation:** The user is responsible to create the vertices table, +indexes, etc. They may use :doc:`pgr_extractVertices` for that purpose. - * Does not have a default value. - * In directed graph: valid values are [``r``, ``R``, ``l``, ``L``] - * In undirected graph: valid values are [``b``, ``B``] - * Using an invalid value throws an ``ERROR``. +.. literalinclude:: sampledata.queries + :start-after: -- q1 + :end-before: -- q1-1 -``pgr_withPointsDD`` (Single vertex) -............................................................................... +Migration of ``pgr_analyzeOneWay`` +------------------------------------------------------------------------------- -Using -`this `__ -example. +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -* |result-spantree| -* ``start_vid`` contains the **start vid** parameter value. -* ``depth`` contains the **depth** from the ``start_vid`` vertex to the - ``node``. -* ``pred`` contains the predecessor of the ``node``. +**Before Deprecation:** The following was calculated: +* Number of potential problems in directionality -To migrate, use an unnamed valid value for **driving side** after the -**distance** parameter: +WHERE -.. literalinclude:: migration.queries - :start-after: --withpointsdd4 - :end-before: --withpointsdd5 +Directionality problems were calculated based on codes. -To get results from previous versions: +.. rubric:: Dead ends. -* filter out the additional columns, for example; -* When ``details => false`` to remove the points use ``WHERE node >= 0 OR cost = - 0`` +A routing problem can arise when from a vertex there is only a way on or a way +out but not both: + +Either saving or using directly :doc:`pgr_extractVertices` get the dead ends +information and determine if the adjacent edge is one way or not. + +In this example :doc:`pgr_extractVertices` has already been applied. .. literalinclude:: migration.queries - :start-after: --withpointsdd5 - :end-before: --withpointsdd6 + :start-after: --OneWay1 + :end-before: --OneWay2 -``pgr_withPointsDD`` (Multiple vertices) -............................................................................... +.. rubric:: Bridges. -Using -`this `__ -example. +Another routing problem can arise when there is an edge of an undirected graph +whose deletion increases its number of connected components, and the bridge is +only one way. -* |result-spantree| -* ``depth`` contains the **depth** from the ``start_vid`` vertex to the - ``node``. -* ``pred`` contains the predecessor of the ``node``. +To determine if the bridges are or not one way. .. literalinclude:: migration.queries - :start-after: --withpointsdd6 - :end-before: --withpointsdd7 + :start-after: --OneWay2 + :end-before: --OneWay3 -To get results from previous versions: +Migration of ``pgr_analyzeGraph`` +------------------------------------------------------------------------------- -* Filter out the additional columns -* When ``details => false`` to remove the points use ``WHERE node >= 0 OR cost = - 0`` +:Deprecated: `v3.8.0 `__ +:Removed: `v4.0.0 `__ -.. literalinclude:: migration.queries - :start-after: --withpointsdd7 - :end-before: --withpointsdd8 +**Before Deprecation:** The following was calculated: + +* Number of isolated segments. +* Number of dead ends. +* Number of potential gaps found near dead ends. +* Number of intersections. (between 2 edges) + +WHERE + +:Graph component: A connected subgraph that is not part of any larger connected + subgraph. +:Isolated segment: A graph component with only one segment. +:Dead ends: A vertex that participates in only one edge. +:gaps: Space between two geometries. +:Intersection: Is a topological relationship between two geometries. -Migration of ``pgr_withPointsKSP`` -------------------------------------------------------------------------------- +.. rubric:: Migration. -Starting from `v3.6.0 `__ -:doc:`pgr_withPointsKSP` result columns are being standardized. +.. rubric:: Components. -:from: |ksp-result| -:from: |nksp-result| +Instead of counting only isolated segments, determine all the components of the +graph. -And ``driving side`` parameter changed from named optional to unnamed compulsory -**driving side** and its validity differ for directed and undirected graphs. +Depending of the final application requirements use: -Signatures to be migrated: +* :doc:`pgr_connectedComponents` +* :doc:`pgr_strongComponents` +* :doc:`pgr_biconnectedComponents` -* ``pgr_withPointsKSP`` (`One to One`) +For example: -:Before Migration: +.. literalinclude:: migration.queries + :start-after: --analysis1 + :end-before: --analysis2 -* Output columns were |old-pid-result| +.. rubric:: Dead ends. - * the columns ``start_vid`` and ``end_vid`` do not exist. +Instead of counting the dead ends, determine all the dead ends of the graph +using :doc:`pgr_degree`. +For example: -:Migration: +.. literalinclude:: migration.queries + :start-after: --analysis2 + :end-before: --analysis3 -* Be aware of the existence of the additional result Columns. -* New output columns are |nksp-result| -* **driving side** parameter is unnamed compulsory, and valid values differ for - directed and undirected graphs. +.. rubric:: Potential gaps near dead ends. - * Does not have a default value. - * In directed graph: valid values are [``r``, ``R``, ``l``, ``L``] - * In undirected graph: valid values are [``b``, ``B``] - * Using an invalid value throws an ``ERROR``. +Instead of counting potential gaps between geometries, determine the geometric +gaps in the graph using :doc:`pgr_findCloseEdges`. -``pgr_withPointsKSP`` (`One to One`) -............................................................................... +For example: -Using -`this `__ -example. +.. literalinclude:: migration.queries + :start-after: --analysis3 + :end-before: --analysis4 -* ``start_vid`` contains the **start vid** parameter value. -* ``end_vid`` contains the **end vid** parameter value. +.. rubric:: Topological relationships. -.. literalinclude:: migration.queries - :start-after: --withPointsKSP1 - :end-before: --withPointsKSP2 +Instead of counting intersections, determine topological relationships between +geometries. -If needed filter out the additional columns, for example, to return the original -columns: +Several PostGIS functions can be used: +`ST_Intersects `__, +`ST_Crosses `__, +`ST_Overlaps `__, etc. -.. literalinclude:: migration.queries - :start-after: --withPointsKSP2 - :end-before: --withPointsKSP3 +For example: +.. literalinclude:: migration.queries + :start-after: --analysis4 + :end-before: --analysis5 Migration of ``pgr_trsp`` (Vertices) ------------------------------------------------------------------------------- @@ -987,6 +1236,7 @@ Signature: RETURNS SETOF (seq, id1, id2, cost) :Deprecated: `v3.4.0 `__ +:Removed: `v4.0.0 `__ .. contents:: :local: @@ -1047,6 +1297,7 @@ Signature: RETURNS SETOF (seq, id1, id2, cost) :Deprecated: `v3.4.0 `__ +:Removed: `v4.0.0 `__ .. contents:: :local: @@ -1057,42 +1308,6 @@ Signature: - :doc:`pgr_trsp_withPoints` - `Migration of restrictions`_ -Use ``pgr_withPoints`` when there are no restrictions. -............................................................................... - -Use :doc:`pgr_withPoints` (One to One) instead. - -.. literalinclude:: migration.queries - :start-after: --edgesv2 - :end-before: --edgesv3 - -To get the original column names: - -.. literalinclude:: migration.queries - :start-after: --edgesv3 - :end-before: --edgesv4 - -* ``id1`` is the node -* ``id2`` is the edge - -Use ``pgr_trsp_withPoints`` when there are restrictions. -............................................................................... - -Use :doc:`pgr_trsp_withPoints` instead. - -.. literalinclude:: migration.queries - :start-after: --edgesv5 - :end-before: --edgesv6 - -To get the original column names: - -.. literalinclude:: migration.queries - :start-after: --edgesv6 - :end-before: --edgesv7 - -* ``id1`` is the node -* ``id2`` is the edge - Migration of ``pgr_trspViaVertices`` ------------------------------------------------------------------------------- @@ -1106,6 +1321,7 @@ Signature: RETURNS SETOF (seq, id1, id2, id3, cost) :Deprecated: `v3.4.0 `__ +:Removed: `v4.0.0 `__ .. contents:: :local: @@ -1168,6 +1384,7 @@ Signature: RETURNS SETOF (seq, id1, id2, id3, cost) :Deprecated: `v3.4.0 `__ +:Removed: `v4.0.0 `__ .. contents:: :local: @@ -1217,15 +1434,165 @@ To get the original column names: * ``id2`` is the node * ``id3`` is the edge -Migration of restrictions +Not yet classified migrations ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Migration of ``pgr_withPointsKSP`` +------------------------------------------------------------------------------- + +Starting from `v3.6.0 `__ +:doc:`pgr_withPointsKSP` result columns are being standardized. + +:from: |ksp-result| +:to: |generic-result| + +And ``driving side`` parameter changed from named optional to unnamed +**driving side** and its validity differ for directed and undirected graphs. + +Signatures to be migrated: + +* ``pgr_withPointsKSP`` (`One to One`) + +:Before Migration: + +* Output columns were |old-pid-result| + + * the columns ``start_vid`` and ``end_vid`` do not exist. + + +:Migration: + +* Be aware of the existence of the additional result Columns. +* New output columns are |generic-result| + +.. note:: Default value of **driving side** parameter + + **driving side** parameter is unnamed, and valid values differ for + directed and undirected graphs. + + * In directed graph: valid values are [``r``, ``R``, ``l``, ``L``] + + * Default value = 'r'; + + * In undirected graph: valid values are [``b``, ``B``] + + * Default value = 'b'; + +``pgr_withPointsKSP`` (`One to One`) +............................................................................... + +Using +`this `__ +example. + +* ``start_vid`` contains the **start vid** parameter value. +* ``end_vid`` contains the **end vid** parameter value. + +.. literalinclude:: migration.queries + :start-after: --withPointsKSP1 + :end-before: --withPointsKSP2 + +If needed filter out the additional columns, for example, to return the original +columns: + +.. literalinclude:: migration.queries + :start-after: --withPointsKSP2 + :end-before: --withPointsKSP3 + + +Use ``pgr_withPoints`` when there are no restrictions. +............................................................................... + +Use :doc:`pgr_withPoints` (One to One) instead. + +.. literalinclude:: migration.queries + :start-after: --edgesv2 + :end-before: --edgesv3 + +To get the original column names: + +.. literalinclude:: migration.queries + :start-after: --edgesv3 + :end-before: --edgesv4 + +* ``id1`` is the node +* ``id2`` is the edge + +Use ``pgr_trsp_withPoints`` when there are restrictions. +............................................................................... + +Use :doc:`pgr_trsp_withPoints` instead. + +.. literalinclude:: migration.queries + :start-after: --edgesv5 + :end-before: --edgesv6 + +To get the original column names: + +.. literalinclude:: migration.queries + :start-after: --edgesv6 + :end-before: --edgesv7 + +* ``id1`` is the node +* ``id2`` is the edge + +Migration of ``pgr_maxCardinalityMatch`` ------------------------------------------------------------------------------- +:doc:`pgr_maxCardinalityMatch` works only for undirected graphs, therefore the +``directed`` flag has been removed. + +Starting from `v3.4.0 `__ + +Signature to be migrated: + +.. parsed-literal:: + + pgr_maxCardinalityMatch(Edges SQL, [directed]) + RETURNS SETOF (seq, edge, source, target) + +Migration is needed, because: + +* Use ``cost`` and ``reverse_cost`` on the inner query +* Results are ordered +* Works for undirected graphs. +* New signature + + * ``pgr_maxCardinalityMatch(text)`` returns only ``edge`` column. + * The optional flag ``directed`` is removed. + +:Before migration: + +* Columns used are ``going`` and ``coming`` to represent the existence of an + edge. +* Flag ``directed`` was used to indicate if it was for a **directed** or + **undirected** graph. + + * The flag ``directed`` is ignored. + + * Regardless of it's value it gives the result considering the graph as + **undirected**. + +:Migration: + +* Use the columns ``cost`` and ``reverse_cost`` to represent the existence of an + edge. +* Do not use the flag ``directed``. +* In the query returns only ``edge`` column. + +.. literalinclude:: migration.queries + :start-after: --maxcard2 + :end-before: --maxcard3 + +Migration of restrictions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Starting from `v3.4.0 `__ The structure of the restrictions have changed: Old restrictions structure -............................................................................... +------------------------------------------------------------------------------- On the deprecated signatures: @@ -1258,7 +1625,7 @@ Old restrictions fill up :end-before: --rest1 Old restrictions contents -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +............................................................................... .. literalinclude:: migration.queries :start-after: --rest1 @@ -1279,7 +1646,7 @@ The restriction with ``rid = 2`` is representing :math:`3 \rightarrow 5 New restrictions structure -............................................................................... +------------------------------------------------------------------------------- * Column ``id`` is ignored * Column ``path`` @@ -1332,10 +1699,9 @@ The migrated table contents: See Also -------------------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -* :doc:`TRSP-family` -* :doc:`withPoints-category` +* :doc:`pgRouting-concepts` .. rubric:: Indices and tables diff --git a/doc/src/pgRouting-concepts.rst b/doc/src/pgRouting-concepts.rst index ed471beb9cf..ec504a0b6c0 100644 --- a/doc/src/pgRouting-concepts.rst +++ b/doc/src/pgRouting-concepts.rst @@ -1530,136 +1530,26 @@ Result columns There are several kinds of columns returned are depending of the function. -Result columns for a path +Result columns for single path functions ............................................................................... -.. rubric:: Used in functions that return one path solution - -.. return_path_short_start - -Returns set of ``(seq, path_seq [, start_vid] [, end_vid], node, edge, cost, -agg_cost)`` - -.. list-table:: - :width: 81 - :widths: 12 14 60 - :header-rows: 1 - - * - Column - - Type - - Description - * - ``seq`` - - ``INTEGER`` - - Sequential value starting from **1**. - * - ``path_seq`` - - ``INTEGER`` - - Relative position in the path. Has value **1** for the beginning of a - path. - * - ``start_vid`` - - ``BIGINT`` - - Identifier of the starting vertex. - Returned when multiple starting vetrices are in the query. - - * `Many to One`_ - * `Many to Many`_ - * - ``end_vid`` - - ``BIGINT`` - - Identifier of the ending vertex. - Returned when multiple ending vertices are in the query. - - * `One to Many`_ - * `Many to Many`_ - * - ``node`` - - ``BIGINT`` - - Identifier of the node in the path from ``start_vid`` to ``end_vid``. - * - ``edge`` - - ``BIGINT`` - - Identifier of the edge used to go from ``node`` to the next node in the - path sequence. **-1** for the last node of the path. - * - ``cost`` - - ``FLOAT`` - - Cost to traverse from ``node`` using ``edge`` to the next node in the - path sequence. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from ``start_vid`` to ``node``. - -.. return_path_short_end - -.. rubric:: Used in functions the following: - -* :doc:`pgr_withPoints` - - -.. return_withpoint_path_short_start - -Returns set of ``(seq, path_seq [, start_pid] [, end_pid], node, edge, cost, -agg_cost)`` - -.. list-table:: - :width: 81 - :widths: 12 14 60 - :header-rows: 1 - - * - Column - - Type - - Description - * - ``seq`` - - ``INTEGER`` - - Sequential value starting from **1**. - * - ``path_seq`` - - ``INTEGER`` - - Relative position in the path. - - * **1** For the first row of the path. - * - ``start_pid`` - - ``BIGINT`` - - Identifier of a starting vertex/point of the path. - - * When positive is the identifier of the starting vertex. - * When negative is the identifier of the starting point. - * Returned on `Many to One`_ and `Many to Many`_ - * - ``end_pid`` - - ``BIGINT`` - - Identifier of an ending vertex/point of the path. - - * When positive is the identifier of the ending vertex. - * When negative is the identifier of the ending point. - * Returned on `One to Many`_ and `Many to Many`_ - * - ``node`` - - ``BIGINT`` - - Identifier of the node in the path from ``start_pid`` to ``end_pid``. - - * When positive is the identifier of the a vertex. - * When negative is the identifier of the a point. - * - ``edge`` - - ``BIGINT`` - - Identifier of the edge used to go from ``node`` to the next node in the - path sequence. - - * **-1** for the last row of the path. - * - ``cost`` - - ``FLOAT`` - - Cost to traverse from ``node`` using ``edge`` to the next node in the - path sequence. - - * **0** For the first row of the path. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from ``start_vid`` to ``node``. - - * **0** For the first row of the path. - -.. return_withpoint_path_short_end - - -.. rubric:: Used in functions the following: +Used in functions that return one path solution per departure and destination. +* :doc:`pgr_aStar` +* :doc:`pgr_bdAstar` +* :doc:`pgr_bdDijkstra` +* :doc:`pgr_bellmanFord` +* :doc:`pgr_binaryBreadthFirstSearch` +* :doc:`pgr_dijkstra` * :doc:`pgr_dijkstraNear` +* :doc:`pgr_edwardMoore` +* :doc:`pgr_trsp` +* :doc:`pgr_trsp_withPoints` +* :doc:`pgr_withPoints` .. return_path_complete_start -Returns ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` +Returns |short-generic-result| .. list-table:: :width: 81 @@ -1699,84 +1589,24 @@ Returns ``(seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)`` .. return_path_complete_end -Multiple paths -............................................................................... - -Selective for multiple paths. -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -The columns depend on the function call. - -.. return_path_start - -Set of ``(seq, path_id, path_seq [, start_vid] [, end_vid], node, edge, cost, -agg_cost)`` - -.. list-table:: - :width: 81 - :widths: 12 14 60 - :header-rows: 1 - - * - Column - - Type - - Description - * - ``seq`` - - ``INTEGER`` - - Sequential value starting from **1**. - * - ``path_id`` - - ``INTEGER`` - - Path identifier. - - * Has value **1** for the first of a path from ``start_vid`` to - ``end_vid``. - * - ``path_seq`` - - ``INTEGER`` - - Relative position in the path. Has value **1** for the beginning of a - path. - * - ``start_vid`` - - ``BIGINT`` - - Identifier of the starting vertex. - Returned when multiple starting vetrices are in the query. - - * `Many to One`_ - * `Many to Many`_ - * `Combinations`_ - * - ``end_vid`` - - ``BIGINT`` - - Identifier of the ending vertex. - Returned when multiple ending vertices are in the query. - - * `One to Many`_ - * `Many to Many`_ - * `Combinations`_ - * - ``node`` - - ``BIGINT`` - - Identifier of the node in the path from ``start_vid`` to ``end_vid``. - * - ``edge`` - - ``BIGINT`` - - Identifier of the edge used to go from ``node`` to the next node in the - path sequence. **-1** for the last node of the path. - * - ``cost`` - - ``FLOAT`` - - Cost to traverse from ``node`` using ``edge`` to the next node in the - path sequence. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from ``start_vid`` to ``node``. +.. Note:: + When ``start_vid`` or ``end_vid`` columns have negative values, the identifier is for + a Point. -.. return_path_end +.. return_path_withPoints_end -Non selective for multiple paths -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Result columns for multiple paths functions +............................................................................... -Regardless of the call, al the columns are returned. +Used in functions that return many paths solutions per departure and destination. -* :doc:`pgr_trsp` +* :doc:`pgr_KSP` +* :doc:`pgr_withPointsKSP` +* :doc:`pgr_edgeDisjointPaths` .. return_path_all_columns_start -Returns set of ``(seq, path_id, path_seq, start_vid, end_vid, node, edge, cost, -agg_cost)`` +Returns set of |generic-result| .. list-table:: :width: 81 @@ -1822,10 +1652,16 @@ agg_cost)`` .. return_path_all_columns_end +.. Note:: + When ``start_vid`` or ``end_vid`` columns have negative values, the identifier is for + a Point. + +.. return_path_all_columns_withPoints_end + Result columns for cost functions ............................................................................... -.. rubric:: Used in the following +Used by: * :doc:`cost-category` * :doc:`costMatrix-category` @@ -1866,7 +1702,7 @@ Set of |matrix-result| Result columns for flow functions ............................................................................... -.. rubric:: Edges SQL for the following +Used by: * :doc:`flow-family` @@ -1885,7 +1721,71 @@ Result columns for flow functions Result columns for spanning tree functions ............................................................................... -.. rubric:: Edges SQL for the following +Used in functions that return a tree solution per departure. + +* :doc:`pgr_breadthFirstSearch` +* :doc:`pgr_depthFirstSearch` +* :doc:`pgr_drivingDistance` +* :doc:`pgr_kruskalBFS` +* :doc:`pgr_kruskalDD` +* :doc:`pgr_kruskalDFS` +* :doc:`pgr_primBFS` +* :doc:`pgr_primDD` +* :doc:`pgr_primDFS` +* :doc:`pgr_withPointsDD` + +.. spantree-result-columns-start + +Returns set of |result-spantree| + +.. list-table:: + :width: 81 + :widths: auto + :header-rows: 1 + + * - Parameter + - Type + - Description + * - ``seq`` + - ``BIGINT`` + - Sequential value starting from :math:`1`. + * - ``depth`` + - ``BIGINT`` + - Depth of the ``node``. + + - :math:`0` when ``node`` = ``start_vid``. + - :math:`depth-1` is the depth of ``pred`` + + * - ``start_vid`` + - ``BIGINT`` + - Identifier of the root vertex. + * - ``pred`` + - ``BIGINT`` + - Predecessor of ``node``. + + - When ``node`` = ``start_vid`` then has the value ``node``. + * - ``node`` + - ``BIGINT`` + - Identifier of ``node`` reached using ``edge``. + * - ``edge`` + - ``BIGINT`` + - Identifier of the ``edge`` used to arrive from ``pred`` to ``node``. + + - :math:`-1` when ``node`` = ``start_vid``. + + * - ``cost`` + - ``FLOAT`` + - Cost to traverse ``edge``. + * - ``agg_cost`` + - ``FLOAT`` + - Aggregate cost from ``start_vid`` to ``node``. + +.. spantree-result-columns-end + +Result columns for simple spanning tree functions +............................................................................... + +Used by: * :doc:`pgr_prim` * :doc:`pgr_kruskal` @@ -1960,7 +1860,8 @@ How to contribute Consult the `developer's documentation `__ - +See also +---------------------------------------------------------------------- .. rubric:: Indices and tables diff --git a/doc/src/pgRouting-installation.rst b/doc/src/pgRouting-installation.rst index c081da0fc4a..405c5a21404 100644 --- a/doc/src/pgRouting-installation.rst +++ b/doc/src/pgRouting-installation.rst @@ -15,20 +15,12 @@ Installation .. rubric:: Table of Contents -* :ref:`install-short` -* :ref:`install_get_sources` -* :ref:`install_enable_db` -* :ref:`install_dependencies` -* :ref:`install_configuring` -* :ref:`install_build` -* :ref:`install_testing` - Instructions for downloading and installing binaries for different operating systems, additional notes and corrections not included in this documentation can be found in `Installation wiki `__ -To use pgRouting PostGIS needs to be installed, please read the information +To use pgRouting, PostGIS needs to be installed, please read the information about installation in this `Install Guide `__ @@ -40,14 +32,14 @@ Short Version Extracting the tar ball -.. parsed-literal:: +.. code-block:: shell tar xvfz pgrouting-${PROJECT_VERSION}.tar.gz cd pgrouting-${PROJECT_VERSION} To compile assuming you have all the dependencies in your search path: -.. parsed-literal:: +.. code-block:: shell mkdir build cd build @@ -58,15 +50,12 @@ To compile assuming you have all the dependencies in your search path: Once pgRouting is installed, it needs to be enabled in each individual database you want to use it in. -.. parsed-literal:: +.. code-block:: shell createdb routing - psql routing -c 'CREATE EXTENSION PostGIS' - psql routing -c 'CREATE EXTENSION pgRouting' + psql routing -c 'CREATE EXTENSION pgRouting CASCADE' -.. _install_get_sources: - Get the sources ------------------------------------------------------------------------------- @@ -75,7 +64,7 @@ https://github.com/pgRouting/pgrouting/releases/latest To download this release: -.. parsed-literal:: +.. code-block:: shell wget -O pgrouting-${PROJECT_VERSION}.tar.gz \ https://github.com/pgRouting/pgrouting/archive/v${PROJECT_VERSION}.tar.gz @@ -87,7 +76,7 @@ compiling pgRouting. To download the repository -.. parsed-literal:: +.. code-block:: shell git clone git://github.com/pgRouting/pgrouting.git cd pgrouting @@ -98,9 +87,6 @@ Go to :ref:`install-short` for more instructions on compiling pgRouting GitHub). - -.. _install_enable_db: - Enabling and upgrading in the database ------------------------------------------------------------------------------- @@ -110,14 +96,14 @@ pgRouting is a PostgreSQL extension and depends on PostGIS to provide functionalities to end user. Below given code demonstrates enabling PostGIS and pgRouting in the database. -.. parsed-literal:: +.. code-block:: sql CREATE EXTENSION postgis; CREATE EXTENSION pgrouting; Checking PostGIS and pgRouting version after enabling them in the database. -.. parsed-literal:: +.. code-block:: sql SELECT PostGIS_full_version(); SELECT * FROM pgr_version(); @@ -127,8 +113,6 @@ Checking PostGIS and pgRouting version after enabling them in the database. To upgrade pgRouting in the database to version ${PROJECT_VERSION} use the following command: -.. TODO: pumpup release must change this value - .. parsed-literal:: ALTER EXTENSION pgrouting UPDATE TO "${PROJECT_VERSION}"; @@ -137,8 +121,6 @@ More information can be found in https://www.postgresql.org/docs/current/sql-createextension.html -.. _install_dependencies: - Dependencies ------------------------------------------------------------------------------- @@ -149,26 +131,22 @@ met: * C and C++0x compilers - * Compiling with Boost 1.56 up to Boost 1.74 requires C++ Compiler with - C++03 or C++11 standard support - * Compiling with Boost 1.75 requires C++ Compiler with C++14 standard - support - -* Postgresql version = Supported versions by PostgreSQL -* The Boost Graph Library (BGL). Version >= 1.56 -* CMake >= 3.2 + * Compiling with Boost 1.56 up to Boost 1.74 requires C++ Compiler with + C++03 or C++11 standard support + * Compiling with Boost 1.75 requires C++ Compiler with C++14 standard + support - -.. rubric:: optional dependencies +* Postgresql version >= ${POSTGRESQL_MINIMUM_VERSION} +* The Boost Graph Library (BGL) >= ${BOOST_MINIMUM_VERSION} +* CMake >= ${CMAKE_MINIMUM_REQUIRED_VERSION} For user's documentation -* Sphinx >= 1.1 -* Latex +* Sphinx >= ${SPHINX_MINIMUM_VERSION} For developer's documentation -* Doxygen >= 1.7 +* Doxygen >= ${DOXYGEN_MINIMUM_VERSION} For testing @@ -177,170 +155,72 @@ For testing For using: -* PostGIS version >= 2.2 +* PostGIS version >= ${POSTGIS_MINIMUM_VERSION} .. rubric:: Example: Installing dependencies on linux Installing the compilation dependencies -.. rubric:: Database dependencies - -.. parsed-literal:: - - sudo apt install postgresql-15 - sudo apt install postgresql-server-dev-15 - sudo apt install postgresql-15-postgis - -.. rubric:: Configuring PostgreSQL - -Entering psql console - -.. parsed-literal:: - - sudo systemctl start postgresql.service - sudo -i -u postgres - psql - -To exit psql console - -.. parsed-literal:: - - \q - -Entering psql console directly without switching roles can be done by the -following commands - -.. parsed-literal:: - - sudo -u postgres psql - -Then use the above given method to exit out of the psql console - -Checking PostgreSQL version - -.. parsed-literal:: - - psql --version - -or - -Enter the psql console using above given method and then enter - -.. parsed-literal:: - - SELECT VERSION(); - -Creating PostgreSQL role - -.. parsed-literal:: - - sudo -i -u postgres - createuser --interactive - -or - -.. parsed-literal:: - - sudo -u postgres createuser --interactive - -Default role provided by PostgreSQL is postgres. To create new roles you -can use the above provided commands. The prompt will ask the user to type -name of the role and then provide affirmation. Proceed with the steps and -you will succeed in creating PostgreSQL role successfully. - -To add password to the role or change previously created password of the -role use the following commands - -.. parsed-literal:: - - ALTER USER PASSWORD - -To get additional details on the flags associated with ``createuser`` below -given command can be used - -.. parsed-literal:: - - man createuser - -Creating Database in PostgreSQL - -.. parsed-literal:: - - sudo -i -u postgres - createdb - -or - -.. parsed-literal:: - - sudo -u postgres createdb - -Connecting to a PostgreSQL Database - -Enter the psql console and type the following commands - -.. parsed-literal:: - - \connect - .. rubric:: Build dependencies -.. parsed-literal:: +.. code-block:: bash - sudo apt install cmake - sudo apt install g++ - sudo apt install libboost-graph-dev + sudo apt install \ + build-essential \ + libboost-graph-dev \ + postgresql-${POSTGRESQL_MINIMUM_VERSION} \ + postgresql-server-dev-${POSTGRESQL_MINIMUM_VERSION} \ + postgresql-${POSTGRESQL_MINIMUM_VERSION}-postgis .. rubric:: Optional dependencies -For documentation and testing +For documentation -.. parsed-literal:: +.. code-block:: bash - pip install sphinx - pip install sphinx-bootstrap-theme - sudo apt install texlive - sudo apt install doxygen - sudo apt install libtap-parser-sourcehandler-pgtap-perl - sudo apt install postgresql-15-pgtap + sudo apt-get install -y \ + python3-sphinx \ + python3-sphinx-bootstrap-theme \ + texlive \ + doxygen +For testing -.. _install_configuring: +.. code-block:: bash + + sudo apt install \ + libtap-parser-sourcehandler-pgtap-perl + postgresql-${POSTGRESQL_MINIMUM_VERSION}-pgtap Configuring ------------------------------------------------------------------------------- pgRouting uses the `cmake` system to do the configuration. -The build directory is different from the source directory - -Create the build directory - -.. parsed-literal:: - - $ mkdir build - Configurable variables ............................................................................... .. rubric:: To see the variables that can be configured -.. parsed-literal:: +.. code-block:: bash - $ cd build - $ cmake -L .. + mkdir build + cd build + cmake -L .. +The build directory is different from the source directory .. rubric:: Configuring The Documentation +User and developers documentation are not build if prerequisites are not found. + Most of the effort of the documentation has been on the HTML files. Some variables for building documentation: ================== ========= ============================ Variable Default Comment ================== ========= ============================ -WITH_DOC BOOL=OFF Turn on/off building the documentation BUILD_HTML BOOL=ON If ON, turn on/off building HTML for user's documentation BUILD_DOXY BOOL=ON If ON, turn on/off building HTML for developer's @@ -349,55 +229,34 @@ BUILD_LATEX BOOL=OFF If ON, turn on/off building PDF BUILD_MAN BOOL=OFF If ON, turn on/off building MAN pages DOC_USE_BOOTSTRAP BOOL=OFF If ON, use sphinx-bootstrap for HTML pages of the users documentation +EN BOOL=ON if OFF the English documentation will no be built +ES BOOL=ON if OFF the Spanish documentation will no be built +SV BOOL=ON if OFF the Swedish documentation will no be built +ZH_HANS BOOL=ON if OFF the Chinese simplified documentation will no + be built ================== ========= ============================ -Configuring cmake to create documentation before building -pgRouting - -.. parsed-literal:: - - $ cmake -DWITH_DOC=ON -DDOC_USE_BOOTSTRAP=ON .. - -.. note:: Most of the effort of the documentation has been on the html files. - - -.. _install_build: - Building ------------------------------------------------------------------------------- Using ``make`` to build the code and the documentation -The following instructions start from *path/to/pgrouting/build* +The following instructions start from ``path/to/pgrouting/build`` .. parsed-literal:: - $ make # build the code but not the documentation + $ make # default build $ make doc # build only the user's documentation - $ make all doc # build both the code and the user's documentation $ make doxy # build only the developer's documentation + $ make all # build both the code and the user's documentation We have tested on several platforms, For installing or reinstalling all the steps are needed. -.. warning:: - The sql signatures are configured and build in the ``cmake`` command. - -.. rubric:: MinGW on Windows - -.. parsed-literal:: - - $ mkdir build - $ cd build - $ cmake -G"MSYS Makefiles" .. - $ make - $ make install - - .. rubric:: Linux -The following instructions start from *path/to/pgrouting* +The following instructions start from ``path/to/pgrouting`` .. parsed-literal:: @@ -407,25 +266,14 @@ The following instructions start from *path/to/pgrouting* make sudo make install -To remove the build when the configuration changes, use the following -code: - -.. parsed-literal:: - - rm -rf build - -and start the build process as mentioned previously. - -.. _install_testing: - Testing ------------------------------------------------------------------------------- Currently there is no :code:`make test` and testing is done as follows -The following instructions start from *path/to/pgrouting/* +The following instructions start from ``path/to/pgrouting`` -.. parsed-literal:: +.. code-block:: bash tools/testers/doc_queries_generator.pl createdb -U ___pgr___test___ @@ -439,5 +287,3 @@ See Also * :ref:`genindex` * :ref:`search` - - diff --git a/doc/src/pgRouting-introduction.rst b/doc/src/pgRouting-introduction.rst index e9e2a54d54e..e2f965584dc 100644 --- a/doc/src/pgRouting-introduction.rst +++ b/doc/src/pgRouting-introduction.rst @@ -63,11 +63,13 @@ Contributors This Release Contributors +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Individuals in this release v3.8.x (in alphabetical order) +Individuals in this release v4.0.0 (in alphabetical order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Aurélie Bousquet, +Bipasha Gayary, +Fan Wu, Regina Obe, +Saloni kumari, Vicky Vergara @@ -78,7 +80,18 @@ pgRouting, pgRoutingLayer, workshop. Translators (in alphabetical order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Dapeng Wang +Chinese: + +- Dapeng Wang + +Spanish: + +- Vicky Vergara + +Swedish: + +- Daniel Nylander + Corporate Sponsors in this release (in alphabetical order) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -110,6 +123,7 @@ Aryan Gupta, Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, +Bipasha Gayary, Cayetano Benavent, Christian Gonzalez, Daniel Kastl, @@ -119,6 +133,7 @@ David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, +Fan Wu, Florian Thurkow, Frederic Junod, Gerald Fenoy, @@ -145,6 +160,7 @@ Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, +Saloni Kumari, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, diff --git a/doc/src/proposed.rst b/doc/src/proposed.rst index f790b882839..69b58bf4be1 100644 --- a/doc/src/proposed.rst +++ b/doc/src/proposed.rst @@ -15,17 +15,14 @@ Proposed Functions .. warning-begin -.. collapse:: Proposed +.. admonition:: Proposed .. warning:: Proposed functions for next mayor release. - They are not officially in the current release. - - They will likely officially be part of the next mayor release: - - The functions make use of ANY-INTEGER and ANY-NUMERICAL - - Name might not change. (But still can) - - Signature might not change. (But still can) - - Functionality might not change. (But still can) + - Code has been reviewed therefore is not experimental. + - Name, signature and functionality might not change. - pgTap tests have being done. But might need more. - Documentation might need refinement. @@ -33,29 +30,6 @@ Proposed Functions .. rubric:: Families -:doc:`dijkstra-family` - -.. include:: dijkstra-family.rst - :start-after: proposed-start - :end-before: proposed-end - -:doc:`withPoints-family` - -.. include:: withPoints-family.rst - :start-after: proposed-start - :end-before: proposed-end - -:doc:`TRSP-family` - -.. include:: TRSP-family.rst - :start-after: proposed-start - :end-before: proposed-end - -.. toctree:: - :hidden: - - TRSP-family - :doc:`transformation-family` .. include:: transformation-family.rst @@ -77,14 +51,8 @@ Proposed Functions :doc:`traversal-family` .. include:: traversal-family.rst - :start-after: official-start - :end-before: official-end - -.. toctree:: - :hidden: - - traversal-family - coloring-family + :start-after: proposed-start + :end-before: proposed-end .. rubric:: categories @@ -94,44 +62,6 @@ Proposed Functions :start-after: proposed-start :end-before: proposed-end -:doc:`costMatrix-category` - -.. include:: costMatrix-category.rst - :start-after: proposed-start - :end-before: proposed-end - -:doc:`drivingDistance-category` - -.. include:: drivingDistance-category.rst - :start-after: proposed-start - :end-before: proposed-end - -:doc:`KSP-category` - -.. include:: KSP-category.rst - :start-after: proposed-start - :end-before: proposed-end - -:doc:`via-category` - -.. include:: via-category.rst - :start-after: proposed start - :end-before: proposed end - -:doc:`withPoints-category` - -.. include:: withPoints-category.rst - :start-after: proposed start - :end-before: proposed end - -.. toctree:: - :hidden: - - withPoints-family - KSP-category - via-category - withPoints-category - See Also ------------------------------------------------------------------------------- diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index c06965bea52..3c6028caad9 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -20,6 +20,618 @@ To see the full list of changes check the list of `Git commits :local: :depth: 1 +pgRouting 4 +******************************************************************************* + +.. contents:: Minors 4.x + :local: + :depth: 1 + +pgRouting 4.0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +.. contents:: Contents + :local: + :depth: 1 + +.. current + +pgRouting 4.0.0-alpha1 Release Notes +------------------------------------------------------------------------------- + +To see all issues & pull requests closed by this release see the +:milestone:`4.0.0` + +.. contents:: Contents + :local: + :depth: 1 + +Build +............................................................................... + +* C++ standard is std17 + + * Using this standard, all supported toolchains across our CI matrix will work. + * The code is not yet modified to use std17: + + * If needed: ``-DCMAKE_CXX_STANDARD=14`` to lower the standard. + +* The user's documentation is built by default. +* The doxygen documentation is built by default. + +For developers: + +* Set `-DUSE_CLANG_TIDY=ON` for clang tidy checks. +* Tidy checks are done on CI. + +Documentation build +............................................................................... + +* The doxygen documentation is built by default +* The HTML documentation is built by default +* The translated languages (en, es, sv, zh_Hans) HTML documentation are built by + default +* `WITH-DOC` is not used anymore + +User Documentation is not built when + +* Sphinx is not found +* When all Sphinx formats are OFF + + * To not build HTML default format: `-DBUILD_HTML=OFF` + +* When all languages are OFF + + * To build only English: `-DES=OFF -DSV=OFF -DZH_HANS=OFF` + +* Documentation output location: ``build/doc/_build/`` + + * For example: for HTML output is on `build/doc/_build/html` directory + +Developers' Documentation is not built when + +* Doxygen is not found +* To not build Doxygen documentation: `-DBUILD_DOXY=OFF` + +Summary of changes by function +............................................................................... + +* pgr_aStar + + .. include:: pgr_aStar.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_aStarCost + + .. include:: pgr_aStarCost.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bandwidth + + .. include:: pgr_bandwidth.rst + :start-after: Version 4.0.0 + :end-before: Description + +* pgr_bdAstar + + .. include:: pgr_bdAstar.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bdAstarCost + + .. include:: pgr_bdAstarCost.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bdDijkstra + + .. include:: pgr_bdDijkstra.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bdDijkstraCost + + .. include:: pgr_bdDijkstraCost.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bellmanFord + + .. include:: pgr_bellmanFord.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_binaryBreadthFirstSearch + + .. include:: pgr_binaryBreadthFirstSearch.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_bipartite + + .. include:: pgr_bipartite.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_boykovKolmogorov + + .. include:: pgr_boykovKolmogorov.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_breadthFirstSearch + + .. include:: pgr_breadthFirstSearch.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_contraction + + .. include:: pgr_contraction.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_dagShortestPath + + .. include:: pgr_dagShortestPath.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_depthFirstSearch + + .. include:: pgr_depthFirstSearch.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_dijkstra + + .. include:: pgr_dijkstra.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_dijkstraCost + + .. include:: pgr_dijkstraCost.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_edgeColoring + + .. include:: pgr_edgeColoring.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_edgeDisjointPaths + + .. include:: pgr_edgeDisjointPaths.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_edmondsKarp + + .. include:: pgr_edmondsKarp.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_edwardMoore + + .. include:: pgr_edwardMoore.rst + :start-after: Version 4.0.0 + :end-before: Description + +* pgr_kingOrdering + + .. include:: pgr_kingOrdering.rst + :start-after: Version 4.0.0 + :end-before: Description + +* pgr_KSP + + .. include:: pgr_KSP.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_maxFlow + + .. include:: pgr_maxFlow.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_pushRelabel + + .. include:: pgr_pushRelabel.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_sloanOrdering + + .. include:: pgr_sloanOrdering.rst + :start-after: Version 4.0.0 + :end-before: Description + +* pgr_sequentialVertexColoring + + .. include:: pgr_sequentialVertexColoring.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_topologicalSort + + .. include:: pgr_topologicalSort.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_transitiveClosure + + .. include:: pgr_transitiveClosure.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_trsp + + .. include:: pgr_trsp.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_trspVia + + .. include:: pgr_trspVia.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_trspVia_withPoints + + .. include:: pgr_trspVia_withPoints.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_trsp_withPoints + + .. include:: pgr_trsp_withPoints.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_turnRestrictedPath + + .. include:: pgr_turnRestrictedPath.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPoints + + .. include:: pgr_withPoints.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPointsCost + + .. include:: pgr_withPointsCost.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPointsCostMatrix + + .. include:: pgr_withPointsCostMatrix.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPointsDD + + .. include:: pgr_withPointsDD.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPointsKSP + + .. include:: pgr_withPointsKSP.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +* pgr_withPointsVia + + .. include:: pgr_withPointsVia.rst + :start-after: Version 4.0.0 + :end-before: .. rubric + +Functions promoted to official +............................................................................... + +* :issue:`2701`: pgr_trsp +* :issue:`2701`: pgr_trspVia +* :issue:`2701`: pgr_trspVia_withPoints +* :issue:`2701`: pgr_trsp_withPoints +* :issue:`2700`: pgr_withPoints +* :issue:`2700`: pgr_withPointsCost +* :issue:`2700`: pgr_withPointsCostMatrix +* :issue:`2700`: pgr_withPointsDD +* :issue:`2700`: pgr_withPointsKSP +* :issue:`2700`: pgr_withPointsVia + +Signatures promoted to official +............................................................................... + +* :issue:`2718`: pgr_aStar(Combinations) +* :issue:`2718`: pgr_aStarCost(Combinations) +* :issue:`2718`: pgr_bdAstar(Combinations) +* :issue:`2718`: pgr_bdAstarCost(Combinations) +* :issue:`2718`: pgr_bdDijkstra(Combinations) +* :issue:`2718`: pgr_bdDijkstraCost(Combinations) +* :issue:`2718`: pgr_dijkstra(Combinations) +* :issue:`2718`: pgr_dijkstraCost(Combinations) +* :issue:`2718`: pgr_KSP(All signatures) +* :issue:`2718`: pgr_boykovKolmogorov(Combinations) +* :issue:`2718`: pgr_edmondsKarp(Combinations) +* :issue:`2718`: pgr_maxFlow(Combinations) +* :issue:`2718`: pgr_pushRelabel(Combinations) + +New experimental functions. +............................................................................... + +* Metrics + + * :issue:`2951`: pgr_bandwidth + +* Ordering + + * :issue:`2954`: pgr_kingOrdering + * :issue:`2955`: pgr_sloanOrdering + +SQL signatures and output standardization +............................................................................... + +:issue:`2904`: Standardize output columns of functions with different output + columns within overloads + +.. rubric:: Standardized to |short-generic-result| + +* :issue:`2905`: pgr_withPoints +* :issue:`2906`: pgr_bdDijkstra +* :issue:`2907`: pgr_bellmanFord +* :issue:`2908`: pgr_binaryBreadthFirstSearch +* :issue:`2910`: pgr_edwardMoore +* :issue:`2913`: pgr_dagShortestPath + +.. rubric:: Standardized to |matrix-result| + +* :issue:`2905`: pgr_withPointsCost +* :issue:`2905`: pgr_withPointsCostMatrix + +.. rubric:: Standardized to |generic-result| + +* :issue:`2909`: pgr_edgeDisjointPaths +* :issue:`2909`: pgr_turnRestrictedPath + +.. rubric:: Standardized to |result_edge_color| + +* :issue:`2924`: pgr_edgeColoring + +.. rubric:: Standardized to |result_node_color| + +* :issue:`2924`: pgr_bipartite +* :issue:`2927`: pgr_sequentialVertexColoring + +.. rubric:: Standardized to |result-spantree| + +* :issue:`2931`: pgr_breadthFirstSearch +* :issue:`2931`: pgr_depthFirstSearch + +.. rubric:: Standardized to |result_node_order| + +* :issue:`2934`: pgr_topologicalSort + +.. rubric:: Standardized to |result-closure| + +* :issue:`2934`: pgr_transitiveClosure + +Removal of SQL deprecated signatures +............................................................................... + +* :issue:`2798`: pgr_contraction + + .. include:: pgr_contraction.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2683`: pgr_trsp + + .. include:: pgr_trsp.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2683`: pgr_trspVia + + .. include:: pgr_trspVia.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2700`: pgr_withPointsVia + + .. include:: pgr_withPointsVia.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2888`: pgr_findCloseEdges + + * pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean) + * pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean) + +* :issue:`2890`: pgr_withPointsDD + + .. include:: pgr_withPointsDD.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2895`: pgr_withPointsKSP + + .. include:: pgr_withPointsKSP.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2899`: pgr_maxCardinalityMatch + + .. include:: pgr_maxCardinalityMatch.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2901`: pgr_TSP + + .. include:: pgr_TSP.rst + :start-after: Breaking change + :end-before: .. rubric + +* :issue:`2901`: pgr_TSPeuclidean + + .. include:: pgr_TSPeuclidean.rst + :start-after: Breaking change + :end-before: .. rubric + + +Removal of SQL deprecated functions +............................................................................... + +* :issue:`2681`: pgr_trspViaedges +* :issue:`2682`: pgr_trspViaVertices +* :issue:`2748`: pgr_alphaShape +* :issue:`2751`: pgr_createTopology +* :issue:`2752`: pgr_analyzeGraph +* :issue:`2755`: pgr_analyzeOneWay +* :issue:`2827`: pgr_createVerticesTable +* :issue:`2886`: pgr_nodeNetwork + +Removal of SQL deprecated internal functions +............................................................................... + +* :issue:`2748` _pgr_alphaShape(text,double precision) +* :issue:`2861` _pgr_checkVertTab(text,text[],integer,text) +* :issue:`2861` _pgr_createIndex(text,text,text,integer,text) +* :issue:`2861` _pgr_createIndex(text,text,text,text,integer,text) +* :issue:`2913` _pgr_dagShortestPath(text,anyarray,anyarray,boolean,boolean) +* :issue:`2913` _pgr_dagShortestPath(text,text,boolean,boolean) +* :issue:`2730` _pgr_dijkstraNear(text,anyarray,anyarray,bigint,boolean) +* :issue:`2730` _pgr_dijkstraNear(text,anyarray,bigint,bigint,boolean) +* :issue:`2730` _pgr_dijkstraNear(text,bigint,anyarray,bigint,boolean) +* :issue:`2730` _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint) +* :issue:`2730` _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint,boolean) +* :issue:`2730` _pgr_dijkstra(text,text,boolean,boolean,bigint,boolean) +* :issue:`2730` _pgr_dijkstra(text,text,boolean,boolean,boolean) +* :issue:`2735` _pgr_drivingDistance(text,anyarray,double precision,boolean,boolean) +* :issue:`2861` _pgr_endPoint(geometry) +* :issue:`2861` __pgr_getColumnName(text,text,integer,text) +* :issue:`2861` __pgr_getColumnName(text,text,text,integer,text) +* :issue:`2861` __pgr_getColumnType(text,text,integer,text) +* :issue:`2861` __pgr_getColumnType(text,text,text,integer,text) +* :issue:`2861` __pgr_getTableName(text,integer,text) +* :issue:`2861` _pgr_isColumnIndexed(text,text,integer,text) +* :issue:`2861` _pgr_isColumnIndexed(text,text,text,integer,text) +* :issue:`2861` _pgr_isColumnIntable(text,text) +* :issue:`2745` _pgr_kruskal(text,anyarray,text,bigint,double precision) +* :issue:`2897` _pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean,boolean) +* :issue:`2897` _pgr_ksp(text,bigint,bigint,integer,boolean,boolean) +* :issue:`2897` _pgr_ksp(text,text,integer,boolean,boolean) +* :issue:`2899` _pgr_maxCardinalityMatch(text,boolean) +* :issue:`2861` _pgr_msg(integer,text,text) +* :issue:`2861` _pgr_onerror(boolean,integer,text,text,text,text) +* :issue:`2861` _pgr_pointtoid(geometry,double precision,text,integer) +* :issue:`2743` _pgr_prim(text,anyarray,text,bigint,double precision) +* :issue:`2861` _pgr_quote_ident(text) +* :issue:`2861` _pgr_startPoint(geometry) +* :issue:`2683` _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) +* :issue:`2683` _pgr_trsp(text,text,anyarray,anyarray,boolean) +* :issue:`2683` _pgr_trsp(text,text,anyarray,bigint,boolean) +* :issue:`2683` _pgr_trsp(text,text,bigint,anyarray,boolean) +* :issue:`2683` _pgr_trsp(text,text,bigint,bigint,boolean) +* :issue:`2682` _pgr_trspViaVertices(text,integer[],boolean,boolean,text) +* :issue:`2919` _pgr_trspVia_withPoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) +* :issue:`2919` _pgr_trsp_withPoints(text,text,text,anyarray,anyarray,boolean,character,boolean) +* :issue:`2919` _pgr_trsp_withPoints(text,text,text,text,boolean,character,boolean) +* :issue:`2901` _pgr_tspEuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* :issue:`2901` _pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* :issue:`2861` _pgr_versionLess(text,text) +* :issue:`2890` _pgr_withPointsDD(text,text,anyarray,double precision,boolean,character,boolean,boolean) +* :issue:`2895` _pgr_withPointsKSP(text,text,anyarray,anyarray,integer,character,boolean,boolean,boolean,boolean) +* :issue:`2895` _pgr_withPointsKSP(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) +* :issue:`2895` _pgr_withPointsKSP(text,text,text,integer,character,boolean,boolean,boolean) +* :issue:`2741` _pgr_withPointsVia(text,bigint[],double precision[],boolean) +* :issue:`2741` _pgr_withPointsVia(text,text,anyarray,boolean,boolean,boolean,character,boolean) +* :issue:`2683` _trsp(text,text,anyarray,anyarray,boolean) +* :issue:`2683` _v4trsp(text,text,anyarray,anyarray,boolean) +* :issue:`2683` _v4trsp(text,text,text,boolean) + +Summary of functions and signatures no longer on pgrouting +............................................................................... + +* :issue:`2748` pgr_alphashape(geometry,double precision) +* :issue:`2752` pgr_analyzegraph(text,double precision,text,text,text,text,text) +* :issue:`2755` pgr_analyzeoneway(text,text[],text[],text[],text[],boolean,text,text,text) +* :issue:`2798` pgr_contraction(text,bigint[],integer,bigint[],boolean) +* :issue:`2751` pgr_createtopology(text,double precision,text,text,text,text,text,boolean) +* :issue:`2827` pgr_createverticestable(text,text,text,text,text) +* :issue:`2888` pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean) +* :issue:`2888` pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean) +* :issue:`2899` pgr_maxCardinalityMatch(text,boolean) +* :issue:`2886` pgr_nodenetwork(text,double precision,text,text,text,text,boolean) +* :issue:`2683` pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) +* :issue:`2683` pgr_trsp(text,integer,integer,boolean,boolean,text) +* :issue:`2681` pgr_trspViaedges(text,integer[],double precision[],boolean,boolean,text) +* :issue:`2682` pgr_trspViaVertices(text,anyarray,boolean,boolean,text) +* :issue:`2919` pgr_trspVia_withPoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) +* :issue:`2919` pgr_trsp_withPoints(text,text,text,anyarray,anyarray,boolean,character,boolean) +* :issue:`2919` pgr_trsp_withPoints(text,text,text,anyarray,bigint,boolean,character,boolean) +* :issue:`2919` pgr_trsp_withPoints(text,text,text,bigint,anyarray,boolean,character,boolean) +* :issue:`2919` pgr_trsp_withPoints(text,text,text,bigint,bigint,boolean,character,boolean) +* :issue:`2919` pgr_trsp_withPoints(text,text,text,text,boolean,character,boolean) +* :issue:`2901` pgr_tspEuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* :issue:`2901` pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean) +* :issue:`2919` pgr_withPointsCostMatrix(text,text,anyarray,boolean,character) +* :issue:`2919` pgr_withPointsCost(text,text,anyarray,anyarray,boolean,character) +* :issue:`2919` pgr_withPointsCost(text,text,anyarray,bigint,boolean,character) +* :issue:`2919` pgr_withPointsCost(text,text,bigint,anyarray,boolean,character) +* :issue:`2919` pgr_withPointsCost(text,text,bigint,bigint,boolean,character) +* :issue:`2919` pgr_withPointsCost(text,text,text,boolean,character) +* :issue:`2890` pgr_withPointsDD(text,text,anyarray,double precision,boolean,character,boolean,boolean) +* :issue:`2890` pgr_withPointsDD(text,text,bigint,double precision,boolean,character,boolean) +* :issue:`2895` pgr_withPointsKSP(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) +* :issue:`2919` pgr_withPoints(text,text,anyarray,anyarray,boolean,character,boolean) +* :issue:`2919` pgr_withPoints(text,text,anyarray,bigint,boolean,character,boolean) +* :issue:`2919` pgr_withPoints(text,text,bigint,anyarray,boolean,character,boolean) +* :issue:`2919` pgr_withPoints(text,text,bigint,bigint,boolean,character,boolean) +* :issue:`2919` pgr_withPoints(text,text,text,boolean,character,boolean) +* :issue:`2919` pgr_withPointsVia(text,text,anyarray,boolean,boolean,boolean,character,boolean) + +Code enhancements +............................................................................... + +* Removal of unused C/C++ code +* Refactor the Script to build the update PostgreSQL file. +* One process & driver for: + + * allpairs: johnson and Floyd-Warshall + * Shortest path: Dijkstra and withPoints using Dijkstra + +.. rubric:: Deprecation of internal C/C++ functions + +Deprecated functions are substituted by new function. + +* _pgr_drivingDistance => _pgr_drivingDistancev4 +* _pgr_withPointsDD => _pgr_withPointsddv4 +* _pgr_kruskal => _pgr_kruskalv4 +* _pgr_prim => _pgr_primv4 +* _pgr_dijkstra => _pgr_dijkstra_v4 +* _pgr_withPointsKSP => _pgr_withPointsKSP_v4 +* _pgr_trspVia_withPoints => _pgr_trspVia_withPoints_v4 +* _pgr_trsp_withPoints => _pgr_trsp_withPoints_v4 +* _pgr_withPointsVia => _pgr_withPointsvia_v4 + +.. rubric:: Internal C/C++ functions in legacy + +* :issue:`2683` _trsp +* :issue:`2683` _v4trsp +* :issue:`2748` _pgr_alphaShape +* :issue:`2913` _pgr_dagShortestPath + pgRouting 3 ******************************************************************************* @@ -34,21 +646,17 @@ pgRouting 3.8 :local: :depth: 1 -.. current - pgRouting 3.8.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.8.0 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.8.0` .. rubric:: Promotion to official function of pgRouting. .. rubric:: Metric -* `#2760 `__: - Promoted to official pgr_degree in version 3.8 +* :issue:`2760`: Promoted to official pgr_degree in version 3.8 .. include:: pgr_degree.rst :start-after: Version 3.8.0 @@ -56,29 +664,25 @@ milestone for 3.8.0 .. rubric:: Utilities -* `#2772 `__: - Promoted to official pgr_extractVertices in version 3.8 +* :issue:`2772`: Promoted to official pgr_extractVertices in version 3.8 .. include:: pgr_extractVertices.rst :start-after: Version 3.8.0 :end-before: .. rubric -* `#2774 `__: - Promoted to official pgr_findCloseEdges in version 3.8 +* :issue:`2774`: Promoted to official pgr_findCloseEdges in version 3.8 .. include:: pgr_findCloseEdges.rst :start-after: Version 3.8.0 :end-before: .. rubric -* `#2873 `__: - Promoted to official pgr_separateCrossing in version 3.8 +* :issue:`2873`: Promoted to official pgr_separateCrossing in version 3.8 .. include:: pgr_separateCrossing.rst :start-after: Version 3.8.0 :end-before: Description -* `#2874 `__: - Promoted to official pgr_separateTouching in version 3.8 +* :issue:`2874`: Promoted to official pgr_separateTouching in version 3.8 .. include:: pgr_separateTouching.rst :start-after: Version 3.8.0 @@ -88,24 +692,18 @@ milestone for 3.8.0 .. rubric:: Contraction -* `#2790 `__: - pgr_contractionDeadEnd new contraction function -* `#2791 `__: - pgr_contractionLinear new contraction function -* `#2536 `__: - Support for contraction hierarchies (pgr_contractionHierarchies) +* :issue:`2790`: pgr_contractionDeadEnd new contraction function +* :issue:`2791`: pgr_contractionLinear new contraction function +* :issue:`2536`: Support for contraction hierarchies (pgr_contractionHierarchies) .. rubric:: Utilities -* `#2848 `__: - Create pgr_separateCrossing new utility function -* `#2849 `__: - Create of pgr_separateTouching new utility function +* :issue:`2848`: Create pgr_separateCrossing new utility function +* :issue:`2849`: Create of pgr_separateTouching new utility function .. rubric:: Official functions changes -* `#2786 `__: - pgr_contraction(edges) new signature +* :issue:`2786`: pgr_contraction(edges) new signature .. include:: pgr_contraction.rst :start-after: Version 3.8.0 @@ -113,30 +711,22 @@ milestone for 3.8.0 .. rubric:: C/C++ code enhancements -* `#2802 `__: - Code reorganization on pgr_contraction +* :issue:`2802`: Code reorganization on pgr_contraction * Other enhancements: - `#2869 `__ + + * :issue:`2869`: .. rubric:: SQL code enhancements -* `#2850 `__: - Rewrite pgr_nodeNetwork +* :issue:`2850`: Rewrite pgr_nodeNetwork .. rubric:: Deprecation of SQL functions -* `#2749 `__: - Deprecate pgr_AlphaShape in 3.8 -* `#2750 `__: - Deprecate pgr_CreateTopology in 3.8 -* `#2753 `__: - Deprecate pgr_analyzeGraph in 3.8 -* `#2754 `__: - Deprecate pgr_analyzeOneWay in 3.8 -* `#2826 `__: - Deprecate pgr_createVerticesTable in 3.8 -* `#2847 `__: - Deprecate pgr_nodeNetwork in 3.8 +* :issue:`2749`: Deprecate pgr_AlphaShape in 3.8 +* :issue:`2750`: Deprecate pgr_CreateTopology in 3.8 +* :issue:`2753`: Deprecate pgr_analyzeGraph in 3.8 +* :issue:`2754`: Deprecate pgr_analyzeOneWay in 3.8 +* :issue:`2826`: Deprecate pgr_createVerticesTable in 3.8 In the deprecated functions: @@ -153,22 +743,20 @@ pgRouting 3.7 pgRouting 3.7.3 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.7.3 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.7.3` -* `#2731 `__ Build Failure on Ubuntu 22 +* :issue:`2731`: Build Failure on Ubuntu 22 pgRouting 3.7.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.7.2 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.7.2` .. rubric:: Build -* `#2713 `__ cmake missing +* :issue:`2713`: cmake missing some policies and min version - Using OLD policies: CMP0148, CMP0144, CMP0167 @@ -176,24 +764,20 @@ milestone for 3.7.2 .. rubric:: Bug fixes -* `#2707 `__ Build failure in - pgRouting 3.7.1 on Alpine -* `#2706 `__ winnie crashing - on pgr_betweennessCentrality +* :issue:`2707`: Build failure in pgRouting 3.7.1 on Alpine +* :issue:`2706`: winnie crashing on pgr_betweennessCentrality pgRouting 3.7.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.7.1 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.7.1` .. rubric:: Bug fixes -* `#2680 `__ fails to compile - under mingw64 gcc 13.2 -* `#2689 `__ When point is a - vertex, the withPoints family do not return results. +* :issue:`2680`: fails to compile under mingw64 gcc 13.2 +* :issue:`2689`: When point is a vertex, the withPoints family do not return + results. .. rubric:: C/C++ code enhancemet @@ -202,19 +786,17 @@ milestone for 3.7.1 pgRouting 3.7.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.7.0 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.7.0` .. rubric:: Support -* `#2656 `__ Stop support of - PostgreSQL12 on pgrouting v3.7 +* :issue:`2656`: Stop support of PostgreSQL12 on pgrouting v3.7 * Stopping support of PostgreSQL 12 * CI does not test for PostgreSQL 12 -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * Metrics @@ -222,8 +804,7 @@ milestone for 3.7.0 .. rubric:: Official functions changes -* `#2605 `__ Standardize - spanning tree functions output +* :issue:`2605`: Standardize spanning tree functions output * Functions: @@ -240,8 +821,8 @@ milestone for 3.7.0 .. rubric:: Experimental promoted to proposed. -* `#2635 `__ pgr_LineGraph - ignores directed flag and use negative values for identifiers. +* :issue:`2635`: pgr_LineGraph ignores directed flag and use negative values for + identifiers. * ``pgr_lineGraph`` @@ -251,11 +832,11 @@ milestone for 3.7.0 .. rubric:: Code enhancement -* `#2599 `__ Driving distance +* :issue:`2599`: Driving distance cleanup -* `#2607 `__ Read postgresql +* :issue:`2607`: Read postgresql data on C++ -* `#2614 `__ Clang tidy does +* :issue:`2614`: Clang tidy does not work pgRouting 3.6 @@ -268,9 +849,8 @@ pgRouting 3.6 pgRouting 3.6.3 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.6.3 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.6.3` .. rubric:: Build @@ -307,9 +887,8 @@ milestone for 3.6.3 pgRouting 3.6.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.6.2 -`__ +To see all issues & pull requests closed by this release see the +:milestone:`3.6.2` .. rubric:: Upgrade fix @@ -328,24 +907,21 @@ milestone for 3.6.2 pgRouting 3.6.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.6.1 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.6.1` -* `#2588 `__ pgrouting 3.6.0 +* :issue:`2588`: pgrouting 3.6.0 fails to build on OSX pgRouting 3.6.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.6.0 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.6.0` .. rubric:: Official functions changes -* `#2516 `__ Standardize output - pgr_aStar +* :issue:`2516`: Standardize output pgr_aStar * Standardize output columns to |short-generic-result| @@ -353,25 +929,21 @@ milestone for 3.6.0 * pgr_aStar(One to Many) added ``end_vid`` column. * pgr_aStar(Many to One) added ``start_vid`` column. -* `#2523 `__ Standardize output - pgr_bdAstar +* :issue:`2523`: Standardize output pgr_bdAstar * Standardize output columns to |short-generic-result| - * pgr_bdAstar(One to One) added ``start_vid`` and ``end_vid`` - columns. + * pgr_bdAstar(One to One) added ``start_vid`` and ``end_vid`` columns. * pgr_bdAstar(One to Many) added ``end_vid`` column. * pgr_bdAstar(Many to One) added ``start_vid`` column. -* `#2547 `__ Standardize output - and modifying signature pgr_KSP +* :issue:`2547`: Standardize output and modifying signature pgr_KSP .. include:: pgr_KSP.rst :start-after: Version 3.6.0 :end-before: .. rubric -* `#2548 `__ Standardize output - pgr_drivingDistance +* :issue:`2548`: Standardize output pgr_drivingDistance .. include:: pgr_drivingDistance.rst :start-after: Version 3.6.0 @@ -379,15 +951,13 @@ milestone for 3.6.0 .. rubric:: Proposed functions changes -* `#2544 `__ Standardize output - and modifying signature pgr_withPointsDD +* :issue:`2544`: Standardize output and modifying signature pgr_withPointsDD .. include:: pgr_withPointsDD.rst :start-after: Version 3.6.0 :end-before: .. rubric -* `#2546 `__ Standardize output - and modifying signature pgr_withPointsKSP +* :issue:`2546`: Standardize output and modifying signature pgr_withPointsKSP .. include:: pgr_withPointsKSP.rst :start-after: Version 3.6.0 @@ -395,29 +965,25 @@ milestone for 3.6.0 .. rubric:: C/C++ code enhancements -* `#2504 `__ To C++ pg data get, +* :issue:`2504`: To C++ pg data get, fetch and check. * Stopping support for compilation with MSVC. -* `#2505 `__ Using namespace. -* `#2512 `__ [Dijkstra] Removing - duplicate code on Dijkstra. -* `#2517 `__ Astar code - simplification. -* `#2521 `__ Dijkstra code - simplification. -* `#2522 `__ bdAstar code - simplification. +* :issue:`2505`: Using namespace. +* :issue:`2512`: [Dijkstra] Removing duplicate code on Dijkstra. +* :issue:`2517`: Astar code simplification. +* :issue:`2521`: Dijkstra code simplification. +* :issue:`2522`: bdAstar code simplification. .. rubric:: Documentation -* `#2490 `__ Automatic page +* :issue:`2490`: Automatic page history links. * ..rubric:: Standardize SQL -* `#2555 `__ Standardize +* :issue:`2555`: Standardize deprecated messages * On new internal function: do not use named parameters and default parameters. @@ -431,9 +997,8 @@ pgRouting 3.5 pgRouting 3.5.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.5.1 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.5.1` .. rubric:: Documentation fixes @@ -448,17 +1013,15 @@ Changes on the documentation to the following: .. rubric:: Issue fixes -* `#2565 `__ - pgr_lengauerTarjanDominatorTree triggers an assertion +* :issue:`2565`: pgr_lengauerTarjanDominatorTree triggers an assertion .. rubric:: SQL enhancements -* `#2561 `__ Not use - wildcards on SQL +* :issue:`2561`: Not use wildcards on SQL .. rubric:: pgtap tests -* `#2559 `__ pgtap test using sampledata +* :issue:`2559`: pgtap test using sampledata .. rubric:: Build fixes @@ -473,9 +1036,8 @@ Changes on the documentation to the following: pgRouting 3.5.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.5.0 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.5.0` .. rubric:: Official functions changes @@ -497,42 +1059,34 @@ pgRouting 3.4 pgRouting 3.4.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.4.2 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.4.2` .. rubric:: Issue fixes -* `#2394 `__: - pgr_bdAstar accumulates heuristic cost in visited node cost. -* `#2427 `__: - pgr_createVerticesTable & pgr_createTopology, variable should be of type Record. +* :issue:`2394`: pgr_bdAstar accumulates heuristic cost in visited node cost. +* :issue:`2427`: pgr_createVerticesTable & pgr_createTopology, variable should be of type Record. pgRouting 3.4.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.4.1 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.4.1` .. rubric:: Issue fixes -* `#2401 `__: - pgRouting 3.4.0 do not build docs when sphinx is too low or missing -* `#2398 `__: - v3.4.0 does not upgrade from 3.3.3 +* :issue:`2401`: pgRouting 3.4.0 do not build docs when sphinx is too low or missing +* :issue:`2398`: v3.4.0 does not upgrade from 3.3.3 pgRouting 3.4.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.4.0 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.4.0` .. rubric:: Issue fixes -* `#1891 `__: - pgr_ksp doesn't give all correct shortest path +* :issue:`1891`: pgr_ksp doesn't give all correct shortest path .. rubric:: New proposed functions. @@ -572,7 +1126,7 @@ milestone for 3.4.0 * pgr_findCloseEdges(One point) * pgr_findCloseEdges(Many points) -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * Ordering @@ -609,32 +1163,33 @@ pgRouting 3.3 pgRouting 3.3.5 Release Notes ------------------------------------------------------------------------------- -* `#2401 `__: - pgRouting 3.4.0 do not build docs when sphinx is too low or missing +To see all issues & pull requests closed by this release see the +:milestone:`3.3.5` + +.. rubric:: Documentation + +* :issue:`2401`: pgRouting 3.4.0 do not build docs when sphinx is too low or + missing pgRouting 3.3.4 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.3.4 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.3.4` .. rubric:: Issue fixes -* `#2400 `__: - pgRouting 3.3.3 does not build in focal +* :issue:`2400`: pgRouting 3.3.3 does not build in focal pgRouting 3.3.3 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.3.3 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.3.3` .. rubric:: Issue fixes -* `#1891 `__: - pgr_ksp doesn't give all correct shortest path +* :issue:`1891`: pgr_ksp doesn't give all correct shortest path .. rubric:: Official functions changes @@ -649,9 +1204,8 @@ milestone for 3.3.3 pgRouting 3.3.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.3.2 -`_ +To see all issues & pull requests closed by this release see the +:milestone:`3.3.2` * Revised documentation @@ -676,44 +1230,37 @@ milestone for 3.3.2 .. rubric:: Issue fixes -* `#2276 `__: - edgeDisjointPaths issues with start_vid and combinations -* `#2312 `__: - pgr_extractVertices error when target is not BIGINT -* `#2357 `__: - Apply clang-tidy performance-* +* :issue:`2276`: edgeDisjointPaths issues with start_vid and combinations +* :issue:`2312`: pgr_extractVertices error when target is not BIGINT +* :issue:`2357`: Apply clang-tidy performance-* pgRouting 3.3.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.3.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.3.1` .. rubric:: Issue fixes -* `#2216 `__: Warnings when using clang -* `#2266 `__: Error processing restrictions +* :issue:`2216`: Warnings when using clang +* :issue:`2266`: Error processing restrictions pgRouting 3.3.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.3.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.3.0` .. rubric:: Issue fixes -* `#2057 `__: trspViaEdges columns in different order -* `#2087 `__: pgr_extractVertices to proposed -* `#2201 `__: pgr_depthFirstSearch to proposed -* `#2202 `__: pgr_sequentialVertexColoring to proposed -* `#2203 `__: pgr_dijkstraNear and pgr_dijkstraNearCost to proposed +* :issue:`2057`: trspViaEdges columns in different order +* :issue:`2087`: pgr_extractVertices to proposed +* :issue:`2201`: pgr_depthFirstSearch to proposed +* :issue:`2202`: pgr_sequentialVertexColoring to proposed +* :issue:`2203`: pgr_dijkstraNear and pgr_dijkstraNearCost to proposed -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * Coloring @@ -760,49 +1307,44 @@ pgRouting 3.2 pgRouting 3.2.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.2.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.2.2` .. rubric:: Issue fixes -* `#2093 `__: Compilation on Visual Studio -* `#2189 `__: Build error on RHEL 7 +* :issue:`2093`: Compilation on Visual Studio +* :issue:`2189`: Build error on RHEL 7 pgRouting 3.2.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.2.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.2.1` .. rubric:: Issue fixes -* `#1883 `__: pgr_TSPEuclidean crashes connection on Windows +* :issue:`1883`: pgr_TSPEuclidean crashes connection on Windows * The solution is to use Boost::graph::metric_tsp_approx - * To not break user's code the optional parameters related to the TSP Annaeling are ignored + * To not break user's code the optional parameters related to the TSP + Annaeling are ignored * The function with the annaeling optional parameters is deprecated pgRouting 3.2.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.2.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.2.0` .. rubric:: Build -* `#1850 `__: Change Boost +* :issue:`1850`: Change Boost min version to 1.56 * Removing support for Boost v1.53, v1.54 & v1.55 -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * pgr_bellmanFord(Combinations) * pgr_binaryBreadthFirstSearch(Combinations) @@ -874,87 +1416,67 @@ pgRouting 3.1 pgRouting 3.1.4 Release Notes -------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.1.4 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.1.4` .. rubric:: Issues fixes -* `#2189 `__: Build error on +* :issue:`2189`: Build error on RHEL 7 pgRouting 3.1.3 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.1.3 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.1.3` .. rubric:: Issues fixes -* `#1825 `__: Boost versions - are not honored -* `#1849 `__: Boost 1.75.0 - geometry "point_xy.hpp" build error on macOS environment -* `#1861 `__: vrp functions - crash server +* :issue:`1825`: Boost versions are not honored +* :issue:`1849`: Boost 1.75.0 geometry "point_xy.hpp" build error on macOS + environment +* :issue:`1861`: vrp functions crash server pgRouting 3.1.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.1.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.1.2` .. rubric:: Issues fixes -* `#1304 `__: FreeBSD 12 +* :issue:`1304`: FreeBSD 12 64-bit crashes on pgr_vrOneDepot tests Experimental Function -* `#1356 `__: - tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed -* `#1725 `__: Server crash +* :issue:`1356`: tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed +* :issue:`1725`: Server crash on pgr_pickDeliver and pgr_vrpOneDepot on openbsd -* `#1760 `__: TSP server +* :issue:`1760`: TSP server crash on ubuntu 20.04 #1760 -* `#1770 `__: Remove +* :issue:`1770`: Remove warnings when using clang compiler pgRouting 3.1.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.1.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.1.1` .. rubric:: Issues fixes -* `#1733 `__: pgr_bdAstar - fails when source or target vertex does not exist in the graph -* `#1647 `__: Linear - Contraction contracts self loops -* `#1640 `__: pgr_withPoints - fails when points_sql is empty -* `#1616 `__: Path - evaluation on C++ not updated before the results go back to C -* `#1300 `__: - pgr_chinesePostman crash on test data - - +* :issue:`1733`: pgr_bdAstar fails when source or target vertex does not exist in the graph +* :issue:`1647`: Linear Contraction contracts self loops +* :issue:`1640`: pgr_withPoints fails when points_sql is empty +* :issue:`1616`: Path evaluation on C++ not updated before the results go back to C +* :issue:`1300`: pgr_chinesePostman crash on test data pgRouting 3.1.0 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.1.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.1.0` .. rubric:: New proposed functions. @@ -975,131 +1497,98 @@ pgRouting 3.0 pgRouting 3.0.6 Release Notes -------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.6 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.6` .. rubric:: Issues fixes -* `#2189 `__: Build error on - RHEL 7 +* :issue:`2189`: Build error on RHEL 7 pgRouting 3.0.5 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.5 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.5` .. rubric:: Backport issue fixes -* `#1825 `__: Boost versions - are not honored -* `#1849 `__: Boost 1.75.0 - geometry "point_xy.hpp" build error on macOS environment -* `#1861 `__: vrp functions - crash server +* :issue:`1825`: Boost versions are not honored +* :issue:`1849`: Boost 1.75.0 geometry "point_xy.hpp" build error on macOS environment +* :issue:`1861`: vrp functions crash server pgRouting 3.0.4 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.4 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.4` .. rubric:: Backport issue fixes -* `#1304 `__: FreeBSD 12 - 64-bit crashes on pgr_vrOneDepot tests Experimental Function -* `#1356 `__: - tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed -* `#1725 `__: Server crash - on pgr_pickDeliver and pgr_vrpOneDepot on openbsd -* `#1760 `__: TSP server - crash on ubuntu 20.04 #1760 -* `#1770 `__: Remove - warnings when using clang compiler +* :issue:`1304`: FreeBSD 12 64-bit crashes on pgr_vrOneDepot tests Experimental Function +* :issue:`1356`: tools/testers/pg_prove_tests.sh fails when PostgreSQL port is not passed +* :issue:`1725`: Server crash on pgr_pickDeliver and pgr_vrpOneDepot on openbsd +* :issue:`1760`: TSP server crash on ubuntu 20.04 #1760 +* :issue:`1770`: Remove warnings when using clang compiler pgRouting 3.0.3 Release Notes ------------------------------------------------------------------------------- +To see all issues & pull requests closed by this release see the +:milestone:`3.0.3` + .. rubric:: Backport issue fixes -* `#1733 `__: pgr_bdAstar - fails when source or target vertex does not exist in the graph -* `#1647 `__: Linear - Contraction contracts self loops -* `#1640 `__: pgr_withPoints - fails when points_sql is empty -* `#1616 `__: Path - evaluation on C++ not updated before the results go back to C -* `#1300 `__: - pgr_chinesePostman crash on test data +* :issue:`1733`: pgr_bdAstar fails when source or target vertex does not exist in the graph +* :issue:`1647`: Linear Contraction contracts self loops +* :issue:`1640`: pgr_withPoints fails when points_sql is empty +* :issue:`1616`: Path evaluation on C++ not updated before the results go back to C +* :issue:`1300`: pgr_chinesePostman crash on test data pgRouting 3.0.2 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.2` .. rubric:: Issues fixes -* `#1378 `__: Visual Studio +* :issue:`1378`: Visual Studio build failing pgRouting 3.0.1 Release Notes ------------------------------------------------------------------------------- -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.1` .. rubric:: Issues fixes -* `#232 `__: Honor client +* :issue:`232`: Honor client cancel requests in C /C++ code pgRouting 3.0.0 Release Notes ------------------------------------------------------------------------------- -.. contents:: Contents - :local: - :depth: 1 - -To see all issues & pull requests closed by this release see the `Git closed -milestone for 3.0.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`3.0.0` .. rubric:: Fixed Issues -* `#1153 `__: Renamed - pgr_eucledianTSP to pgr_TSPeuclidean -* `#1188 `__: Removed CGAL - dependency -* `#1002 `__: Fixed - contraction issues: +* :issue:`1153`: Renamed pgr_eucledianTSP to pgr_TSPeuclidean +* :issue:`1188`: Removed CGAL dependency +* :issue:`1002`: Fixed contraction issues: - * `#1004 `__: Contracts - when forbidden vertices do not belong to graph - * `#1005 `__: Intermideate - results eliminated - * `#1006 `__: No loss of - information + * :issue:`1004`: Contracts when forbidden vertices do not belong to graph + * :issue:`1005`: Intermideate results eliminated + * :issue:`1006`: No loss of information .. rubric:: New Functions @@ -1188,7 +1677,7 @@ on Github. * Bug Fixes -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * pgr_maxFlowMinCost * pgr_maxFlowMinCost_Cost @@ -1255,44 +1744,34 @@ pgRouting 2.6 pgRouting 2.6.3 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.6.3 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.6.3` .. rubric:: Bug fixes -* `#1219 `__ Implicit cast for - via_path integer to text -* `#1193 `__ Fixed - pgr_pointsAsPolygon breaking when comparing strings in WHERE clause -* `#1185 `__ Improve - FindPostgreSQL.cmake - - +* :issue:`1219`: Implicit cast for via_path integer to text +* :issue:`1193`: Fixed pgr_pointsAsPolygon breaking when comparing strings in + WHERE clause +* :issue:`1185`: Improve FindPostgreSQL.cmake pgRouting 2.6.2 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.6.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.6.2` .. rubric:: Bug fixes -* `#1152 `__ Fixes driving - distance when vertex is not part of the graph -* `#1098 `__ Fixes windows - test -* `#1165 `__ Fixes build for - python3 and perl5 +* :issue:`1152`: Fixes driving distance when vertex is not part of the graph +* :issue:`1098`: Fixes windows test +* :issue:`1165`: Fixes build for python3 and perl5 pgRouting 2.6.1 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.6.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.6.1` * Fixes server crash on several functions. @@ -1331,12 +1810,10 @@ on Github. pgRouting 2.6.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.6.0 -`_ -on Github. - +To see all issues & pull requests closed by this release see the +:milestone:`2.6.0` -.. rubric:: New experimental functions +.. rubric:: New experimental functions. * pgr_lineGraphFull @@ -1374,9 +1851,8 @@ pgRouting 2.5 pgRouting 2.5.5 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.5.5 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.5.5` .. rubric:: Bug fixes @@ -1388,9 +1864,8 @@ on Github. pgRouting 2.5.4 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.5.4 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.5.4` * Fixes server crash on several functions. @@ -1429,9 +1904,8 @@ on Github. pgRouting 2.5.3 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.5.3 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.5.3` .. rubric:: Bug fixes @@ -1442,34 +1916,28 @@ on Github. pgRouting 2.5.2 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.5.2 `_ on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.5.2` .. rubric:: Bug fixes * Fix for postgresql 10.1: Removed a compiler condition - - pgRouting 2.5.1 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.5.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.5.1` .. rubric:: Bug fixes * Fixed prerequisite minimum version of: cmake - - pgRouting 2.5.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.5.0 -`_ -on Github. - +To see all issues & pull requests closed by this release see the +:milestone:`2.5.0` .. rubric:: enhancement: @@ -1539,9 +2007,8 @@ pgRouting 2.4 pgRouting 2.4.2 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.4.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.4.2` .. rubric:: Improvement @@ -1558,9 +2025,8 @@ on Github. pgRouting 2.4.1 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed milestone for 2.4.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.4.1` .. rubric:: Bug fixes @@ -1571,9 +2037,8 @@ on Github. pgRouting 2.4.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.4.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.4.0` .. rubric:: New Functions @@ -1614,9 +2079,8 @@ pgRouting 2.3 pgRouting 2.3.2 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.3.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.3.2` .. rubric:: Bug Fixes @@ -1631,9 +2095,8 @@ on Github. pgRouting 2.3.1 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.3.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.3.1` .. rubric:: Bug Fixes @@ -1646,9 +2109,8 @@ on Github. pgRouting 2.3.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.3.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.3.0` .. rubric:: New Signatures @@ -1707,9 +2169,8 @@ pgRouting 2.2 pgRouting 2.2.4 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.2.4 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.2.4` .. rubric:: Bug Fixes @@ -1721,9 +2182,8 @@ on Github. pgRouting 2.2.3 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.2.3 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.2.3` .. rubric:: Bug Fixes @@ -1733,9 +2193,8 @@ on Github. pgRouting 2.2.2 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.2.2 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.2.2` .. rubric:: Bug Fixes @@ -1746,24 +2205,19 @@ on Github. pgRouting 2.2.1 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.2.1 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.2.1` .. rubric:: Bug Fixes * Server crash fix on pgr_alphaShape * Bug fix on With Points family of functions - - pgRouting 2.2.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.2.0 -`_ -on Github. - +To see all issues & pull requests closed by this release see the +:milestone:`2.2.0` .. rubric:: Improvements @@ -1822,9 +2276,8 @@ pgRouting 2.1 pgRouting 2.1.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.1.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.1.0` .. rubric:: New Signatures @@ -1914,6 +2367,9 @@ pgRouting 2.0 pgRouting 2.0.1 Release Notes ------------------------------------------------------------------------------- +To see all issues & pull requests closed by this release see the +:milestone:`2.0.1` + Minor bug fixes. .. rubric:: Bug Fixes @@ -1923,9 +2379,8 @@ Minor bug fixes. pgRouting 2.0.0 Release Notes ------------------------------------------------------------------------------- -To see the issues closed by this release see the `Git closed issues for 2.0.0 -`_ -on Github. +To see all issues & pull requests closed by this release see the +:milestone:`2.0.0` With the release of pgRouting 2.0.0 the library has abandoned backwards compatibility to `pgRouting 1.0`_ releases. diff --git a/doc/src/routingFunctions.rst b/doc/src/routingFunctions.rst index b9cd551e075..17c1856f353 100644 --- a/doc/src/routingFunctions.rst +++ b/doc/src/routingFunctions.rst @@ -89,9 +89,9 @@ Function Families :start-after: official-start :end-before: official-end -:doc:`topology-functions` +:doc:`TRSP-family` -.. include:: topology-functions.rst +.. include:: TRSP-family.rst :start-after: official-start :end-before: official-end @@ -101,13 +101,17 @@ Function Families :start-after: official-start :end-before: official-end -:doc:`pgr_trsp` - Turn Restriction Shortest Path (TRSP) +:doc:`utilities-family` -.. rubric:: Utilities +.. include:: utilities-family.rst + :start-after: official-start + :end-before: official-end + +:doc:`withPoints-family` -.. include:: topology-functions.rst - :start-after: utility_official-start - :end-before: utility_official-end +.. include:: withPoints-family.rst + :start-after: official-start + :end-before: official-end Functions by categories =============================================================================== @@ -155,6 +159,12 @@ Functions by categories :start-after: official-start :end-before: official-end +:doc:`withPoints-category` + +.. include:: withPoints-category.rst + :start-after: official-start + :end-before: official-end + .. to-here .. toctree:: @@ -172,8 +182,10 @@ Functions by categories metrics-family prim-family reference - topology-functions + TRSP-family TSP-family + utilities-family + withPoints-family .. toctree:: :hidden: diff --git a/doc/src/sampledata.rst b/doc/src/sampledata.rst index cc496274315..1af6f551326 100644 --- a/doc/src/sampledata.rst +++ b/doc/src/sampledata.rst @@ -268,8 +268,7 @@ Inserting the data: :start-after: -- c2 :end-before: -- c3 -Combinations data -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. rubric:: Combinations data .. literalinclude:: sampledata.queries :start-after: -- c3 @@ -295,8 +294,7 @@ Adding the restrictions :start-after: -- r2 :end-before: -- r3 -Restrictions data -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. rubric:: Restrictions data .. literalinclude:: sampledata.queries :start-after: -- r3 diff --git a/doc/src/support.rst b/doc/src/support.rst index 91bdab74dd6..6fa184174ed 100644 --- a/doc/src/support.rst +++ b/doc/src/support.rst @@ -48,12 +48,12 @@ Bugs are reported and managed in an `issue tracker -Mailing List and GIS StackExchange +Mailing List, Matrix, GIS StackExchange ------------------------------------------------------------------------------- -There are two mailing lists for pgRouting hosted on OSGeo mailing list server: +There are two mailing lists for pgRouting hosted on OSGeo discourse server: -* User mailing list: https://lists.osgeo.org/mailman/listinfo/pgrouting-users +* User mailing list: https://discourse.osgeo.org/c/pgrouting/pgrouting-users/ * Developer mailing list: https://discourse.osgeo.org/c/pgrouting/pgrouting-dev/ * Subscribe: https://discourse.osgeo.org/g/pgrouting-dev @@ -61,6 +61,9 @@ There are two mailing lists for pgRouting hosted on OSGeo mailing list server: For general questions and topics about how to use pgRouting, please write to the user mailing list. +If you want to chat with fellow pgRouting users and contributors, you +can join our matrix channel: `pgRouting matrix channel `_. + You can also ask at `GIS StackExchange `_ and tag the question with ``pgrouting``. Find all questions tagged with ``pgrouting`` under diff --git a/doc/topology/CMakeLists.txt b/doc/topology/CMakeLists.txt deleted file mode 100644 index d5c5cfada91..00000000000 --- a/doc/topology/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -SET(LOCAL_FILES - pgr_analyzeGraph.rst - pgr_createTopology.rst - pgr_nodeNetwork.rst - pgr_analyzeOneWay.rst - pgr_createVerticesTable.rst - pgr_extractVertices.rst - topology-functions.rst - ) - -foreach (f ${LOCAL_FILES}) - configure_file(${f} "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}") - list(APPEND LOCAL_DOC_FILES ${PGR_DOCUMENTATION_SOURCE_DIR}/${f}) -endforeach() - -set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/doc/topology/pgr_analyzeGraph.rst b/doc/topology/pgr_analyzeGraph.rst deleted file mode 100644 index 641b86de3ad..00000000000 --- a/doc/topology/pgr_analyzeGraph.rst +++ /dev/null @@ -1,292 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: - single: Topology Family ; pgr_analyzeGraph - Deprecated since 3.8.0 - single: analyzeGraph - Deprecated since 3.8.0 - -| - -``pgr_analyzeGraph`` -- Deprecated since 3.8.0 -=============================================================================== - -``pgr_analyzeGraph`` — Analyzes the network topology. - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - -* Version 2.0.0 - - * Official function. - -.. include:: migration.rst - :start-after: migrate_pgr_analyzeGraph_start - :end-before: migrate_pgr_analyzeGraph_end - -Description -------------------------------------------------------------------------------- - -The function returns: - -- ``OK`` after the analysis has finished. -- ``FAIL`` when the analysis was not completed due to an error. - -.. admonition:: \ \ - :class: signatures - - | pgr_analyzeGraph(**edge_table**, **tolerance**, [**options**]) - | **options:** ``[the_geom, id, source, target, rows_where]`` - - | RETURNS ``VARCHAR`` - - -.. rubric:: Prerequisites - -The edge table to be analyzed must contain a source column and a target column -filled with id's of the vertices of the segments and the corresponding vertices -table _vertices_pgr that stores the vertices information. - -Parameters -------------------------------------------------------------------------------- - -The analyze graph function accepts the following parameters: - -:edge_table: ``text`` Network table name. (may contain the schema name as well) -:tolerance: ``float8`` Snapping tolerance of disconnected edges. (in projection - unit) -:the_geom: ``text`` Geometry column name of the network table. Default value is - ``the_geom``. -:id: ``text`` Primary key column name of the network table. Default value is - ``id``. -:source: ``text`` Source column name of the network table. Default value is - ``source``. -:target: ``text`` Target column name of the network table. Default value is - ``target``. -:rows_where: ``text`` Condition to select a subset or rows. Default value is - ``true`` to indicate all rows. - -The function returns: - -- ``OK`` after the analysis has finished. - - * Uses the vertices table: _vertices_pgr. - * Fills completely the ``cnt`` and ``chk`` columns of the vertices table. - * Returns the analysis of the section of the network defined by ``rows_where`` - -- ``FAIL`` when the analysis was not completed due to an error. - - * The vertices table is not found. - * A required column of the Network table is not found or is not of the appropriate type. - * The condition is not well formed. - * The names of source , target or id are the same. - * The SRID of the geometry could not be determined. - - -.. rubric:: The Vertices Table - -The structure of the vertices table is: - -:id: ``bigint`` Identifier of the vertex. -:cnt: ``integer`` Number of vertices in the edge_table that reference this - vertex. -:chk: ``integer`` Indicator that the vertex might have a problem. -:ein: ``integer`` Number of vertices in the edge_table that reference this - vertex as incoming. -:eout: ``integer`` Number of vertices in the edge_table that reference this - vertex as outgoing. -:the_geom: ``geometry`` Point geometry of the vertex. - -Usage when the edge table's columns MATCH the default values: -............................................................................... - -.. rubric:: The simplest way to use pgr_analyzeGraph is: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q1 - :end-before: -- q1.1 - -.. rubric:: Arguments are given in the order described in the parameters: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q3 - :end-before: -- q3.1 - -We get the same result as the simplest way to use the function. - -.. warning:: An error would occur when - - the arguments are not given in the appropriate order: - - In this example, the column ``id`` of the table ``mytable`` - is passed to the function as the geometry column, and the geometry column - ``the_geom`` is passed to the function as the id column. - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q5 - :end-before: -- q5.1 - - -.. rubric:: When using the named notation - -The order of the parameters do not matter: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q6 - :end-before: -- q6.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q7 - :end-before: -- q7.1 - -Parameters defined with a default value can be omitted, as long as the value -matches the default: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q8 - :end-before: -- q8.1 - -.. rubric:: Selecting rows using rows_where parameter - -Selecting rows based on the id. Displays the analysis a the section of the -network. - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q9 - :end-before: -- q9.1 - -Selecting the rows where the geometry is near the geometry of row with ``id`` = -5 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q10 - :end-before: -- q10.1 - -Selecting the rows where the geometry is near the geometry of the row with -``gid`` =100 of the table ``othertable``. - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q11 - :end-before: -- q11.1 - -Usage when the edge table's columns DO NOT MATCH the default values: -............................................................................... - -For the following table - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q12 - :end-before: -- q12.1 - -.. rubric:: Using positional notation: - -The arguments need to be given in the order described in the parameters: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q13 - :end-before: -- q13.1 - -.. warning:: An error would occur when - the arguments are not given in the appropriate order: In this example, the - column ``gid`` of the table ``mytable`` is passed to the function as the - geometry column, and the geometry column ``mygeom`` is passed to the function - as the id column. - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q14 - :end-before: -- q14.1 - -.. rubric:: When using the named notation - -The order of the parameters do not matter: - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q15 - :end-before: -- q15.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q16 - :end-before: -- q16.1 - -In this scenario omitting a parameter would create an error because the default -values for the column names do not match the column names of the table. - -.. rubric:: Selecting rows using rows_where parameter - -Selecting rows based on the id. - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q17 - :end-before: -- q17.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q18 - :end-before: -- q18.1 - -Selecting the rows WHERE the geometry is near the geometry of row with ``id`` =5 . - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q19 - :end-before: -- q19.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q20 - :end-before: -- q20.1 - -Selecting the rows WHERE the geometry is near the place='myhouse' of the table -``othertable``. (note the use of quote_literal) - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q21 - :end-before: -- q21.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q22 - :end-before: -- q22.1 - -Additional Examples -------------------------------------------------------------------------------- - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q23 - :end-before: -- q23.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q24 - :end-before: -- q24.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q25 - :end-before: -- q25.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q26 - :end-before: -- q26.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q27 - :end-before: -- q27.1 - -.. literalinclude:: analyzeGraph.queries - :start-after: -- q28 - :end-before: -- q28.1 - -See Also -------------------------------------------------------------------------------- - -* :doc:`sampledata` -* :doc:`topology-functions` -* :doc:`pgr_analyzeOneWay` - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/topology/pgr_analyzeOneWay.rst b/doc/topology/pgr_analyzeOneWay.rst deleted file mode 100644 index d2524736278..00000000000 --- a/doc/topology/pgr_analyzeOneWay.rst +++ /dev/null @@ -1,146 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: - single: Topology Family ; pgr_analyzeOneWay - Deprecated since 3.8.0 - single: analyzeOneWay - Deprecated since 3.8.0 - -| - -``pgr_analyzeOneWay`` - Deprecated since 3.8.0 -=============================================================================== - -``pgr_analyzeOneWay`` — Analyzes oneway Sstreets and identifies flipped segments. - -This function analyzes oneway streets in a graph and identifies any flipped -segments. - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - -* Version 2.0.0 - - * Official function. - -.. include:: migration.rst - :start-after: migrate_pgr_analyzeOneWay_start - :end-before: migrate_pgr_analyzeOneWay_end - -Description -------------------------------------------------------------------------------- - -The analyses of one way segments is pretty simple but can be a powerful tools to -identifying some the potential problems created by setting the direction of a -segment the wrong way. A node is a `source` if it has edges the exit from that -node and no edges enter that node. Conversely, a node is a `sink` if all edges -enter the node but none exit that node. For a `source` type node it is logically -impossible to exist because no vehicle can exit the node if no vehicle and enter -the node. Likewise, if you had a `sink` node you would have an infinite number -of vehicle piling up on this node because you can enter it but not leave it. - -So why do we care if the are not feasible? Well if the direction of an edge was -reversed by mistake we could generate exactly these conditions. Think about a -divided highway and on the north bound lane one segment got entered wrong or -maybe a sequence of multiple segments got entered wrong or maybe this happened -on a round-about. The result would be potentially a `source` and/or a `sink` -node. - -So by counting the number of edges entering and exiting each node we can -identify both `source` and `sink` nodes so that you can look at those areas of -your network to make repairs and/or report the problem back to your data vendor. - -.. rubric:: Prerequisites - -The edge table to be analyzed must contain a source column and a target column -filled with id's of the vertices of the segments and the corresponding vertices -table _vertices_pgr that stores the vertices information. - -|Boost| Boost Graph Inside - -Signatures -------------------------------------------------------------------------------- - -.. admonition:: \ \ - :class: signatures - - | pgr_analyzeOneWay(**geom_table**, **s_in_rules**, **s_out_rules**, **t_in_rules**, **t_out_rules**, [**options**]) - | **options:** ``[oneway, source, target, two_way_if_null]`` - - | RETURNS ``TEXT`` - -Parameters -------------------------------------------------------------------------------- - -:edge_table: ``text`` Network table name. (may contain the schema name as well) -:s_in_rules: ``text[]`` source node **in** rules -:s_out_rules: ``text[]`` source node **out** rules -:t_in_rules: ``text[]`` target node **in** rules -:t_out_rules: ``text[]`` target node **out** rules -:oneway: ``text`` oneway column name name of the network table. Default value is - ``oneway``. -:source: ``text`` Source column name of the network table. Default value is - ``source``. -:target: ``text`` Target column name of the network table. Default value is - ``target``. -:two_way_if_null: ``boolean`` flag to treat oneway NULL values as - bi-directional. Default value is ``true``. - -The function returns: - -- ``OK`` after the analysis has finished. - - * Uses the vertices table: _vertices_pgr. - * Fills completely the ``ein`` and ``eout`` columns of the vertices table. - -- ``FAIL`` when the analysis was not completed due to an error. - - * The vertices table is not found. - * A required column of the Network table is not found or is not of the - appropriate type. - * The names of source , target or oneway are the same. - -The rules are defined as an array of text strings that if match the ``oneway`` -value would be counted as ``true`` for the source or target **in** or **out** -condition. - -.. rubric:: The Vertices Table - -The structure of the vertices table is: - -:id: ``bigint`` Identifier of the vertex. -:cnt: ``integer`` Number of vertices in the edge_table that reference this - vertex. -:chk: ``integer`` Indicator that the vertex might have a problem. -:ein: ``integer`` Number of vertices in the edge_table that reference this - vertex as incoming. -:eout: ``integer`` Number of vertices in the edge_table that reference this - vertex as outgoing. -:the_geom: ``geometry`` Point geometry of the vertex. - -Additional Examples -------------------------------------------------------------------------------- - -.. literalinclude:: analyzeOneWay.queries - :start-after: --q1 - :end-before: --q1.1 - - -See Also -------------------------------------------------------------------------------- - -* :doc:`topology-functions` -* :doc:`sampledata` - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/topology/pgr_createTopology.rst b/doc/topology/pgr_createTopology.rst deleted file mode 100644 index af0274d5a7f..00000000000 --- a/doc/topology/pgr_createTopology.rst +++ /dev/null @@ -1,290 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: - single: Topology Family ; pgr_createTopology - Deprecated since v3.8.0 - single: createTopology - Deprecated since v3.8.0 - -| - -``pgr_createTopology`` - Deprecated since v3.8.0 -=============================================================================== - -``pgr_createTopology`` — Builds a network topology based on the geometry -information. - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - -* Version 2.0.0 - - * Official function. - * Renamed from version 1.x - -.. include:: migration.rst - :start-after: migrate_pgr_createTopology_start - :end-before: migrate_pgr_createTopology_end - -Description -------------------------------------------------------------------------------- - -The function returns: - -- ``OK`` after the network topology has been built and the vertices table - created. -- ``FAIL`` when the network topology was not built due to an error. - -|Boost| Boost Graph Inside - -Signatures -------------------------------------------------------------------------------- - -.. admonition:: \ \ - :class: signatures - - | pgr_createTopology(edge_table, tolerance, [**options**]) - | **options:** ``[the_geom, id, source, target, rows_where, clean]`` - - | RETURNS ``VARCHAR`` - -Parameters -------------------------------------------------------------------------------- - -The topology creation function accepts the following parameters: - -:edge_table: ``text`` Network table name. (may contain the schema name as well) -:tolerance: ``float8`` Snapping tolerance of disconnected edges. (in projection - unit) -:the_geom: ``text`` Geometry column name of the network table. Default value is - ``the_geom``. -:id: ``text`` Primary key column name of the network table. Default value is - ``id``. -:source: ``text`` Source column name of the network table. Default value is - ``source``. -:target: ``text`` Target column name of the network table. Default value is - ``target``. -:rows_where: ``text`` Condition to SELECT a subset or rows. Default value is - ``true`` to indicate all rows that where ``source`` or ``target`` - have a null value, otherwise the condition is used. -:clean: ``boolean`` Clean any previous topology. Default value is ``false``. - -.. warning:: - - The ``edge_table`` will be affected - - - The ``source`` column values will change. - - The ``target`` column values will change. - - - An index will be created, if it doesn't exists, - to speed up the process to the following columns: - - * ``id`` - * ``the_geom`` - * ``source`` - * ``target`` - -The function returns: - -- ``OK`` after the network topology has been built. - - * Creates a vertices table: _vertices_pgr. - * Fills ``id`` and ``the_geom`` columns of the vertices table. - * Fills the source and target columns of the edge table referencing the ``id`` - of the vertices table. - - -- ``FAIL`` when the network topology was not built due to an error: - - * A required column of the Network table is not found or is not of the - appropriate type. - * The condition is not well formed. - * The names of source , target or id are the same. - * The SRID of the geometry could not be determined. - -.. rubric:: The Vertices Table - -The structure of the vertices table is: - -:id: ``bigint`` Identifier of the vertex. -:cnt: ``integer`` Number of vertices in the edge_table that reference this - vertex. -:chk: ``integer`` Indicator that the vertex might have a problem. -:ein: ``integer`` Number of vertices in the edge_table that reference this - vertex AS incoming. -:eout: ``integer`` Number of vertices in the edge_table that reference this - vertex AS outgoing. -:the_geom: ``geometry`` Point geometry of the vertex. - -Usage when the edge table's columns MATCH the default values: -............................................................................... - -The simplest way to use pgr_createTopology is: - -.. literalinclude:: createTopology.queries - :start-after: --q1 - :end-before: --q1.1 - -.. rubric:: When the arguments are given in the order described in the - parameters: - -We get the sameresult as the simplest way to use the function. - -.. literalinclude:: createTopology.queries - :start-after: --q2 - :end-before: --q2.1 - -.. warning:: - An error would occur when the arguments are not given in the appropriate - order: In this example, the column ``id`` of the table ``ege_table`` is - passed to the function as the geometry column, and the geometry column - ``the_geom`` is passed to the function as the id column. - - .. literalinclude:: createTopology.queries - :start-after: --q3 - :end-before: --q3.1 - -.. rubric:: When using the named notation - -Parameters defined with a default value can be omitted, as long as the value -matches the default And The order of the parameters would not matter. - -.. literalinclude:: createTopology.queries - :start-after: --q4 - :end-before: --q4.1 - -.. literalinclude:: createTopology.queries - :start-after: --q5 - :end-before: --q5.1 - -.. literalinclude:: createTopology.queries - :start-after: --q6 - :end-before: --q6.1 - -.. rubric:: Selecting rows using rows_where parameter - -Selecting rows based on the id. - -.. literalinclude:: createTopology.queries - :start-after: --q7 - :end-before: --q7.1 - -Selecting the rows where the geometry is near the geometry of row with ``id = -5``. - -.. literalinclude:: createTopology.queries - :start-after: --q8 - :end-before: --q8.1 - -Selecting the rows where the geometry is near the geometry of the row with -``gid`` =100 of the table ``othertable``. - -.. literalinclude:: createTopology.queries - :start-after: --q9 - :end-before: --q9.1 - -Usage when the edge table's columns DO NOT MATCH the default values: -............................................................................... - -For the following table - -.. literalinclude:: createTopology.queries - :start-after: --q10 - :end-before: --q10.1 - -.. rubric:: Using positional notation: - -The arguments need to be given in the order described in the parameters. - -Note that this example uses clean flag. So it recreates the whole vertices -table. - -.. literalinclude:: createTopology.queries - :start-after: --q11 - :end-before: --q11.1 - -.. warning:: - An error would occur when the arguments are not given in the appropiriate - order: In this example, the column ``gid`` of the table ``mytable`` is passed - to the function AS the geometry column, and the geometry column ``mygeom`` is - passed to the function AS the id column. - - .. literalinclude:: createTopology.queries - :start-after: --q12 - :end-before: --q12.1 - -.. rubric:: When using the named notation - -In this scenario omitting a parameter would create an error because the default -values for the column names do not match the column names of the table. -The order of the parameters do not matter: - -.. literalinclude:: createTopology.queries - :start-after: --q13 - :end-before: --q13.1 - -.. literalinclude:: createTopology.queries - :start-after: --q14 - :end-before: --q14.1 - -.. rubric:: Selecting rows using rows_where parameter - -Based on id: - -.. literalinclude:: createTopology.queries - :start-after: --q15 - :end-before: --q15.1 - -Selecting the rows where the geometry is near the geometry of the row with -``gid`` =100 of the table ``othertable``. - -.. literalinclude:: createTopology.queries - :start-after: --q16 - :end-before: --q16.1 - -Additional Examples -------------------------------------------------------------------------------- - -.. contents:: - :local: - - -Create a routing topology -............................................................................... - -An alternate method to create a routing topology use :doc:`pgr_extractVertices` - -.. include:: pgr_extractVertices.rst - :start-after: create_routing_topology_start - :end-before: create_routing_topology_end - - -With full output -............................................................................... - -This example start a clean topology, with 5 edges, and then its incremented to -the rest of the edges. - -.. literalinclude:: createTopology.queries - :start-after: --q17 - :end-before: --q17.1 - -See Also -------------------------------------------------------------------------------- - -* :doc:`sampledata` -* :doc:`topology-functions` - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` - diff --git a/doc/topology/pgr_createVerticesTable.rst b/doc/topology/pgr_createVerticesTable.rst deleted file mode 100644 index 94446ec6984..00000000000 --- a/doc/topology/pgr_createVerticesTable.rst +++ /dev/null @@ -1,293 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: - single: Topology Family ; pgr_createVerticesTable - Deprecated since 3.8.0 - single: createVerticesTable - Deprecated since 3.8.0 - -| - -``pgr_createVerticesTable`` - Deprecated since 3.8.0 -=============================================================================== - -``pgr_createVerticesTable`` — Reconstructs the vertices table based on the -source and target information. - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - -* Version 2.0.0 - - * Official function. - * Renamed from version 1.x - -.. include:: migration.rst - :start-after: migrate_pgr_createVerticesTable_start - :end-before: migrate_pgr_createVerticesTable_end - -Description -------------------------------------------------------------------------------- - -The function returns: - -- ``OK`` after the vertices table has been reconstructed. -- ``FAIL`` when the vertices table was not reconstructed due to an error. - -|Boost| Boost Graph Inside - -Signatures -------------------------------------------------------------------------------- - -.. admonition:: \ \ - :class: signatures - - | pgr_createVerticesTable(edge_table, [``the_geom, source, target, rows_where``]) - - | RETURNS ``VARCHAR`` - -Parameters -------------------------------------------------------------------------------- - -The reconstruction of the vertices table function accepts the following -parameters: - -:edge_table: ``text`` Network table name. (may contain the schema name as well) -:the_geom: ``text`` Geometry column name of the network table. Default value is - ``the_geom``. -:source: ``text`` Source column name of the network table. Default value is - ``source``. -:target: ``text`` Target column name of the network table. Default value is - ``target``. -:rows_where: ``text`` Condition to SELECT a subset or rows. Default value is - ``true`` to indicate all rows. - -.. warning:: - - The ``edge_table`` will be affected - - - An index will be created, if it doesn't exists, to speed up the process to - the following columns: - - * ``the_geom`` - * ``source`` - * ``target`` - -The function returns: - -- ``OK`` after the vertices table has been reconstructed. - - * Creates a vertices table: _vertices_pgr. - * Fills ``id`` and ``the_geom`` columns of the vertices table based on the - source and target columns of the edge table. - -- ``FAIL`` when the vertices table was not reconstructed due to an error. - - * A required column of the Network table is not found or is not of the - appropriate type. - * The condition is not well formed. - * The names of source, target are the same. - * The SRID of the geometry could not be determined. - -.. rubric:: The Vertices Table - -The structure of the vertices table is: - -:id: ``bigint`` Identifier of the vertex. -:cnt: ``integer`` Number of vertices in the edge_table that reference this - vertex. -:chk: ``integer`` Indicator that the vertex might have a problem. -:ein: ``integer`` Number of vertices in the edge_table that reference this - vertex as incoming. -:eout: ``integer`` Number of vertices in the edge_table that reference this - vertex as outgoing. -:the_geom: ``geometry`` Point geometry of the vertex. - -:Example 1: The simplest way to use pgr_createVerticesTable - -.. literalinclude:: createVerticesTable.queries - :start-after: --q1 - :end-before: --q1.1 - - -Additional Examples -------------------------------------------------------------------------------- - - -:Example 2: When the arguments are given in the order described in the parameters: - -.. literalinclude:: createVerticesTable.queries - :start-after: --q2 - :end-before: --q2.1 - - -We get the same result as the simplest way to use the function. - -.. warning:: - An error would occur when the arguments are not given in the appropriate - order: In this example, the column source column ``source`` of the table - ``mytable`` is passed to the function as the geometry column, and the - geometry column ``the_geom`` is passed to the function as the source column. - - .. literalinclude:: createVerticesTable.queries - :start-after: --q2.1 - :end-before: --q2.2 - - -.. rubric:: When using the named notation - -:Example 3: The order of the parameters do not matter: - -.. literalinclude:: createVerticesTable.queries - :start-after: --q3.1 - :end-before: --q3.2 - -:Example 4: Using a different ordering - -.. literalinclude:: createVerticesTable.queries - :start-after: --q4 - :end-before: --q4.1 - - -:Example 5: Parameters defined with a default value can be omitted, as long as - the value matches the default: - -.. literalinclude:: createVerticesTable.queries - :start-after: --q5 - :end-before: --q5.1 - - -.. rubric:: Selecting rows using rows_where parameter - -:Example 6: Selecting rows based on the id. - -.. literalinclude:: createVerticesTable.queries - :start-after: --q6 - :end-before: --q6.1 - - -:Example 7: Selecting the rows where the geometry is near the geometry of row - with ``id`` =5 . - -.. literalinclude:: createVerticesTable.queries - :start-after: --q7 - :end-before: --q7.1 - - -:Example 8: Selecting the rows where the geometry is near the geometry of the - row with ``gid`` =100 of the table ``othertable``. - -.. literalinclude:: createVerticesTable.queries - :start-after: --q8 - :end-before: --q8.1 - -Usage when the edge table's columns DO NOT MATCH the default values: -............................................................................... - -Using the following table - -.. literalinclude:: createVerticesTable.queries - :start-after: --tab1 - :end-before: --tab2 - - -.. rubric:: Using positional notation: - -:Example 9: The arguments need to be given in the order described in the parameters: - -.. literalinclude:: createVerticesTable.queries - :start-after: --q9 - :end-before: --q9.1 - -.. warning:: - An error would occur when the arguments are not given in the appropriate - order: In this example, the column ``src`` of the table ``mytable`` is passed - to the function as the geometry column, and the geometry column ``mygeom`` is - passed to the function as the source column. - - .. literalinclude:: createVerticesTable.queries - :start-after: --q9.1 - :end-before: --q9.2 - -.. rubric:: When using the named notation - -:Example 10: The order of the parameters do not matter: - -.. literalinclude:: createVerticesTable.queries - :start-after: --q10 - :end-before: --q10.1 - -:Example 11: Using a different ordering - -In this scenario omitting a parameter would create an error because the default -values for the column names do not match the column names of the table. - -.. literalinclude:: createVerticesTable.queries - :start-after: --q11 - :end-before: --q11.1 - - -.. rubric:: Selecting rows using rows_where parameter - -:Example 12: Selecting rows based on the gid. (positional notation) - -.. literalinclude:: createVerticesTable.queries - :start-after: --q12 - :end-before: --q12.1 - -:Example 13: Selecting rows based on the gid. (named notation) - -.. literalinclude:: createVerticesTable.queries - :start-after: --q13 - :end-before: --q13.1 - -:Example 14: Selecting the rows where the geometry is near the geometry of row - with ``gid`` = 5. - -.. literalinclude:: createVerticesTable.queries - :start-after: --q14 - :end-before: --q14.1 - - -:Example 15: TBD - -.. literalinclude:: createVerticesTable.queries - :start-after: --q15 - :end-before: --q15.1 - -:Example 16: Selecting the rows where the geometry is near the geometry of the - row with ``gid`` =100 of the table ``othertable``. - -.. literalinclude:: createVerticesTable.queries - :start-after: --q16 - :end-before: --q16.1 - -.. literalinclude:: createVerticesTable.queries - :start-after: --q16.1 - :end-before: --q16.2 - -:Example 17: TBD - -.. literalinclude:: createVerticesTable.queries - :start-after: --q17 - :end-before: --q17.1 - -See Also -------------------------------------------------------------------------------- - -* :doc:`sampledata` -* :doc:`topology-functions` for an overview of a topology for routing - algorithms. - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/topology/pgr_nodeNetwork.rst b/doc/topology/pgr_nodeNetwork.rst deleted file mode 100644 index 98ea79f4776..00000000000 --- a/doc/topology/pgr_nodeNetwork.rst +++ /dev/null @@ -1,249 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: - single: Topology Family ; pgr_nodeNetwork - Deprecated since 3.8.0 - single: nodeNetwork - Deprecated since 3.8.0 - -| - -``pgr_nodeNetwork`` - Deprecated since 3.8.0 -=============================================================================== - -``pgr_nodeNetwork`` - Nodes an network edge table. - -:Author: Nicolas Ribot -:Copyright: Nicolas Ribot, The source code is released under the MIT-X license. - -The function reads edges from a not "noded" network table and writes the "noded" -edges into a new table. - -.. index:: - single: pgr_nodeNetwork - -.. parsed-literal:: - - | pgr_nodenetwork(edge_table, tolerance, [**options**]) - | **options:** ``[id, text the_geom, table_ending, rows_where, outall]`` - - | RETURNS ``TEXT`` - -.. rubric:: Availability - -* Version 3.8.0 - - * Deprecated function. - * Not checking and not creating indexes. - * Using ``pgr_separateTouching`` and ``pgr_separateCrossing``. - * Created table with ``BIGINT``. - -* Version 2.0.0 - - * Official function. - -.. include:: migration.rst - :start-after: migrate_pgr_nodeNetwork_start - :end-before: migrate_pgr_nodeNetwork_end - -Description -------------------------------------------------------------------------------- - -**The main characteristics are:** - -A common problem associated with bringing GIS data into pgRouting is the fact -that the data is often not "noded" correctly. This will create invalid -topologies, which will result in routes that are incorrect. - -What we mean by "noded" is that at every intersection in the road network all -the edges will be broken into separate road segments. There are cases like an -over-pass and under-pass intersection where you can not traverse from the -over-pass to the under-pass, but this function does not have the ability to -detect and accommodate those situations. - -This function reads the ``edge_table`` table, that has a primary key column -``id`` and geometry column named ``the_geom`` and intersect all the segments in -it against all the other segments and then creates a table ``edge_table_noded``. -It uses the ``tolerance`` for deciding that multiple nodes within the tolerance -are considered the same node. - -Parameters -------------------------------------------------------------------------------- - -:edge_table: ``text`` Network table name. (may contain the schema name as well) -:tolerance: ``float8`` tolerance for coincident points (in projection unit)dd -:id: ``text`` Primary key column name of the network table. Default value is - ``id``. -:the_geom: ``text`` Geometry column name of the network table. Default value is - ``the_geom``. -:table_ending: ``text`` Suffix for the new table's. Default value is ``noded``. - -The output table will have for ``edge_table_noded`` - -:id: ``bigint`` Unique identifier for the table -:old_id: ``bigint`` Identifier of the edge in original table -:sub_id: ``integer`` Segment number of the original edge -:source: ``bigint`` Empty source column -:target: ``bigint`` Empty target column -:the geom: ``geometry`` Geometry column of the noded network - -Examples -------------------------------------------------------------------------------- - -Create the topology for the data in :doc:`sampledata` - -.. literalinclude:: sampledata.queries - :start-after: -- q1 - :end-before: -- q1-1 - -.. literalinclude:: sampledata.queries - :start-after: -- q3 - :end-before: -- q4 - -Analyze the network for intersections. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q1 - :end-before: --q2 - -Analyze the network for gaps. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q2 - :end-before: --q3 - -The analysis tell us that the network has a gap and an intersection. - -Fixing an intersection -............................................................................... - -Storing the intersections. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q3 - :end-before: --q4 - -Calling ``pgr_nodeNetwork``. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q4 - :end-before: --q5 - -Inspecting the generated table, we can see that edges 13 and 18 have been -segmented. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q5 - :end-before: --q6 - -.. rubric:: Update the topology - -Add new segments to the edges table. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q6 - :end-before: --q7 - -Insert the intersection as new vertices. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q7 - :end-before: --q8 - -Update source and target information on the edges table. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q8 - :end-before: --q9 - -Delete original edge. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q9 - :end-before: --q10 - -Update the vertex topology - -.. literalinclude:: nodeNetwork.queries - :start-after: --q10 - :end-before: --q11 - -Analyze the network for intersections. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q11 - :end-before: --q12 - -Fixing a gap -............................................................................... - -Store the deadends - -.. literalinclude:: nodeNetwork.queries - :start-after: --q12 - :end-before: --q13 - -Calling ``pgr_nodeNetwork``. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q13 - :end-before: --q14 - -Inspecting the generated table, we can see that edge 14 has been segmented. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q14 - :end-before: --q15 - -.. rubric:: Update the topology - -Add new segments to the edges table. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q15 - :end-before: --q16 - -Insert the intersection as new vertices. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q16 - :end-before: --q17 - -Update source and target information on the edges table. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q17 - :end-before: --q18 - -Delete original edge. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q18 - :end-before: --q19 - -Update the vertex topology - -.. literalinclude:: nodeNetwork.queries - :start-after: --q19 - :end-before: --q20 - -Analyze the network for gaps. - -.. literalinclude:: nodeNetwork.queries - :start-after: --q20 - :end-before: --q21 - -See Also -------------------------------------------------------------------------------- - -:doc:`topology-functions` for an overview of a topology for routing algorithms. - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/topology/topology-functions.rst b/doc/topology/topology-functions.rst deleted file mode 100644 index bb715b5e5ca..00000000000 --- a/doc/topology/topology-functions.rst +++ /dev/null @@ -1,80 +0,0 @@ -.. - **************************************************************************** - pgRouting Manual - Copyright(c) pgRouting Contributors - - This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ - **************************************************************************** - -.. index:: Topology Family - -| - -Topology - Family of Functions -=============================================================================== - -The pgRouting's topology of a network represented with a graph in form of two -tables: and edge table and a vertex table. - -Attributes associated to the tables help to indicate if the graph is directed or -undirected, if an edge is one way on a directed graph, and depending on the -final application needs, suitable topology(s) need to be -created. - -.. official-start - -The following functions modify the database directly therefore the user must -have special permissions given by the administrators to use them. - -- :doc:`pgr_createTopology` - create a topology based on the geometry. -- :doc:`pgr_createVerticesTable` - reconstruct the vertices table based on - the source and target information. -- :doc:`pgr_analyzeGraph` - to analyze the edges and vertices of the edge - table. -- :doc:`pgr_analyzeOneWay` - to analyze directionality of the edges. -- :doc:`pgr_nodeNetwork` - to create nodes to a not noded edge table. - -.. official-end - -.. index:: Utilities - -| - -Utility functions -=============================================================================== - -.. utility_official-start - -- :doc:`pgr_extractVertices` - Extracts vertex information based on the edge - table information. -- :doc:`pgr_findCloseEdges` - Finds close edges of points on the fly -- :doc:`pgr_separateCrossing` - Breaks geometries that cross each other. -- :doc:`pgr_separateTouching` - Breaks geometries that (almost) touch each other. - -.. utility_official-end - -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. toctree:: - :hidden: - - pgr_createTopology - pgr_createVerticesTable - pgr_analyzeGraph - pgr_analyzeOneWay - pgr_nodeNetwork - pgr_extractVertices - pgr_findCloseEdges - pgr_separateCrossing - pgr_separateTouching - -See Also -------------------------------------------------------------------------------- - -.. rubric:: Indices and tables - -* :ref:`genindex` -* :ref:`search` diff --git a/doc/transitiveClosure/CMakeLists.txt b/doc/transitiveClosure/CMakeLists.txt index e68087e3193..d7abe837b55 100644 --- a/doc/transitiveClosure/CMakeLists.txt +++ b/doc/transitiveClosure/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_transitiveClosure.rst ) diff --git a/doc/transitiveClosure/pgr_transitiveClosure.rst b/doc/transitiveClosure/pgr_transitiveClosure.rst index 5546035fc0b..b7c9a4a6097 100644 --- a/doc/transitiveClosure/pgr_transitiveClosure.rst +++ b/doc/transitiveClosure/pgr_transitiveClosure.rst @@ -24,9 +24,13 @@ .. rubric:: Availability -* Version 3.0.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Standardized output to |result-closure| + +.. rubric:: Version 3.0.0 + +* New experimental function. Description diff --git a/doc/traversal/CMakeLists.txt b/doc/traversal/CMakeLists.txt index ca3cfe4d3b4..f814566a0b3 100644 --- a/doc/traversal/CMakeLists.txt +++ b/doc/traversal/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_binaryBreadthFirstSearch.rst pgr_breadthFirstSearch.rst pgr_depthFirstSearch.rst diff --git a/doc/traversal/images/CMakeLists.txt b/doc/traversal/images/CMakeLists.txt index 745f68a14a9..4205c418078 100644 --- a/doc/traversal/images/CMakeLists.txt +++ b/doc/traversal/images/CMakeLists.txt @@ -1,4 +1,4 @@ -SET(LOCAL_FILES +set(LOCAL_FILES Fig1-AscendingOrder.png Fig2-DescendingOrder.png bfs-ascending.png diff --git a/doc/traversal/pgr_binaryBreadthFirstSearch.rst b/doc/traversal/pgr_binaryBreadthFirstSearch.rst index ebdedac7264..001752ec927 100644 --- a/doc/traversal/pgr_binaryBreadthFirstSearch.rst +++ b/doc/traversal/pgr_binaryBreadthFirstSearch.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -29,15 +29,19 @@ non-negative integer, is termed as a 'binary graph'. .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 - * New experimental signature: +* Output columns standardized to |short-generic-result| - * pgr_binaryBreadthFirstSearch(Combinations) +.. rubric:: Version 3.2.0 -* Version 3.0.0 +* New experimental signature: - * New experimental function. + * pgr_binaryBreadthFirstSearch(Combinations) + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -47,8 +51,8 @@ vertices can be found using Breadth First Search in :math:`O(|E|)` in an unweighted graph, i.e. the distance is the minimal number of edges that you need to traverse from the source to another vertex. We can interpret such a graph also as a weighted graph, where every edge has the weight :math:`1`. -If not alledges in graph have the same weight, that we need a more general -algorithm, like Dijkstra's Algorithm which runs in :math:`O(|E|log|V|)` time. +If not all edges in graph have the same weight, then we a more general +algorithm is needed, like Dijkstra's Algorithm which runs in :math:`O(|E|log|V|)` time. However if the weights are more constrained, we can use a faster algorithm. This algorithm, termed as 'Binary Breadth First Search' as well as '0-1 BFS', @@ -87,7 +91,7 @@ Signatures | pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vids**, **end vids**, [``directed``]) | pgr_binaryBreadthFirstSearch(`Edges SQL`_, `Combinations SQL`_, [``directed``]) - | Returns set of |old-generic-result| + | Returns set of |short-generic-result| | OR EMPTY SET **Note:** Using the :doc:`sampledata` Network as all weights are same (i.e @@ -104,7 +108,7 @@ One to One | pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vid**, **end vid**, [``directed``]) - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertex :math:`10` on a **directed** graph @@ -124,7 +128,7 @@ One to Many | pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vid**, **end vids**, [``directed``]) - | Returns set of |result-1-m| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertex :math:`6` to vertices :math:`\{10, 17\}` on a **directed** @@ -145,7 +149,7 @@ Many to One | pgr_binaryBreadthFirstSearch(`Edges SQL`_, **start vids**, **end vid**, [``directed``]) - | Returns set of |result-m-1| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From vertices :math:`\{6, 1\}` to vertex :math:`17` on a **directed** @@ -239,8 +243,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_start - :end-before: return_path_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples diff --git a/doc/traversal/pgr_breadthFirstSearch.rst b/doc/traversal/pgr_breadthFirstSearch.rst index d8638e6dd0b..382eeedf11f 100644 --- a/doc/traversal/pgr_breadthFirstSearch.rst +++ b/doc/traversal/pgr_breadthFirstSearch.rst @@ -4,7 +4,7 @@ Copyright(c) pgRouting Contributors This documentation is licensed under a Creative Commons Attribution-Share - Alike 3.0 License: http://creativecommons.org/licenses/by-sa/3.0/ + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ **************************************************************************** .. index:: @@ -26,9 +26,13 @@ Search algorithm. .. rubric:: Availability -* Version 3.0.0 +.. rubric:: Version 4.0.0: - * New experimental function. +* Standardizing output columns to |result-spantree| + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -57,7 +61,7 @@ Signatures | pgr_breadthFirstSearch(`Edges SQL`_, **root vids**, [**options**]) | **options:** ``[max_depth, directed]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| .. index:: single: breadthFirstSearch - Experimental ; Single vertex - Experimental on v3.0 @@ -71,7 +75,7 @@ Single vertex | pgr_breadthFirstSearch(`Edges SQL`_, **root vid**, [**options**]) | **options:** ``[max_depth, directed]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| :Example: From root vertex :math:`6` on a **directed** graph with edges in ascending order of ``id`` @@ -92,7 +96,7 @@ Multiple vertices | pgr_breadthFirstSearch(`Edges SQL`_, **root vids**, [**options**]) | **options:** ``[max_depth, directed]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| :Example: From root vertices :math:`\{12, 6\}` on an **undirected** graph with **depth** :math:`<= 2` and edges in ascending order of ``id`` diff --git a/doc/traversal/pgr_depthFirstSearch.rst b/doc/traversal/pgr_depthFirstSearch.rst index c9c8b351284..b71affc97b1 100644 --- a/doc/traversal/pgr_depthFirstSearch.rst +++ b/doc/traversal/pgr_depthFirstSearch.rst @@ -26,13 +26,17 @@ The graph can be directed or undirected. .. rubric:: Availability -* Version 3.3.0 +.. rubric:: Version 4.0.0: - * Function promoted to proposed. +* Standardizing output columns to |result-spantree| -* Version 3.2.0 +.. rubric:: Version 3.3.0 - * New experimental function. +* Function promoted to proposed. + +.. rubric:: Version 3.2.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -70,7 +74,7 @@ Signatures | pgr_depthFirstSearch(`Edges SQL`_, **root vids**, [**options**]) | **options:** ``[directed, max_depth]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| .. index:: single: depthFirstSearch - Proposed ; Single vertex - Proposed on v3.3 @@ -84,7 +88,7 @@ Single vertex | pgr_depthFirstSearch(`Edges SQL`_, **root vid**, [**options**]) | **options:** ``[directed, max_depth]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| :Example: From root vertex :math:`6` on a **directed** graph with edges in ascending order of ``id`` @@ -105,7 +109,7 @@ Multiple vertices | pgr_depthFirstSearch(`Edges SQL`_, **root vids**, [**options**]) | **options:** ``[directed, max_depth]`` - | Returns set of |result-bfs| + | Returns set of |result-spantree| :Example: From root vertices :math:`\{12, 6\}` on an **undirected** graph with **depth** :math:`<= 2` and edges in ascending order of ``id`` diff --git a/doc/traversal/traversal-family.rst b/doc/traversal/traversal-family.rst index ec3be222f37..331a51bf06a 100644 --- a/doc/traversal/traversal-family.rst +++ b/doc/traversal/traversal-family.rst @@ -18,11 +18,11 @@ Traversal - Family of functions :start-after: warning-begin :end-before: end-warning -.. official-start +.. proposed-start * :doc:`pgr_depthFirstSearch` - Depth first search traversal of the graph. -.. official-end +.. proposed-end .. include:: experimental.rst :start-after: warning-begin diff --git a/doc/trsp/CMakeLists.txt b/doc/trsp/CMakeLists.txt index fb73962201b..521f249cc8b 100644 --- a/doc/trsp/CMakeLists.txt +++ b/doc/trsp/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES TRSP-family.rst pgr_trsp.rst pgr_trspVia.rst diff --git a/doc/trsp/TRSP-family.rst b/doc/trsp/TRSP-family.rst index f0e2c17044a..99d8facf281 100644 --- a/doc/trsp/TRSP-family.rst +++ b/doc/trsp/TRSP-family.rst @@ -16,21 +16,14 @@ TRSP - Family of functions When points are also given as input: -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning +.. official-start -.. proposed-start - -- :doc:`pgr_trsp` - Vertex - Vertex routing with restrictions. +- :doc:`pgr_trsp` - Routing with restrictions. - :doc:`pgr_trspVia` - Via Vertices routing with restrictions. - :doc:`pgr_trsp_withPoints` - Vertex/Point routing with restrictions. - :doc:`pgr_trspVia_withPoints` - Via Vertex/point routing with restrictions. -.. proposed-end - -.. Warning:: Read the :doc:`migration` about how to migrate from the - deprecated TRSP functionality to the new signatures or replacement functions. +.. official-end .. include:: experimental.rst :start-after: warning-begin diff --git a/doc/trsp/pgr_trsp.rst b/doc/trsp/pgr_trsp.rst index 005ffbc6530..ad3abd3f15c 100644 --- a/doc/trsp/pgr_trsp.rst +++ b/doc/trsp/pgr_trsp.rst @@ -15,44 +15,51 @@ | -``pgr_trsp`` - Proposed +``pgr_trsp`` =============================================================================== ``pgr_trsp`` - routing vertices with restrictions. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. + +.. Breaking change + +* Breaking change, signatures no longer available: - * New proposed signatures: + * pgr_trsp(text,integer,integer,boolean,boolean,text) + * pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) - * pgr_trsp(One to One) - * pgr_trsp(One to Many) - * pgr_trsp(Many to One) - * pgr_trsp(Many to Many) - * pgr_trsp(Combinations) +.. rubric:: Version 3.4.0 - * Deprecated signatures +* New proposed signatures: - * pgr_trsp(text,integer,integer,boolean,boolean,text) - * pgr_trsp(text,integer,float,integer,float,boolean,boolean,text) - * pgr_trspViaVertices(text,anyarray,boolean,boolean,text) - * pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text) + * pgr_trsp(One to One) + * pgr_trsp(One to Many) + * pgr_trsp(Many to One) + * pgr_trsp(Many to Many) + * pgr_trsp(Combinations) -* Version 2.1.0 +* Deprecated signatures - * New prototypes + * pgr_trsp(text,integer,integer,boolean,boolean,text) + * pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text) + * pgr_trspViaVertices(text,anyarray,boolean,boolean,text) + * pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text) - * pgr_trspViaVertices - * pgr_trspViaEdges +.. rubric:: Version 2.1.0 -* Version 2.0.0 +* New prototypes - * Official function. + * pgr_trspViaVertices + * pgr_trspViaEdges + +.. rubric:: Version 2.0.0 + +* Official function. Description ------------------------------------------------------------------------------- @@ -92,7 +99,7 @@ Signatures | OR EMPTY SET .. index:: - single: trsp ; One to One -- Proposed on v3.4 + single: trsp ; One to One One to One ............................................................................... @@ -112,7 +119,7 @@ One to One :end-before: -- q3 .. index:: - single: trsp ; One to Many -- Proposed on v3.4 + single: trsp ; One to Many One to Many ............................................................................... @@ -133,7 +140,7 @@ One to Many :end-before: -- q4 .. index:: - single: trsp ; Many to One -- Proposed on v3.4 + single: trsp ; Many to One Many to One ............................................................................... @@ -154,7 +161,7 @@ Many to One :end-before: -- q5 .. index:: - single: trsp ; Many to Many -- Proposed on v3.4 + single: trsp ; Many to Many Many to Many ............................................................................... @@ -176,7 +183,7 @@ Many to Many :end-before: -- q6 .. index:: - single: trsp ; Combinations - Proposed on v3.4 + single: trsp ; Combinations Combinations ............................................................................... @@ -239,10 +246,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_all_columns_start - :end-before: return_path_all_columns_end - - + :start-after: return_path_complete_start + :end-before: return_path_complete_end See Also ------------------------------------------------------------------------------- diff --git a/doc/trsp/pgr_trspVia.rst b/doc/trsp/pgr_trspVia.rst index e578332a539..2cd8686c4ed 100644 --- a/doc/trsp/pgr_trspVia.rst +++ b/doc/trsp/pgr_trspVia.rst @@ -15,20 +15,29 @@ | -``pgr_trspVia`` - Proposed +``pgr_trspVia`` =============================================================================== ``pgr_trspVia`` Route that goes through a list of vertices with restrictions. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. + +.. Breaking change + +* Breaking change, signatures no longer available: + + * pgr_trspviavertices(text,anyarray,boolean,boolean,text) + +.. rubric:: Version 3.4.0 + +* New proposed function. +* Deprecated signatures - * New proposed function. + * pgr_trspviavertices(text,anyarray,boolean,boolean,text) Description ------------------------------------------------------------------------------- @@ -53,7 +62,7 @@ Signatures ------------------------------------------------------------------------------- .. index:: - single: trspVia ; One Via - Proposed on v3.4 + single: trspVia ; One Via One Via ............................................................................... diff --git a/doc/trsp/pgr_trspVia_withPoints.rst b/doc/trsp/pgr_trspVia_withPoints.rst index 40ae2342c8a..c8b33dae0b6 100644 --- a/doc/trsp/pgr_trspVia_withPoints.rst +++ b/doc/trsp/pgr_trspVia_withPoints.rst @@ -16,21 +16,33 @@ | -``pgr_trspVia_withPoints`` - Proposed +``pgr_trspVia_withPoints`` =============================================================================== ``pgr_trspVia_withPoints`` - Route that goes through a list of vertices and/or points with restrictions. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is positional unnamed. + + * Valid values depend on kind of graph + +* Breaking change, signatures no longer available: + + * pgr_trspvia_withpoints(text,text,text,anyarray,boolean,boolean,boolean,character,boolean) + * pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text) + + +.. rubric:: Version 3.4.0 + +* New proposed function. +* Deprecated signatures - * New proposed function. + * pgr_trspviaedges(text,integer[],double precision[],boolean,boolean,text) Description ------------------------------------------------------------------------------- @@ -65,7 +77,7 @@ Signatures ------------------------------------------------------------------------------- .. index:: - single: trspVia_withPoints ; One Via - Proposed on v3.4 + single: trspVia_withPoints ; One Via One Via ............................................................................... @@ -73,8 +85,8 @@ One Via .. admonition:: \ \ :class: signatures - | pgr_trspVia_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **via vertices**, [**options**]) - | **options:** ``[directed, strict, U_turn_on_edge]`` + | pgr_trspVia_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **via vertices**, [**driving side**,] [**options**]) + | **options:** ``[directed, strict, U_turn_on_edge, details]`` | Returns set of |via-result| | OR EMPTY SET @@ -89,9 +101,41 @@ One Via Parameters ------------------------------------------------------------------------------- -.. include:: via-category.rst - :start-after: via_withPoints_parameters_start - :end-before: via_withPoints_parameters_end +.. trspvia_withPoints_parameters_start + +.. list-table:: + :width: 81 + :widths: auto + :header-rows: 1 + + * - Parameter + - Type + - Description + * - `Edges SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Restrictions SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Points SQL`_ + - ``TEXT`` + - SQL query as described. + * - **via vertices** + - ``ARRAY`` [ **ANY-INTEGER** ] + - Array of ordered vertices identifiers that are going to be visited. + + * When positive it is considered a vertex identifier + * When negative it is considered a point identifier + +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + +Where: + +:ANY-INTEGER: SMALLINT, INTEGER, BIGINT + +.. trspvia_withPoints_parameters_end Optional parameters ............................................................................... @@ -110,9 +154,9 @@ Via optional parameters With points optional parameters ............................................................................... -.. include:: pgr_trsp_withPoints.rst - :start-after: withPoints_parameters_start - :end-before: withPoints_parameters_end +.. include:: withPoints-category.rst + :start-after: withPoints_optionals_start + :end-before: withPoints_optionals_end Inner Queries ------------------------------------------------------------------------------- diff --git a/doc/trsp/pgr_trsp_withPoints.rst b/doc/trsp/pgr_trsp_withPoints.rst index 71b437779c0..f4b067bd57f 100644 --- a/doc/trsp/pgr_trsp_withPoints.rst +++ b/doc/trsp/pgr_trsp_withPoints.rst @@ -16,53 +16,67 @@ | -``pgr_trsp_withPoints`` - Proposed +``pgr_trsp_withPoints`` =============================================================================== ``pgr_trsp_withPoints`` Routing Vertex/Point with restrictions. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is positional unnamed and compulsory. + + * Valid values depend on kind of graph + +* Breaking change, signatures no longer available: + + * pgr_trsp_withpoints(text,text,text,anyarray,anyarray,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,anyarray,bigint,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,bigint,anyarray,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,bigint,bigint,boolean,character,boolean) + * pgr_trsp_withpoints(text,text,text,text,boolean,character,boolean) - * New proposed function. +.. rubric:: Version 3.4.0 + +* New proposed function. Description ------------------------------------------------------------------------------- -Modify the graph to include points defined by points_sql. -Using Dijkstra algorithm, find the shortest path +Modify the graph to include points defined by `Points SQL`_. +Consider the invalid paths on `Restrictions SQL`_. +Using Dijkstra algorithm, find the shortest path. -Characteristics: +The main characteristics are: +- Process is done only on edges with positive costs. - Vertices of the graph are: - **positive** when it belongs to the `Edges SQL`_ - **negative** when it belongs to the `Points SQL`_ -- Driving side can not be ``b`` - Values are returned when there is a path. - When the starting vertex and ending vertex are the same, there is no path. - - The agg_cost the non included values (v, v) is 0 + - The `agg_cost` in the non included values `(v, v)` is `0` - When the starting vertex and ending vertex are the different and there is no path: - - The agg_cost the non included values (u, v) is ∞ + - The `agg_cost` in the non included values `(u, v)` is :math:`\infty` + +- For optimization purposes, any duplicated value in the input arrays of **start vids** or + **end vids** or are ignored. -- For optimization purposes, any duplicated value in the start_vids or end_vids - are ignored. - The returned values are ordered: - - start_vid ascending - - end_vid ascending -* Running time: :math:`O(|start\_vids|\times(V \log V + E))` + - `start_vid` ascending + - `end_vid` ascending + +- Running time: :math:`O(|start\_vids|\times(V \log V + E))` |Boost| Boost Graph Inside @@ -74,18 +88,18 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vid**, [**options**]) - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vids**, [**options**]) - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vid**, [**options**]) - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vids**, [**options**]) - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Combinations SQL`_, `Points SQL`_, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**,] [**options**]) + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**,] [**options**]) + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**,] [**options**]) + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**,] [**options**]) + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET .. index:: - single: trsp_withPoints ; One to One - Proposed on v3.4 + single: trsp_withPoints ; One to One One to One ............................................................................... @@ -93,21 +107,21 @@ One to One .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vid**, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` to vertex :math:`10` with details on a left - driving side configuration on a directed graph with details. +:Example: From point :math:`1` to vertex :math:`10` with right driving side in directed graph. + (with details) .. literalinclude:: trsp_withPoints.queries - :start-after: --e1 - :end-before: --e2 + :start-after: -- q1 + :end-before: -- q2 .. index:: - single: trsp_withPoints ; One to Many - Proposed on v3.4 + single: trsp_withPoints ; One to Many One to Many ............................................................................... @@ -115,20 +129,21 @@ One to Many .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vids**, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` to point :math:`3` and vertex :math:`7`. +:Example: From point :math:`1` to point :math:`3` and vertex :math:`7` on an + undirected graph .. literalinclude:: trsp_withPoints.queries - :start-after: --e2 - :end-before: --e3 + :start-after: -- q2 + :end-before: -- q3 .. index:: - single: trsp_withPoints ; Many to One - Proposed on v3.4 + single: trsp_withPoints ; Many to One Many to One ............................................................................... @@ -136,20 +151,21 @@ Many to One .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vid**, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` and vertex :math:`6` to point :math:`3`. +:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` with right driving side in directed graph. + (without details) .. literalinclude:: trsp_withPoints.queries - :start-after: --e3 - :end-before: --e4 + :start-after: -- q3 + :end-before: -- q4 .. index:: - single: trsp_withPoints ; Many to Many - Proposed on v3.4 + single: trsp_withPoints ; Many to Many Many to Many ............................................................................... @@ -157,21 +173,21 @@ Many to Many .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vids**, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET :Example: From point :math:`1` and vertex :math:`6` to point :math:`3` and - vertex :math:`1`. + vertex :math:`1` with left side driving. .. literalinclude:: trsp_withPoints.queries - :start-after: --e4 - :end-before: --e5 + :start-after: -- q4 + :end-before: -- q5 .. index:: - single: trsp_withPoints ; Combinations - Proposed on v3.4 + single: trsp_withPoints ; Combinations Combinations ............................................................................... @@ -179,26 +195,67 @@ Combinations .. admonition:: \ \ :class: signatures - | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Combinations SQL`_, `Points SQL`_, [**options**]) - | **options:** ``[directed, driving_side, details]`` + | pgr_trsp_withPoints(`Edges SQL`_, `Restrictions SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**,] [**options**]) + | **options:** ``[directed, details]`` | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` to vertex :math:`10` and from vertex :math:`6` to - point :math:`3` with right side driving configuration. +:Example: Two combinations + +From point :math:`1` to vertex :math:`10`, and from vertex :math:`6` to point +:math:`3` with right side driving. +(with details) .. literalinclude:: trsp_withPoints.queries - :start-after: --e5 - :end-before: --q1 + :start-after: -- q5 + :end-before: -- q6 Parameters ------------------------------------------------------------------------------- -.. include:: pgRouting-concepts.rst - :start-after: restriction_parameters_start - :end-before: restriction_parameters_end +.. restriction_parameters_start + +.. list-table:: + :width: 81 + :widths: 17 22 44 + :header-rows: 1 + * - Column + - Type + - Description + * - `Edges SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Restrictions SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Points SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Combinations SQL`_ + - ``TEXT`` + - `Combinations SQL`_ as described below + * - **start vid** + - **ANY-INTEGER** + - Identifier of the departure vertex. + * - **start vids** + - ``ARRAY`` [**ANY-INTEGER**] + - Array of identifiers of destination vertices. + * - **end vid** + - **ANY-INTEGER** + - Identifier of the departure vertex. + * - **end vids** + - ``ARRAY`` [**ANY-INTEGER**] + - Array of identifiers of destination vertices. + +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + +Where: + +:ANY-INTEGER: ``SMALLINT``, ``INTEGER``, ``BIGINT`` Optional parameters ............................................................................... @@ -210,33 +267,9 @@ Optional parameters With points optional parameters ............................................................................... -.. withPoints_parameters_start - -.. list-table:: - :width: 81 - :widths: 14 7 7 60 - :header-rows: 1 - - * - Parameter - - Type - - Default - - Description - * - ``driving_side`` - - ``CHAR`` - - ``r`` - - Value in [``r``, ``l``] indicating if the driving side is: - - - ``r`` for right driving side - - ``l`` for left driving side - - Any other value will be considered as ``r`` - * - ``details`` - - ``BOOLEAN`` - - ``false`` - - - When ``true`` the results will include the points that are in the path. - - When ``false`` the results will not include the points that are in the - path. - -.. withPoints_parameters_end +.. include:: withPoints-category.rst + :start-after: withPoints_optionals_start + :end-before: withPoints_optionals_end Inner Queries ------------------------------------------------------------------------------- @@ -273,8 +306,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_path_all_columns_start - :end-before: return_path_all_columns_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- @@ -282,40 +315,48 @@ Additional Examples .. contents:: :local: -Use ``pgr_findCloseEdges`` for points on the fly +Use :doc:`pgr_findCloseEdges` in the `Points SQL`_. ............................................................................... -Using :doc:`pgr_findCloseEdges`: - Find the routes from vertex :math:`1` to the two closest locations on the graph of point `(2.9, 1.8)`. .. literalinclude:: trsp_withPoints.queries - :start-after: --q3 - :end-before: -- q4 + :start-after: -- q9 + :end-before: -- q10 * Point :math:`-1` corresponds to the closest edge from point `(2.9, 1.8)`. * Point :math:`-2` corresponds to the next close edge from point `(2.9, 1.8)`. -Pass in front or visits. +Usage variations ............................................................................... -Which path (if any) passes in front of point :math:`6` or vertex :math:`11` with -right side driving topology. +All the examples are about traveling from point :math:`1` and vertex :math:`5` +to points :math:`\{2, 3, 6\}` and vertices :math:`\{10, 11\}` +with restrictions .. literalinclude:: trsp_withPoints.queries - :start-after: --q1 - :end-before: --q2 + :start-after: -- q6 + :end-before: -- q7 -Show details on undirected graph. -............................................................................... +Passes in front or visits with right side driving. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +For point :math:`6` and vertex :math:`11`. -From point :math:`1` and vertex :math:`6` to point :math:`3` to vertex :math:`1` -on an undirected graph, with details. +.. literalinclude:: trsp_withPoints.queries + :start-after: -- q7 + :end-before: -- q8 + +Passes in front or visits with left side driving. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +For point :math:`6` and vertex :math:`11`. .. literalinclude:: trsp_withPoints.queries - :start-after: --q2 - :end-before: --q3 + :start-after: -- q8 + :end-before: -- q9 + See Also ------------------------------------------------------------------------------- diff --git a/doc/trsp/pgr_turnRestrictedPath.rst b/doc/trsp/pgr_turnRestrictedPath.rst index a07fe2d3659..5047b5f41d5 100644 --- a/doc/trsp/pgr_turnRestrictedPath.rst +++ b/doc/trsp/pgr_turnRestrictedPath.rst @@ -27,9 +27,13 @@ restrictions .. rubric:: Availability -* Version 3.0.0 +.. rubric:: Version 4.0.0 - * New experimental function. +* Output columns standardized to |nksp-result| + +.. rubric:: Version 3.0.0 + +* New experimental function. Description ------------------------------------------------------------------------------- @@ -48,7 +52,7 @@ Signatures | pgr_turnRestrictedPath(`Edges SQL`_, `Restrictions SQL`_, **start vid**, **end vid**, **K**, [**options**]) | **options:** ``[directed, heap_paths, stop_on_first, strict]`` - | Returns set of |ksp-result| + | Returns set of |nksp-result| | OR EMPTY SET :Example: From vertex :math:`3` to vertex :math:`8` on a directed graph diff --git a/doc/tsp/CMakeLists.txt b/doc/tsp/CMakeLists.txt index cacbe1a40b5..dd9850bc800 100644 --- a/doc/tsp/CMakeLists.txt +++ b/doc/tsp/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_TSPeuclidean.rst pgr_TSP.rst TSP-family.rst diff --git a/doc/tsp/TSP-family.rst b/doc/tsp/TSP-family.rst index 3b21d57ef33..054f8766803 100644 --- a/doc/tsp/TSP-family.rst +++ b/doc/tsp/TSP-family.rst @@ -87,17 +87,16 @@ Characteristics - This problem is an NP-hard optimization problem. - Metric Algorithm is used - Implementation generates solutions that *are twice as long as the optimal tour - in the worst case* when: + in the worst case*: +- Graph characteristics for best performance: - Graph is undirected - Graph is fully connected - Graph where traveling costs on edges obey the triangle inequality. - -- On an undirected graph: - - The traveling costs are symmetric: - - Traveling costs from ``u`` to ``v`` are just as much as traveling from - ``v`` to ``u`` + + - Traveling costs from ``u`` to ``v`` are just as much as traveling from + ``v`` to ``u`` .. tsp characteristics end diff --git a/doc/tsp/images/CMakeLists.txt b/doc/tsp/images/CMakeLists.txt index b71bbe2e860..51fba72c53d 100644 --- a/doc/tsp/images/CMakeLists.txt +++ b/doc/tsp/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES wi29optimal.png wi29Solution.png ) diff --git a/doc/tsp/pgr_TSP.rst b/doc/tsp/pgr_TSP.rst index eafac324116..67543d6f18a 100644 --- a/doc/tsp/pgr_TSP.rst +++ b/doc/tsp/pgr_TSP.rst @@ -20,27 +20,38 @@ .. rubric:: Availability: -* Version 3.2.1 +.. rubric:: Version 4.0.0 - * Metric Algorithm from `Boost library - `__ - * Simulated Annealing Algorithm no longer supported +* Results change depending on input order +* Only for undirected graphs - * The Simulated Annealing Algorithm related parameters are ignored: - max_processing_time, tries_per_temperature, - max_changes_per_temperature, max_consecutive_non_changes, - initial_temperature, final_temperature, cooling_factor, - randomize +.. Breaking change -* Version 2.3.0 +* Breaking change, signatures no longer available: - * Signature change + * pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double + precision,double precision,double precision,boolean) - * Old signature no longer supported +.. rubric:: Version 3.2.1 -* Version 2.0.0 +* Metric Algorithm from `Boost library + `__ +* Simulated Annealing Algorithm no longer supported + + * The Simulated Annealing Algorithm related parameters are ignored: + `max_processing_time`, `tries_per_temperature`, + `max_changes_per_temperature`, `max_consecutive_non_changes`, + `initial_temperature`, `final_temperature`, `cooling_factor`, `randomize` + +.. rubric:: Version 2.3.0 + +* Signature change + + * Old signature no longer supported - * Official function. +.. rubric:: Version 2.0.0 + +* Official function. Description @@ -54,6 +65,8 @@ Description :start-after: tsp characteristics start :end-before: tsp characteristics end +- Results change depending on input order of the `Matrix SQL`_ +- Negative costs are ignored. - Can be Used with :doc:`costMatrix-category` functions preferably with `directed => false`. @@ -98,9 +111,22 @@ Description - Some (or all) traveling costs on edges will still might not obey the triangle inequality. -- When the data is incomplete, but it is a connected graph: +- When the data does not come from an undirected graph or its not fully + connected: + + - Missing values will be calculated with dijkstra algorithm. + - When the graph has more than one component: + + - ``start_vid`` or ``end_vid`` are defined and are on the same component: + the TSP tour will happen on that component. + - ``start_vid`` or ``end_vid`` are defined and are not on the same + component: the TSP tour will propose a tour that has both components + where connecting costs are estimated. + - ``start_vid`` or ``end_vid`` are not defined: the starting point could be + on any component and will include data only from that component. + +- One cycle attempt to remove crossing edges is done to the TSP results. - - the missing values will be calculated with dijkstra algorithm. |Boost| Boost Graph Inside diff --git a/doc/tsp/pgr_TSPeuclidean.rst b/doc/tsp/pgr_TSPeuclidean.rst index 5d9ba1e5957..d4807869055 100644 --- a/doc/tsp/pgr_TSPeuclidean.rst +++ b/doc/tsp/pgr_TSPeuclidean.rst @@ -20,25 +20,35 @@ .. rubric:: Availability: -* Version 3.2.1 +.. rubric:: Version 4.0.0 - * Using `Boost: metric TSP approx - `__ - * Simulated Annealing Algorithm no longer supported +* Results change depending on input order - * The Simulated Annealing Algorithm related parameters are ignored: - `max_processing_time`, `tries_per_temperature`, - `max_changes_per_temperature`, `max_consecutive_non_changes`, - `initial_temperature`, `final_temperature`, `cooling_factor`, - `randomize` +.. Breaking change -* Version 3.0.0 +* Breaking change, signatures no longer available: - * Name change from pgr_eucledianTSP + * pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer, + integer,double precision,double precision,double precision,boolean) -* Version 2.3.0 +.. rubric:: Version 3.2.1 - * New official function. +* Using `Boost: metric TSP approx + `__ +* Simulated Annealing Algorithm no longer supported + + * The Simulated Annealing Algorithm related parameters are ignored: + `max_processing_time`, `tries_per_temperature`, + `max_changes_per_temperature`, `max_consecutive_non_changes`, + `initial_temperature`, `final_temperature`, `cooling_factor`, `randomize` + +.. rubric:: Version 3.0.0 + +* Name change from pgr_eucledianTSP + +.. rubric:: Version 2.3.0 + +* New official function. Description @@ -52,6 +62,7 @@ Description :start-after: tsp characteristics start :end-before: tsp characteristics end +- Results change depending on input order of the `Coordinates SQL`_ - Any duplicated identifier will be ignored. The coordinates that will be kept is arbitrarily. diff --git a/doc/utilities/CMakeLists.txt b/doc/utilities/CMakeLists.txt index a8de3c5fc3b..776752029d4 100644 --- a/doc/utilities/CMakeLists.txt +++ b/doc/utilities/CMakeLists.txt @@ -1,7 +1,9 @@ -SET(LOCAL_FILES +set(LOCAL_FILES + pgr_extractVertices.rst pgr_findCloseEdges.rst pgr_separateCrossing.rst pgr_separateTouching.rst + utilities-family.rst ) foreach (f ${LOCAL_FILES}) diff --git a/doc/topology/pgr_extractVertices.rst b/doc/utilities/pgr_extractVertices.rst similarity index 99% rename from doc/topology/pgr_extractVertices.rst rename to doc/utilities/pgr_extractVertices.rst index 5238c556b8e..ac98ddb6a42 100644 --- a/doc/topology/pgr_extractVertices.rst +++ b/doc/utilities/pgr_extractVertices.rst @@ -284,7 +284,7 @@ Inspect the routing topology See Also ------------------------------------------------------------------------------- -* :doc:`topology-functions` +* :doc:`utilities-family` .. rubric:: Indices and tables diff --git a/doc/utilities/pgr_separateCrossing.rst b/doc/utilities/pgr_separateCrossing.rst index b7ab1ad596a..f20033585b9 100644 --- a/doc/utilities/pgr_separateCrossing.rst +++ b/doc/utilities/pgr_separateCrossing.rst @@ -175,7 +175,7 @@ Routing from :math:`1` to :math:`18` gives a solution. See Also ------------------------------------------------------------------------------- -:doc:`topology-functions` for an overview of a topology for routing algorithms. +:doc:`utilities-family` .. rubric:: Indices and tables diff --git a/doc/utilities/pgr_separateTouching.rst b/doc/utilities/pgr_separateTouching.rst index ca2e6f318a0..e28627f30f4 100644 --- a/doc/utilities/pgr_separateTouching.rst +++ b/doc/utilities/pgr_separateTouching.rst @@ -176,7 +176,7 @@ Routing from :math:`1` to :math:`2` gives a solution. See Also ------------------------------------------------------------------------------- -:doc:`topology-functions` for an overview of a topology for routing algorithms. +:doc:`utilities-family` .. rubric:: Indices and tables diff --git a/doc/utilities/utilities-family.rst b/doc/utilities/utilities-family.rst new file mode 100644 index 00000000000..1290e95645a --- /dev/null +++ b/doc/utilities/utilities-family.rst @@ -0,0 +1,41 @@ +.. + **************************************************************************** + pgRouting Manual + Copyright(c) pgRouting Contributors + + This documentation is licensed under a Creative Commons Attribution-Share + Alike 3.0 License: https://creativecommons.org/licenses/by-sa/3.0/ + **************************************************************************** + +.. index:: Utilities + +| + +Utility functions +=============================================================================== + +.. official-start + +- :doc:`pgr_extractVertices` - Extracts vertex information based on the edge + table information. +- :doc:`pgr_findCloseEdges` - Finds close edges of points on the fly +- :doc:`pgr_separateCrossing` - Breaks geometries that cross each other. +- :doc:`pgr_separateTouching` - Breaks geometries that (almost) touch each other. + +.. official-end + +.. toctree:: + :hidden: + + pgr_extractVertices + pgr_findCloseEdges + pgr_separateCrossing + pgr_separateTouching + +See Also +------------------------------------------------------------------------------- + +.. rubric:: Indices and tables + +* :ref:`genindex` +* :ref:`search` diff --git a/doc/version/CMakeLists.txt b/doc/version/CMakeLists.txt index a17f4e7ab85..5f9e9d79360 100644 --- a/doc/version/CMakeLists.txt +++ b/doc/version/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_version.rst pgr_full_version.rst reference.rst diff --git a/doc/withPoints/CMakeLists.txt b/doc/withPoints/CMakeLists.txt index 1533f0dceab..ef94e5d6a4d 100644 --- a/doc/withPoints/CMakeLists.txt +++ b/doc/withPoints/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES pgr_withPointsDD.rst pgr_withPoints.rst withPoints-family.rst diff --git a/doc/withPoints/images/CMakeLists.txt b/doc/withPoints/images/CMakeLists.txt index 462f26e8ed8..a72743106f2 100644 --- a/doc/withPoints/images/CMakeLists.txt +++ b/doc/withPoints/images/CMakeLists.txt @@ -1,5 +1,5 @@ -SET(LOCAL_FILES +set(LOCAL_FILES leftDrivingSide.png noMatterDrivingSide.png rightDrivingSide.png diff --git a/doc/withPoints/pgr_withPoints.rst b/doc/withPoints/pgr_withPoints.rst index 06a8dc6115a..db0e7d96c4d 100644 --- a/doc/withPoints/pgr_withPoints.rst +++ b/doc/withPoints/pgr_withPoints.rst @@ -15,58 +15,77 @@ | -``pgr_withPoints`` - Proposed +``pgr_withPoints`` =============================================================================== ``pgr_withPoints`` - Returns the shortest path in a graph with additional temporary vertices. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is positional unnamed and compulsory. + + * Valid values depend on kind of graph + +* Output columns standardized to |short-generic-result| + +.. Breaking change + +* Breaking change, signatures no longer available: + + * pgr_withpoints(text,text,anyarray,anyarray,boolean,character,boolean) + * pgr_withpoints(text,text,anyarray,bigint,boolean,character,boolean) + * pgr_withpoints(text,text,bigint,anyarray,boolean,character,boolean) + * pgr_withpoints(text,text,bigint,bigint,boolean,character,boolean) + * pgr_withpoints(text,text,text,boolean,character,boolean) + +.. rubric:: Version 3.2.0 - * New proposed signature: +* New proposed signature: - * pgr_withPoints(Combinations) + * pgr_withPoints(Combinations) -* Version 2.2.0 +.. rubric:: Version 2.2.0 - * New proposed function. +* New proposed function. Description ------------------------------------------------------------------------------- -Modify the graph to include points defined by points_sql. -Using Dijkstra algorithm, find the shortest path +Modify the graph to include points defined by `Points SQL`_. +Using Dijkstra algorithm, find the shortest path. -**The main characteristics are:** +The main characteristics are: - Process is done only on edges with positive costs. - Vertices of the graph are: - - **positive** when it belongs to the edges_sql - - **negative** when it belongs to the points_sql + - **positive** when it belongs to the `Edges SQL`_ + - **negative** when it belongs to the `Points SQL`_ - Values are returned when there is a path. - When the starting vertex and ending vertex are the same, there is no path. - - The agg_cost the non included values (v, v) is 0 + + - The `agg_cost` in the non included values `(v, v)` is `0` - When the starting vertex and ending vertex are the different and there is no path: - - The agg_cost the non included values (u, v) is ∞ -- For optimization purposes, any duplicated value in the start_vids or end_vids - are ignored. + - The `agg_cost` in the non included values `(u, v)` is :math:`\infty` + +- For optimization purposes, any duplicated value in the input arrays of **start vids** or + **end vids** or are ignored. + - The returned values are ordered: - - start_vid ascending - - end_vid ascending -* Running time: :math:`O(|start\_vids|\times(V \log V + E))` + - `start_vid` ascending + - `end_vid` ascending + +- Running time: :math:`O(|start\_vids|\times(V \log V + E))` |Boost| Boost Graph Inside @@ -78,18 +97,18 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**options**]) - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**options**]) - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**options**]) - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**options**]) - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**options**]) - | **options:** ``[directed, driving_side, details])`` + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**] [**options**]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**] [**options**]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**] [**options**]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**] [**options**]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**] [**options**]) + | **options:** ``[directed, details])`` - | Returns set of |old-pid-result| + | Returns set of |short-generic-result| | OR EMPTY SET .. index:: - single: withPoints ; One to One - Proposed on v2.2 + single: withPoints ; One to One One to One ............................................................................... @@ -97,20 +116,21 @@ One to One .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**options**]) - | **options:** [directed, driving_side, details]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**] [**options**]) + | **options:** ``[directed, details]`` - | Returns set of |result-1-1| + | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` to vertex :math:`10` with details +:Example: From point :math:`1` to vertex :math:`10` with right driving side in directed graph. + (without details) .. literalinclude:: withPoints.queries :start-after: -- q1 :end-before: -- q2 .. index:: - single: withPoints ; One to Many - Proposed on v2.2 + single: withPoints ; One to Many One to Many ............................................................................... @@ -118,10 +138,10 @@ One to Many .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**options**]) - | **options:** [directed, driving_side, details]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**] [**options**]) + | **options:** ``[directed, details]`` - | Returns set of |pid-1-m| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From point :math:`1` to point :math:`3` and vertex :math:`7` on an @@ -132,7 +152,7 @@ One to Many :end-before: -- q3 .. index:: - single: withPoints ; Many to One - Proposed on v2.2 + single: withPoints ; Many to One Many to One ............................................................................... @@ -140,20 +160,21 @@ Many to One .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**options**]) - | **options:** [directed, driving_side, details]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**] [**options**]) + | **options:** ``[directed, details]`` - | Returns set of |pid-m-1| + | Returns set of |short-generic-result| | OR EMPTY SET -:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` +:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` with right driving side in directed graph. + (without details) .. literalinclude:: withPoints.queries :start-after: -- q3 :end-before: -- q4 .. index:: - single: withPoints ; Many to Many - Proposed on v2.2 + single: withPoints ; Many to Many Many to Many ............................................................................... @@ -161,21 +182,21 @@ Many to Many .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**options**]) - | **options:** [directed, driving_side, details]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**] [**options**]) + | **options:** ``[directed, details]`` - | Returns set of |pid-m-m| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: From point :math:`1` and vertex :math:`6` to point :math:`3` and - vertex :math:`1` + vertex :math:`1` with left side driving. .. literalinclude:: withPoints.queries :start-after: -- q4 :end-before: -- q5 .. index:: - single: withPoints ; Combinations - Proposed on v3.2 + single: withPoints ; Combinations Combinations ............................................................................... @@ -183,16 +204,17 @@ Combinations .. admonition:: \ \ :class: signatures - | pgr_withPoints(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**options**]) - | **options:** [directed, driving_side, details]) + | pgr_withPoints(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**] [**options**]) + | **options:** ``[directed, details]`` - | Returns set of |pid-m-m| + | Returns set of |short-generic-result| | OR EMPTY SET :Example: Two combinations From point :math:`1` to vertex :math:`10`, and from vertex :math:`6` to point -:math:`3` with **right** side driving. +:math:`3` with right side driving. +(with details) .. literalinclude:: withPoints.queries :start-after: -- q5 @@ -205,6 +227,10 @@ Parameters :start-after: withPoints_parameters_start :end-before: withPoints_parameters_end +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + Optional parameters ............................................................................... @@ -215,9 +241,9 @@ Optional parameters With points optional parameters ............................................................................... -.. include:: withPoints-family.rst - :start-after: withPoints_optionals_start - :end-before: withPoints_optionals_end +.. include:: withPoints-category.rst + :start-after: withPoints_optionals_start + :end-before: withPoints_optionals_end Inner Queries ------------------------------------------------------------------------------- @@ -247,8 +273,8 @@ Result columns ------------------------------------------------------------------------------- .. include:: pgRouting-concepts.rst - :start-after: return_withpoint_path_short_start - :end-before: return_withpoint_path_short_end + :start-after: return_path_complete_start + :end-before: return_path_complete_end Additional Examples ------------------------------------------------------------------------------- @@ -284,7 +310,6 @@ Passes in front or visits with right side driving. For point :math:`6` and vertex :math:`11`. - .. literalinclude:: withPoints.queries :start-after: -- q7 :end-before: -- q8 diff --git a/doc/withPoints/pgr_withPointsCost.rst b/doc/withPoints/pgr_withPointsCost.rst index f2c5c56cec1..b52ed2d648c 100644 --- a/doc/withPoints/pgr_withPointsCost.rst +++ b/doc/withPoints/pgr_withPointsCost.rst @@ -8,36 +8,48 @@ **************************************************************************** .. index:: - single: withPoints Family ; pgr_withPointsCost - Proposed - single: With Points Category ; pgr_withPointsCost - Proposed - single: Cost Category ; pgr_withPointsCost - Proposed - single: withPointsCost - Proposed + single: withPoints Family ; pgr_withPointsCost + single: With Points Category ; pgr_withPointsCost + single: Cost Category ; pgr_withPointsCost + single: withPointsCost | -``pgr_withPointsCost`` - Proposed +``pgr_withPointsCost`` =============================================================================== ``pgr_withPointsCost`` - Calculates the shortest path and returns only the aggregate cost of the shortest path found, for the combination of points given. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.2.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is unnamed and compulsory. + + * Valid values depend on kind of graph + +* Output columns standardized to |matrix-result| +* Breaking change, signatures no longer available: + + * pgr_withpointscost(text,text,anyarray,anyarray,boolean,character) + * pgr_withpointscost(text,text,anyarray,bigint,boolean,character) + * pgr_withpointscost(text,text,bigint,anyarray,boolean,character) + * pgr_withpointscost(text,text,bigint,bigint,boolean,character) + * pgr_withpointscost(text,text,text,boolean,character) - * New proposed signature: - * pgr_withPointsCost(Combinations) +.. rubric:: Version 3.2.0 -* Version 2.2.0 +* New proposed signature: - * New proposed function. + * pgr_withPointsCost(Combinations) +.. rubric:: Version 2.2.0 + +* New proposed function. Description ------------------------------------------------------------------------------- @@ -47,28 +59,29 @@ Using Dijkstra algorithm, return only the aggregate cost of the shortest path found. The main characteristics are: - - It does not return a path. - - Returns the sum of the costs of the shortest path for pair combination of - vertices in the modified graph. - - Vertices of the graph are: - - **positive** when it belongs to the edges_sql - - **negative** when it belongs to the points_sql +- Process is done only on edges with positive costs. +- It does not return a path. +- Returns the sum of the costs of the shortest path for pair combination of + vertices in the modified graph. + + - The returned values are in the form of a set of |matrix-result|. - - Process is done only on edges with positive costs. - - Values are returned when there is a path. +- Vertices of the graph are: - - The returned values are in the form of a set of `(start_vid, end_vid, - agg_cost)`. + - **positive** when it belongs to the edges_sql + - **negative** when it belongs to the points_sql - - When the starting vertex and ending vertex are the same, there is no path. +- Values are returned when there is a path. - - The `agg_cost` in the non included values `(v, v)` is `0` + - When the starting vertex and ending vertex are the same, there is no path. - - When the starting vertex and ending vertex are the different and there is - no path. + - The `agg_cost` in the non included values `(v, v)` is `0` - - The `agg_cost` in the non included values `(u, v)` is :math:`\infty` + - When the starting vertex and ending vertex are the different and there is no + path: + + - The `agg_cost` in the non included values `(u, v)` is :math:`\infty` - If the values returned are stored in a table, the unique index would be the pair: `(start_vid, end_vid)`. @@ -77,15 +90,15 @@ The main characteristics are: - The `agg_cost` of `(u, v)` is the same as for `(v, u)`. - - For optimization purposes, any duplicated value in the `start_vids` or - `end_vids` is ignored. +- For optimization purposes, any duplicated value in the input arrays of **start vids** or + **end vids** or are ignored. - - The returned values are ordered: +- The returned values are ordered: - - `start_vid` ascending - - `end_vid` ascending + - `start_vid` ascending + - `end_vid` ascending - - Running time: :math:`O(|start\_vids|\times(V \log V + E))` +- Running time: :math:`O(|start\_vids|\times(V \log V + E))` |Boost| Boost Graph Inside @@ -97,21 +110,21 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, **start vid**, **end vid**, [**options**]) - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, **start vid**, **end vids**, [**options**]) - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, **start vids**, **end vid**, [**options**]) - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, **start vids**, **end vids**, [**options**]) - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, `Combinations SQL`_, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**] [**options**]) + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**] [**options**]) + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**] [**options**]) + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**] [**options**]) + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET .. note:: There is no **details** flag, unlike the other members of the withPoints family of functions. .. index:: - single: withPointsCost - Proposed ; One to One - Proposed on v2.2 + single: withPointsCost ; One to One One to One ............................................................................... @@ -119,20 +132,20 @@ One to One .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, 'Points SQL`_, **start vid**, **end vid**, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET -:Example: From point :math:`1` to vertex :math:`10` with defaults +.. rubric:: From point :math:`1` to vertex :math:`10` with right driving side in directed graph. .. literalinclude:: withPointsCost.queries :start-after: -- q1 :end-before: -- q2 .. index:: - single: withPointsCost - Proposed ; One to Many - Proposed on v2.2 + single: withPointsCost ; One to Many One to Many ............................................................................... @@ -140,21 +153,21 @@ One to Many .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET -:Example: From point :math:`1` to point :math:`3` and vertex :math:`7` on an - undirected graph +.. rubric:: From point :math:`1` to point :math:`3` and vertex :math:`7` on an + undirected graph .. literalinclude:: withPointsCost.queries :start-after: -- q2 :end-before: -- q3 .. index:: - single: withPointsCost - Proposed ; Many to One - Proposed on v2.2 + single: withPointsCost ; Many to One Many to One ............................................................................... @@ -162,20 +175,20 @@ Many to One .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET -:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` +:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` with right driving side in directed graph. .. literalinclude:: withPointsCost.queries :start-after: -- q3 :end-before: -- q4 .. index:: - single: withPointsCost - Proposed ; Many to Many - Proposed on v2.2 + single: withPointsCost ; Many to Many Many to Many ............................................................................... @@ -183,21 +196,21 @@ Many to Many .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET -:Example: From point :math:`15` and vertex :math:`6` to point :math:`3` and - vertex :math:`1` +:Example: From point :math:`1` and vertex :math:`6` to point :math:`3` and + vertex :math:`1` with left side driving. .. literalinclude:: withPointsCost.queries :start-after: -- q4 :end-before: -- q5 .. index:: - single: withPointsCost - Proposed ; Combinations -- Proposed on v3.2 + single: withPointsCost ; Combinations Combinations ............................................................................... @@ -205,16 +218,16 @@ Combinations .. admonition:: \ \ :class: signatures - | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCost(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, [**driving side**] [**options**]) + | **options:** ``[directed]`` - | Returns set of |matrix-pid| + | Returns set of |matrix-result| | OR EMPTY SET :Example: Two combinations From point :math:`1` to vertex :math:`10`, and from vertex :math:`6` to point -:math:`3` with **right** side driving. +:math:`3` with right side driving. .. literalinclude:: withPointsCost.queries :start-after: -- q5 @@ -227,6 +240,10 @@ Parameters :start-after: withPoints_parameters_start :end-before: withPoints_parameters_end +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + Optional parameters ............................................................................... @@ -234,31 +251,6 @@ Optional parameters :start-after: dijkstra_optionals_start :end-before: dijkstra_optionals_end -With points optional parameters -............................................................................... - -.. withpoints_short_optionals_start - -.. list-table:: - :width: 35 - :widths: auto - :header-rows: 1 - - * - Parameter - - Type - - Default - - Description - * - ``driving_side`` - - ``CHAR`` - - ``b`` - - Value in [``r``, ``l``, ``b``] indicating if the driving side is: - - - ``r`` for right driving side. - - ``l`` for left driving side. - - ``b`` for both. - -.. withpoints_short_optionals_end - Inner Queries ------------------------------------------------------------------------------- @@ -286,29 +278,9 @@ Combinations SQL Result columns ------------------------------------------------------------------------------- -.. list-table:: - :width: 81 - :widths: auto - :header-rows: 1 - - * - Column - - Type - - Description - * - ``start_pid`` - - ``BIGINT`` - - Identifier of the starting vertex or point. - - * When positive: is a vertex’s identifier. - * When negative: is a point’s identifier. - * - ``end_pid`` - - ``BIGINT`` - - Identifier of the ending vertex or point. - - * When positive: is a vertex’s identifier. - * When negative: is a point’s identifier. - * - ``agg_cost`` - - ``FLOAT`` - - Aggregate cost from ``start_vid`` to ``end_vid``. +.. include:: pgRouting-concepts.rst + :start-after: return_cost_start + :end-before: return_cost_withPoints_end Additional Examples ------------------------------------------------------------------------------- @@ -360,12 +332,13 @@ Traveling from point :math:`1` and vertex :math:`5` to points :math:`\{2, 3, :start-after: -- q8 :end-before: -- q9 -:doc:`sampledata` See Also ------------------------------------------------------------------------------- * :doc:`withPoints-family` +* :doc:`cost-category` +* :doc:`sampledata` .. rubric:: Indices and tables diff --git a/doc/withPoints/pgr_withPointsCostMatrix.rst b/doc/withPoints/pgr_withPointsCostMatrix.rst index 30f4592148b..bbeef7424b3 100644 --- a/doc/withPoints/pgr_withPointsCostMatrix.rst +++ b/doc/withPoints/pgr_withPointsCostMatrix.rst @@ -8,28 +8,35 @@ **************************************************************************** .. index:: - single: withPoints Family ; pgr_withPointsCostMatrix - Proposed - single: With Points Category ; pgr_withPointsCostMatrix - Proposed - single: Cost Matrix Category ; pgr_withPointsCostMatrix - Proposed - single: withPointsCostMatrix - proposed on v2.0 + single: withPoints Family ; pgr_withPointsCostMatrix + single: With Points Category ; pgr_withPointsCostMatrix + single: Cost Matrix Category ; pgr_withPointsCostMatrix + single: withPointsCostMatrix | -``pgr_withPointsCostMatrix`` - proposed +``pgr_withPointsCostMatrix`` =============================================================================== ``pgr_withPointsCostMatrix`` - Calculates a cost matrix using :doc:`pgr_withPoints`. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 2.2.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is positional unnamed and compulsory. + + * Valid values depend on kind of graph +* Output columns standardized to |matrix-result| +* Breaking change, signatures no longer available: - * New proposed function. + * pgr_withpointscostmatrix(text,text,anyarray,boolean,character) + +.. rubric:: Version 2.2.0 + +* New proposed function. Description ------------------------------------------------------------------------------- @@ -52,8 +59,8 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_withPointsCostMatrix(`Edges SQL`_, `Points SQL`_, **start vids**, [**options**]) - | **options:** ``[directed, driving_side]`` + | pgr_withPointsCostMatrix(`Edges SQL`_, `Points SQL`_, **start vids**, [**driving side**] [**options**]) + | **options:** ``[directed]`` | Returns set of |matrix-result| | OR EMPTY SET @@ -66,7 +73,7 @@ Signatures * Returning a **symmetrical** cost matrix * Using the default ``side`` value on the **points_sql** query -* Using the default ``driving_side`` value +* Using the default ``driving side`` value .. literalinclude:: withPointsCostMatrix.queries :start-after: -- q1 @@ -79,6 +86,10 @@ Parameters :start-after: costMatrix_withPoints_parameters_start :end-before: costMatrix_withPoints_parameters_end +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + Optional parameters ............................................................................... @@ -86,13 +97,6 @@ Optional parameters :start-after: dijkstra_optionals_start :end-before: dijkstra_optionals_end -With points optional parameters -............................................................................... - -.. include:: pgr_withPointsCost.rst - :start-after: withpoints_short_optionals_start - :end-before: withpoints_short_optionals_end - Inner Queries ------------------------------------------------------------------------------- @@ -115,10 +119,6 @@ Result columns .. include:: pgRouting-concepts.rst :start-after: return_cost_start - :end-before: return_cost_end - -.. include:: pgRouting-concepts.rst - :start-after: return_cost_withPoints_start :end-before: return_cost_withPoints_end Additional Examples @@ -139,6 +139,7 @@ locations on the graph of point `(2.9, 1.8)`. * Point :math:`-1` corresponds to the closest edge from point `(2.9, 1.8)`. * Point :math:`-2` corresponds to the next close edge from point `(2.9, 1.8)`. +* Being close to the graph does not mean have a shorter route. Use with :doc:`pgr_TSP`. ............................................................................... diff --git a/doc/withPoints/pgr_withPointsDD.rst b/doc/withPoints/pgr_withPointsDD.rst index 99526927987..968438a5482 100644 --- a/doc/withPoints/pgr_withPointsDD.rst +++ b/doc/withPoints/pgr_withPointsDD.rst @@ -8,48 +8,43 @@ **************************************************************************** .. index:: - single: withPoints Family ; pgr_withPointsDD - Proposed - single: With Points Category ; pgr_withPointsDD - Proposed - single: Driving Distance Category ; pgr_withPointsDD - Proposed - single: withPointsDD - Proposed + single: withPoints Family ; pgr_withPointsDD + single: With Points Category ; pgr_withPointsDD + single: Driving Distance Category ; pgr_withPointsDD + single: withPointsDD | -``pgr_withPointsDD`` - Proposed +``pgr_withPointsDD`` =============================================================================== ``pgr_withPointsDD`` - Returns the driving **distance** from a starting point. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -.. rubric:: Version 3.6.0 +.. rubric:: Version 4.0.0 -* Signature change: ``driving_side`` parameter changed from named optional to - unnamed compulsory **driving side**. +* Function promoted to official. - * pgr_withPointsDD(Single vertex) - * pgr_withPointsDD(Multiple vertices) +.. Breaking change -* Standardizing output columns to |result-spantree| +* Breaking change, signatures no longer available: - * pgr_withPointsDD(Single vertex) + * pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) + * pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean) - * Added ``depth``, ``pred`` and ``start_vid`` column. +.. rubric:: Version 3.6.0 - * pgr_withPointsDD(Multiple vertices) +* Output columns standardized to |result-spantree| +* **Driving side** parameter is positional unnamed and compulsory. - * Added ``depth``, ``pred`` columns. + * Valid values depend on kind of graph * When ``details`` is ``false``: - * Only points that are visited are removed, that is, points reached within the - distance are included + * Points reached within the distance are not included. -* Deprecated signatures +* Deprecated signatures: * pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) * pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean) @@ -75,8 +70,8 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vid**, **distance**, **driving side**, [**options A**]) - | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vids**, **distance**, **driving side**, [**options B**]) + | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vid**, **distance**, [**driving side**], [**options A**]) + | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vids**, **distance**, [**driving side**], [**options B**]) | **options A:** ``[directed, details]`` | **options B:** ``[directed, details, equicost]`` @@ -84,7 +79,7 @@ Signatures | OR EMPTY SET .. index:: - single: withPointsDD - Proposed ; Single Vertex - Proposed on v2.2 + single: withPointsDD ; Single Vertex Single vertex ............................................................................... @@ -92,7 +87,7 @@ Single vertex .. admonition:: \ \ :class: signatures - | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vid**, **distance**, **driving side**, [**options**]) + | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vid**, **distance**, [**driving side**], [**options**]) | **options:** ``[directed, details]`` | Returns set of |result-spantree| @@ -106,7 +101,7 @@ Single vertex :end-before: -- q3 .. index:: - single: withPointsDD - Proposed ; Multiple Vertices - Proposed on v2.2 + single: withPointsDD ; Multiple Vertices Multiple vertices ............................................................................... @@ -114,7 +109,7 @@ Multiple vertices .. admonition:: \ \ :class: signatures - | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vids**, **distance**, **driving side**, [**options**]) + | pgr_withPointsDD(`Edges SQL`_, `Points SQL`_, **root vids**, **distance**, [**driving side**], [**options**]) | **options:** ``[directed, details, equicost]`` | Returns set of |result-spantree| @@ -159,18 +154,10 @@ Parameters * - **distance** - ``FLOAT`` - Upper limit for the inclusion of a node in the result. - * - **driving side** - - ``CHAR`` - - - Value in [``r``, ``R``, ``l``, ``L``, ``b``, ``B``] indicating if the driving side is: - - ``r``, ``R`` for right driving side, - - ``l``, ``L`` for left driving side. - - ``b``, ``B`` for both. - - - Valid values differ for directed and undirected graphs: - - - In directed graphs: [``r``, ``R``, ``l``, ``L``]. - - In undirected graphs: [``b``, ``B``]. +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end Where: @@ -229,7 +216,7 @@ Points SQL Result columns ------------------------------------------------------------------------------- -.. include:: drivingDistance-category.rst +.. include:: pgRouting-concepts.rst :start-after: spantree-result-columns-start :end-before: spantree-result-columns-end diff --git a/doc/withPoints/pgr_withPointsKSP.rst b/doc/withPoints/pgr_withPointsKSP.rst index 1c52bf766c8..ca68de8543d 100644 --- a/doc/withPoints/pgr_withPointsKSP.rst +++ b/doc/withPoints/pgr_withPointsKSP.rst @@ -15,23 +15,29 @@ | -``pgr_withPointsKSP`` - Proposed +``pgr_withPointsKSP`` =============================================================================== ``pgr_withPointsKSP`` — Yen's algorithm for K shortest paths using Dijkstra. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning +.. rubric:: Availability + +.. rubric:: Version 4.0.0 + +* Function promoted to official. + +.. Breaking change + +* Breaking change, signatures no longer available: + + * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) .. rubric:: Version 3.6.0 -* Standardizing output columns to |nksp-result| -* pgr_withPointsKSP(One to One) +* Output columns standardized to |nksp-result| +* **Driving side** parameter is positional unnamed and compulsory. - * Signature change: ``driving_side`` parameter changed from named optional to - unnamed compulsory **driving side**. - * Added ``start_vid`` and ``end_vid`` result columns. + * Valid values depend on kind of graph * New proposed signatures: @@ -40,9 +46,9 @@ * pgr_withPointsKSP(Many to Many) * pgr_withPointsKSP(Combinations) -* Deprecated signature +* Deprecated signatures: - * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,char,boolean)`` + * pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean) .. rubric:: Version 2.2.0 @@ -63,18 +69,18 @@ Signatures .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, **K**, **driving_side**, [**options**]) - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, **K**, **driving_side**, [**options**]) - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, **K**, **driving_side**, [**options**]) - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, **K**, **driving_side**, [**options**]) - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, **K**, [**driving side**], [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, **K**, [**driving side**], [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, **K**, [**driving side**], [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, **K**, [**driving side**], [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` - | Returns set of |ksp-result| + | Returns set of |nksp-result| | OR EMPTY SET .. index:: - single: withPointsKSP ; One to One - Proposed on v2.2 + single: withPointsKSP ; One to One One to One ............................................................................... @@ -82,7 +88,7 @@ One to One .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vid**, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` | Returns set of |nksp-result| @@ -100,7 +106,7 @@ One to One :end-before: --q2 .. index:: - single: withPointsKSP ; One to Many - Proposed on v3.6 + single: withPointsKSP ; One to Many One to Many ............................................................................... @@ -108,10 +114,10 @@ One to Many .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vid**, **end vids**, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` - | Returns set of |ksp-result| + | Returns set of |nksp-result| | OR EMPTY SET :Example: Get 2 paths from point :math:`1` to point :math:`3` and vertex :math:`7` on an @@ -122,7 +128,7 @@ One to Many :end-before: --q3 .. index:: - single: withPointsKSP ; Many to One - Proposed on v3.6 + single: withPointsKSP ; Many to One Many to One ............................................................................... @@ -130,10 +136,10 @@ Many to One .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vid**, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` - | Returns set of |ksp-result| + | Returns set of |nksp-result| | OR EMPTY SET :Example: Get a path from point :math:`1` and vertex :math:`6` to point :math:`3` on a **directed** @@ -144,7 +150,7 @@ Many to One :end-before: --q4 .. index:: - single: withPointsKSP ; Many to Many - Proposed on v3.6 + single: withPointsKSP ; Many to Many Many to Many ............................................................................... @@ -152,7 +158,7 @@ Many to Many .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, **start vids**, **end vids**, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` | Returns set of |nksp-result| @@ -166,7 +172,7 @@ Many to Many :end-before: --q5 .. index:: - single: withPointsKSP ; Combinations - Proposed on v3.6 + single: withPointsKSP ; Combinations Combinations ............................................................................... @@ -174,10 +180,10 @@ Combinations .. admonition:: \ \ :class: signatures - | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, **K**, **driving_side**, [**options**]) + | pgr_withPointsKSP(`Edges SQL`_, `Points SQL`_, `Combinations SQL`_, **K**, [**driving side**], [**options**]) | **options:** ``[directed, heap_paths, details]`` - | Returns set of |ksp-result| + | Returns set of |nksp-result| | OR EMPTY SET :Example: Using a combinations table on an **directed** graph @@ -191,7 +197,7 @@ Parameters .. list-table:: :width: 81 - :widths: 17 22 44 + :widths: 14 14 44 :header-rows: 1 * - Column @@ -199,30 +205,36 @@ Parameters - Description * - `Edges SQL`_ - ``TEXT`` - - `Edges SQL`_ query as described. + - `Edges SQL`_ as described below * - `Points SQL`_ - ``TEXT`` - - `Points SQL`_ query as described. + - `Points SQL`_ as described below + * - `Combinations SQL`_ + - ``TEXT`` + - `Combinations SQL`_ as described below * - **start vid** - - **ANY-INTEGER** - - Identifier of the departure vertex. - - - Negative values represent a point + - ``BIGINT`` + - Identifier of the starting vertex of the path. Negative value is for + point’s identifier. + * - **start vids** + - ``ARRAY[BIGINT]`` + - Array of identifiers of starting vertices. Negative values are for + point’s identifiers. * - **end vid** - - **ANY-INTEGER** - - Identifier of the destination vertex. - - - Negative values represent a point + - ``BIGINT`` + - Identifier of the ending vertex of the path. Negative value is for + point’s identifier. + * - **end vids** + - ``ARRAY[BIGINT]`` + - Array of identifiers of ending vertices. Negative values are for point’s + identifiers. * - **K** - **ANY-INTEGER** - Number of required paths - * - **driving_side** - - **CHAR** - - Value in [``r``, ``R``, ``l``, ``L``, ``b``, ``B``] indicating if the driving side is: - - [``r``, ``R``] for right driving side (for directed graph only) - - [``l``, ``L``] for left driving side (for directed graph only) - - [``b``, ``B``] for both (only for undirected graph) +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end Where: @@ -288,9 +300,9 @@ Combinations SQL Result columns ------------------------------------------------------------------------------- -.. include:: pgr_KSP.rst - :start-after: ksp_returns_start - :end-before: ksp_returns_end +.. include:: pgRouting-concepts.rst + :start-after: return_path_all_columns_start + :end-before: return_path_all_columns_withPoints_end Additional Examples ------------------------------------------------------------------------------- diff --git a/doc/withPoints/pgr_withPointsVia.rst b/doc/withPoints/pgr_withPointsVia.rst index 76551a37ad4..3403720fb1f 100644 --- a/doc/withPoints/pgr_withPointsVia.rst +++ b/doc/withPoints/pgr_withPointsVia.rst @@ -15,21 +15,30 @@ | -``pgr_withPointsVia`` - Proposed +``pgr_withPointsVia`` =============================================================================== ``pgr_withPointsVia`` - Route that goes through a list of vertices and/or points. -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - .. rubric:: Availability -* Version 3.4.0 +.. rubric:: Version 4.0.0 + +* Function promoted to official. +* **Driving side** parameter is positional unnamed and compulsory. + + * Valid values depend on kind of graph + +.. Breaking change + +* Breaking change, signatures no longer available: + + * pgr_withpointsvia(text,text,anyarray,boolean,boolean,boolean,character,boolean) + +.. rubric:: Version 3.4.0 - * New proposed function. +* New proposed function. Description ------------------------------------------------------------------------------- @@ -57,7 +66,7 @@ Signatures ------------------------------------------------------------------------------- .. index:: - single: withPointsVia ; One Via - Proposed on v3.4 + single: withPointsVia ; One Via One Via ............................................................................... @@ -65,14 +74,14 @@ One Via .. admonition:: \ \ :class: signatures - | pgr_withPointsVia(`Edges SQL`_, `Points SQL`_, **via vertices**, [**options**]) - | **options:** ``[directed, strict, U_turn_on_edge]`` + | pgr_withPointsVia(`Edges SQL`_, `Points SQL`_, **via vertices**, [**driving side**] [**options**]) + | **options:** ``[directed, strict, U_turn_on_edge, details]`` | Returns set of |via-result| | OR EMPTY SET :Example: Find the route that visits the vertices :math:`\{ -6, 15, -1\}` in - that order on a **directed** graph. + that order with right driving side in directed graph.. .. literalinclude:: withPointsVia.queries :start-after: -- q0 @@ -81,9 +90,38 @@ One Via Parameters ------------------------------------------------------------------------------- -.. include:: via-category.rst - :start-after: via_withPoints_parameters_start - :end-before: via_withPoints_parameters_end +.. via_withPoints_parameters_start + +.. list-table:: + :width: 81 + :widths: auto + :header-rows: 1 + + * - Parameter + - Type + - Description + * - `Edges SQL`_ + - ``TEXT`` + - SQL query as described. + * - `Points SQL`_ + - ``TEXT`` + - SQL query as described. + * - **via vertices** + - ``ARRAY`` [ **ANY-INTEGER** ] + - Array of ordered vertices identifiers that are going to be visited. + + * When positive it is considered a vertex identifier + * When negative it is considered a point identifier + +.. include:: withPoints-category.rst + :start-after: driving_side_start + :end-before: driving_side_end + +Where: + +:ANY-INTEGER: SMALLINT, INTEGER, BIGINT + +.. via_withPoints_parameters_end Optional parameters ............................................................................... @@ -102,7 +140,7 @@ Via optional parameters With points optional parameters ............................................................................... -.. include:: withPoints-family.rst +.. include:: withPoints-category.rst :start-after: withPoints_optionals_start :end-before: withPoints_optionals_end diff --git a/doc/withPoints/withPoints-family.rst b/doc/withPoints/withPoints-family.rst index 83e47ee8413..1db757138b5 100644 --- a/doc/withPoints/withPoints-family.rst +++ b/doc/withPoints/withPoints-family.rst @@ -16,11 +16,7 @@ withPoints - Family of functions When points are also given as input: -.. include:: proposed.rst - :start-after: warning-begin - :end-before: end-warning - -.. proposed-start +.. official-start - :doc:`pgr_withPoints` - Route from/to points anywhere on the graph. - :doc:`pgr_withPointsCost` - Costs of the shortest paths. @@ -29,7 +25,7 @@ When points are also given as input: - :doc:`pgr_withPointsDD` - Driving distance. - :doc:`pgr_withPointsVia` - Via routing -.. proposed-end +.. official-end .. toctree:: :hidden: @@ -73,33 +69,9 @@ Optional parameters With points optional parameters ............................................................................... -.. withPoints_optionals_start - -.. list-table:: - :width: 81 - :widths: 14 7 7 60 - :header-rows: 1 - - * - Parameter - - Type - - Default - - Description - * - ``driving_side`` - - ``CHAR`` - - ``b`` - - Value in [``r``, ``l``, ``b``] indicating if the driving side is: - - - ``r`` for right driving side. - - ``l`` for left driving side. - - ``b`` for both. - * - ``details`` - - ``BOOLEAN`` - - ``false`` - - - When ``true`` the results will include the points that are in the path. - - When ``false`` the results will not include the points that are in the - path. - -.. withPoints_optionals_end +.. include:: withPoints-category.rst + :start-after: withPoints_optionals_start + :end-before: withPoints_optionals_end Inner Queries ------------------------------------------------------------------------------- @@ -111,13 +83,6 @@ Edges SQL :start-after: basic_edges_sql_start :end-before: basic_edges_sql_end -Points SQL -............................................................................... - -.. include:: withPoints-category.rst - :start-after: points_sql_start - :end-before: points_sql_end - Combinations SQL ............................................................................... @@ -125,6 +90,13 @@ Combinations SQL :start-after: basic_combinations_sql_start :end-before: basic_combinations_sql_end +Points SQL +............................................................................... + +.. include:: withPoints-category.rst + :start-after: points_sql_start + :end-before: points_sql_end + Advanced Documentation ------------------------------------------------------------------------------- diff --git a/docqueries/allpairs/CMakeLists.txt b/docqueries/allpairs/CMakeLists.txt index a1736c9cf96..e6c34ab032d 100644 --- a/docqueries/allpairs/CMakeLists.txt +++ b/docqueries/allpairs/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES floydWarshall johnson ) diff --git a/docqueries/alpha_shape/CMakeLists.txt b/docqueries/alpha_shape/CMakeLists.txt deleted file mode 100644 index 5f783af7cb7..00000000000 --- a/docqueries/alpha_shape/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# Do not use extensions -SET(LOCAL_FILES - alphashape - ) - -foreach (f ${LOCAL_FILES}) - configure_file("${f}.result" "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") - list(APPEND LOCAL_DOC_FILES "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") -endforeach() - -set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/docqueries/alpha_shape/alphashape.pg b/docqueries/alpha_shape/alphashape.pg deleted file mode 100644 index 144308ca07c..00000000000 --- a/docqueries/alpha_shape/alphashape.pg +++ /dev/null @@ -1,6 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -/* -- q1 */ -SELECT ST_Area(pgr_alphaShape((SELECT ST_Collect(geom) - FROM vertices), 1.5)); -/* -- q2 */ diff --git a/docqueries/alpha_shape/alphashape.result b/docqueries/alpha_shape/alphashape.result deleted file mode 100644 index a75a39a6a7c..00000000000 --- a/docqueries/alpha_shape/alphashape.result +++ /dev/null @@ -1,16 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/* -- q1 */ -SELECT ST_Area(pgr_alphaShape((SELECT ST_Collect(geom) - FROM vertices), 1.5)); -WARNING: pgr_alphashape(geometry,double precision) deprecated function on v3.8.0 - st_area ---------- - 9.75 -(1 row) - -/* -- q2 */ -ROLLBACK; -ROLLBACK diff --git a/docqueries/alpha_shape/test.conf b/docqueries/alpha_shape/test.conf deleted file mode 100644 index 228e355b5af..00000000000 --- a/docqueries/alpha_shape/test.conf +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/perl -w - -%main::tests = ( - 'any' => { - 'files' => [qw( - alphashape.pg - )] - }, -); - -1; diff --git a/docqueries/astar/CMakeLists.txt b/docqueries/astar/CMakeLists.txt index e7a4f595029..1d6d4a97b48 100644 --- a/docqueries/astar/CMakeLists.txt +++ b/docqueries/astar/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES aStarCostMatrix aStarCost astar diff --git a/docqueries/astar/aStarCostMatrix.result b/docqueries/astar/aStarCostMatrix.result index 1ee03597f5f..4b726c74fb1 100644 --- a/docqueries/astar/aStarCostMatrix.result +++ b/docqueries/astar/aStarCostMatrix.result @@ -31,8 +31,6 @@ SELECT * FROM pgr_TSP( (SELECT array_agg(id) FROM vertices WHERE id IN (5, 6, 10, 15)), directed=> false, heuristic => 2) $$); -NOTICE: pgr_TSP no longer solving with simulated annaeling -HINT: Ignoring annaeling parameters seq | node | cost | agg_cost -----+------+------+---------- 1 | 5 | 0 | 0 diff --git a/docqueries/bdAstar/CMakeLists.txt b/docqueries/bdAstar/CMakeLists.txt index 7800b4f2428..4da186e16e2 100644 --- a/docqueries/bdAstar/CMakeLists.txt +++ b/docqueries/bdAstar/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES bdAstarCostMatrix bdAstarCost bdAstar diff --git a/docqueries/bdAstar/bdAstarCostMatrix.result b/docqueries/bdAstar/bdAstarCostMatrix.result index 8814f2ba510..42cdcc44032 100644 --- a/docqueries/bdAstar/bdAstarCostMatrix.result +++ b/docqueries/bdAstar/bdAstarCostMatrix.result @@ -34,8 +34,6 @@ SELECT * FROM pgr_TSP( ) $$ ); -NOTICE: pgr_TSP no longer solving with simulated annaeling -HINT: Ignoring annaeling parameters seq | node | cost | agg_cost -----+------+------+---------- 1 | 5 | 0 | 0 diff --git a/docqueries/bdDijkstra/CMakeLists.txt b/docqueries/bdDijkstra/CMakeLists.txt index 33ddab1f9f6..f57073d5d7c 100644 --- a/docqueries/bdDijkstra/CMakeLists.txt +++ b/docqueries/bdDijkstra/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES bdDijkstraCostMatrix bdDijkstraCost bdDijkstra diff --git a/docqueries/bdDijkstra/bdDijkstra.result b/docqueries/bdDijkstra/bdDijkstra.result index 3b65807414c..3b30588e1d4 100644 --- a/docqueries/bdDijkstra/bdDijkstra.result +++ b/docqueries/bdDijkstra/bdDijkstra.result @@ -6,52 +6,52 @@ SET SELECT * FROM pgr_bdDijkstra( 'select id, source, target, cost, reverse_cost from edges', 6, 10, true); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 8 | 1 | 1 - 3 | 3 | 11 | 9 | 1 | 2 - 4 | 4 | 16 | 16 | 1 | 3 - 5 | 5 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | -1 | 0 | 5 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 (6 rows) /* -- q3 */ SELECT * FROM pgr_bdDijkstra( 'select id, source, target, cost, reverse_cost from edges', 6, ARRAY[10, 17]); - seq | path_seq | end_vid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | 10 | 6 | 4 | 1 | 0 - 2 | 2 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 17 | 6 | 4 | 1 | 0 - 8 | 2 | 17 | 7 | 8 | 1 | 1 - 9 | 3 | 17 | 11 | 11 | 1 | 2 - 10 | 4 | 17 | 12 | 13 | 1 | 3 - 11 | 5 | 17 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q4 */ SELECT * FROM pgr_bdDijkstra( 'select id, source, target, cost, reverse_cost from edges', ARRAY[6, 1], 17); - seq | path_seq | start_vid | node | edge | cost | agg_cost ------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 1 | 6 | 1 | 0 - 2 | 2 | 1 | 3 | 7 | 1 | 1 - 3 | 3 | 1 | 7 | 8 | 1 | 2 - 4 | 4 | 1 | 11 | 11 | 1 | 3 - 5 | 5 | 1 | 12 | 13 | 1 | 4 - 6 | 6 | 1 | 17 | -1 | 0 | 5 - 7 | 1 | 6 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 11 | 11 | 1 | 2 - 10 | 4 | 6 | 12 | 13 | 1 | 3 - 11 | 5 | 6 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q5 */ diff --git a/docqueries/bdDijkstra/bdDijkstraCostMatrix.result b/docqueries/bdDijkstra/bdDijkstraCostMatrix.result index 850ffdca6e5..32b4f1f3789 100644 --- a/docqueries/bdDijkstra/bdDijkstraCostMatrix.result +++ b/docqueries/bdDijkstra/bdDijkstraCostMatrix.result @@ -35,8 +35,6 @@ SELECT * FROM pgr_TSP( WHERE id IN (5, 6, 10, 15)), false) $$); -NOTICE: pgr_TSP no longer solving with simulated annaeling -HINT: Ignoring annaeling parameters seq | node | cost | agg_cost -----+------+------+---------- 1 | 5 | 0 | 0 diff --git a/docqueries/bellman_ford/CMakeLists.txt b/docqueries/bellman_ford/CMakeLists.txt index 0724ab0309f..bd0b61b5ebc 100644 --- a/docqueries/bellman_ford/CMakeLists.txt +++ b/docqueries/bellman_ford/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES bellmanFord edwardMoore ) diff --git a/docqueries/bellman_ford/bellmanFord.result b/docqueries/bellman_ford/bellmanFord.result index 36d1a3495f6..5bbed5a0181 100644 --- a/docqueries/bellman_ford/bellmanFord.result +++ b/docqueries/bellman_ford/bellmanFord.result @@ -6,52 +6,52 @@ SET SELECT * FROM pgr_bellmanFord( 'SELECT id, source, target, cost, reverse_cost FROM edges', 6, 10, true); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 8 | 1 | 1 - 3 | 3 | 11 | 9 | 1 | 2 - 4 | 4 | 16 | 16 | 1 | 3 - 5 | 5 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | -1 | 0 | 5 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 (6 rows) /* -- q3 */ SELECT * FROM pgr_bellmanFord( 'SELECT id, source, target, cost, reverse_cost FROM edges', 6, ARRAY[10, 17]); - seq | path_seq | end_vid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | 10 | 6 | 4 | 1 | 0 - 2 | 2 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 17 | 6 | 4 | 1 | 0 - 8 | 2 | 17 | 7 | 8 | 1 | 1 - 9 | 3 | 17 | 11 | 11 | 1 | 2 - 10 | 4 | 17 | 12 | 13 | 1 | 3 - 11 | 5 | 17 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q4 */ SELECT * FROM pgr_bellmanFord( 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[6, 1], 17); - seq | path_seq | start_vid | node | edge | cost | agg_cost ------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 1 | 6 | 1 | 0 - 2 | 2 | 1 | 3 | 7 | 1 | 1 - 3 | 3 | 1 | 7 | 8 | 1 | 2 - 4 | 4 | 1 | 11 | 11 | 1 | 3 - 5 | 5 | 1 | 12 | 13 | 1 | 4 - 6 | 6 | 1 | 17 | -1 | 0 | 5 - 7 | 1 | 6 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 11 | 11 | 1 | 2 - 10 | 4 | 6 | 12 | 13 | 1 | 3 - 11 | 5 | 6 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q5 */ diff --git a/docqueries/bellman_ford/edwardMoore.result b/docqueries/bellman_ford/edwardMoore.result index cebc4973003..48907e8eab6 100644 --- a/docqueries/bellman_ford/edwardMoore.result +++ b/docqueries/bellman_ford/edwardMoore.result @@ -6,52 +6,52 @@ SET SELECT * FROM pgr_edwardMoore( 'SELECT id, source, target, cost, reverse_cost FROM edges', 6, 10, true); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 8 | 1 | 1 - 3 | 3 | 11 | 9 | 1 | 2 - 4 | 4 | 16 | 16 | 1 | 3 - 5 | 5 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | -1 | 0 | 5 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 (6 rows) /* -- q3 */ SELECT * FROM pgr_edwardMoore( 'SELECT id, source, target, cost, reverse_cost FROM edges', 6, ARRAY[10, 17]); - seq | path_seq | end_vid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | 10 | 6 | 4 | 1 | 0 - 2 | 2 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 17 | 6 | 4 | 1 | 0 - 8 | 2 | 17 | 7 | 8 | 1 | 1 - 9 | 3 | 17 | 11 | 11 | 1 | 2 - 10 | 4 | 17 | 12 | 13 | 1 | 3 - 11 | 5 | 17 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q4 */ SELECT * FROM pgr_edwardMoore( 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[6, 1], 17); - seq | path_seq | start_vid | node | edge | cost | agg_cost ------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 1 | 6 | 1 | 0 - 2 | 2 | 1 | 3 | 7 | 1 | 1 - 3 | 3 | 1 | 7 | 8 | 1 | 2 - 4 | 4 | 1 | 11 | 11 | 1 | 3 - 5 | 5 | 1 | 12 | 13 | 1 | 4 - 6 | 6 | 1 | 17 | -1 | 0 | 5 - 7 | 1 | 6 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 11 | 11 | 1 | 2 - 10 | 4 | 6 | 12 | 13 | 1 | 3 - 11 | 5 | 6 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q5 */ diff --git a/docqueries/chinese/CMakeLists.txt b/docqueries/chinese/CMakeLists.txt index 9c187a96f19..bcecadb1f1d 100644 --- a/docqueries/chinese/CMakeLists.txt +++ b/docqueries/chinese/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES chinesePostmanCost chinesePostman ) diff --git a/docqueries/circuits/CMakeLists.txt b/docqueries/circuits/CMakeLists.txt index d19e4659ce8..afc23a2991e 100755 --- a/docqueries/circuits/CMakeLists.txt +++ b/docqueries/circuits/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES hawickCircuits ) diff --git a/docqueries/coloring/CMakeLists.txt b/docqueries/coloring/CMakeLists.txt index 4e67b0b2f4e..425add100ec 100644 --- a/docqueries/coloring/CMakeLists.txt +++ b/docqueries/coloring/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES sequentialVertexColoring bipartite edgeColoring diff --git a/docqueries/coloring/bipartite.pg b/docqueries/coloring/bipartite.pg index bf5a8bb8427..23395ab2afc 100644 --- a/docqueries/coloring/bipartite.pg +++ b/docqueries/coloring/bipartite.pg @@ -3,7 +3,7 @@ /* --q1 */ SELECT * FROM pgr_bipartite( $$SELECT id, source, target, cost, reverse_cost FROM edges$$ -) ORDER BY vertex_id; +) ORDER BY node; /* --q2 */ INSERT INTO edges (source, target, cost, reverse_cost) VALUES (5, 1, 1, 1); diff --git a/docqueries/coloring/bipartite.result b/docqueries/coloring/bipartite.result index 8a715d1b416..1c573cf6fd7 100644 --- a/docqueries/coloring/bipartite.result +++ b/docqueries/coloring/bipartite.result @@ -5,26 +5,26 @@ SET /* --q1 */ SELECT * FROM pgr_bipartite( $$SELECT id, source, target, cost, reverse_cost FROM edges$$ -) ORDER BY vertex_id; - vertex_id | color_id ------------+---------- - 1 | 0 - 2 | 0 - 3 | 1 - 4 | 1 - 5 | 0 - 6 | 1 - 7 | 0 - 8 | 1 - 9 | 0 - 10 | 0 - 11 | 1 - 12 | 0 - 13 | 0 - 14 | 1 - 15 | 1 - 16 | 0 - 17 | 1 +) ORDER BY node; + node | color +------+------- + 1 | 0 + 2 | 0 + 3 | 1 + 4 | 1 + 5 | 0 + 6 | 1 + 7 | 0 + 8 | 1 + 9 | 0 + 10 | 0 + 11 | 1 + 12 | 0 + 13 | 0 + 14 | 1 + 15 | 1 + 16 | 0 + 17 | 1 (17 rows) /* --q2 */ @@ -35,8 +35,8 @@ INSERT 0 1 SELECT * FROM pgr_bipartite( $$SELECT id, source, target, cost, reverse_cost FROM edges$$ ); - vertex_id | color_id ------------+---------- + node | color +------+------- (0 rows) /* --q4 */ diff --git a/docqueries/coloring/edgeColoring.pg b/docqueries/coloring/edgeColoring.pg index 05eab075a46..fffac77baca 100644 --- a/docqueries/coloring/edgeColoring.pg +++ b/docqueries/coloring/edgeColoring.pg @@ -1,7 +1,7 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ /* -- q1 */ -SELECT * FROM pgr_edgeColoring( +SELECT edge, color FROM pgr_edgeColoring( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id' ); diff --git a/docqueries/coloring/edgeColoring.result b/docqueries/coloring/edgeColoring.result index 1ef28de82b3..c9ccaa0c1f3 100644 --- a/docqueries/coloring/edgeColoring.result +++ b/docqueries/coloring/edgeColoring.result @@ -3,30 +3,30 @@ BEGIN SET client_min_messages TO NOTICE; SET /* -- q1 */ -SELECT * FROM pgr_edgeColoring( +SELECT edge, color FROM pgr_edgeColoring( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id' ); - edge_id | color_id ----------+---------- - 1 | 3 - 2 | 2 - 3 | 3 - 4 | 4 - 5 | 4 - 6 | 1 - 7 | 2 - 8 | 1 - 9 | 2 - 10 | 5 - 11 | 5 - 12 | 3 - 13 | 2 - 14 | 1 - 15 | 3 - 16 | 1 - 17 | 1 - 18 | 1 + edge | color +------+------- + 1 | 3 + 2 | 2 + 3 | 3 + 4 | 4 + 5 | 4 + 6 | 1 + 7 | 2 + 8 | 1 + 9 | 2 + 10 | 5 + 11 | 5 + 12 | 3 + 13 | 2 + 14 | 1 + 15 | 3 + 16 | 1 + 17 | 1 + 18 | 1 (18 rows) /* -- q2 */ diff --git a/docqueries/coloring/sequentialVertexColoring.result b/docqueries/coloring/sequentialVertexColoring.result index 4856cc83be2..d33c773d2c6 100644 --- a/docqueries/coloring/sequentialVertexColoring.result +++ b/docqueries/coloring/sequentialVertexColoring.result @@ -7,25 +7,25 @@ SELECT * FROM pgr_sequentialVertexColoring( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id' ); - vertex_id | color_id ------------+---------- - 1 | 1 - 2 | 1 - 3 | 2 - 4 | 2 - 5 | 1 - 6 | 2 - 7 | 1 - 8 | 2 - 9 | 1 - 10 | 1 - 11 | 2 - 12 | 1 - 13 | 1 - 14 | 2 - 15 | 2 - 16 | 1 - 17 | 2 + node | color +------+------- + 1 | 1 + 2 | 1 + 3 | 2 + 4 | 2 + 5 | 1 + 6 | 2 + 7 | 1 + 8 | 2 + 9 | 1 + 10 | 1 + 11 | 2 + 12 | 1 + 13 | 1 + 14 | 2 + 15 | 2 + 16 | 1 + 17 | 2 (17 rows) /* -- q2 */ diff --git a/docqueries/common/CMakeLists.txt b/docqueries/common/CMakeLists.txt deleted file mode 100644 index 07cfb9dcbae..00000000000 --- a/docqueries/common/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Do not use extensions -SET(LOCAL_FILES - ) - -foreach (f ${LOCAL_FILES}) - configure_file("${f}.result" "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") - list(APPEND LOCAL_DOC_FILES "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") -endforeach() - -set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/docqueries/common/test.conf b/docqueries/common/test.conf deleted file mode 100644 index 7eb6a08025f..00000000000 --- a/docqueries/common/test.conf +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/perl -w - -%main::tests = ( - 'any' => { - 'data' => ['sampledata.data'], - 'files' => [qw( - versionless-any-01.pg - )], - }, -); - -1; diff --git a/docqueries/common/versionless-any-01.pg b/docqueries/common/versionless-any-01.pg deleted file mode 100644 index 35d38bbd9d6..00000000000 --- a/docqueries/common/versionless-any-01.pg +++ /dev/null @@ -1,85 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ -select _pgr_versionless('2.1.0foobar23', '2.1'); -select _pgr_versionless('2.1.0foobar23', '2.1-rc1'); -select _pgr_versionless('2.1.0foobar23', '2.1-beta'); -select _pgr_versionless('2.1.0foobar23', '2.1-alpha'); -select _pgr_versionless('2.1.0foobar23', '2.1-dev'); -select _pgr_versionless('2.1.0foobar23', '2.1rc1'); -select _pgr_versionless('2.1.0foobar23', '2.1beta'); -select _pgr_versionless('2.1.0foobar23', '2.1alpha'); -select _pgr_versionless('2.1.0foobar23', '2.1dev'); -select _pgr_versionless('2.1.0-dev', '2.1'); -select _pgr_versionless('2.1.0-dev', '2.1-rc1'); -select _pgr_versionless('2.1.0-dev', '2.1-beta'); -select _pgr_versionless('2.1.0-dev', '2.1-alpha'); -select _pgr_versionless('2.1.0-dev', '2.1rc1'); -select _pgr_versionless('2.1.0-dev', '2.1beta'); -select _pgr_versionless('2.1.0-dev', '2.1alpha'); -select _pgr_versionless('2.1.0-alpha', '2.1'); -select _pgr_versionless('2.1.0-alpha', '2.1-rc1'); -select _pgr_versionless('2.1.0-alpha', '2.1-beta'); -select _pgr_versionless('2.1.0-alpha', '2.1rc1'); -select _pgr_versionless('2.1.0-alpha', '2.1beta'); -select _pgr_versionless('2.1.0-beta', '2.1'); -select _pgr_versionless('2.1.0-beta', '2.1-rc1'); -select _pgr_versionless('2.1.0-beta', '2.1rc1'); -select _pgr_versionless('2.0.0', '2.1'); -select _pgr_versionless('2.1', '2.1.3'); -select _pgr_versionless('1.05', '2.0.0'); -select _pgr_versionless('1.05', '2.0'); -select _pgr_versionless('1.05', '2'); -select _pgr_versionless('2.1', '2.1.0foobar23'); -select _pgr_versionless('2.1-rc1', '2.1.0foobar23'); -select _pgr_versionless('2.1-beta', '2.1.0foobar23'); -select _pgr_versionless('2.1-alpha', '2.1.0foobar23'); -select _pgr_versionless('2.1-dev', '2.1.0foobar23'); -select _pgr_versionless('2.1rc1', '2.1.0foobar23'); -select _pgr_versionless('2.1beta', '2.1.0foobar23'); -select _pgr_versionless('2.1alpha', '2.1.0foobar23'); -select _pgr_versionless('2.1dev', '2.1.0foobar23'); -select _pgr_versionless('2.1', '2.1.0-dev'); -select _pgr_versionless('2.1-rc1', '2.1.0-dev'); -select _pgr_versionless('2.1-beta', '2.1.0-dev'); -select _pgr_versionless('2.1-alpha', '2.1.0-dev'); -select _pgr_versionless('2.1rc1', '2.1.0-dev'); -select _pgr_versionless('2.1beta', '2.1.0-dev'); -select _pgr_versionless('2.1alpha', '2.1.0-dev'); -select _pgr_versionless('2.1', '2.1.0-alpha'); -select _pgr_versionless('2.1-rc1', '2.1.0-alpha'); -select _pgr_versionless('2.1-beta', '2.1.0-alpha'); -select _pgr_versionless('2.1rc1', '2.1.0-alpha'); -select _pgr_versionless('2.1beta', '2.1.0-alpha'); -select _pgr_versionless('2.1', '2.1.0-beta'); -select _pgr_versionless('2.1-rc1', '2.1.0-beta'); -select _pgr_versionless('2.1rc1', '2.1.0-beta'); -select _pgr_versionless('2.1', '2.0.0'); -select _pgr_versionless('2.1.3', '2.1'); -select _pgr_versionless('2.0.0', '1.05'); -select _pgr_versionless('2.0', '1.05'); -select _pgr_versionless('2', '1.05'); -select _pgr_versionless('2', '2.0.0foobar'); -select _pgr_versionless('2.1', '2.1.0'); -select _pgr_versionless('2.1.0beta3dev', '2.1.0beta1dev'); diff --git a/docqueries/common/versionless-any-01.result b/docqueries/common/versionless-any-01.result deleted file mode 100644 index 3b11442ef12..00000000000 --- a/docqueries/common/versionless-any-01.result +++ /dev/null @@ -1,394 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ -select _pgr_versionless('2.1.0foobar23', '2.1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1-rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1-beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1-alpha'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1-dev'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1alpha'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0foobar23', '2.1dev'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1-rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1-beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1-alpha'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-dev', '2.1alpha'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-alpha', '2.1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-alpha', '2.1-rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-alpha', '2.1-beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-alpha', '2.1rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-alpha', '2.1beta'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-beta', '2.1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-beta', '2.1-rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1.0-beta', '2.1rc1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.0.0', '2.1'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1', '2.1.3'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('1.05', '2.0.0'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('1.05', '2.0'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('1.05', '2'); - _pgr_versionless ------------------- - t -(1 row) - -select _pgr_versionless('2.1', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-rc1', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-beta', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-alpha', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-dev', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1rc1', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1beta', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1alpha', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1dev', '2.1.0foobar23'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-rc1', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-beta', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-alpha', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1rc1', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1beta', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1alpha', '2.1.0-dev'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1', '2.1.0-alpha'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-rc1', '2.1.0-alpha'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-beta', '2.1.0-alpha'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1rc1', '2.1.0-alpha'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1beta', '2.1.0-alpha'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1', '2.1.0-beta'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1-rc1', '2.1.0-beta'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1rc1', '2.1.0-beta'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1', '2.0.0'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1.3', '2.1'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.0.0', '1.05'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.0', '1.05'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2', '1.05'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2', '2.0.0foobar'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1', '2.1.0'); - _pgr_versionless ------------------- - f -(1 row) - -select _pgr_versionless('2.1.0beta3dev', '2.1.0beta1dev'); - _pgr_versionless ------------------- - f -(1 row) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/components/CMakeLists.txt b/docqueries/components/CMakeLists.txt index d21c494aa1b..3822b6c4f47 100644 --- a/docqueries/components/CMakeLists.txt +++ b/docqueries/components/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES articulationPoints biconnectedComponents bridges diff --git a/docqueries/contraction/CMakeLists.txt b/docqueries/contraction/CMakeLists.txt index 5448e33601b..ee32684693f 100644 --- a/docqueries/contraction/CMakeLists.txt +++ b/docqueries/contraction/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES contraction contractionDeadEnd contractionLinear diff --git a/docqueries/contraction/contraction.pg b/docqueries/contraction/contraction.pg index d817d6a1664..61bba17e44f 100644 --- a/docqueries/contraction/contraction.pg +++ b/docqueries/contraction/contraction.pg @@ -74,7 +74,7 @@ SELECT agg_cost FROM pgr_dijkstraCost( /* The inner query */ 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE ' || $1 ||' = ANY(contracted_vertices) OR ' || $2 ||' = ANY(contracted_vertices)), linears_to_expand AS ( diff --git a/docqueries/contraction/contraction.result b/docqueries/contraction/contraction.result index e9662cd97b2..42527266357 100644 --- a/docqueries/contraction/contraction.result +++ b/docqueries/contraction/contraction.result @@ -165,7 +165,7 @@ SELECT agg_cost FROM pgr_dijkstraCost( /* The inner query */ 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE ' || $1 ||' = ANY(contracted_vertices) OR ' || $2 ||' = ANY(contracted_vertices)), linears_to_expand AS ( diff --git a/docqueries/contraction/contractionDeadEnd.pg b/docqueries/contraction/contractionDeadEnd.pg index d6c88033ca2..d182eb24d3d 100644 --- a/docqueries/contraction/contractionDeadEnd.pg +++ b/docqueries/contraction/contractionDeadEnd.pg @@ -78,7 +78,7 @@ FROM pgr_dijkstra('SELECT * FROM contracted_graph', 6, 17); /* -- cg8 */ SELECT * FROM pgr_dijkstra( 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE 1 = ANY(contracted_vertices)) SELECT id, source, target, cost, reverse_cost FROM edges, cul_de_sac WHERE source = ANY(v) AND target = ANY(v) @@ -90,7 +90,7 @@ SELECT * FROM pgr_dijkstra( /* -- cg9 */ SELECT * FROM pgr_dijkstra( 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE 1 = ANY(contracted_vertices) OR 9 = ANY(contracted_vertices)) SELECT id, source, target, cost, reverse_cost FROM edges, cul_de_sac WHERE source = ANY(v) AND target = ANY(v) diff --git a/docqueries/contraction/contractionDeadEnd.result b/docqueries/contraction/contractionDeadEnd.result index 8990c9af388..4d96e3bd683 100644 --- a/docqueries/contraction/contractionDeadEnd.result +++ b/docqueries/contraction/contractionDeadEnd.result @@ -135,7 +135,7 @@ FROM pgr_dijkstra('SELECT * FROM contracted_graph', 6, 17); /* -- cg8 */ SELECT * FROM pgr_dijkstra( 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE 1 = ANY(contracted_vertices)) SELECT id, source, target, cost, reverse_cost FROM edges, cul_de_sac WHERE source = ANY(v) AND target = ANY(v) @@ -157,7 +157,7 @@ SELECT * FROM pgr_dijkstra( /* -- cg9 */ SELECT * FROM pgr_dijkstra( 'WITH cul_de_sac AS ( - SELECT contracted_vertices || id as v + SELECT contracted_vertices || id::INTEGER as v FROM vertices WHERE 1 = ANY(contracted_vertices) OR 9 = ANY(contracted_vertices)) SELECT id, source, target, cost, reverse_cost FROM edges, cul_de_sac WHERE source = ANY(v) AND target = ANY(v) diff --git a/docqueries/contraction/contractionHierarchies.result b/docqueries/contraction/contractionHierarchies.result index 44425d34ddf..65c3a4f16c9 100644 --- a/docqueries/contraction/contractionHierarchies.result +++ b/docqueries/contraction/contractionHierarchies.result @@ -123,14 +123,14 @@ SELECT * FROM pgr_bdDijkstra( 'SELECT id, source, target, cost, reverse_cost FROM edges', 1, 17 ); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 1 | 6 | 1 | 0 - 2 | 2 | 3 | 7 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | 11 | 1 | 3 - 5 | 5 | 12 | 13 | 1 | 4 - 6 | 6 | 17 | -1 | 0 | 5 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 (6 rows) /* -- q9 */ diff --git a/docqueries/dagShortestPath/CMakeLists.txt b/docqueries/dagShortestPath/CMakeLists.txt index 3c14948b6e0..b8504de1956 100644 --- a/docqueries/dagShortestPath/CMakeLists.txt +++ b/docqueries/dagShortestPath/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES dagShortestPath ) diff --git a/docqueries/dagShortestPath/dagShortestPath.result b/docqueries/dagShortestPath/dagShortestPath.result index ff51c630547..efc8f85ff2c 100644 --- a/docqueries/dagShortestPath/dagShortestPath.result +++ b/docqueries/dagShortestPath/dagShortestPath.result @@ -6,62 +6,62 @@ SET SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', 5, 11); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | -1 | 0 | 3 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 (4 rows) /* -- q3 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', 5, ARRAY[7, 11]); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | -1 | 0 | 2 - 4 | 1 | 5 | 1 | 1 | 0 - 5 | 2 | 6 | 4 | 1 | 1 - 6 | 3 | 7 | 8 | 1 | 2 - 7 | 4 | 11 | -1 | 0 | 3 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 7 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 7 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 7 | 7 | -1 | 0 | 2 + 4 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 5 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 6 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 7 | 4 | 5 | 11 | 11 | -1 | 0 | 3 (7 rows) /* -- q4 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', ARRAY[5, 10], 11); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | -1 | 0 | 3 - 5 | 1 | 10 | 5 | 1 | 0 - 6 | 2 | 11 | -1 | 0 | 1 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 + 5 | 1 | 10 | 11 | 10 | 5 | 1 | 0 + 6 | 2 | 10 | 11 | 11 | -1 | 0 | 1 (6 rows) /* -- q5 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', ARRAY[5, 15], ARRAY[11, 17]); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | -1 | 0 | 3 - 5 | 1 | 5 | 1 | 1 | 0 - 6 | 2 | 6 | 4 | 1 | 1 - 7 | 3 | 7 | 8 | 1 | 2 - 8 | 4 | 11 | 9 | 1 | 3 - 9 | 5 | 16 | 15 | 1 | 4 - 10 | 6 | 17 | -1 | 0 | 5 - 11 | 1 | 15 | 16 | 1 | 0 - 12 | 2 | 16 | 15 | 1 | 1 - 13 | 3 | 17 | -1 | 0 | 2 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 + 5 | 1 | 5 | 17 | 5 | 1 | 1 | 0 + 6 | 2 | 5 | 17 | 6 | 4 | 1 | 1 + 7 | 3 | 5 | 17 | 7 | 8 | 1 | 2 + 8 | 4 | 5 | 17 | 11 | 9 | 1 | 3 + 9 | 5 | 5 | 17 | 16 | 15 | 1 | 4 + 10 | 6 | 5 | 17 | 17 | -1 | 0 | 5 + 11 | 1 | 15 | 17 | 15 | 16 | 1 | 0 + 12 | 2 | 15 | 17 | 16 | 15 | 1 | 1 + 13 | 3 | 15 | 17 | 17 | -1 | 0 | 2 (13 rows) /* -- q51 */ @@ -79,58 +79,58 @@ SELECT source, target FROM combinations; SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', 'SELECT source, target FROM combinations'); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | -1 | 0 | 1 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 6 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 6 | 6 | -1 | 0 | 1 (2 rows) /* -- q6 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', ARRAY[5, 10, 5, 10, 10, 5], ARRAY[11, 17, 17, 11]); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | -1 | 0 | 3 - 5 | 1 | 5 | 1 | 1 | 0 - 6 | 2 | 6 | 4 | 1 | 1 - 7 | 3 | 7 | 8 | 1 | 2 - 8 | 4 | 11 | 9 | 1 | 3 - 9 | 5 | 16 | 15 | 1 | 4 - 10 | 6 | 17 | -1 | 0 | 5 - 11 | 1 | 10 | 5 | 1 | 0 - 12 | 2 | 11 | -1 | 0 | 1 - 13 | 1 | 10 | 5 | 1 | 0 - 14 | 2 | 11 | 9 | 1 | 1 - 15 | 3 | 16 | 15 | 1 | 2 - 16 | 4 | 17 | -1 | 0 | 3 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 + 5 | 1 | 5 | 17 | 5 | 1 | 1 | 0 + 6 | 2 | 5 | 17 | 6 | 4 | 1 | 1 + 7 | 3 | 5 | 17 | 7 | 8 | 1 | 2 + 8 | 4 | 5 | 17 | 11 | 9 | 1 | 3 + 9 | 5 | 5 | 17 | 16 | 15 | 1 | 4 + 10 | 6 | 5 | 17 | 17 | -1 | 0 | 5 + 11 | 1 | 10 | 11 | 10 | 5 | 1 | 0 + 12 | 2 | 10 | 11 | 11 | -1 | 0 | 1 + 13 | 1 | 10 | 17 | 10 | 5 | 1 | 0 + 14 | 2 | 10 | 17 | 11 | 9 | 1 | 1 + 15 | 3 | 10 | 17 | 16 | 15 | 1 | 2 + 16 | 4 | 10 | 17 | 17 | -1 | 0 | 3 (16 rows) /* -- q7 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', ARRAY[5, 10, 11], ARRAY[5, 10, 11]); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 5 | 1 | 1 | 0 - 2 | 2 | 6 | 4 | 1 | 1 - 3 | 3 | 7 | 8 | 1 | 2 - 4 | 4 | 11 | -1 | 0 | 3 - 5 | 1 | 10 | 5 | 1 | 0 - 6 | 2 | 11 | -1 | 0 | 1 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 + 5 | 1 | 10 | 11 | 10 | 5 | 1 | 0 + 6 | 2 | 10 | 11 | 11 | -1 | 0 | 1 (6 rows) /* -- q8 */ SELECT * FROM pgr_dagShortestPath( 'SELECT id, source, target, cost FROM edges', 'SELECT * FROM (VALUES (6, 10), (6, 7), (12, 10)) AS combinations (source, target)'); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | -1 | 0 | 1 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 7 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 7 | 7 | -1 | 0 | 1 (2 rows) /* -- q9 */ diff --git a/docqueries/dijkstra/CMakeLists.txt b/docqueries/dijkstra/CMakeLists.txt index 90b64c6c333..bf20feb3659 100644 --- a/docqueries/dijkstra/CMakeLists.txt +++ b/docqueries/dijkstra/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES dijkstraCostMatrix dijkstraCost dijkstra diff --git a/docqueries/dijkstra/dijkstraCostMatrix.result b/docqueries/dijkstra/dijkstraCostMatrix.result index 154a7f86b50..85ce26e687e 100644 --- a/docqueries/dijkstra/dijkstraCostMatrix.result +++ b/docqueries/dijkstra/dijkstraCostMatrix.result @@ -35,8 +35,6 @@ SELECT * FROM pgr_TSP( WHERE id IN (5, 6, 10, 15)), false) $$); -NOTICE: pgr_TSP no longer solving with simulated annaeling -HINT: Ignoring annaeling parameters seq | node | cost | agg_cost -----+------+------+---------- 1 | 5 | 0 | 0 diff --git a/docqueries/dominator/CMakeLists.txt b/docqueries/dominator/CMakeLists.txt index 9def4ce4bcd..1389a34d366 100644 --- a/docqueries/dominator/CMakeLists.txt +++ b/docqueries/dominator/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES lengauerTarjanDominatorTree ) diff --git a/docqueries/driving_distance/CMakeLists.txt b/docqueries/driving_distance/CMakeLists.txt index a570865c484..912423dd2ae 100644 --- a/docqueries/driving_distance/CMakeLists.txt +++ b/docqueries/driving_distance/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES drivingDistance ) diff --git a/docqueries/ksp/CMakeLists.txt b/docqueries/ksp/CMakeLists.txt index 3922d10d594..7e49298cf92 100644 --- a/docqueries/ksp/CMakeLists.txt +++ b/docqueries/ksp/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES ksp turnRestrictedPath ) diff --git a/docqueries/ksp/turnRestrictedPath.result b/docqueries/ksp/turnRestrictedPath.result index d015441f578..96dd917cb29 100644 --- a/docqueries/ksp/turnRestrictedPath.result +++ b/docqueries/ksp/turnRestrictedPath.result @@ -7,11 +7,11 @@ SELECT * FROM pgr_turnRestrictedPath( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT path, cost FROM restrictions$$, 3, 8, 3); - seq | path_id | path_seq | node | edge | cost | agg_cost ------+---------+----------+------+------+------+---------- - 1 | 1 | 1 | 3 | 7 | 1 | Infinity - 2 | 1 | 2 | 7 | 10 | 1 | 1 - 3 | 1 | 3 | 8 | -1 | 0 | 2 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 0 | 8 | 3 | 7 | 1 | Infinity + 2 | 1 | 2 | 0 | 8 | 7 | 10 | 1 | 1 + 3 | 1 | 3 | 0 | 8 | 8 | -1 | 0 | 2 (3 rows) /* -- q2 */ @@ -20,8 +20,8 @@ SELECT * FROM pgr_turnRestrictedPath( $$SELECT path, cost FROM restrictions$$, 3, 8, 3, strict => true); - seq | path_id | path_seq | node | edge | cost | agg_cost ------+---------+----------+------+------+------+---------- + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- (0 rows) /* -- q3 */ @@ -30,15 +30,15 @@ SELECT * FROM pgr_turnRestrictedPath( $$SELECT path, cost FROM restrictions$$, 3, 8, 3, directed => false); - seq | path_id | path_seq | node | edge | cost | agg_cost ------+---------+----------+------+------+------+---------- - 1 | 1 | 1 | 3 | 7 | 1 | 0 - 2 | 1 | 2 | 7 | 4 | 1 | 1 - 3 | 1 | 3 | 6 | 2 | 1 | 2 - 4 | 1 | 4 | 10 | 5 | 1 | 3 - 5 | 1 | 5 | 11 | 11 | 1 | 4 - 6 | 1 | 6 | 12 | 12 | 1 | 5 - 7 | 1 | 7 | 8 | -1 | 0 | 6 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 0 | 8 | 3 | 7 | 1 | 0 + 2 | 1 | 2 | 0 | 8 | 7 | 4 | 1 | 1 + 3 | 1 | 3 | 0 | 8 | 6 | 2 | 1 | 2 + 4 | 1 | 4 | 0 | 8 | 10 | 5 | 1 | 3 + 5 | 1 | 5 | 0 | 8 | 11 | 11 | 1 | 4 + 6 | 1 | 6 | 0 | 8 | 12 | 12 | 1 | 5 + 7 | 1 | 7 | 0 | 8 | 8 | -1 | 0 | 6 (7 rows) /* -- q4 */ @@ -49,22 +49,22 @@ SELECT * FROM pgr_turnRestrictedPath( directed => false, heap_paths => true, stop_on_first => false); - seq | path_id | path_seq | node | edge | cost | agg_cost ------+---------+----------+------+------+------+---------- - 1 | 1 | 1 | 3 | 7 | 1 | 0 - 2 | 1 | 2 | 7 | 4 | 1 | 1 - 3 | 1 | 3 | 6 | 2 | 1 | 2 - 4 | 1 | 4 | 10 | 5 | 1 | 3 - 5 | 1 | 5 | 11 | 11 | 1 | 4 - 6 | 1 | 6 | 12 | 12 | 1 | 5 - 7 | 1 | 7 | 8 | -1 | 0 | 6 - 8 | 2 | 1 | 3 | 7 | 1 | 0 - 9 | 2 | 2 | 7 | 8 | 1 | 1 - 10 | 2 | 3 | 11 | 9 | 1 | 2 - 11 | 2 | 4 | 16 | 15 | 1 | 3 - 12 | 2 | 5 | 17 | 13 | 1 | 4 - 13 | 2 | 6 | 12 | 12 | 1 | 5 - 14 | 2 | 7 | 8 | -1 | 0 | 6 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 0 | 8 | 3 | 7 | 1 | 0 + 2 | 1 | 2 | 0 | 8 | 7 | 4 | 1 | 1 + 3 | 1 | 3 | 0 | 8 | 6 | 2 | 1 | 2 + 4 | 1 | 4 | 0 | 8 | 10 | 5 | 1 | 3 + 5 | 1 | 5 | 0 | 8 | 11 | 11 | 1 | 4 + 6 | 1 | 6 | 0 | 8 | 12 | 12 | 1 | 5 + 7 | 1 | 7 | 0 | 8 | 8 | -1 | 0 | 6 + 8 | 2 | 1 | 1 | 8 | 3 | 7 | 1 | 0 + 9 | 2 | 2 | 1 | 8 | 7 | 8 | 1 | 1 + 10 | 2 | 3 | 1 | 8 | 11 | 9 | 1 | 2 + 11 | 2 | 4 | 1 | 8 | 16 | 15 | 1 | 3 + 12 | 2 | 5 | 1 | 8 | 17 | 13 | 1 | 4 + 13 | 2 | 6 | 1 | 8 | 12 | 12 | 1 | 5 + 14 | 2 | 7 | 1 | 8 | 8 | -1 | 0 | 6 (14 rows) /* -- q5 */ diff --git a/docqueries/lineGraph/CMakeLists.txt b/docqueries/lineGraph/CMakeLists.txt index 1e52b109cc0..3b1539f0fbd 100644 --- a/docqueries/lineGraph/CMakeLists.txt +++ b/docqueries/lineGraph/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES lineGraphFull lineGraph ) diff --git a/docqueries/max_flow/CMakeLists.txt b/docqueries/max_flow/CMakeLists.txt index ac285200d07..8ed2100dcfc 100644 --- a/docqueries/max_flow/CMakeLists.txt +++ b/docqueries/max_flow/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES boykovKolmogorov edgeDisjointPaths edmondsKarp diff --git a/docqueries/max_flow/edgeDisjointPaths.result b/docqueries/max_flow/edgeDisjointPaths.result index 7fbb762a495..c83778a6f47 100644 --- a/docqueries/max_flow/edgeDisjointPaths.result +++ b/docqueries/max_flow/edgeDisjointPaths.result @@ -7,14 +7,14 @@ SELECT * FROM pgr_edgeDisjointPaths( 'SELECT id, source, target, cost, reverse_cost FROM edges', 11, 12); - seq | path_id | path_seq | node | edge | cost | agg_cost ------+---------+----------+------+------+------+---------- - 1 | 1 | 1 | 11 | 8 | 1 | 0 - 2 | 1 | 2 | 7 | 10 | 1 | 1 - 3 | 1 | 3 | 8 | 12 | 1 | 2 - 4 | 1 | 4 | 12 | -1 | 0 | 3 - 5 | 2 | 1 | 11 | 11 | 1 | 0 - 6 | 2 | 2 | 12 | -1 | 0 | 1 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 11 | 12 | 11 | 8 | 1 | 0 + 2 | 1 | 2 | 11 | 12 | 7 | 10 | 1 | 1 + 3 | 1 | 3 | 11 | 12 | 8 | 12 | 1 | 2 + 4 | 1 | 4 | 11 | 12 | 12 | -1 | 0 | 3 + 5 | 2 | 1 | 11 | 12 | 11 | 11 | 1 | 0 + 6 | 2 | 2 | 11 | 12 | 12 | -1 | 0 | 1 (6 rows) /* -- q2 */ @@ -22,22 +22,22 @@ SELECT * FROM pgr_edgeDisjointPaths( 'SELECT id, source, target, cost, reverse_cost FROM edges', 11, ARRAY[5, 10, 12]); - seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost ------+---------+----------+---------+------+------+------+---------- - 1 | 1 | 1 | 5 | 11 | 8 | 1 | 0 - 2 | 1 | 2 | 5 | 7 | 4 | 1 | 1 - 3 | 1 | 3 | 5 | 6 | 1 | 1 | 2 - 4 | 1 | 4 | 5 | 5 | -1 | 0 | 3 - 5 | 2 | 1 | 10 | 11 | 9 | 1 | 0 - 6 | 2 | 2 | 10 | 16 | 16 | 1 | 1 - 7 | 2 | 3 | 10 | 15 | 3 | 1 | 2 - 8 | 2 | 4 | 10 | 10 | -1 | 0 | 3 - 9 | 3 | 1 | 12 | 11 | 8 | 1 | 0 - 10 | 3 | 2 | 12 | 7 | 10 | 1 | 1 - 11 | 3 | 3 | 12 | 8 | 12 | 1 | 2 - 12 | 3 | 4 | 12 | 12 | -1 | 0 | 3 - 13 | 4 | 1 | 12 | 11 | 11 | 1 | 0 - 14 | 4 | 2 | 12 | 12 | -1 | 0 | 1 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 11 | 5 | 11 | 8 | 1 | 0 + 2 | 1 | 2 | 11 | 5 | 7 | 4 | 1 | 1 + 3 | 1 | 3 | 11 | 5 | 6 | 1 | 1 | 2 + 4 | 1 | 4 | 11 | 5 | 5 | -1 | 0 | 3 + 5 | 2 | 1 | 11 | 10 | 11 | 9 | 1 | 0 + 6 | 2 | 2 | 11 | 10 | 16 | 16 | 1 | 1 + 7 | 2 | 3 | 11 | 10 | 15 | 3 | 1 | 2 + 8 | 2 | 4 | 11 | 10 | 10 | -1 | 0 | 3 + 9 | 3 | 1 | 11 | 12 | 11 | 8 | 1 | 0 + 10 | 3 | 2 | 11 | 12 | 7 | 10 | 1 | 1 + 11 | 3 | 3 | 11 | 12 | 8 | 12 | 1 | 2 + 12 | 3 | 4 | 11 | 12 | 12 | -1 | 0 | 3 + 13 | 4 | 1 | 11 | 12 | 11 | 11 | 1 | 0 + 14 | 4 | 2 | 11 | 12 | 12 | -1 | 0 | 1 (14 rows) /* -- q3 */ @@ -45,22 +45,22 @@ SELECT * FROM pgr_edgeDisjointPaths( 'SELECT id, source, target, cost, reverse_cost FROM edges', ARRAY[11, 3, 17], 12); - seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost ------+---------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 3 | 3 | 7 | 1 | 0 - 2 | 1 | 2 | 3 | 7 | 8 | 1 | 1 - 3 | 1 | 3 | 3 | 11 | 11 | 1 | 2 - 4 | 1 | 4 | 3 | 12 | -1 | 0 | 3 - 5 | 2 | 1 | 11 | 11 | 8 | 1 | 0 - 6 | 2 | 2 | 11 | 7 | 10 | 1 | 1 - 7 | 2 | 3 | 11 | 8 | 12 | 1 | 2 - 8 | 2 | 4 | 11 | 12 | -1 | 0 | 3 - 9 | 3 | 1 | 11 | 11 | 11 | 1 | 0 - 10 | 3 | 2 | 11 | 12 | -1 | 0 | 1 - 11 | 4 | 1 | 17 | 17 | 15 | 1 | 0 - 12 | 4 | 2 | 17 | 16 | 9 | 1 | 1 - 13 | 4 | 3 | 17 | 11 | 11 | 1 | 2 - 14 | 4 | 4 | 17 | 12 | -1 | 0 | 3 + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 12 | 3 | 3 | 7 | 1 | 0 + 2 | 1 | 2 | 12 | 3 | 7 | 8 | 1 | 1 + 3 | 1 | 3 | 12 | 3 | 11 | 11 | 1 | 2 + 4 | 1 | 4 | 12 | 3 | 12 | -1 | 0 | 3 + 5 | 2 | 1 | 12 | 11 | 11 | 8 | 1 | 0 + 6 | 2 | 2 | 12 | 11 | 7 | 10 | 1 | 1 + 7 | 2 | 3 | 12 | 11 | 8 | 12 | 1 | 2 + 8 | 2 | 4 | 12 | 11 | 12 | -1 | 0 | 3 + 9 | 3 | 1 | 12 | 11 | 11 | 11 | 1 | 0 + 10 | 3 | 2 | 12 | 11 | 12 | -1 | 0 | 1 + 11 | 4 | 1 | 12 | 17 | 17 | 15 | 1 | 0 + 12 | 4 | 2 | 12 | 17 | 16 | 9 | 1 | 1 + 13 | 4 | 3 | 12 | 17 | 11 | 11 | 1 | 2 + 14 | 4 | 4 | 12 | 17 | 12 | -1 | 0 | 3 (14 rows) /* -- q4 */ diff --git a/docqueries/metrics/CMakeLists.txt b/docqueries/metrics/CMakeLists.txt index 010b2229c9c..667c8a33ecb 100644 --- a/docqueries/metrics/CMakeLists.txt +++ b/docqueries/metrics/CMakeLists.txt @@ -1,5 +1,6 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES + bandwidth betweennessCentrality degree ) diff --git a/docqueries/metrics/bandwidth.pg b/docqueries/metrics/bandwidth.pg new file mode 100644 index 00000000000..86d43dbfa95 --- /dev/null +++ b/docqueries/metrics/bandwidth.pg @@ -0,0 +1,88 @@ +-- CopyRight(c) pgRouting developers +-- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ + +/* -- q1 */ +SELECT * FROM pgr_bandwidth( +'SELECT id, source, target, cost, reverse_cost +FROM edges' +); + +/* -- q2 */ +CREATE TABLE my_edges1 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +/* -- q3 */ +INSERT INTO my_edges1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); +/* -- q4 */ +SELECT * FROM pgr_bandwidth( + 'SELECT id, source, target, cost, reverse_cost FROM my_edges1' +); + +/* -- q5 */ +CREATE TABLE my_edges2 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +/* -- q6 */ +INSERT INTO my_edges2 (source, target, cost, reverse_cost) VALUES +(0, 1, 1, 1), +(1, 0, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1), +(1, 2, 1, 1), +(2, 1, 1, 1), +(2, 4, 1, 1), +(4, 2, 1, 1), +(4, 8, 1, 1), +(8, 4, 1, 1), +(8, 3, 1, 1), +(3, 8, 1, 1), +(3, 5, 1, 1), +(5, 3, 1, 1), +(3, 6, 1, 1), +(6, 3, 1, 1), +(3, 7, 1, 1), +(7, 3, 1, 1), +(8, 7, 1, 1), +(7, 8, 1, 1), +(6, 9, 1, 1), +(9, 6, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1); +/* -- q7 */ +SELECT * FROM pgr_bandwidth( + 'SELECT id, source, target, cost, reverse_cost FROM my_edges2' +); + +/* -- q8 */ diff --git a/docqueries/metrics/bandwidth.result b/docqueries/metrics/bandwidth.result new file mode 100644 index 00000000000..3ffedca78ed --- /dev/null +++ b/docqueries/metrics/bandwidth.result @@ -0,0 +1,107 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +/* -- q1 */ +SELECT * FROM pgr_bandwidth( +'SELECT id, source, target, cost, reverse_cost +FROM edges' +); + bandwidth +----------- + 5 +(1 row) + +/* -- q2 */ +CREATE TABLE my_edges1 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +CREATE TABLE +/* -- q3 */ +INSERT INTO my_edges1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); +INSERT 0 24 +/* -- q4 */ +SELECT * FROM pgr_bandwidth( + 'SELECT id, source, target, cost, reverse_cost FROM my_edges1' +); + bandwidth +----------- + 8 +(1 row) + +/* -- q5 */ +CREATE TABLE my_edges2 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +CREATE TABLE +/* -- q6 */ +INSERT INTO my_edges2 (source, target, cost, reverse_cost) VALUES +(0, 1, 1, 1), +(1, 0, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1), +(1, 2, 1, 1), +(2, 1, 1, 1), +(2, 4, 1, 1), +(4, 2, 1, 1), +(4, 8, 1, 1), +(8, 4, 1, 1), +(8, 3, 1, 1), +(3, 8, 1, 1), +(3, 5, 1, 1), +(5, 3, 1, 1), +(3, 6, 1, 1), +(6, 3, 1, 1), +(3, 7, 1, 1), +(7, 3, 1, 1), +(8, 7, 1, 1), +(7, 8, 1, 1), +(6, 9, 1, 1), +(9, 6, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1); +INSERT 0 24 +/* -- q7 */ +SELECT * FROM pgr_bandwidth( + 'SELECT id, source, target, cost, reverse_cost FROM my_edges2' +); + bandwidth +----------- + 5 +(1 row) + +/* -- q8 */ +ROLLBACK; +ROLLBACK diff --git a/docqueries/metrics/test.conf b/docqueries/metrics/test.conf index 252681dc40f..cb97b83ff04 100644 --- a/docqueries/metrics/test.conf +++ b/docqueries/metrics/test.conf @@ -3,6 +3,7 @@ %main::tests = ( 'any' => { 'files' => [qw( + bandwidth.pg betweennessCentrality.pg degree.pg )] diff --git a/docqueries/mincut/CMakeLists.txt b/docqueries/mincut/CMakeLists.txt index 84c97ae8b97..bafb7873f23 100644 --- a/docqueries/mincut/CMakeLists.txt +++ b/docqueries/mincut/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES stoerWagner ) diff --git a/docqueries/ordering/CMakeLists.txt b/docqueries/ordering/CMakeLists.txt index 9ae17c3d87b..d698f2aca7d 100644 --- a/docqueries/ordering/CMakeLists.txt +++ b/docqueries/ordering/CMakeLists.txt @@ -1,7 +1,9 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES cuthillMckeeOrdering topologicalSort + sloanOrdering + kingOrdering ) foreach (f ${LOCAL_FILES}) diff --git a/docqueries/ordering/kingOrdering.pg b/docqueries/ordering/kingOrdering.pg new file mode 100644 index 00000000000..f8327a72b93 --- /dev/null +++ b/docqueries/ordering/kingOrdering.pg @@ -0,0 +1,47 @@ +-- CopyRight(c) pgRouting developers +-- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ +/* -- q1 */ +SELECT * FROM pgr_kingOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM edges' + ); + +/* -- q2 */ +CREATE TABLE additional_sample_1( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); + +INSERT INTO additional_sample_1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); + +SELECT * FROM pgr_kingOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM additional_sample_1' +); + +/* -- q3 */ \ No newline at end of file diff --git a/docqueries/ordering/kingOrdering.result b/docqueries/ordering/kingOrdering.result new file mode 100644 index 00000000000..598493a930c --- /dev/null +++ b/docqueries/ordering/kingOrdering.result @@ -0,0 +1,84 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +/* -- q1 */ +SELECT * FROM pgr_kingOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM edges' + ); + seq | node +-----+------ + 1 | 13 + 2 | 14 + 3 | 2 + 4 | 4 + 5 | 1 + 6 | 9 + 7 | 3 + 8 | 8 + 9 | 5 + 10 | 7 + 11 | 12 + 12 | 6 + 13 | 11 + 14 | 17 + 15 | 10 + 16 | 16 + 17 | 15 +(17 rows) + +/* -- q2 */ +CREATE TABLE additional_sample_1( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +CREATE TABLE +INSERT INTO additional_sample_1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); +INSERT 0 24 +SELECT * FROM pgr_kingOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM additional_sample_1' +); + seq | node +-----+------ + 1 | 0 + 2 | 4 + 3 | 2 + 4 | 7 + 5 | 8 + 6 | 5 + 7 | 9 + 8 | 1 + 9 | 6 + 10 | 3 +(10 rows) + +/* -- q3 */ +ROLLBACK; +ROLLBACK diff --git a/docqueries/ordering/sloanOrdering.pg b/docqueries/ordering/sloanOrdering.pg new file mode 100644 index 00000000000..7f56b7d4d48 --- /dev/null +++ b/docqueries/ordering/sloanOrdering.pg @@ -0,0 +1,46 @@ +-- CopyRight(c) pgRouting developers +-- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ +/* -- q1 */ +SELECT * FROM pgr_sloanOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM edges' + ); +/* -- q2 */ + +CREATE TABLE example_edges1 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +/* --q3 */ +INSERT INTO example_edges1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); +/* --q4 */ +SELECT * FROM pgr_sloanOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM example_edges1' +); +/* --q5 */ diff --git a/docqueries/ordering/sloanOrdering.result b/docqueries/ordering/sloanOrdering.result new file mode 100644 index 00000000000..5136f23e089 --- /dev/null +++ b/docqueries/ordering/sloanOrdering.result @@ -0,0 +1,86 @@ +BEGIN; +BEGIN +SET client_min_messages TO NOTICE; +SET +/* -- q1 */ +SELECT * FROM pgr_sloanOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM edges' + ); + seq | node +-----+------ + 1 | 1 + 2 | 3 + 3 | 8 + 4 | 9 + 5 | 12 + 6 | 7 + 7 | 5 + 8 | 17 + 9 | 6 + 10 | 11 + 11 | 16 + 12 | 10 + 13 | 15 + 14 | 1 + 15 | 1 + 16 | 1 + 17 | 1 +(17 rows) + +/* -- q2 */ +CREATE TABLE example_edges1 ( + id SERIAL PRIMARY KEY, + source INTEGER, + target INTEGER, + cost DOUBLE PRECISION, + reverse_cost DOUBLE PRECISION +); +CREATE TABLE +/* --q3 */ +INSERT INTO example_edges1 (source, target, cost, reverse_cost) VALUES +(4, 7, 1, 1), +(7, 4, 1, 1), +(7, 9, 1, 1), +(9, 7, 1, 1), +(7, 0, 1, 1), +(0, 7, 1, 1), +(0, 2, 1, 1), +(2, 0, 1, 1), +(2, 5, 1, 1), +(5, 2, 1, 1), +(5, 9, 1, 1), +(9, 5, 1, 1), +(9, 8, 1, 1), +(8, 9, 1, 1), +(9, 1, 1, 1), +(1, 9, 1, 1), +(5, 1, 1, 1), +(1, 5, 1, 1), +(9, 6, 1, 1), +(6, 9, 1, 1), +(6, 3, 1, 1), +(3, 6, 1, 1), +(1, 3, 1, 1), +(3, 1, 1, 1); +INSERT 0 24 +/* --q4 */ +SELECT * FROM pgr_sloanOrdering( + 'SELECT id, source, target, cost, reverse_cost FROM example_edges1' +); + seq | node +-----+------ + 1 | 4 + 2 | 0 + 3 | 2 + 4 | 7 + 5 | 8 + 6 | 5 + 7 | 9 + 8 | 3 + 9 | 1 + 10 | 6 +(10 rows) + +/* --q5 */ +ROLLBACK; +ROLLBACK diff --git a/docqueries/ordering/test.conf b/docqueries/ordering/test.conf index 74ee3644ad6..4b7a245616b 100644 --- a/docqueries/ordering/test.conf +++ b/docqueries/ordering/test.conf @@ -3,8 +3,11 @@ %main::tests = ( 'any' => { 'files' => [qw( + sloanOrdering.pg cuthillMckeeOrdering.pg topologicalSort.pg + sloanOrdering.pg + kingOrdering.pg )] }, diff --git a/docqueries/ordering/topologicalSort.result b/docqueries/ordering/topologicalSort.result index ac0fd1cad1b..0c53f1bab25 100644 --- a/docqueries/ordering/topologicalSort.result +++ b/docqueries/ordering/topologicalSort.result @@ -9,25 +9,25 @@ SELECT * FROM pgr_topologicalsort( UNION SELECT id, target, source, reverse_cost FROM edges WHERE cost < 0$$); - seq | sorted_v ------+---------- - 1 | 1 - 2 | 5 - 3 | 2 - 4 | 4 - 5 | 3 - 6 | 13 - 7 | 14 - 8 | 15 - 9 | 10 - 10 | 6 - 11 | 7 - 12 | 8 - 13 | 9 - 14 | 11 - 15 | 16 - 16 | 12 - 17 | 17 + seq | node +-----+------ + 1 | 1 + 2 | 5 + 3 | 2 + 4 | 4 + 5 | 3 + 6 | 13 + 7 | 14 + 8 | 15 + 9 | 10 + 10 | 6 + 11 | 7 + 12 | 8 + 13 | 9 + 14 | 11 + 15 | 16 + 16 | 12 + 17 | 17 (17 rows) /* -- q2 */ @@ -37,25 +37,25 @@ SELECT * FROM pgr_topologicalsort( UNION SELECT id, source, target, -1, reverse_cost FROM edges WHERE cost < 0$$); - seq | sorted_v ------+---------- - 1 | 5 - 2 | 2 - 3 | 4 - 4 | 13 - 5 | 14 - 6 | 1 - 7 | 3 - 8 | 15 - 9 | 10 - 10 | 6 - 11 | 7 - 12 | 8 - 13 | 9 - 14 | 11 - 15 | 12 - 16 | 16 - 17 | 17 + seq | node +-----+------ + 1 | 5 + 2 | 2 + 3 | 4 + 4 | 13 + 5 | 14 + 6 | 1 + 7 | 3 + 8 | 15 + 9 | 10 + 10 | 6 + 11 | 7 + 12 | 8 + 13 | 9 + 14 | 11 + 15 | 12 + 16 | 16 + 17 | 17 (17 rows) /* -- q3 */ diff --git a/docqueries/pickDeliver/CMakeLists.txt b/docqueries/pickDeliver/CMakeLists.txt index d9064c641fe..418328af1df 100644 --- a/docqueries/pickDeliver/CMakeLists.txt +++ b/docqueries/pickDeliver/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES pickDeliverEuclidean pickDeliver vrpOneDepot diff --git a/docqueries/planar/CMakeLists.txt b/docqueries/planar/CMakeLists.txt index 21a66f4e369..72b62bae6f2 100644 --- a/docqueries/planar/CMakeLists.txt +++ b/docqueries/planar/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES boyerMyrvold isPlanar ) diff --git a/docqueries/spanningTree/CMakeLists.txt b/docqueries/spanningTree/CMakeLists.txt index c7a5dac2dec..d1638bee6b0 100644 --- a/docqueries/spanningTree/CMakeLists.txt +++ b/docqueries/spanningTree/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES kruskalBFS kruskalDD kruskalDFS diff --git a/docqueries/src/CMakeLists.txt b/docqueries/src/CMakeLists.txt index 0688dd96b4a..a8de3c0b0a2 100644 --- a/docqueries/src/CMakeLists.txt +++ b/docqueries/src/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES withPoints-category sampledata migration diff --git a/docqueries/src/migration.pg b/docqueries/src/migration.pg index 7c28a870f73..d965c744572 100644 --- a/docqueries/src/migration.pg +++ b/docqueries/src/migration.pg @@ -68,14 +68,14 @@ SELECT * FROM pgr_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (4, 3)$$, -4, -3, - details => false); + 'r', details => false); /* --edgesv3 */ SELECT seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost FROM pgr_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6)) AS t(pid, edge_id, fraction)$$, -1, -2, - details => false); + 'r', details => false); /* --edgesv4 */ /* --edgesv5 */ SELECT * FROM pgr_trsp_withPoints( @@ -83,7 +83,7 @@ SELECT * FROM pgr_trsp_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (4, 3)$$, -4, -3, - details => false); + 'r', details => false); /* --edgesv6 */ SELECT seq, node::INTEGER AS id1, edge::INTEGER AS id2, cost FROM pgr_trsp_withPoints( @@ -91,7 +91,7 @@ FROM pgr_trsp_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6)) AS t(pid, edge_id, fraction)$$, -1, -2, - details => false) + 'r', details => false) WHERE edge != -1; /* --edgesv7 */ /* --viav2 */ @@ -131,7 +131,7 @@ SELECT * FROM pgr_withPointsVia( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); /* --edgesvia3 */ SELECT row_number() over(ORDER BY seq) AS seq, path_id::INTEGER AS id1, node::INTEGER AS id2, @@ -140,7 +140,7 @@ FROM pgr_withPointsVia( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); /* --edgesvia4 */ /* --edgesvia5 */ SELECT * FROM pgr_trspVia_withPoints( @@ -148,7 +148,7 @@ SELECT * FROM pgr_trspVia_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); /* --edgesvia6 */ SELECT row_number() over(ORDER BY seq) AS seq, path_id::INTEGER AS id1, node::INTEGER AS id2, @@ -158,14 +158,9 @@ FROM pgr_trspVia_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6),(3, 4, 0.7)) AS t(pid, edge_id, fraction)$$, ARRAY[-1, -2, -3], - details => false); + 'r', details => false); /* --edgesvia7 */ -/* --maxcard1 */ -SELECT * FROM pgr_maxCardinalityMatch( - $$SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges$$, - directed => true -); /* --maxcard2 */ SELECT * FROM pgr_maxCardinalityMatch( $$SELECT id, source, target, cost, reverse_cost FROM edges$$ @@ -182,11 +177,11 @@ SELECT * FROM pgr_dijkstra( /* --dijkstra3 */ SELECT * FROM pgr_dijkstra( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, - ARRAY[3, 6], 10); + ARRAY[6, 1], 17); /* --dijkstra4 */ -SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_dijkstra( +SELECT seq, path_seq, start_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, - 6, 10); + ARRAY[6, 1], 17); /* --dijkstra5 */ /* --astar1 */ SELECT * FROM pgr_aStar( @@ -212,36 +207,24 @@ SELECT * FROM pgr_bdAstar( /* --bdastar2 */ SELECT * FROM pgr_bdAstar( $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, - 6, ARRAY[3, 10]); + 6, ARRAY[10, 12], + heuristic => 3, factor := 3.5); /* --bdastar3 */ SELECT * FROM pgr_bdAstar( $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, - ARRAY[3, 6], 10); + 6, ARRAY[10, 12], + heuristic => 3, factor := 3.5); /* --bdastar4 */ SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_bdAstar( $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, 6, 10); /* --bdastar5 */ -/* --withpointsdd1 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3); -/* --withpointsdd2 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, driving_side => 'r'); -/* --withpointsdd3 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, directed => true, driving_side => 'b'); + /* --withpointsdd4 */ SELECT * FROM pgr_withPointsDD( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, 'r', directed => true); + -1, 3.3, 'r', details =>true); /* --withpointsdd5 */ SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, @@ -258,6 +241,7 @@ SELECT seq, start_vid, node, edge, cost, agg_cost FROM pgr_withPointsDD( $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, ARRAY[-1, 16], 3.3, 'l', equicost => true) WHERE node >= 0 OR cost = 0; /* --withpointsdd8 */ + /* --withPointsKSP1 */ SELECT * FROM pgr_withPointsKSP( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, @@ -309,25 +293,25 @@ FROM pgr_kruskalDD( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 6, 3.5); /* --kruskalDD3 */ -SELECT * FROM pgr_kruskalDD( +SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - ARRAY[9, 6], 3.5); + ARRAY[9, 6], max_depth => 3); /* --kruskalDD4 */ SELECT seq, depth, start_vid, node, edge, cost, agg_cost -FROM pgr_kruskalDD( +FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - ARRAY[9, 6], 3.5); + ARRAY[9, 6], max_depth => 3); /* --kruskalDD5 */ /* --primDD1 */ -SELECT * FROM pgr_primDD( +SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 6, 3.5); + 6); /* --primDD2 */ SELECT seq, depth, start_vid, node, edge, cost, agg_cost -FROM pgr_primDD( +FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 6, 3.5); + 6); /* --primDD3 */ SELECT * FROM pgr_primDD( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', @@ -380,3 +364,185 @@ FROM pgr_bridges('SELECT id, source, target, cost, reverse_cost FROM edges') JOIN edges ON (edge = id) WHERE cost < 0 OR reverse_cost<0; /* --OneWay4 */ + + +-- withPoints +/* --withPoints-1-to-1 */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, + 'r', details => true); +/* --withPoints-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, + 'r', details => true); +/* --withPoints-1-to-m */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); +/* --withPoints-1-to-m-filter */ +SELECT seq, path_seq, end_vid AS end_pid, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); +/* --withPoints-m-to-1 */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); +/* --withPoints-m-to-1-filter */ +SELECT seq, path_seq, start_vid AS start_pid, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); +/* --withPoints-m-to-m */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); +/* --withPoints-m-to-m-filter */ +SELECT seq, path_seq, start_vid AS start_pid, end_vid AS end_pid,node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); +/* --withPoints-c */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); +/* --withPoints-c-filter */ +SELECT seq, path_seq, start_vid AS start_pid, end_vid AS end_pid,node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); +/* --withPoints-END */ + + +-- withPointsCost +/* --withPointsCost-1-to-1 */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, 'r'); +/* --withPointsCost-1-to-1-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, 'r'); +/* --withPointsCost-1-to-m */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); +/* --withPointsCost-1-to-m-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); +/* --withPointsCost-m-to-1 */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); +/* --withPointsCost-m-to-1-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); +/* --withPointsCost-m-to-m */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); +/* --withPointsCost-m-to-m-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); +/* --withPointsCost-c */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r'); +/* --withPointsCost-c-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r'); +/* --withPointsCost-END */ + +-- bdDijkstra +/* --bdDijkstra-1-to-1 */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, 10, true); +/* --bdDijkstra-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, 10, true); +/* --bdDijkstra-1-to-m */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, ARRAY[10, 17]); +/* --bdDijkstra-1-to-m-filter */ +SELECT seq, path_seq, end_vid AS end_pid, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, ARRAY[10, 17]); +/* --bdDijkstra-m-to-1 */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[6, 1], 17); +/* --bdDijkstra-m-to-1-filter */ +SELECT seq, path_seq, start_vid AS start_pid, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[6, 1], 17); +/* --bdDijkstra-END */ + + +-- DAGshortestPath +/* --DAGshortestPath-1-to-1 */ +SELECT * FROM pgr_DAGshortestPath( + 'select id, source, target, cost from edges', + 5, 11); +/* --DAGshortestPath-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_DAGshortestPath( + 'select id, source, target, cost from edges', + 5, 11); +/* --DAGshortestPath-END */ + +/* --EdgeDisjoint1 */ +SELECT * FROM pgr_edgeDisjointPaths( + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 11, 12); +/* --EdgeDisjoint2 */ +SELECT seq, path_id, path_seq, node, edge, cost, agg_cost +FROM pgr_edgeDisjointPaths( + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 11, 12); +/* --EdgeDisjoint3 */ diff --git a/docqueries/src/migration.result b/docqueries/src/migration.result index 8a9eecf33e8..9bc66857914 100644 --- a/docqueries/src/migration.result +++ b/docqueries/src/migration.result @@ -141,14 +141,14 @@ SELECT * FROM pgr_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (4, 3)$$, -4, -3, - details => false); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | -4 | 6 | 0.7 | 0 - 2 | 2 | 3 | 7 | 1 | 0.7 - 3 | 3 | 7 | 10 | 1 | 1.7 - 4 | 4 | 8 | 12 | 0.6 | 2.7 - 5 | 5 | -3 | -1 | 0 | 3.3 + 'r', details => false); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -4 | -3 | -4 | 6 | 0.7 | 0 + 2 | 2 | -4 | -3 | 3 | 7 | 1 | 0.7 + 3 | 3 | -4 | -3 | 7 | 10 | 1 | 1.7 + 4 | 4 | -4 | -3 | 8 | 12 | 0.6 | 2.7 + 5 | 5 | -4 | -3 | -3 | -1 | 0 | 3.3 (5 rows) /* --edgesv3 */ @@ -157,7 +157,7 @@ FROM pgr_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6)) AS t(pid, edge_id, fraction)$$, -1, -2, - details => false); + 'r', details => false); seq | id1 | id2 | cost -----+-----+-----+------ 1 | -1 | 6 | 0.7 @@ -174,7 +174,7 @@ SELECT * FROM pgr_trsp_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (4, 3)$$, -4, -3, - details => false); + 'r', details => false); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -4 | -3 | -4 | 6 | 0.7 | 0 @@ -197,7 +197,7 @@ FROM pgr_trsp_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6)) AS t(pid, edge_id, fraction)$$, -1, -2, - details => false) + 'r', details => false) WHERE edge != -1; seq | id1 | id2 | cost -----+-----+-----+------ @@ -315,7 +315,7 @@ SELECT * FROM pgr_withPointsVia( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost -----+---------+----------+-----------+---------+------+------+------+----------+---------------- 1 | 1 | 1 | -4 | -3 | -4 | 6 | 0.7 | 0 | 0 @@ -340,7 +340,7 @@ FROM pgr_withPointsVia( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); seq | id1 | id2 | id3 | cost -----+-----+-----+-----+------ 1 | 1 | -4 | 6 | 0.7 @@ -364,7 +364,7 @@ SELECT * FROM pgr_trspVia_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT pid, edge_id, fraction FROM pointsOfInterest WHERE pid IN (3, 4, 6)$$, ARRAY[-4, -3, -6], - details => false); + 'r', details => false); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost -----+---------+----------+-----------+---------+------+------+------+----------+---------------- 1 | 1 | 1 | -4 | -3 | -4 | 6 | 0.7 | 0 | 0 @@ -391,7 +391,7 @@ FROM pgr_trspVia_withPoints( $$SELECT * FROM new_restrictions$$, $$SELECT * FROM (VALUES (1, 6, 0.3),(2, 12, 0.6),(3, 4, 0.7)) AS t(pid, edge_id, fraction)$$, ARRAY[-1, -2, -3], - details => false); + 'r', details => false); seq | id1 | id2 | id3 | cost -----+-----+-----+-----+------ 1 | 1 | -1 | 6 | 0.7 @@ -410,24 +410,6 @@ FROM pgr_trspVia_withPoints( (13 rows) /* --edgesvia7 */ -/* --maxcard1 */ -SELECT * FROM pgr_maxCardinalityMatch( - $$SELECT id, source, target, cost AS going, reverse_cost AS coming FROM edges$$, - directed => true -); -WARNING: pgr_maxCardinalityMatch(text,boolean) deprecated signature on v3.4.0 - seq | edge | source | target ------+------+--------+-------- - 1 | 1 | 5 | 6 - 2 | 5 | 10 | 11 - 3 | 6 | 1 | 3 - 4 | 13 | 12 | 17 - 5 | 14 | 8 | 9 - 6 | 16 | 15 | 16 - 7 | 17 | 2 | 4 - 8 | 18 | 13 | 14 -(8 rows) - /* --maxcard2 */ SELECT * FROM pgr_maxCardinalityMatch( $$SELECT id, source, target, cost, reverse_cost FROM edges$$ @@ -479,36 +461,40 @@ SELECT * FROM pgr_dijkstra( /* --dijkstra3 */ SELECT * FROM pgr_dijkstra( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, - ARRAY[3, 6], 10); + ARRAY[6, 1], 17); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 3 | 10 | 3 | 7 | 1 | 0 - 2 | 2 | 3 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 3 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 3 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 3 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 6 | 10 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 10 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 10 | 11 | 9 | 1 | 2 - 10 | 4 | 6 | 10 | 16 | 16 | 1 | 3 - 11 | 5 | 6 | 10 | 15 | 3 | 1 | 4 - 12 | 6 | 6 | 10 | 10 | -1 | 0 | 5 -(12 rows) + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 +(11 rows) /* --dijkstra4 */ -SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_dijkstra( +SELECT seq, path_seq, start_vid, node, edge, cost, agg_cost FROM pgr_dijkstra( $$SELECT id, source, target, cost, reverse_cost FROM edges$$, - 6, 10); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 8 | 1 | 1 - 3 | 3 | 11 | 9 | 1 | 2 - 4 | 4 | 16 | 16 | 1 | 3 - 5 | 5 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | -1 | 0 | 5 -(6 rows) + ARRAY[6, 1], 17); + seq | path_seq | start_vid | node | edge | cost | agg_cost +-----+----------+-----------+------+------+------+---------- + 1 | 1 | 1 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | -1 | 0 | 4 +(11 rows) /* --dijkstra5 */ /* --astar1 */ @@ -594,39 +580,40 @@ SELECT * FROM pgr_bdAstar( /* --bdastar2 */ SELECT * FROM pgr_bdAstar( $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, - 6, ARRAY[3, 10]); + 6, ARRAY[10, 12], + heuristic => 3, factor := 3.5); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 6 | 3 | 6 | 4 | 1 | 0 - 2 | 2 | 6 | 3 | 7 | 7 | 1 | 1 - 3 | 3 | 6 | 3 | 3 | -1 | 0 | 2 - 4 | 1 | 6 | 10 | 6 | 4 | 1 | 0 - 5 | 2 | 6 | 10 | 7 | 8 | 1 | 1 - 6 | 3 | 6 | 10 | 11 | 9 | 1 | 2 - 7 | 4 | 6 | 10 | 16 | 16 | 1 | 3 - 8 | 5 | 6 | 10 | 15 | 3 | 1 | 4 - 9 | 6 | 6 | 10 | 10 | -1 | 0 | 5 -(9 rows) + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 12 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 12 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 12 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 12 | 12 | -1 | 0 | 3 +(10 rows) /* --bdastar3 */ SELECT * FROM pgr_bdAstar( $$SELECT id, source, target, cost, reverse_cost, x1, y1, x2, y2 FROM edges$$, - ARRAY[3, 6], 10); + 6, ARRAY[10, 12], + heuristic => 3, factor := 3.5); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 3 | 10 | 3 | 7 | 1 | 0 - 2 | 2 | 3 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 3 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 3 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 3 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 6 | 10 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 10 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 10 | 11 | 9 | 1 | 2 - 10 | 4 | 6 | 10 | 16 | 16 | 1 | 3 - 11 | 5 | 6 | 10 | 15 | 3 | 1 | 4 - 12 | 6 | 6 | 10 | 10 | -1 | 0 | 5 -(12 rows) + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 12 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 12 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 12 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 12 | 12 | -1 | 0 | 3 +(10 rows) /* --bdastar4 */ SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_bdAstar( @@ -643,70 +630,19 @@ SELECT seq, path_seq, node, edge, cost, agg_cost FROM pgr_bdAstar( (6 rows) /* --bdastar5 */ -/* --withpointsdd1 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3); -WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) deprecated signature on 3.6.0 - seq | node | edge | cost | agg_cost ------+------+------+------+---------- - 1 | -1 | -1 | 0 | 0 - 2 | 5 | 1 | 0.4 | 0.4 - 3 | 6 | 1 | 0.6 | 0.6 - 4 | 7 | 4 | 1 | 1.6 - 5 | 3 | 7 | 1 | 2.6 - 6 | 8 | 10 | 1 | 2.6 - 7 | 11 | 8 | 1 | 2.6 - 8 | -3 | 12 | 0.6 | 3.2 - 9 | -4 | 6 | 0.7 | 3.3 -(9 rows) - -/* --withpointsdd2 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, driving_side => 'r'); -WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) deprecated signature on 3.6.0 - seq | node | edge | cost | agg_cost ------+------+------+------+---------- - 1 | -1 | -1 | 0 | 0 - 2 | 5 | 1 | 0.4 | 0.4 - 3 | 6 | 1 | 1 | 1.4 - 4 | 7 | 4 | 1 | 2.4 -(4 rows) - -/* --withpointsdd3 */ -SELECT * FROM pgr_withPointsDD( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, directed => true, driving_side => 'b'); -WARNING: pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean) deprecated signature on 3.6.0 - seq | node | edge | cost | agg_cost ------+------+------+------+---------- - 1 | -1 | -1 | 0 | 0 - 2 | 5 | 1 | 0.4 | 0.4 - 3 | 6 | 1 | 0.6 | 0.6 - 4 | 7 | 4 | 1 | 1.6 - 5 | 3 | 7 | 1 | 2.6 - 6 | 8 | 10 | 1 | 2.6 - 7 | 11 | 8 | 1 | 2.6 - 8 | -3 | 12 | 0.6 | 3.2 - 9 | -4 | 6 | 0.7 | 3.3 -(9 rows) - /* --withpointsdd4 */ SELECT * FROM pgr_withPointsDD( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT pid, edge_id, fraction, side from pointsOfInterest$$, - -1, 3.3, 'r', directed => true); + -1, 3.3, 'r', details =>true); seq | depth | start_vid | pred | node | edge | cost | agg_cost -----+-------+-----------+------+------+------+------+---------- 1 | 0 | -1 | -1 | -1 | -1 | 0 | 0 2 | 1 | -1 | -1 | 5 | 1 | 0.4 | 0.4 3 | 2 | -1 | 5 | 6 | 1 | 1 | 1.4 - 4 | 3 | -1 | -6 | 7 | 4 | 1 | 2.4 -(4 rows) + 4 | 3 | -1 | 6 | -6 | 4 | 0.7 | 2.1 + 5 | 4 | -1 | -6 | 7 | 4 | 0.3 | 2.4 +(5 rows) /* --withpointsdd5 */ SELECT seq, node, edge, cost, agg_cost FROM pgr_withPointsDD( @@ -965,9 +901,9 @@ FROM pgr_kruskalDD( (5 rows) /* --kruskalDD3 */ -SELECT * FROM pgr_kruskalDD( +SELECT * FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - ARRAY[9, 6], 3.5); + ARRAY[9, 6], max_depth => 3); seq | depth | start_vid | pred | node | edge | cost | agg_cost -----+-------+-----------+------+------+------+------+---------- 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 @@ -986,9 +922,9 @@ SELECT * FROM pgr_kruskalDD( /* --kruskalDD4 */ SELECT seq, depth, start_vid, node, edge, cost, agg_cost -FROM pgr_kruskalDD( +FROM pgr_kruskalDFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - ARRAY[9, 6], 3.5); + ARRAY[9, 6], max_depth => 3); seq | depth | start_vid | node | edge | cost | agg_cost -----+-------+-----------+------+------+------+---------- 1 | 0 | 6 | 6 | -1 | 0 | 0 @@ -1007,45 +943,47 @@ FROM pgr_kruskalDD( /* --kruskalDD5 */ /* --primDD1 */ -SELECT * FROM pgr_primDD( +SELECT * FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 6, 3.5); + 6); seq | depth | start_vid | pred | node | edge | cost | agg_cost -----+-------+-----------+------+------+------+------+---------- 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 2 | 1 | 6 | 6 | 5 | 1 | 1 | 1 3 | 1 | 6 | 6 | 10 | 2 | 1 | 1 - 4 | 2 | 6 | 10 | 15 | 3 | 1 | 2 - 5 | 2 | 6 | 10 | 11 | 5 | 1 | 2 - 6 | 3 | 6 | 11 | 16 | 9 | 1 | 3 - 7 | 3 | 6 | 11 | 12 | 11 | 1 | 3 - 8 | 1 | 6 | 6 | 7 | 4 | 1 | 1 - 9 | 2 | 6 | 7 | 3 | 7 | 1 | 2 - 10 | 3 | 6 | 3 | 1 | 6 | 1 | 3 - 11 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 4 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 5 | 2 | 6 | 10 | 15 | 3 | 1 | 2 + 6 | 2 | 6 | 10 | 11 | 5 | 1 | 2 + 7 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 8 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 9 | 3 | 6 | 11 | 16 | 9 | 1 | 3 + 10 | 3 | 6 | 11 | 12 | 11 | 1 | 3 + 11 | 3 | 6 | 3 | 1 | 6 | 1 | 3 12 | 3 | 6 | 8 | 9 | 14 | 1 | 3 -(12 rows) + 13 | 4 | 6 | 12 | 17 | 13 | 1 | 4 +(13 rows) /* --primDD2 */ SELECT seq, depth, start_vid, node, edge, cost, agg_cost -FROM pgr_primDD( +FROM pgr_primBFS( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 6, 3.5); + 6); seq | depth | start_vid | node | edge | cost | agg_cost -----+-------+-----------+------+------+------+---------- 1 | 0 | 6 | 6 | -1 | 0 | 0 2 | 1 | 6 | 5 | 1 | 1 | 1 3 | 1 | 6 | 10 | 2 | 1 | 1 - 4 | 2 | 6 | 15 | 3 | 1 | 2 - 5 | 2 | 6 | 11 | 5 | 1 | 2 - 6 | 3 | 6 | 16 | 9 | 1 | 3 - 7 | 3 | 6 | 12 | 11 | 1 | 3 - 8 | 1 | 6 | 7 | 4 | 1 | 1 - 9 | 2 | 6 | 3 | 7 | 1 | 2 - 10 | 3 | 6 | 1 | 6 | 1 | 3 - 11 | 2 | 6 | 8 | 10 | 1 | 2 + 4 | 1 | 6 | 7 | 4 | 1 | 1 + 5 | 2 | 6 | 15 | 3 | 1 | 2 + 6 | 2 | 6 | 11 | 5 | 1 | 2 + 7 | 2 | 6 | 3 | 7 | 1 | 2 + 8 | 2 | 6 | 8 | 10 | 1 | 2 + 9 | 3 | 6 | 16 | 9 | 1 | 3 + 10 | 3 | 6 | 12 | 11 | 1 | 3 + 11 | 3 | 6 | 1 | 6 | 1 | 3 12 | 3 | 6 | 9 | 14 | 1 | 3 -(12 rows) + 13 | 4 | 6 | 17 | 13 | 1 | 4 +(13 rows) /* --primDD3 */ SELECT * FROM pgr_primDD( @@ -1199,5 +1137,513 @@ WHERE cost < 0 OR reverse_cost<0; (0 rows) /* --OneWay4 */ +-- withPoints +/* --withPoints-1-to-1 */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, + 'r', details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 + 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 + 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 + 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 + 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 + 7 | 7 | -1 | 10 | 16 | 16 | 1 | 4.4 + 8 | 8 | -1 | 10 | 15 | 3 | 1 | 5.4 + 9 | 9 | -1 | 10 | 10 | -1 | 0 | 6.4 +(9 rows) + +/* --withPoints-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, + 'r', details => true); + seq | path_seq | node | edge | cost | agg_cost +-----+----------+------+------+------+---------- + 1 | 1 | -1 | 1 | 0.4 | 0 + 2 | 2 | 5 | 1 | 1 | 0.4 + 3 | 3 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -6 | 4 | 0.3 | 2.1 + 5 | 5 | 7 | 8 | 1 | 2.4 + 6 | 6 | 11 | 9 | 1 | 3.4 + 7 | 7 | 16 | 16 | 1 | 4.4 + 8 | 8 | 15 | 3 | 1 | 5.4 + 9 | 9 | 10 | -1 | 0 | 6.4 +(9 rows) + +/* --withPoints-1-to-m */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 0.6 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 1.6 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 2.6 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 3.2 + 6 | 1 | -1 | 7 | -1 | 1 | 0.6 | 0 + 7 | 2 | -1 | 7 | 6 | 4 | 1 | 0.6 + 8 | 3 | -1 | 7 | 7 | -1 | 0 | 1.6 +(8 rows) + +/* --withPoints-1-to-m-filter */ +SELECT seq, path_seq, end_vid AS end_pid, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); + seq | path_seq | end_pid | node | edge | cost | agg_cost +-----+----------+---------+------+------+------+---------- + 1 | 1 | -3 | -1 | 1 | 0.6 | 0 + 2 | 2 | -3 | 6 | 4 | 1 | 0.6 + 3 | 3 | -3 | 7 | 10 | 1 | 1.6 + 4 | 4 | -3 | 8 | 12 | 0.6 | 2.6 + 5 | 5 | -3 | -3 | -1 | 0 | 3.2 + 6 | 1 | 7 | -1 | 1 | 0.6 | 0 + 7 | 2 | 7 | 6 | 4 | 1 | 0.6 + 8 | 3 | 7 | 7 | -1 | 0 | 1.6 +(8 rows) + +/* --withPoints-m-to-1 */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 + 6 | 1 | 6 | -3 | 6 | 4 | 1 | 0 + 7 | 2 | 6 | -3 | 7 | 10 | 1 | 1 + 8 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 + 9 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 +(9 rows) + +/* --withPoints-m-to-1-filter */ +SELECT seq, path_seq, start_vid AS start_pid, node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); + seq | path_seq | start_pid | node | edge | cost | agg_cost +-----+----------+-----------+------+------+------+---------- + 1 | 1 | -1 | -1 | 1 | 1.4 | 0 + 2 | 2 | -1 | 6 | 4 | 1 | 1.4 + 3 | 3 | -1 | 7 | 10 | 1 | 2.4 + 4 | 4 | -1 | 8 | 12 | 0.6 | 3.4 + 5 | 5 | -1 | -3 | -1 | 0 | 4 + 6 | 1 | 6 | 6 | 4 | 1 | 0 + 7 | 2 | 6 | 7 | 10 | 1 | 1 + 8 | 3 | 6 | 8 | 12 | 0.6 | 2 + 9 | 4 | 6 | -3 | -1 | 0 | 2.6 +(9 rows) + +/* --withPoints-m-to-m */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 + 6 | 1 | -1 | 1 | -1 | 1 | 1.4 | 0 + 7 | 2 | -1 | 1 | 6 | 4 | 1 | 1.4 + 8 | 3 | -1 | 1 | 7 | 7 | 1 | 2.4 + 9 | 4 | -1 | 1 | 3 | 6 | 1 | 3.4 + 10 | 5 | -1 | 1 | 1 | -1 | 0 | 4.4 + 11 | 1 | 6 | -3 | 6 | 4 | 1 | 0 + 12 | 2 | 6 | -3 | 7 | 10 | 1 | 1 + 13 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 + 14 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 + 15 | 1 | 6 | 1 | 6 | 4 | 1 | 0 + 16 | 2 | 6 | 1 | 7 | 7 | 1 | 1 + 17 | 3 | 6 | 1 | 3 | 6 | 1 | 2 + 18 | 4 | 6 | 1 | 1 | -1 | 0 | 3 +(18 rows) + +/* --withPoints-m-to-m-filter */ +SELECT seq, path_seq, start_vid AS start_pid, end_vid AS end_pid,node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); + seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 + 6 | 1 | -1 | 1 | -1 | 1 | 1.4 | 0 + 7 | 2 | -1 | 1 | 6 | 4 | 1 | 1.4 + 8 | 3 | -1 | 1 | 7 | 7 | 1 | 2.4 + 9 | 4 | -1 | 1 | 3 | 6 | 1 | 3.4 + 10 | 5 | -1 | 1 | 1 | -1 | 0 | 4.4 + 11 | 1 | 6 | -3 | 6 | 4 | 1 | 0 + 12 | 2 | 6 | -3 | 7 | 10 | 1 | 1 + 13 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 + 14 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 + 15 | 1 | 6 | 1 | 6 | 4 | 1 | 0 + 16 | 2 | 6 | 1 | 7 | 7 | 1 | 1 + 17 | 3 | 6 | 1 | 3 | 6 | 1 | 2 + 18 | 4 | 6 | 1 | 1 | -1 | 0 | 3 +(18 rows) + +/* --withPoints-c */ +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 + 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 + 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 + 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 + 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 + 7 | 7 | -1 | 10 | 16 | 16 | 1 | 4.4 + 8 | 8 | -1 | 10 | 15 | 3 | 1 | 5.4 + 9 | 9 | -1 | 10 | 10 | -1 | 0 | 6.4 + 10 | 1 | 6 | -3 | 6 | 4 | 0.7 | 0 + 11 | 2 | 6 | -3 | -6 | 4 | 0.3 | 0.7 + 12 | 3 | 6 | -3 | 7 | 10 | 1 | 1 + 13 | 4 | 6 | -3 | 8 | 12 | 0.6 | 2 + 14 | 5 | 6 | -3 | -3 | -1 | 0 | 2.6 +(14 rows) + +/* --withPoints-c-filter */ +SELECT seq, path_seq, start_vid AS start_pid, end_vid AS end_pid,node, edge, cost, agg_cost +FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); + seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 + 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 + 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 + 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 + 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 + 7 | 7 | -1 | 10 | 16 | 16 | 1 | 4.4 + 8 | 8 | -1 | 10 | 15 | 3 | 1 | 5.4 + 9 | 9 | -1 | 10 | 10 | -1 | 0 | 6.4 + 10 | 1 | 6 | -3 | 6 | 4 | 0.7 | 0 + 11 | 2 | 6 | -3 | -6 | 4 | 0.3 | 0.7 + 12 | 3 | 6 | -3 | 7 | 10 | 1 | 1 + 13 | 4 | 6 | -3 | 8 | 12 | 0.6 | 2 + 14 | 5 | 6 | -3 | -3 | -1 | 0 | 2.6 +(14 rows) + +/* --withPoints-END */ +-- withPointsCost +/* --withPointsCost-1-to-1 */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, 'r'); + start_vid | end_vid | agg_cost +-----------+---------+---------- + -1 | 10 | 6.4 +(1 row) + +/* --withPointsCost-1-to-1-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, 10, 'r'); + start_pid | end_pid | agg_cost +-----------+---------+---------- + -1 | 10 | 6.4 +(1 row) + +/* --withPointsCost-1-to-m */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); + start_vid | end_vid | agg_cost +-----------+---------+---------- + -1 | -3 | 3.2 + -1 | 7 | 1.6 +(2 rows) + +/* --withPointsCost-1-to-m-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + -1, ARRAY[-3, 7], + 'b', directed => false); + start_pid | end_pid | agg_cost +-----------+---------+---------- + -1 | -3 | 3.2 + -1 | 7 | 1.6 +(2 rows) + +/* --withPointsCost-m-to-1 */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); + start_vid | end_vid | agg_cost +-----------+---------+---------- + -1 | -3 | 4 + 6 | -3 | 2.6 +(2 rows) + +/* --withPointsCost-m-to-1-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], -3, 'r'); + start_pid | end_pid | agg_cost +-----------+---------+---------- + -1 | -3 | 4 + 6 | -3 | 2.6 +(2 rows) + +/* --withPointsCost-m-to-m */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); + start_vid | end_vid | agg_cost +-----------+---------+---------- + -1 | -3 | 4 + -1 | 1 | 4.4 + 6 | -3 | 2.6 + 6 | 1 | 3 +(4 rows) + +/* --withPointsCost-m-to-m-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'r'); + start_pid | end_pid | agg_cost +-----------+---------+---------- + -1 | -3 | 4 + -1 | 1 | 4.4 + 6 | -3 | 2.6 + 6 | 1 | 3 +(4 rows) + +/* --withPointsCost-c */ +SELECT * FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r'); + start_vid | end_vid | agg_cost +-----------+---------+---------- + -1 | 10 | 6.4 + 6 | -3 | 2.6 +(2 rows) + +/* --withPointsCost-c-filter */ +SELECT start_vid AS start_pid, end_vid AS end_pid, agg_cost +FROM pgr_withPointsCost( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r'); + start_pid | end_pid | agg_cost +-----------+---------+---------- + -1 | 10 | 6.4 + 6 | -3 | 2.6 +(2 rows) + +/* --withPointsCost-END */ +-- bdDijkstra +/* --bdDijkstra-1-to-1 */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, 10, true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 +(6 rows) + +/* --bdDijkstra-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, 10, true); + seq | path_seq | node | edge | cost | agg_cost +-----+----------+------+------+------+---------- + 1 | 1 | 6 | 4 | 1 | 0 + 2 | 2 | 7 | 8 | 1 | 1 + 3 | 3 | 11 | 9 | 1 | 2 + 4 | 4 | 16 | 16 | 1 | 3 + 5 | 5 | 15 | 3 | 1 | 4 + 6 | 6 | 10 | -1 | 0 | 5 +(6 rows) + +/* --bdDijkstra-1-to-m */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, ARRAY[10, 17]); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 +(11 rows) + +/* --bdDijkstra-1-to-m-filter */ +SELECT seq, path_seq, end_vid AS end_pid, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + 6, ARRAY[10, 17]); + seq | path_seq | end_pid | node | edge | cost | agg_cost +-----+----------+---------+------+------+------+---------- + 1 | 1 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 17 | 17 | -1 | 0 | 4 +(11 rows) + +/* --bdDijkstra-m-to-1 */ +SELECT * FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[6, 1], 17); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 +(11 rows) + +/* --bdDijkstra-m-to-1-filter */ +SELECT seq, path_seq, start_vid AS start_pid, node, edge, cost, agg_cost +FROM pgr_bdDijkstra( + 'select id, source, target, cost, reverse_cost from edges', + ARRAY[6, 1], 17); + seq | path_seq | start_pid | node | edge | cost | agg_cost +-----+----------+-----------+------+------+------+---------- + 1 | 1 | 1 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | -1 | 0 | 4 +(11 rows) + +/* --bdDijkstra-END */ +-- DAGshortestPath +/* --DAGshortestPath-1-to-1 */ +SELECT * FROM pgr_DAGshortestPath( + 'select id, source, target, cost from edges', + 5, 11); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 2 | 2 | 5 | 11 | 6 | 4 | 1 | 1 + 3 | 3 | 5 | 11 | 7 | 8 | 1 | 2 + 4 | 4 | 5 | 11 | 11 | -1 | 0 | 3 +(4 rows) + +/* --DAGshortestPath-1-to-1-filter */ +SELECT seq, path_seq, node, edge, cost, agg_cost +FROM pgr_DAGshortestPath( + 'select id, source, target, cost from edges', + 5, 11); + seq | path_seq | node | edge | cost | agg_cost +-----+----------+------+------+------+---------- + 1 | 1 | 5 | 1 | 1 | 0 + 2 | 2 | 6 | 4 | 1 | 1 + 3 | 3 | 7 | 8 | 1 | 2 + 4 | 4 | 11 | -1 | 0 | 3 +(4 rows) + +/* --DAGshortestPath-END */ +/* --EdgeDisjoint1 */ +SELECT * FROM pgr_edgeDisjointPaths( + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 11, 12); + seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+---------+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 11 | 12 | 11 | 8 | 1 | 0 + 2 | 1 | 2 | 11 | 12 | 7 | 10 | 1 | 1 + 3 | 1 | 3 | 11 | 12 | 8 | 12 | 1 | 2 + 4 | 1 | 4 | 11 | 12 | 12 | -1 | 0 | 3 + 5 | 2 | 1 | 11 | 12 | 11 | 11 | 1 | 0 + 6 | 2 | 2 | 11 | 12 | 12 | -1 | 0 | 1 +(6 rows) + +/* --EdgeDisjoint2 */ +SELECT seq, path_id, path_seq, node, edge, cost, agg_cost +FROM pgr_edgeDisjointPaths( + 'SELECT id, source, target, cost, reverse_cost FROM edges', + 11, 12); + seq | path_id | path_seq | node | edge | cost | agg_cost +-----+---------+----------+------+------+------+---------- + 1 | 1 | 1 | 11 | 8 | 1 | 0 + 2 | 1 | 2 | 7 | 10 | 1 | 1 + 3 | 1 | 3 | 8 | 12 | 1 | 2 + 4 | 1 | 4 | 12 | -1 | 0 | 3 + 5 | 2 | 1 | 11 | 11 | 1 | 0 + 6 | 2 | 2 | 12 | -1 | 0 | 1 +(6 rows) + +/* --EdgeDisjoint3 */ ROLLBACK; ROLLBACK diff --git a/docqueries/src/sampledata.result b/docqueries/src/sampledata.result index 38b896538f7..ddecb4eec23 100644 --- a/docqueries/src/sampledata.result +++ b/docqueries/src/sampledata.result @@ -206,13 +206,13 @@ SELECT pid, ST_AsText(geom) geom, edge_id, fraction AS frac, side, distance AS dist, ST_AsText(edge) edge, ST_AsText(newPoint) newPoint -FROM pointsOfInterest; +FROM pointsOfInterest ORDER BY pid; pid | geom | edge_id | frac | side | dist | edge | newpoint -----+----------------+---------+------+------+------+---------------------------+-------------- 1 | POINT(1.8 0.4) | 1 | 0.4 | l | 0.2 | LINESTRING(1.8 0.4,2 0.4) | POINT(2 0.4) - 4 | POINT(0.3 1.8) | 6 | 0.3 | r | 0.2 | LINESTRING(0.3 1.8,0.3 2) | POINT(0.3 2) - 3 | POINT(2.6 3.2) | 12 | 0.6 | l | 0.2 | LINESTRING(2.6 3.2,2.6 3) | POINT(2.6 3) 2 | POINT(4.2 2.4) | 15 | 0.4 | r | 0.2 | LINESTRING(4.2 2.4,4 2.4) | POINT(4 2.4) + 3 | POINT(2.6 3.2) | 12 | 0.6 | l | 0.2 | LINESTRING(2.6 3.2,2.6 3) | POINT(2.6 3) + 4 | POINT(0.3 1.8) | 6 | 0.3 | r | 0.2 | LINESTRING(0.3 1.8,0.3 2) | POINT(0.3 2) 5 | POINT(2.9 1.8) | 5 | 0.8 | l | 0.1 | LINESTRING(2.9 1.8,3 1.8) | POINT(3 1.8) 6 | POINT(2.2 1.7) | 4 | 0.7 | b | 0.2 | LINESTRING(2.2 1.7,2 1.7) | POINT(2 1.7) (6 rows) diff --git a/docqueries/src/withPoints-category.pg b/docqueries/src/withPoints-category.pg index d0d349f56ef..f1da339d2fb 100644 --- a/docqueries/src/withPoints-category.pg +++ b/docqueries/src/withPoints-category.pg @@ -1,7 +1,8 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ /* --q1 */ -SELECT pid, edge_id, fraction, side FROM pointsOfInterest; +SELECT pid, edge_id, fraction, side FROM pointsOfInterest +ORDER BY pid; /* --q2 */ SELECT id, source, target, cost, reverse_cost FROM edges WHERE id = 15; diff --git a/docqueries/src/withPoints-category.result b/docqueries/src/withPoints-category.result index 44e1f236cf6..398b7b762ca 100644 --- a/docqueries/src/withPoints-category.result +++ b/docqueries/src/withPoints-category.result @@ -3,13 +3,14 @@ BEGIN SET client_min_messages TO NOTICE; SET /* --q1 */ -SELECT pid, edge_id, fraction, side FROM pointsOfInterest; +SELECT pid, edge_id, fraction, side FROM pointsOfInterest +ORDER BY pid; pid | edge_id | fraction | side -----+---------+----------+------ 1 | 1 | 0.4 | l - 4 | 6 | 0.3 | r - 3 | 12 | 0.6 | l 2 | 15 | 0.4 | r + 3 | 12 | 0.6 | l + 4 | 6 | 0.3 | r 5 | 5 | 0.8 | l 6 | 4 | 0.7 | b (6 rows) diff --git a/docqueries/topology/CMakeLists.txt b/docqueries/topology/CMakeLists.txt deleted file mode 100644 index abf97a73c91..00000000000 --- a/docqueries/topology/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# Do not use extensions -SET(LOCAL_FILES - analyzeGraph - analyzeOneWay - createTopology - createVerticesTable - extractVertices - nodeNetwork - ) - -foreach (f ${LOCAL_FILES}) - configure_file("${f}.result" "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") - list(APPEND LOCAL_DOC_FILES "${PGR_DOCUMENTATION_SOURCE_DIR}/${f}.queries") -endforeach() - -set(PROJECT_DOC_FILES ${PROJECT_DOC_FILES} ${LOCAL_DOC_FILES} PARENT_SCOPE) diff --git a/docqueries/topology/analyzeGraph.pg b/docqueries/topology/analyzeGraph.pg deleted file mode 100644 index c6a29150999..00000000000 --- a/docqueries/topology/analyzeGraph.pg +++ /dev/null @@ -1,123 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --- PGR_analyzegraph ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- - -/* -- q1 */ -SELECT id, geom AS the_geom, 0 AS cnt, 0 AS chk INTO edges_vertices_pgr FROM vertices; -SELECT pgr_analyzeGraph('edges',0.001,'geom'); -/* -- q1.1 */ - -/* -- q3 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom','id','source','target'); -/* -- q3.1 */ - -/* -- q5 */ -SELECT pgr_analyzeGraph('edges',0.001,'id','geom','source','target'); -/* -- q5.1 */ - -/* -- q6 */ -SELECT pgr_analyzeGraph('edges',0.001,the_geom:='geom',id:='id',source:='source',target:='target'); -/* -- q6.1 */ - -/* -- q7 */ -SELECT pgr_analyzeGraph('edges',0.001,source:='source',id:='id',target:='target',the_geom:='geom'); -/* -- q7.1 */ - -/* -- q8. */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', source:='source'); -/* -- q8.1 */ - -/* -- q9 */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='id < 10'); -/* -- q9.1 */ - -/* -- q10 */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='geom && (SELECT st_buffer(geom,0.05) FROM edge_table WHERE id=5)'); -/* -- q10.1 */ - -/* -- q11 */ -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='geom && (SELECT st_buffer(geom,1) FROM otherTable WHERE gid=100)'); -/* -- q11.1 */ - -/* -- q12 */ -CREATE TABLE mytable AS (SELECT id AS gid, source AS src ,target AS tgt , geom AS mygeom FROM edges); -SELECT id, geom AS the_geom, 0 AS cnt, 0 AS chk INTO mytable_vertices_pgr FROM vertices; -/* -- q12.1 */ - -/* -- q13 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt'); -/* -- q13.1 */ - -/* -- q14 */ -SELECT pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt'); -/* -- q14.1 */ - -/* -- q15 */ -SELECT pgr_analyzeGraph('mytable',0.001,the_geom:='mygeom',id:='gid',source:='src',target:='tgt'); -/* -- q15.1 */ - -/* -- q16 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom'); -/* -- q16.1 */ - -/* -- q17 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',rows_where:='gid < 10'); -/* -- q17.1 */ - -/* -- q18 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10'); -/* -- q18.1 */ - -/* -- q19 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)'); -/* -- q19.1 */ - -/* -- q20 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)'); -/* -- q20.1 */ - -/* -- q21 */ -DROP TABLE IF EXISTS otherTable; -CREATE TABLE otherTable AS (SELECT 'myhouse'::text AS place, st_point(2.5,2.5) AS other_geom) ; -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')'); -/* -- q21.1 */ - -/* -- q22 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')'); -/* -- q22.1 */ - -/* -- q23 */ -UPDATE edges_vertices_pgr SET (cnt,chk) = (0,0); -SELECT pgr_analyzeGraph('edges', 0.001, 'geom'); -/* -- q23.1 */ - -/* -- q24 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id < 10'); -/* -- q24.1 */ - -/* -- q25 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id >= 10'); -/* -- q25.1 */ - -/* -- q26 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id < 17'); -/* -- q26.1 */ - - -/* -- q27 */ -DELETE FROM edges WHERE id >= 17; -UPDATE edges_vertices_pgr SET (cnt,chk) = (0,0); -/* -- q27.1 */ - -/* -- q28 */ -SELECT pgr_analyzeGraph('edges', 0.001, 'geom'); -/* -- q28.1 */ diff --git a/docqueries/topology/analyzeGraph.result b/docqueries/topology/analyzeGraph.result deleted file mode 100644 index 7705686f10f..00000000000 --- a/docqueries/topology/analyzeGraph.result +++ /dev/null @@ -1,558 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/* -- q1 */ -SELECT id, geom AS the_geom, 0 AS cnt, 0 AS chk INTO edges_vertices_pgr FROM vertices; -SELECT 17 -SELECT pgr_analyzeGraph('edges',0.001,'geom'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q1.1 */ -/* -- q3 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom','id','source','target'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q3.1 */ -/* -- q5 */ -SELECT pgr_analyzeGraph('edges',0.001,'id','geom','source','target'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'id','geom','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Got function st_srid(bigint) does not exist -NOTICE: ERROR: something went wrong when checking for SRID of id in table public.edges - pgr_analyzegraph ------------------- - FAIL -(1 row) - -/* -- q5.1 */ -/* -- q6 */ -SELECT pgr_analyzeGraph('edges',0.001,the_geom:='geom',id:='id',source:='source',target:='target'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q6.1 */ -/* -- q7 */ -SELECT pgr_analyzeGraph('edges',0.001,source:='source',id:='id',target:='target',the_geom:='geom'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q7.1 */ -/* -- q8. */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', source:='source'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q8.1 */ -/* -- q9 */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='id < 10'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','id < 10') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 4 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q9.1 */ -/* -- q10 */ -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='geom && (SELECT st_buffer(geom,0.05) FROM edge_table WHERE id=5)'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','geom && (SELECT st_buffer(geom,0.05) FROM edge_table WHERE id=5)') -NOTICE: Performing checks, please wait ... -NOTICE: Got relation "edge_table" does not exist -NOTICE: ERROR: Condition is not correct. Please execute the following query to test your condition -NOTICE: select count(*) from public.edges WHERE true AND (geom && (SELECT st_buffer(geom,0.05) FROM edge_table WHERE id=5)) - pgr_analyzegraph ------------------- - FAIL -(1 row) - -/* -- q10.1 */ -/* -- q11 */ -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -SELECT pgr_analyzeGraph('edges',0.001, 'geom', rows_where:='geom && (SELECT st_buffer(geom,1) FROM otherTable WHERE gid=100)'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','geom && (SELECT st_buffer(geom,1) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q11.1 */ -/* -- q12 */ -CREATE TABLE mytable AS (SELECT id AS gid, source AS src ,target AS tgt , geom AS mygeom FROM edges); -SELECT 18 -SELECT id, geom AS the_geom, 0 AS cnt, 0 AS chk INTO mytable_vertices_pgr FROM vertices; -SELECT 17 -/* -- q12.1 */ -/* -- q13 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q13.1 */ -/* -- q14 */ -SELECT pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.0001,'gid','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ... -NOTICE: Got function st_srid(bigint) does not exist -NOTICE: ERROR: something went wrong when checking for SRID of gid in table public.mytable - pgr_analyzegraph ------------------- - FAIL -(1 row) - -/* -- q14.1 */ -/* -- q15 */ -SELECT pgr_analyzeGraph('mytable',0.001,the_geom:='mygeom',id:='gid',source:='src',target:='tgt'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q15.1 */ -/* -- q16 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q16.1 */ -/* -- q17 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt',rows_where:='gid < 10'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 4 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q17.1 */ -/* -- q18 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 4 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q18.1 */ -/* -- q19 */ -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 1 -NOTICE: Dead ends: 5 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q19.1 */ -/* -- q20 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(mygeom,1) FROM mytable WHERE gid=5)') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 1 -NOTICE: Dead ends: 5 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q20.1 */ -/* -- q21 */ -DROP TABLE IF EXISTS otherTable; -DROP TABLE -CREATE TABLE otherTable AS (SELECT 'myhouse'::text AS place, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -SELECT pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 10 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q21.1 */ -/* -- q22 */ -SELECT pgr_analyzeGraph('mytable',0.001,source:='src',id:='gid',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='||quote_literal('myhouse')||')'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('mytable',0.001,'mygeom','gid','src','tgt','mygeom && (SELECT st_buffer(other_geom,1) FROM otherTable WHERE place='myhouse')') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 10 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q22.1 */ -/* -- q23 */ -UPDATE edges_vertices_pgr SET (cnt,chk) = (0,0); -UPDATE 17 -SELECT pgr_analyzeGraph('edges', 0.001, 'geom'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 7 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q23.1 */ -/* -- q24 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id < 10'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','id < 10') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 4 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q24.1 */ -/* -- q25 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id >= 10'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','id >= 10') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 2 -NOTICE: Dead ends: 8 -NOTICE: Potential gaps found near dead ends: 1 -NOTICE: Intersections detected: 1 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q25.1 */ -/* -- q26 */ -SELECT pgr_analyzeGraph('edges',0.001,'geom', rows_where:='id < 17'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','id < 17') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 3 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q26.1 */ -/* -- q27 */ -DELETE FROM edges WHERE id >= 17; -DELETE 2 -UPDATE edges_vertices_pgr SET (cnt,chk) = (0,0); -UPDATE 17 -/* -- q27.1 */ -/* -- q28 */ -SELECT pgr_analyzeGraph('edges', 0.001, 'geom'); -WARNING: pgr_analyzegraph(text,double precision,text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeGraph('edges',0.001,'geom','id','source','target','true') -NOTICE: Performing checks, please wait ... -NOTICE: Analyzing for dead ends. Please wait... -NOTICE: Analyzing for gaps. Please wait... -NOTICE: Analyzing for isolated edges. Please wait... -NOTICE: Analyzing for ring geometries. Please wait... -NOTICE: Analyzing for intersections. Please wait... -NOTICE: ANALYSIS RESULTS FOR SELECTED EDGES: -NOTICE: Isolated segments: 0 -NOTICE: Dead ends: 3 -NOTICE: Potential gaps found near dead ends: 0 -NOTICE: Intersections detected: 0 -NOTICE: Ring geometries: 0 - pgr_analyzegraph ------------------- - OK -(1 row) - -/* -- q28.1 */ -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/analyzeOneWay.pg b/docqueries/topology/analyzeOneWay.pg deleted file mode 100644 index f3985e7de64..00000000000 --- a/docqueries/topology/analyzeOneWay.pg +++ /dev/null @@ -1,17 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -/* --q1 */ -ALTER TABLE edges ADD COLUMN dir TEXT; -SELECT *, NULL::INTEGER ein, NULL::INTEGER eout INTO edges_vertices_pgr FROM vertices; -UPDATE edges SET -dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' /* both ways */ - WHEN (cost>0 AND reverse_cost<0) THEN 'FT' /* direction of the LINESSTRING */ - WHEN (cost<0 AND reverse_cost>0) THEN 'TF' /* reverse direction of the LINESTRING */ - ELSE '' END; /* unknown */ - SELECT pgr_analyzeOneWay('edges', - ARRAY['', 'B', 'TF'], - ARRAY['', 'B', 'FT'], - ARRAY['', 'B', 'FT'], - ARRAY['', 'B', 'TF'], - oneway:='dir'); -/* --q1.1 */ diff --git a/docqueries/topology/analyzeOneWay.result b/docqueries/topology/analyzeOneWay.result deleted file mode 100644 index 20420a9909b..00000000000 --- a/docqueries/topology/analyzeOneWay.result +++ /dev/null @@ -1,39 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/* --q1 */ -ALTER TABLE edges ADD COLUMN dir TEXT; -ALTER TABLE -SELECT *, NULL::INTEGER ein, NULL::INTEGER eout INTO edges_vertices_pgr FROM vertices; -SELECT 17 -UPDATE edges SET -dir = CASE WHEN (cost>0 AND reverse_cost>0) THEN 'B' /* both ways */ - WHEN (cost>0 AND reverse_cost<0) THEN 'FT' /* direction of the LINESSTRING */ - WHEN (cost<0 AND reverse_cost>0) THEN 'TF' /* reverse direction of the LINESTRING */ - ELSE '' END; -UPDATE 18 -/* unknown */ - SELECT pgr_analyzeOneWay('edges', - ARRAY['', 'B', 'TF'], - ARRAY['', 'B', 'FT'], - ARRAY['', 'B', 'FT'], - ARRAY['', 'B', 'TF'], - oneway:='dir'); -WARNING: pgr_analyzeoneway(text,text[],text[],text[],text[],boolean,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_analyzeOneway('edges','{"",B,TF}','{"",B,FT}','{"",B,FT}','{"",B,TF}','dir','source','target',t) -NOTICE: Analyzing graph for one way street errors. -NOTICE: Analysis 25% complete ... -NOTICE: Analysis 50% complete ... -NOTICE: Analysis 75% complete ... -NOTICE: Analysis 100% complete ... -NOTICE: Found 0 potential problems in directionality - pgr_analyzeoneway -------------------- - OK -(1 row) - -/* --q1.1 */ -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/createTopology.pg b/docqueries/topology/createTopology.pg deleted file mode 100644 index 9473af9fc31..00000000000 --- a/docqueries/topology/createTopology.pg +++ /dev/null @@ -1,113 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --- pgr_createTopology ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- - -UPDATE edges SET source = NULL, target = NULL; -/* --q1 */ -SELECT pgr_createTopology('edges', 0.001, 'geom'); -/* --q1.1 */ - -UPDATE edges SET source = NULL, target = NULL; -/* --q2 */ -SELECT pgr_createTopology('edges', 0.001, - 'geom', 'id', 'source', 'target'); -/* --q2.1 */ - -SET client_min_messages TO NOTICE; -/* --q3 */ -SELECT pgr_createTopology('edges', 0.001, - 'id', 'geom'); -/* --q3.1 */ - -SET client_min_messages TO WARNING; -DROP TABLE vertices; -UPDATE edges SET source = NULL, target = NULL; -/* --q4 */ -SELECT pgr_createTopology('edges', 0.001, - the_geom:='geom', id:='id', source:='source', target:='target'); -/* --q4.1 */ - -DROP TABLE edges_vertices_pgr; -UPDATE edges SET source = NULL, target = NULL; -/* --q5 */ -SELECT pgr_createTopology('edges', 0.001, - source:='source', id:='id', target:='target', the_geom:='geom'); -/* --q5.1 */ - -DROP TABLE edges_vertices_pgr; -UPDATE edges SET source = NULL, target = NULL; -/* --q6 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', source:='source'); -/* --q6.1 */ - -/* --q7 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', rows_where:='id < 10'); -/* --q7.1 */ - -/* --q8 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', - rows_where:='geom && (SELECT st_buffer(geom, 0.05) FROM edges WHERE id=5)'); -/* --q8.1 */ - -/* --q9 */ -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5, 2.5) AS other_geom); -SELECT pgr_createTopology('edges', 0.001, 'geom', - rows_where:='geom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -/* --q9.1 */ - - -/* --q10 */ -CREATE TABLE mytable AS (SELECT id AS gid, geom AS mygeom, source AS src , target AS tgt FROM edges) ; -/* --q10.1 */ - -/* --q11 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', clean := TRUE); -/* --q11.1 */ - -DROP TABLE mytable_vertices_pgr; -UPDATE mytable SET src = NULL, tgt = NULL; -SET client_min_messages TO NOTICE; -/* --q12 */ -SELECT pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt'); -/* --q12.1 */ -SET client_min_messages TO WARNING; - -/* --q13 */ -SELECT pgr_createTopology('mytable', 0.001, the_geom:='mygeom', id:='gid', source:='src', target:='tgt'); -/* --q13.1 */ - -DROP TABLE mytable_vertices_pgr; -UPDATE mytable SET src = NULL, tgt = NULL; -/* --q14 */ -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom'); -/* --q14.1 */ - -/* --q15 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where:='gid < 10'); -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', rows_where:='gid < 10'); -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)'); -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)'); -/* --q15.1 */ - -/* --q16 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -/* --q16.1 */ - -SET client_min_messages TO NOTICE; -/* --q17 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', rows_where:='id < 6', clean := true); -SELECT pgr_createTopology('edges', 0.001, 'geom'); -/* --q17.1 */ - -SET client_min_messages TO NOTICE; diff --git a/docqueries/topology/createTopology.result b/docqueries/topology/createTopology.result deleted file mode 100644 index f9bc7720fed..00000000000 --- a/docqueries/topology/createTopology.result +++ /dev/null @@ -1,281 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -UPDATE edges SET source = NULL, target = NULL; -UPDATE 18 -/* --q1 */ -SELECT pgr_createTopology('edges', 0.001, 'geom'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'geom', 'id', 'source', 'target', rows_where := 'true', clean := f) -NOTICE: Performing checks, please wait ..... -NOTICE: Creating Topology, Please wait... -NOTICE: -------------> TOPOLOGY CREATED FOR 18 edges -NOTICE: Rows with NULL geometry or NULL id: 0 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createtopology --------------------- - OK -(1 row) - -/* --q1.1 */ -UPDATE edges SET source = NULL, target = NULL; -UPDATE 18 -/* --q2 */ -SELECT pgr_createTopology('edges', 0.001, - 'geom', 'id', 'source', 'target'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'geom', 'id', 'source', 'target', rows_where := 'true', clean := f) -NOTICE: Performing checks, please wait ..... -NOTICE: Creating Topology, Please wait... -NOTICE: -------------> TOPOLOGY CREATED FOR 18 edges -NOTICE: Rows with NULL geometry or NULL id: 0 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createtopology --------------------- - OK -(1 row) - -/* --q2.1 */ -SET client_min_messages TO NOTICE; -SET -/* --q3 */ -SELECT pgr_createTopology('edges', 0.001, - 'id', 'geom'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'id', 'geom', 'source', 'target', rows_where := 'true', clean := f) -NOTICE: Performing checks, please wait ..... -NOTICE: ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:geom -HINT: ----> Expected type of geom is integer,smallint or bigint but USER-DEFINED was found -NOTICE: Unexpected error raise_exception - pgr_createtopology --------------------- - FAIL -(1 row) - -/* --q3.1 */ -SET client_min_messages TO WARNING; -SET -DROP TABLE vertices; -DROP TABLE -UPDATE edges SET source = NULL, target = NULL; -UPDATE 18 -/* --q4 */ -SELECT pgr_createTopology('edges', 0.001, - the_geom:='geom', id:='id', source:='source', target:='target'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q4.1 */ -DROP TABLE edges_vertices_pgr; -DROP TABLE -UPDATE edges SET source = NULL, target = NULL; -UPDATE 18 -/* --q5 */ -SELECT pgr_createTopology('edges', 0.001, - source:='source', id:='id', target:='target', the_geom:='geom'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q5.1 */ -DROP TABLE edges_vertices_pgr; -DROP TABLE -UPDATE edges SET source = NULL, target = NULL; -UPDATE 18 -/* --q6 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', source:='source'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q6.1 */ -/* --q7 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', rows_where:='id < 10'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q7.1 */ -/* --q8 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', - rows_where:='geom && (SELECT st_buffer(geom, 0.05) FROM edges WHERE id=5)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q8.1 */ -/* --q9 */ -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5, 2.5) AS other_geom); -SELECT 1 -SELECT pgr_createTopology('edges', 0.001, 'geom', - rows_where:='geom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q9.1 */ -/* --q10 */ -CREATE TABLE mytable AS (SELECT id AS gid, geom AS mygeom, source AS src , target AS tgt FROM edges) ; -SELECT 18 -/* --q10.1 */ -/* --q11 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', clean := TRUE); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q11.1 */ -DROP TABLE mytable_vertices_pgr; -DROP TABLE -UPDATE mytable SET src = NULL, tgt = NULL; -UPDATE 18 -SET client_min_messages TO NOTICE; -SET -/* --q12 */ -SELECT pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('mytable', 0.001, 'gid', 'mygeom', 'src', 'tgt', rows_where := 'true', clean := f) -NOTICE: Performing checks, please wait ..... -NOTICE: ----> PGR ERROR in pgr_createTopology: Wrong type of Column id:mygeom -HINT: ----> Expected type of mygeom is integer,smallint or bigint but USER-DEFINED was found -NOTICE: Unexpected error raise_exception - pgr_createtopology --------------------- - FAIL -(1 row) - -/* --q12.1 */ -SET client_min_messages TO WARNING; -SET -/* --q13 */ -SELECT pgr_createTopology('mytable', 0.001, the_geom:='mygeom', id:='gid', source:='src', target:='tgt'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q13.1 */ -DROP TABLE mytable_vertices_pgr; -DROP TABLE -UPDATE mytable SET src = NULL, tgt = NULL; -UPDATE 18 -/* --q14 */ -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q14.1 */ -/* --q15 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', rows_where:='gid < 10'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', rows_where:='gid < 10'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom, 1) FROM mytable WHERE gid=5)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q15.1 */ -/* --q16 */ -SELECT pgr_createTopology('mytable', 0.001, 'mygeom', 'gid', 'src', 'tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -SELECT pgr_createTopology('mytable', 0.001, source:='src', id:='gid', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom, 1) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 - pgr_createtopology --------------------- - OK -(1 row) - -/* --q16.1 */ -SET client_min_messages TO NOTICE; -SET -/* --q17 */ -SELECT pgr_createTopology('edges', 0.001, 'geom', rows_where:='id < 6', clean := true); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'geom', 'id', 'source', 'target', rows_where := 'id < 6', clean := t) -NOTICE: Performing checks, please wait ..... -NOTICE: Creating Topology, Please wait... -NOTICE: -------------> TOPOLOGY CREATED FOR 5 edges -NOTICE: Rows with NULL geometry or NULL id: 0 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createtopology --------------------- - OK -(1 row) - -SELECT pgr_createTopology('edges', 0.001, 'geom'); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'geom', 'id', 'source', 'target', rows_where := 'true', clean := f) -NOTICE: Performing checks, please wait ..... -NOTICE: Creating Topology, Please wait... -NOTICE: -------------> TOPOLOGY CREATED FOR 13 edges -NOTICE: Rows with NULL geometry or NULL id: 0 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createtopology --------------------- - OK -(1 row) - -/* --q17.1 */ -SET client_min_messages TO NOTICE; -SET -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/createVertTab-any.pg b/docqueries/topology/createVertTab-any.pg deleted file mode 100644 index b4547dab579..00000000000 --- a/docqueries/topology/createVertTab-any.pg +++ /dev/null @@ -1,43 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --- PGR_createVerticesTable ------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------- --- TODO this should be on pgtap, but if function gets deprecated it is not worth to move tests - -SELECT AddGeometryColumn ('public','edges','the_geom',0,'LINESTRING',2); -UPDATE edges SET the_geom = geom; --- SELECT pgr_createTopology('edges',0.001); - SELECT pgr_createVerticesTable('edges'); - SELECT pgr_createVerticesTable('edges','the_geom','source','target'); - -- SELECT pgr_createVerticesTable('edges','source','the_geom','target'); - SELECT pgr_createVerticesTable('edges',the_geom:='the_geom',source:='source',target:='target'); - SELECT pgr_createVerticesTable('edges',source:='source',target:='target',the_geom:='the_geom'); - SELECT pgr_createVerticesTable('edges',source:='source'); - SELECT pgr_createVerticesTable('edges',rows_where:='id < 10'); - SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)'); - CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; - SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); - CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edges) ; - SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt'); - -- SELECT pgr_createVerticesTable('mytable','src','mygeom','tgt'); - SELECT pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt'); - SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom'); - SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10'); - SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10'); - SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); - SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); - DROP TABLE IF EXISTS otherTable; - CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; - SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); - SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); - -------------------------------------- - SELECT pgr_createVerticesTable('edges'); - diff --git a/docqueries/topology/createVertTab-any.result b/docqueries/topology/createVertTab-any.result deleted file mode 100644 index d71bfa4d7af..00000000000 --- a/docqueries/topology/createVertTab-any.result +++ /dev/null @@ -1,328 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -SELECT AddGeometryColumn ('public','edges','the_geom',0,'LINESTRING',2); - addgeometrycolumn ------------------------------------------------------- - public.edges.the_geom SRID:0 TYPE:LINESTRING DIMS:2 -(1 row) - -UPDATE edges SET the_geom = geom; -UPDATE 18 -SELECT pgr_createVerticesTable('edges'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges','the_geom','source','target'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges',the_geom:='the_geom',source:='source',target:='target'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges',source:='source',target:='target',the_geom:='the_geom'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges',source:='source'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges',rows_where:='id < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','id < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Got relation "edge_table" does not exist -NOTICE: ERROR: Condition is not correct, please execute the following query to test your condition -NOTICE: select * from public.edges WHERE true AND (the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)) limit 1 - pgr_createverticestable -------------------------- - FAIL -(1 row) - -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 10 VERTICES -NOTICE: FOR 12 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 12 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edges) ; -SELECT 18 -SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 9 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 9 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 9 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 9 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -DROP TABLE IF EXISTS otherTable; -DROP TABLE -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt', - rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 10 VERTICES -NOTICE: FOR 12 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 12 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 10 VERTICES -NOTICE: FOR 12 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 12 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -SELECT pgr_createVerticesTable('edges'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/createVerticesTable.pg b/docqueries/topology/createVerticesTable.pg deleted file mode 100644 index 1352f7f83f9..00000000000 --- a/docqueries/topology/createVerticesTable.pg +++ /dev/null @@ -1,101 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ - - -/* --q1 */ -SELECT pgr_createVerticesTable('edges', 'geom'); -/* --q1.1 */ - -/* --q2 */ -SELECT pgr_createVerticesTable('edges', 'geom', 'source', 'target'); -/* --q2.1 */ -SELECT pgr_createVerticesTable('edges', 'source', 'geom', 'target'); -/* --q2.2 */ - -/* --q3.1 */ -SELECT pgr_createVerticesTable('edges', the_geom:='geom', source:='source', target:='target'); -/* --q3.2 */ - -/* --q4 */ -SELECT pgr_createVerticesTable('edges', source:='source', target:='target', the_geom:='geom'); -/* --q4.1 */ - -/* --q5 */ -SELECT pgr_createVerticesTable('edges', 'geom', source:='source'); -/* --q5.1 */ - -/* --q6 */ -SELECT pgr_createVerticesTable('edges', 'geom', rows_where:='id < 10'); -/* --q6.1 */ - -/* --q7 */ -SELECT pgr_createVerticesTable('edges', 'geom', - rows_where:='geom && (select st_buffer(geom,0.5) FROM edges WHERE id=5)'); -/* --q7.1 */ - -/* --q8 */ -DROP TABLE IF EXISTS otherTable; -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT pgr_createVerticesTable('edges', 'geom', - rows_where:='geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); -/* --q8.1 */ - -/* --tab1 */ -DROP TABLE IF EXISTS mytable; -CREATE TABLE mytable AS (SELECT id AS gid, geom AS mygeom, source AS src ,target AS tgt FROM edges) ; -/* --tab2 */ - -/* --q9 */ -SELECT pgr_createVerticesTable('mytable', 'mygeom', 'src', 'tgt'); -/* --q9.1 */ -SELECT pgr_createVerticesTable('mytable', 'src', 'mygeom', 'tgt'); -/* --q9.2 */ - -/* --q10 */ -SELECT pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt'); -/* --q10.1 */ - -/* --q11 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', - the_geom:='mygeom'); -/* --q11.1 */ - -/* --q12 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where:='gid < 10'); -/* --q12.1 */ - -/* --q13 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', the_geom:='mygeom', - rows_where:='gid < 10'); -/* --q13.1 */ - -/* --q14 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where := 'the_geom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); -/* --q14.1 */ - -/* --q15 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE id=5)'); -/* --q15.1 */ - -/* --q16 */ -DROP TABLE IF EXISTS otherTable; -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -/* --q16.1 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where:='the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)'); -/* --q16.2 */ - -/* --q17 */ -SELECT pgr_createVerticesTable( - 'mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)'); -/* --q17.1 */ diff --git a/docqueries/topology/createVerticesTable.result b/docqueries/topology/createVerticesTable.result deleted file mode 100644 index 8a34102079b..00000000000 --- a/docqueries/topology/createVerticesTable.result +++ /dev/null @@ -1,374 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/* --q1 */ -SELECT pgr_createVerticesTable('edges', 'geom'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q1.1 */ -/* --q2 */ -SELECT pgr_createVerticesTable('edges', 'geom', 'source', 'target'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q2.1 */ -SELECT pgr_createVerticesTable('edges', 'source', 'geom', 'target'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','source','geom','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: ----> PGR ERROR in pgr_createVerticesTable: Wrong type of Column source: geom -HINT: ----> Expected type of geom is integer, smallint or bigint but USER-DEFINED was found -NOTICE: Unexpected error raise_exception - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q2.2 */ -/* --q3.1 */ -SELECT pgr_createVerticesTable('edges', the_geom:='geom', source:='source', target:='target'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q3.2 */ -/* --q4 */ -SELECT pgr_createVerticesTable('edges', source:='source', target:='target', the_geom:='geom'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q4.1 */ -/* --q5 */ -SELECT pgr_createVerticesTable('edges', 'geom', source:='source'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q5.1 */ -/* --q6 */ -SELECT pgr_createVerticesTable('edges', 'geom', rows_where:='id < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','id < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q6.1 */ -/* --q7 */ -SELECT pgr_createVerticesTable('edges', 'geom', - rows_where:='geom && (select st_buffer(geom,0.5) FROM edges WHERE id=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','geom && (select st_buffer(geom,0.5) FROM edges WHERE id=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 9 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 9 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q7.1 */ -/* --q8 */ -DROP TABLE IF EXISTS otherTable; -NOTICE: table "othertable" does not exist, skipping -DROP TABLE -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -SELECT pgr_createVerticesTable('edges', 'geom', - rows_where:='geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('edges','geom','source','target','geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.edges_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 10 VERTICES -NOTICE: FOR 12 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 12 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q8.1 */ -/* --tab1 */ -DROP TABLE IF EXISTS mytable; -NOTICE: table "mytable" does not exist, skipping -DROP TABLE -CREATE TABLE mytable AS (SELECT id AS gid, geom AS mygeom, source AS src ,target AS tgt FROM edges) ; -SELECT 18 -/* --tab2 */ -/* --q9 */ -SELECT pgr_createVerticesTable('mytable', 'mygeom', 'src', 'tgt'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q9.1 */ -SELECT pgr_createVerticesTable('mytable', 'src', 'mygeom', 'tgt'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','src','mygeom','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: ----> PGR ERROR in pgr_createVerticesTable: Wrong type of Column source: mygeom -HINT: ----> Expected type of mygeom is integer, smallint or bigint but USER-DEFINED was found -NOTICE: Unexpected error raise_exception - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q9.2 */ -/* --q10 */ -SELECT pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q10.1 */ -/* --q11 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', - the_geom:='mygeom'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 17 VERTICES -NOTICE: FOR 18 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 18 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q11.1 */ -/* --q12 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where:='gid < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q12.1 */ -/* --q13 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', the_geom:='mygeom', - rows_where:='gid < 10'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10') -NOTICE: Performing checks, please wait ..... -NOTICE: Populating public.mytable_vertices_pgr, please wait... -NOTICE: -----> VERTICES TABLE CREATED WITH 9 VERTICES -NOTICE: FOR 10 EDGES -NOTICE: Edges with NULL geometry,source or target: 0 -NOTICE: Edges processed: 10 -NOTICE: Vertices table for table public.mytable is: public.mytable_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createverticestable -------------------------- - OK -(1 row) - -/* --q13.1 */ -/* --q14 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where := 'the_geom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','the_geom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Got column "the_geom" does not exist -NOTICE: ERROR: Condition is not correct, please execute the following query to test your condition -NOTICE: select * from public.mytable WHERE true AND (the_geom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)) limit 1 - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q14.1 */ -/* --q15 */ -SELECT pgr_createVerticesTable( - 'mytable', source:='src', target:='tgt', the_geom:='mygeom', - rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE id=5)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE id=5)') -NOTICE: Performing checks, please wait ..... -NOTICE: Got column "id" does not exist -NOTICE: ERROR: Condition is not correct, please execute the following query to test your condition -NOTICE: select * from public.mytable WHERE true AND (mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE id=5)) limit 1 - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q15.1 */ -/* --q16 */ -DROP TABLE IF EXISTS otherTable; -DROP TABLE -CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ; -SELECT 1 -/* --q16.1 */ -SELECT pgr_createVerticesTable( - 'mytable', 'mygeom', 'src', 'tgt', - rows_where:='the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Got column "the_geom" does not exist -NOTICE: ERROR: Condition is not correct, please execute the following query to test your condition -NOTICE: select * from public.mytable WHERE true AND (the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)) limit 1 - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q16.2 */ -/* --q17 */ -SELECT pgr_createVerticesTable( - 'mytable',source:='src',target:='tgt',the_geom:='mygeom', - rows_where:='the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)'); -WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)') -NOTICE: Performing checks, please wait ..... -NOTICE: Got column "the_geom" does not exist -NOTICE: ERROR: Condition is not correct, please execute the following query to test your condition -NOTICE: select * from public.mytable WHERE true AND (the_geom && (SELECT st_buffer(othergeom,0.5) FROM otherTable WHERE gid=100)) limit 1 - pgr_createverticestable -------------------------- - FAIL -(1 row) - -/* --q17.1 */ -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/issue900.pg b/docqueries/topology/issue900.pg deleted file mode 100644 index 104d1b73bd7..00000000000 --- a/docqueries/topology/issue900.pg +++ /dev/null @@ -1,7 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ - -ALTER TABLE edges RENAME TO mbta_arc; -CREATE TABLE edges AS SELECT * FROM mbta_arc;; -SELECT pgr_CreateTopology('edges', 0.001, 'geom', 'id', clean := true); - diff --git a/docqueries/topology/issue900.result b/docqueries/topology/issue900.result deleted file mode 100644 index 2d3427bd970..00000000000 --- a/docqueries/topology/issue900.result +++ /dev/null @@ -1,26 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -ALTER TABLE edges RENAME TO mbta_arc; -ALTER TABLE -CREATE TABLE edges AS SELECT * FROM mbta_arc; -SELECT 18 -; -SELECT pgr_CreateTopology('edges', 0.001, 'geom', 'id', clean := true); -WARNING: pgr_createtopology(text,double precision,text,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: pgr_createTopology('edges', 0.001, 'geom', 'id', 'source', 'target', rows_where := 'true', clean := t) -NOTICE: Performing checks, please wait ..... -NOTICE: Creating Topology, Please wait... -NOTICE: -------------> TOPOLOGY CREATED FOR 18 edges -NOTICE: Rows with NULL geometry or NULL id: 0 -NOTICE: Vertices table for table public.edges is: public.edges_vertices_pgr -NOTICE: ---------------------------------------------- - pgr_createtopology --------------------- - OK -(1 row) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/nodeNetwork.pg b/docqueries/topology/nodeNetwork.pg deleted file mode 100644 index 7b0cc7d8425..00000000000 --- a/docqueries/topology/nodeNetwork.pg +++ /dev/null @@ -1,144 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ --- pgr_nodeNetwork --------------------------------------------------------------------------------- ---SET client_min_messages TO DEBUG; -/* --q1 */ -SELECT e1.id id1, e2.id id2, ST_ASTEXT(ST_Intersection(e1.geom, e2.geom)) AS point -FROM edges e1, edges e2 -WHERE e1.id < e2.id AND ST_Crosses(e1.geom, e2.geom); -/* --q2 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1 -), -results AS ( - SELECT d.id, d.inhere, - (pgr_findCloseEdges('SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).* - FROM data d -) -SELECT - id, inhere, edge_id, fraction, - ST_AsText(geom) AS geom, ST_AsText(edge) AS edge -FROM results; -/* --q3 */ -SELECT e1.id id1, e2.id id2, st_intersection(e1.geom, e2.geom) AS point -INTO intersections -FROM edges e1, edges e2 -WHERE e1.id < e2.id AND st_crosses(e1.geom, e2.geom); -/* --q4 */ -SELECT pgr_nodeNetwork('edges', 0.001, the_geom => 'geom', rows_where=>'id in ('||id1||','||id2||')') -FROM intersections; -/* --q5 */ -SELECT old_id, ST_AsText(geom) FROM edges_noded ORDER BY old_id, sub_id; -/* --q6 */ -INSERT INTO edges (cost, reverse_cost, geom) -WITH -the_fractions AS ( - SELECT e1.id id, st_lineLocatePoint(e1.geom, point) AS fraction - FROM intersections, edges e1, edges e2 WHERE e1.id = id1 AND e2.id = id2 - UNION - SELECT e2.id, st_lineLocatePoint(e2.geom, point) - FROM intersections, edges e1, edges e2 WHERE e1.id = id1 AND e2.id = id2 -) -SELECT - CASE WHEN sub_id = 1 - THEN cost*fraction ELSE cost*(1-fraction) END as cost, - CASE WHEN sub_id = 1 - THEN reverse_cost*(1-fraction) ELSE reverse_cost*(fraction) END AS reverse_cost, - segments.geom -FROM edges as edges -JOIN edges_noded as segments ON (edges.id = segments.old_id) -JOIN the_fractions f ON (segments.old_id = f.id); -/* --q7 */ -INSERT INTO vertices (id, geom) -SELECT row_number() over() + 100, point -FROM intersections; -/* --q8 */ -UPDATE edges e SET source = v.id FROM -vertices v where source IS NULL AND (st_startPoint(e.geom) = v.geom); - -UPDATE edges e SET target = v.id FROM -vertices v where target IS NULL AND (st_endPoint(e.geom) = v.geom); -/* --q9 */ -DELETE FROM edges -WHERE id IN ( - SELECT id1 FROM intersections - UNION - SELECT id2 FROM intersections); -/* --q10 */ - -WITH data AS ( - select p.id, p.in_edges, p.out_edges - FROM pgr_extractVertices('select id, source, target from edges') p) -UPDATE vertices v -SET (in_edges,out_edges) = (d.in_edges,d.out_edges) -FROM data d where d.id = v.id; -/* --q11 */ -SELECT e1.id, e2.id -FROM edges_noded e1, edges e2 -WHERE e1.id < e2.id AND st_crosses(e1.geom, e2.geom); - -/* --q12 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1) -SELECT - d.id, d.inhere, - (pgr_findCloseEdges('SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).* -INTO deadends -FROM data d; -/* --q13 */ -SELECT pgr_nodeNetwork('edges', 0.001, the_geom => 'geom', rows_where=>'id in ('||inhere||','||edge_id||')') -FROM deadends; - -/* --q14 */ -SELECT old_id, ST_AsText(geom) FROM edges_noded ORDER BY old_id, sub_id; - -/* --q15 */ -INSERT INTO edges (cost, reverse_cost, geom) -SELECT - CASE WHEN sub_id = 1 THEN cost*fraction ELSE cost*(1-fraction) END as cost, - CASE WHEN sub_id = 1 THEN reverse_cost*(1-fraction) ELSE reverse_cost*(fraction) END as reverse_cost, en.geom -FROM deadends r JOIN edges_noded en ON (old_id = edge_id) JOIN edges e ON (old_id = e.id) -UNION -SELECT 0,0,edge FROM deadends; - - -/* --q16 */ -/* Update the vertices table */ -INSERT INTO vertices (id, geom) -select row_number() over() + 200, st_endpoint(edge) FROM deadends; - -/* --q17 */ -UPDATE edges e SET source = v.id FROM -vertices v where source IS NULL AND (st_startPoint(e.geom) = v.geom); - -UPDATE edges e SET target = v.id FROM -vertices v where target IS NULL AND (st_endPoint(e.geom) = v.geom); - -/* --q18 */ -DELETE FROM edges WHERE id IN (SELECT edge_id FROM deadends); - -/* --q19 */ -WITH data AS ( - select p.id, p.in_edges, p.out_edges - FROM pgr_extractVertices('select id, source, target from edges') p) -UPDATE vertices v -SET (in_edges,out_edges) = (d.in_edges,d.out_edges) -FROM data d where d.id = v.id; -/* --q20 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1), -results AS ( - SELECT (pgr_findCloseEdges( - 'SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).*, - d.id, d.inhere - FROM data d -) -SELECT * FROM results; -/* --q21 */ diff --git a/docqueries/topology/nodeNetwork.result b/docqueries/topology/nodeNetwork.result deleted file mode 100644 index 2223a158cd9..00000000000 --- a/docqueries/topology/nodeNetwork.result +++ /dev/null @@ -1,228 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/* --q1 */ -SELECT e1.id id1, e2.id id2, ST_ASTEXT(ST_Intersection(e1.geom, e2.geom)) AS point -FROM edges e1, edges e2 -WHERE e1.id < e2.id AND ST_Crosses(e1.geom, e2.geom); - id1 | id2 | point ------+-----+-------------- - 13 | 18 | POINT(3.5 3) -(1 row) - -/* --q2 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1 -), -results AS ( - SELECT d.id, d.inhere, - (pgr_findCloseEdges('SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).* - FROM data d -) -SELECT - id, inhere, edge_id, fraction, - ST_AsText(geom) AS geom, ST_AsText(edge) AS edge -FROM results; - id | inhere | edge_id | fraction | geom | edge -----+--------+---------+----------+---------------------------+-------------------------------------- - 4 | 17 | 14 | 0.5 | POINT(1.999999999999 3.5) | LINESTRING(1.999999999999 3.5,2 3.5) -(1 row) - -/* --q3 */ -SELECT e1.id id1, e2.id id2, st_intersection(e1.geom, e2.geom) AS point -INTO intersections -FROM edges e1, edges e2 -WHERE e1.id < e2.id AND st_crosses(e1.geom, e2.geom); -SELECT 1 -/* --q4 */ -SELECT pgr_nodeNetwork('edges', 0.001, the_geom => 'geom', rows_where=>'id in ('||id1||','||id2||')') -FROM intersections; -WARNING: pgr_nodenetwork(text,double precision,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: id: id -NOTICE: the_geom: geom -NOTICE: table_ending: noded -NOTICE: rows_where: id in (13,18) -NOTICE: outall: f -NOTICE: pgr_nodeNetwork('edges', 0.001, 'id', 'geom', 'noded', 'id in (13,18)', f) -NOTICE: Performing checks, please wait ..... -NOTICE: Processing, please wait ..... -NOTICE: Split Edges: 2 -NOTICE: Untouched Edges: 0 -NOTICE: Total original Edges: 2 -NOTICE: Edges generated: 4 -NOTICE: Untouched Edges: 0 -NOTICE: Total New segments: 4 -NOTICE: New Table: public.edges_noded -NOTICE: ---------------------------------- - pgr_nodenetwork ------------------ - OK -(1 row) - -/* --q5 */ -SELECT old_id, ST_AsText(geom) FROM edges_noded ORDER BY old_id, sub_id; - old_id | st_astext ---------+--------------------------- - 13 | LINESTRING(3 3,3.5 3) - 13 | LINESTRING(3.5 3,4 3) - 18 | LINESTRING(3.5 2.3,3.5 3) - 18 | LINESTRING(3.5 3,3.5 4) -(4 rows) - -/* --q6 */ -INSERT INTO edges (cost, reverse_cost, geom) -WITH -the_fractions AS ( - SELECT e1.id id, st_lineLocatePoint(e1.geom, point) AS fraction - FROM intersections, edges e1, edges e2 WHERE e1.id = id1 AND e2.id = id2 - UNION - SELECT e2.id, st_lineLocatePoint(e2.geom, point) - FROM intersections, edges e1, edges e2 WHERE e1.id = id1 AND e2.id = id2 -) -SELECT - CASE WHEN sub_id = 1 - THEN cost*fraction ELSE cost*(1-fraction) END as cost, - CASE WHEN sub_id = 1 - THEN reverse_cost*(1-fraction) ELSE reverse_cost*(fraction) END AS reverse_cost, - segments.geom -FROM edges as edges -JOIN edges_noded as segments ON (edges.id = segments.old_id) -JOIN the_fractions f ON (segments.old_id = f.id); -INSERT 0 4 -/* --q7 */ -INSERT INTO vertices (id, geom) -SELECT row_number() over() + 100, point -FROM intersections; -INSERT 0 1 -/* --q8 */ -UPDATE edges e SET source = v.id FROM -vertices v where source IS NULL AND (st_startPoint(e.geom) = v.geom); -UPDATE 4 -UPDATE edges e SET target = v.id FROM -vertices v where target IS NULL AND (st_endPoint(e.geom) = v.geom); -UPDATE 4 -/* --q9 */ -DELETE FROM edges -WHERE id IN ( - SELECT id1 FROM intersections - UNION - SELECT id2 FROM intersections); -DELETE 2 -/* --q10 */ -WITH data AS ( - select p.id, p.in_edges, p.out_edges - FROM pgr_extractVertices('select id, source, target from edges') p) -UPDATE vertices v -SET (in_edges,out_edges) = (d.in_edges,d.out_edges) -FROM data d where d.id = v.id; -UPDATE 18 -/* --q11 */ -SELECT e1.id, e2.id -FROM edges_noded e1, edges e2 -WHERE e1.id < e2.id AND st_crosses(e1.geom, e2.geom); - id | id -----+---- -(0 rows) - -/* --q12 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1) -SELECT - d.id, d.inhere, - (pgr_findCloseEdges('SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).* -INTO deadends -FROM data d; -SELECT 1 -/* --q13 */ -SELECT pgr_nodeNetwork('edges', 0.001, the_geom => 'geom', rows_where=>'id in ('||inhere||','||edge_id||')') -FROM deadends; -WARNING: pgr_nodenetwork(text,double precision,text,text,text,text,boolean) deprecated function on v3.8.0 -NOTICE: PROCESSING: -NOTICE: id: id -NOTICE: the_geom: geom -NOTICE: table_ending: noded -NOTICE: rows_where: id in (17,14) -NOTICE: outall: f -NOTICE: pgr_nodeNetwork('edges', 0.001, 'id', 'geom', 'noded', 'id in (17,14)', f) -NOTICE: Performing checks, please wait ..... -NOTICE: Processing, please wait ..... -NOTICE: Split Edges: 1 -NOTICE: Untouched Edges: 1 -NOTICE: Total original Edges: 2 -NOTICE: Edges generated: 2 -NOTICE: Untouched Edges: 1 -NOTICE: Total New segments: 3 -NOTICE: New Table: public.edges_noded -NOTICE: ---------------------------------- - pgr_nodenetwork ------------------ - OK -(1 row) - -/* --q14 */ -SELECT old_id, ST_AsText(geom) FROM edges_noded ORDER BY old_id, sub_id; - old_id | st_astext ---------+---------------------------------------- - 14 | LINESTRING(2 3,1.999999999999 3.5) - 14 | LINESTRING(1.999999999999 3.5,2 4) - 17 | LINESTRING(0.5 3.5,1.999999999999 3.5) -(3 rows) - -/* --q15 */ -INSERT INTO edges (cost, reverse_cost, geom) -SELECT - CASE WHEN sub_id = 1 THEN cost*fraction ELSE cost*(1-fraction) END as cost, - CASE WHEN sub_id = 1 THEN reverse_cost*(1-fraction) ELSE reverse_cost*(fraction) END as reverse_cost, en.geom -FROM deadends r JOIN edges_noded en ON (old_id = edge_id) JOIN edges e ON (old_id = e.id) -UNION -SELECT 0,0,edge FROM deadends; -INSERT 0 3 -/* --q16 */ -/* Update the vertices table */ -INSERT INTO vertices (id, geom) -select row_number() over() + 200, st_endpoint(edge) FROM deadends; -INSERT 0 1 -/* --q17 */ -UPDATE edges e SET source = v.id FROM -vertices v where source IS NULL AND (st_startPoint(e.geom) = v.geom); -UPDATE 3 -UPDATE edges e SET target = v.id FROM -vertices v where target IS NULL AND (st_endPoint(e.geom) = v.geom); -UPDATE 3 -/* --q18 */ -DELETE FROM edges WHERE id IN (SELECT edge_id FROM deadends); -DELETE 1 -/* --q19 */ -WITH data AS ( - select p.id, p.in_edges, p.out_edges - FROM pgr_extractVertices('select id, source, target from edges') p) -UPDATE vertices v -SET (in_edges,out_edges) = (d.in_edges,d.out_edges) -FROM data d where d.id = v.id; -UPDATE 19 -/* --q20 */ -WITH -data AS ( - SELECT id, geom, (in_edges || out_edges)[1] as inhere - FROM vertices where array_length(in_edges || out_edges, 1) = 1), -results AS ( - SELECT (pgr_findCloseEdges( - 'SELECT id, geom FROM edges WHERE id != ' || inhere , geom, 0.001)).*, - d.id, d.inhere - FROM data d -) -SELECT * FROM results; - edge_id | fraction | side | distance | geom | edge | id | inhere ----------+----------+------+-----------------------+--------------------------------------------+------------------------------------------------------------------------------------+-----+-------- - 17 | 1 | l | 1.000088900582341e-12 | 010100000000000000000000400000000000000C40 | 01020000000200000000000000000000400000000000000C4068EEFFFFFFFFFF3F0000000000000C40 | 201 | 25 -(1 row) - -/* --q21 */ -ROLLBACK; -ROLLBACK diff --git a/docqueries/topology/test.conf b/docqueries/topology/test.conf deleted file mode 100644 index f40233fbec7..00000000000 --- a/docqueries/topology/test.conf +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/perl -w - -%main::tests = ( - 'any' => { - 'files' => [qw( - issue900.pg - createVertTab-any.pg - createTopology.pg - createVerticesTable.pg - analyzeGraph.pg - analyzeOneWay.pg - nodeNetwork.pg - extractVertices.pg - )], - }, -); - -1; diff --git a/docqueries/transitiveClosure/CMakeLists.txt b/docqueries/transitiveClosure/CMakeLists.txt index 1f7502b1da9..58016dc310d 100644 --- a/docqueries/transitiveClosure/CMakeLists.txt +++ b/docqueries/transitiveClosure/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES transitiveClosure ) diff --git a/docqueries/transitiveClosure/transitiveClosure.pg b/docqueries/transitiveClosure/transitiveClosure.pg index a2503eb6661..e244f404460 100644 --- a/docqueries/transitiveClosure/transitiveClosure.pg +++ b/docqueries/transitiveClosure/transitiveClosure.pg @@ -4,5 +4,5 @@ SELECT * FROM pgr_transitiveclosure( 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 5, 11, 12, 13, 15)') -ORDER BY vid; +ORDER BY node; /* -- q2 */ diff --git a/docqueries/transitiveClosure/transitiveClosure.result b/docqueries/transitiveClosure/transitiveClosure.result index e31a0fd6bf3..cfa529afa29 100644 --- a/docqueries/transitiveClosure/transitiveClosure.result +++ b/docqueries/transitiveClosure/transitiveClosure.result @@ -6,17 +6,17 @@ SET SELECT * FROM pgr_transitiveclosure( 'SELECT id, source, target, cost, reverse_cost FROM edges WHERE id IN (2, 3, 5, 11, 12, 13, 15)') -ORDER BY vid; - seq | vid | target_array ------+-----+-------------------- - 1 | 6 | {} - 6 | 8 | {12,17,16} - 2 | 10 | {12,17,16,11,6} - 4 | 11 | {12,17,16} - 5 | 12 | {17,16} - 3 | 15 | {12,17,16,10,11,6} - 8 | 16 | {17,16} - 7 | 17 | {17,16} +ORDER BY node; + node | targets +------+-------------------- + 6 | {} + 8 | {12,17,16} + 10 | {12,17,16,11,6} + 11 | {12,17,16} + 12 | {17,16} + 15 | {12,17,16,10,11,6} + 16 | {17,16} + 17 | {17,16} (8 rows) /* -- q2 */ diff --git a/docqueries/traversal/CMakeLists.txt b/docqueries/traversal/CMakeLists.txt index ade2fd29687..321b28b84e2 100644 --- a/docqueries/traversal/CMakeLists.txt +++ b/docqueries/traversal/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES binaryBreadthFirstSearch breadthFirstSearch depthFirstSearch diff --git a/docqueries/traversal/binaryBreadthFirstSearch.result b/docqueries/traversal/binaryBreadthFirstSearch.result index 051126fb367..0a72efb171f 100644 --- a/docqueries/traversal/binaryBreadthFirstSearch.result +++ b/docqueries/traversal/binaryBreadthFirstSearch.result @@ -6,52 +6,52 @@ SET SELECT * FROM pgr_binaryBreadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost from edges', 6, 10, true); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 8 | 1 | 1 - 3 | 3 | 11 | 9 | 1 | 2 - 4 | 4 | 16 | 16 | 1 | 3 - 5 | 5 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | -1 | 0 | 5 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 (6 rows) /* -- q2 */ SELECT * FROM pgr_binaryBreadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost from edges', 6, ARRAY[10, 17]); - seq | path_seq | end_vid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | 10 | 6 | 4 | 1 | 0 - 2 | 2 | 10 | 7 | 8 | 1 | 1 - 3 | 3 | 10 | 11 | 9 | 1 | 2 - 4 | 4 | 10 | 16 | 16 | 1 | 3 - 5 | 5 | 10 | 15 | 3 | 1 | 4 - 6 | 6 | 10 | 10 | -1 | 0 | 5 - 7 | 1 | 17 | 6 | 4 | 1 | 0 - 8 | 2 | 17 | 7 | 8 | 1 | 1 - 9 | 3 | 17 | 11 | 11 | 1 | 2 - 10 | 4 | 17 | 12 | 13 | 1 | 3 - 11 | 5 | 17 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 6 | 10 | 6 | 4 | 1 | 0 + 2 | 2 | 6 | 10 | 7 | 8 | 1 | 1 + 3 | 3 | 6 | 10 | 11 | 9 | 1 | 2 + 4 | 4 | 6 | 10 | 16 | 16 | 1 | 3 + 5 | 5 | 6 | 10 | 15 | 3 | 1 | 4 + 6 | 6 | 6 | 10 | 10 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q3 */ SELECT * FROM pgr_binaryBreadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost from edges', ARRAY[6, 1], 17); - seq | path_seq | start_vid | node | edge | cost | agg_cost ------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 1 | 6 | 1 | 0 - 2 | 2 | 1 | 3 | 7 | 1 | 1 - 3 | 3 | 1 | 7 | 8 | 1 | 2 - 4 | 4 | 1 | 11 | 11 | 1 | 3 - 5 | 5 | 1 | 12 | 13 | 1 | 4 - 6 | 6 | 1 | 17 | -1 | 0 | 5 - 7 | 1 | 6 | 6 | 4 | 1 | 0 - 8 | 2 | 6 | 7 | 8 | 1 | 1 - 9 | 3 | 6 | 11 | 11 | 1 | 2 - 10 | 4 | 6 | 12 | 13 | 1 | 3 - 11 | 5 | 6 | 17 | -1 | 0 | 4 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | 17 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | 17 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | 17 | 7 | 8 | 1 | 2 + 4 | 4 | 1 | 17 | 11 | 11 | 1 | 3 + 5 | 5 | 1 | 17 | 12 | 13 | 1 | 4 + 6 | 6 | 1 | 17 | 17 | -1 | 0 | 5 + 7 | 1 | 6 | 17 | 6 | 4 | 1 | 0 + 8 | 2 | 6 | 17 | 7 | 8 | 1 | 1 + 9 | 3 | 6 | 17 | 11 | 11 | 1 | 2 + 10 | 4 | 6 | 17 | 12 | 13 | 1 | 3 + 11 | 5 | 6 | 17 | 17 | -1 | 0 | 4 (11 rows) /* -- q4 */ diff --git a/docqueries/traversal/breadthFirstSearch.result b/docqueries/traversal/breadthFirstSearch.result index f5bda2532d7..89e9085e8dd 100644 --- a/docqueries/traversal/breadthFirstSearch.result +++ b/docqueries/traversal/breadthFirstSearch.result @@ -7,21 +7,21 @@ SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 6); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 5 | 1 | 1 | 1 - 3 | 1 | 6 | 7 | 4 | 1 | 1 - 4 | 2 | 6 | 3 | 7 | 1 | 2 - 5 | 2 | 6 | 11 | 8 | 1 | 2 - 6 | 2 | 6 | 8 | 10 | 1 | 2 - 7 | 3 | 6 | 1 | 6 | 1 | 3 - 8 | 3 | 6 | 16 | 9 | 1 | 3 - 9 | 3 | 6 | 12 | 11 | 1 | 3 - 10 | 3 | 6 | 9 | 14 | 1 | 3 - 11 | 4 | 6 | 17 | 15 | 1 | 4 - 12 | 4 | 6 | 15 | 16 | 1 | 4 - 13 | 5 | 6 | 10 | 3 | 1 | 5 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 5 | 1 | 1 | 1 + 3 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 4 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 5 | 2 | 6 | 7 | 11 | 8 | 1 | 2 + 6 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 7 | 3 | 6 | 3 | 1 | 6 | 1 | 3 + 8 | 3 | 6 | 11 | 16 | 9 | 1 | 3 + 9 | 3 | 6 | 11 | 12 | 11 | 1 | 3 + 10 | 3 | 6 | 8 | 9 | 14 | 1 | 3 + 11 | 4 | 6 | 16 | 17 | 15 | 1 | 4 + 12 | 4 | 6 | 16 | 15 | 16 | 1 | 4 + 13 | 5 | 6 | 15 | 10 | 3 | 1 | 5 (13 rows) /* -- q2 */ @@ -29,24 +29,24 @@ SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', ARRAY[12, 6], directed => false, max_depth => 2); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 5 | 1 | 1 | 1 - 3 | 1 | 6 | 10 | 2 | 1 | 1 - 4 | 1 | 6 | 7 | 4 | 1 | 1 - 5 | 2 | 6 | 15 | 3 | 1 | 2 - 6 | 2 | 6 | 11 | 5 | 1 | 2 - 7 | 2 | 6 | 3 | 7 | 1 | 2 - 8 | 2 | 6 | 8 | 10 | 1 | 2 - 9 | 0 | 12 | 12 | -1 | 0 | 0 - 10 | 1 | 12 | 11 | 11 | 1 | 1 - 11 | 1 | 12 | 8 | 12 | 1 | 1 - 12 | 1 | 12 | 17 | 13 | 1 | 1 - 13 | 2 | 12 | 10 | 5 | 1 | 2 - 14 | 2 | 12 | 7 | 8 | 1 | 2 - 15 | 2 | 12 | 16 | 9 | 1 | 2 - 16 | 2 | 12 | 9 | 14 | 1 | 2 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 5 | 1 | 1 | 1 + 3 | 1 | 6 | 6 | 10 | 2 | 1 | 1 + 4 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 5 | 2 | 6 | 10 | 15 | 3 | 1 | 2 + 6 | 2 | 6 | 10 | 11 | 5 | 1 | 2 + 7 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 8 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 9 | 0 | 12 | 12 | 12 | -1 | 0 | 0 + 10 | 1 | 12 | 12 | 11 | 11 | 1 | 1 + 11 | 1 | 12 | 12 | 8 | 12 | 1 | 1 + 12 | 1 | 12 | 12 | 17 | 13 | 1 | 1 + 13 | 2 | 12 | 11 | 10 | 5 | 1 | 2 + 14 | 2 | 12 | 11 | 7 | 8 | 1 | 2 + 15 | 2 | 12 | 11 | 16 | 9 | 1 | 2 + 16 | 2 | 12 | 8 | 9 | 14 | 1 | 2 (16 rows) /* -- q3 */ @@ -54,21 +54,21 @@ SELECT * FROM pgr_breadthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC', 6); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 7 | 4 | 1 | 1 - 3 | 1 | 6 | 5 | 1 | 1 | 1 - 4 | 2 | 6 | 8 | 10 | 1 | 2 - 5 | 2 | 6 | 11 | 8 | 1 | 2 - 6 | 2 | 6 | 3 | 7 | 1 | 2 - 7 | 3 | 6 | 9 | 14 | 1 | 3 - 8 | 3 | 6 | 12 | 12 | 1 | 3 - 9 | 3 | 6 | 16 | 9 | 1 | 3 - 10 | 3 | 6 | 1 | 6 | 1 | 3 - 11 | 4 | 6 | 17 | 13 | 1 | 4 - 12 | 4 | 6 | 15 | 16 | 1 | 4 - 13 | 5 | 6 | 10 | 3 | 1 | 5 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 3 | 1 | 6 | 6 | 5 | 1 | 1 | 1 + 4 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 5 | 2 | 6 | 7 | 11 | 8 | 1 | 2 + 6 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 7 | 3 | 6 | 8 | 9 | 14 | 1 | 3 + 8 | 3 | 6 | 8 | 12 | 12 | 1 | 3 + 9 | 3 | 6 | 11 | 16 | 9 | 1 | 3 + 10 | 3 | 6 | 3 | 1 | 6 | 1 | 3 + 11 | 4 | 6 | 12 | 17 | 13 | 1 | 4 + 12 | 4 | 6 | 16 | 15 | 16 | 1 | 4 + 13 | 5 | 6 | 15 | 10 | 3 | 1 | 5 (13 rows) /* -- q4 */ diff --git a/docqueries/traversal/depthFirstSearch.result b/docqueries/traversal/depthFirstSearch.result index 86885ed7efe..66e45f05bc9 100644 --- a/docqueries/traversal/depthFirstSearch.result +++ b/docqueries/traversal/depthFirstSearch.result @@ -7,21 +7,21 @@ SELECT * FROM pgr_depthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 6); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 5 | 1 | 1 | 1 - 3 | 1 | 6 | 7 | 4 | 1 | 1 - 4 | 2 | 6 | 3 | 7 | 1 | 2 - 5 | 3 | 6 | 1 | 6 | 1 | 3 - 6 | 2 | 6 | 11 | 8 | 1 | 2 - 7 | 3 | 6 | 16 | 9 | 1 | 3 - 8 | 4 | 6 | 17 | 15 | 1 | 4 - 9 | 4 | 6 | 15 | 16 | 1 | 4 - 10 | 5 | 6 | 10 | 3 | 1 | 5 - 11 | 3 | 6 | 12 | 11 | 1 | 3 - 12 | 2 | 6 | 8 | 10 | 1 | 2 - 13 | 3 | 6 | 9 | 14 | 1 | 3 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 5 | 1 | 1 | 1 + 3 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 4 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 5 | 3 | 6 | 3 | 1 | 6 | 1 | 3 + 6 | 2 | 6 | 7 | 11 | 8 | 1 | 2 + 7 | 3 | 6 | 11 | 16 | 9 | 1 | 3 + 8 | 4 | 6 | 16 | 17 | 15 | 1 | 4 + 9 | 4 | 6 | 16 | 15 | 16 | 1 | 4 + 10 | 5 | 6 | 15 | 10 | 3 | 1 | 5 + 11 | 3 | 6 | 11 | 12 | 11 | 1 | 3 + 12 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 13 | 3 | 6 | 8 | 9 | 14 | 1 | 3 (13 rows) /* -- q2 */ @@ -29,24 +29,24 @@ SELECT * FROM pgr_depthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', ARRAY[12, 6], directed => false, max_depth => 2); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 5 | 1 | 1 | 1 - 3 | 1 | 6 | 10 | 2 | 1 | 1 - 4 | 2 | 6 | 15 | 3 | 1 | 2 - 5 | 2 | 6 | 11 | 5 | 1 | 2 - 6 | 1 | 6 | 7 | 4 | 1 | 1 - 7 | 2 | 6 | 3 | 7 | 1 | 2 - 8 | 2 | 6 | 8 | 10 | 1 | 2 - 9 | 0 | 12 | 12 | -1 | 0 | 0 - 10 | 1 | 12 | 11 | 11 | 1 | 1 - 11 | 2 | 12 | 10 | 5 | 1 | 2 - 12 | 2 | 12 | 7 | 8 | 1 | 2 - 13 | 2 | 12 | 16 | 9 | 1 | 2 - 14 | 1 | 12 | 8 | 12 | 1 | 1 - 15 | 2 | 12 | 9 | 14 | 1 | 2 - 16 | 1 | 12 | 17 | 13 | 1 | 1 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 5 | 1 | 1 | 1 + 3 | 1 | 6 | 6 | 10 | 2 | 1 | 1 + 4 | 2 | 6 | 10 | 15 | 3 | 1 | 2 + 5 | 2 | 6 | 10 | 11 | 5 | 1 | 2 + 6 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 7 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 8 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 9 | 0 | 12 | 12 | 12 | -1 | 0 | 0 + 10 | 1 | 12 | 12 | 11 | 11 | 1 | 1 + 11 | 2 | 12 | 11 | 10 | 5 | 1 | 2 + 12 | 2 | 12 | 11 | 7 | 8 | 1 | 2 + 13 | 2 | 12 | 11 | 16 | 9 | 1 | 2 + 14 | 1 | 12 | 12 | 8 | 12 | 1 | 1 + 15 | 2 | 12 | 8 | 9 | 14 | 1 | 2 + 16 | 1 | 12 | 12 | 17 | 13 | 1 | 1 (16 rows) /* -- q3 */ @@ -54,21 +54,21 @@ SELECT * FROM pgr_depthFirstSearch( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id DESC', 6); - seq | depth | start_vid | node | edge | cost | agg_cost ------+-------+-----------+------+------+------+---------- - 1 | 0 | 6 | 6 | -1 | 0 | 0 - 2 | 1 | 6 | 7 | 4 | 1 | 1 - 3 | 2 | 6 | 8 | 10 | 1 | 2 - 4 | 3 | 6 | 9 | 14 | 1 | 3 - 5 | 3 | 6 | 12 | 12 | 1 | 3 - 6 | 4 | 6 | 17 | 13 | 1 | 4 - 7 | 5 | 6 | 16 | 15 | 1 | 5 - 8 | 6 | 6 | 15 | 16 | 1 | 6 - 9 | 7 | 6 | 10 | 3 | 1 | 7 - 10 | 8 | 6 | 11 | 5 | 1 | 8 - 11 | 2 | 6 | 3 | 7 | 1 | 2 - 12 | 3 | 6 | 1 | 6 | 1 | 3 - 13 | 1 | 6 | 5 | 1 | 1 | 1 + seq | depth | start_vid | pred | node | edge | cost | agg_cost +-----+-------+-----------+------+------+------+------+---------- + 1 | 0 | 6 | 6 | 6 | -1 | 0 | 0 + 2 | 1 | 6 | 6 | 7 | 4 | 1 | 1 + 3 | 2 | 6 | 7 | 8 | 10 | 1 | 2 + 4 | 3 | 6 | 8 | 9 | 14 | 1 | 3 + 5 | 3 | 6 | 8 | 12 | 12 | 1 | 3 + 6 | 4 | 6 | 12 | 17 | 13 | 1 | 4 + 7 | 5 | 6 | 17 | 16 | 15 | 1 | 5 + 8 | 6 | 6 | 16 | 15 | 16 | 1 | 6 + 9 | 7 | 6 | 15 | 10 | 3 | 1 | 7 + 10 | 8 | 6 | 10 | 11 | 5 | 1 | 8 + 11 | 2 | 6 | 7 | 3 | 7 | 1 | 2 + 12 | 3 | 6 | 3 | 1 | 6 | 1 | 3 + 13 | 1 | 6 | 6 | 5 | 1 | 1 | 1 (13 rows) /* -- q4 */ diff --git a/docqueries/trsp/CMakeLists.txt b/docqueries/trsp/CMakeLists.txt index a3636ad44d2..82be3cd6a56 100644 --- a/docqueries/trsp/CMakeLists.txt +++ b/docqueries/trsp/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES trsp trsp_withPoints trspVia diff --git a/docqueries/trsp/issue693.pg b/docqueries/trsp/issue693.pg deleted file mode 100644 index 0a5521a19eb..00000000000 --- a/docqueries/trsp/issue693.pg +++ /dev/null @@ -1,16 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ - - - CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer); - INSERT INTO routing (length, source, target, reverse_cost) VALUES - (10000, 1, 2, 10000), - (5, 3, 1, 5), - (10, 4, 3, 10), - (10, 2, 4, 10); - - SELECT pgr_trsp( - 'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing', - 1, 0.1, 1, 0.9, false, true - ); - diff --git a/docqueries/trsp/issue693.result b/docqueries/trsp/issue693.result deleted file mode 100644 index d572a6620fc..00000000000 --- a/docqueries/trsp/issue693.result +++ /dev/null @@ -1,29 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -CREATE TABLE routing (gid serial, length integer, source integer, target integer, reverse_cost integer); -CREATE TABLE -INSERT INTO routing (length, source, target, reverse_cost) VALUES - (10000, 1, 2, 10000), - (5, 3, 1, 5), - (10, 4, 3, 10), - (10, 2, 4, 10); -INSERT 0 4 -SELECT pgr_trsp( - 'SELECT gid as id, source::int4, target::int4, length::float8 as cost, length::float8 as reverse_cost FROM routing', - 1, 0.1, 1, 0.9, false, true - ); -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - pgr_trsp ---------------- - (0,-1,1,1000) - (1,1,2,5) - (2,3,3,10) - (3,4,4,10) - (4,2,1,1000) - (5,-2,-1,0) -(6 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/issue704.pg b/docqueries/trsp/issue704.pg deleted file mode 100644 index 833819fcea1..00000000000 --- a/docqueries/trsp/issue704.pg +++ /dev/null @@ -1,69 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ - - -CREATE TABLE maptest as -SELECT 671222::integer as id, 318255::integer as source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL -SELECT 671223, 222698, 36655, 197.16, 197.16 UNION ALL -SELECT 582877, 408918, 5556, 458.09, 458.09 UNION ALL -SELECT 582876, 318255, 408918, 3.89, 3.89 UNION ALL -SELECT 585280, 5556, 454424, 54.84, 54.84; -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - null /* include the turn restrictions */ -) PG ; - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0.0000000001, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - null /* include the turn restrictions */ -) PG ; - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$ -) PG ; - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0.0000000001, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$ -) PG ; - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 1, /* end_offset */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); - diff --git a/docqueries/trsp/issue704.result b/docqueries/trsp/issue704.result deleted file mode 100644 index 09504e35a39..00000000000 --- a/docqueries/trsp/issue704.result +++ /dev/null @@ -1,100 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -CREATE TABLE maptest as -SELECT 671222::integer as id, 318255::integer as source, 222698::integer as target, 14.02::float8 as cost, 14.02::float8 as reverse_cost UNION ALL -SELECT 671223, 222698, 36655, 197.16, 197.16 UNION ALL -SELECT 582877, 408918, 5556, 458.09, 458.09 UNION ALL -SELECT 582876, 318255, 408918, 3.89, 3.89 UNION ALL -SELECT 585280, 5556, 454424, 54.84, 54.84; -SELECT 5 -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - null /* include the turn restrictions */ -) PG ; -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | node | edge | cost ------+--------+--------+---------- - 0 | 408918 | 582877 | 229.0450 - 1 | -2 | -1 | 0.0000 -(2 rows) - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0.0000000001, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - null /* include the turn restrictions */ -) PG ; -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | node | edge | cost ------+------+--------+---------- - 0 | -1 | 582877 | 229.0450 - 1 | -2 | -1 | 0.0000 -(2 rows) - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$ -) PG ; -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | node | edge | cost ------+------+--------+---------- - 0 | -1 | 582877 | 229.0450 -(1 row) - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0.0000000001, /* ini_offset */ - 582877, /* edge_id of route end */ - 0.5, /* end_offset */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - $$SELECT 100::float AS to_cost, 25::INTEGER AS target_id, '32, 33'::TEXT AS via_path$$ -) PG ; -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | node | edge | cost ------+------+--------+---------- - 0 | -1 | 582877 | 229.0450 -(1 row) - -SELECT seq, id1 AS node, id2 AS edge, cost::numeric(11,4) -FROM pgr_trsp( - 'select * from maptest', - 582877, /* edge_id for start */ - 0, /* ini_offset */ - 582877, /* edge_id of route end */ - 1, /* end_offset */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | node | edge | cost ------+--------+--------+---------- - 0 | 408918 | 582877 | 458.0900 - 1 | 5556 | -1 | 0.0000 -(2 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/issue717.pg b/docqueries/trsp/issue717.pg deleted file mode 100644 index a4a36282925..00000000000 --- a/docqueries/trsp/issue717.pg +++ /dev/null @@ -1,169 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License AS published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ - -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -------------------------------------- --- directed without reverse_cost -------------------------------------- -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); - - - -------------------------------------- --- undirected with reverse_cost -------------------------------------- -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); - - -------------------------------------- --- undirected without reverse_cost -------------------------------------- -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); - - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); diff --git a/docqueries/trsp/issue717.result b/docqueries/trsp/issue717.result deleted file mode 100644 index c915a01ad37..00000000000 --- a/docqueries/trsp/issue717.result +++ /dev/null @@ -1,348 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License AS published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaVertices(text,anyarray,boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | 6 | 4 | 1 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 1 - 4 | 2 | 1 | 6 | 1 - 5 | 2 | 3 | 7 | 1 - 6 | 2 | 7 | 10 | 1 - 7 | 2 | 8 | 12 | 1 - 8 | 2 | 12 | -1 | 0 -(8 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 4 | 0.5 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 0.5 - 4 | 1 | -2 | -1 | 0 - 5 | 2 | -2 | 6 | 0.5 - 6 | 2 | 3 | 7 | 1 - 7 | 2 | 7 | 8 | 1 - 8 | 2 | 11 | 11 | 0.5 - 9 | 2 | -3 | -2 | 0 -(9 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 12 | 13 | 1 - 8 | 2 | 17 | 15 | 1 - 9 | 2 | 16 | 9 | 1 - 10 | 2 | 11 | 8 | 1 - 11 | 2 | 7 | 7 | 1 - 12 | 2 | 3 | 6 | 0.5 - 13 | 2 | -3 | -2 | 0 -(13 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 12 | 13 | 1 - 8 | 2 | 17 | 15 | 1 - 9 | 2 | 16 | 9 | 1 - 10 | 2 | 11 | 8 | 1 - 11 | 2 | 7 | 7 | 1 - 12 | 2 | 3 | 6 | 0.5 - 13 | 2 | -3 | -2 | 0 -(13 rows) - -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaVertices(text,anyarray,boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ -(0 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 2 | -2 | 6 | 0.5 - 2 | 2 | 3 | 7 | 1 - 3 | 2 | 7 | 8 | 1 - 4 | 2 | 11 | 11 | 0.5 - 5 | 2 | -3 | -2 | 0 -(5 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -2 | 0 -(5 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -2 | 0 -(5 rows) - -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaVertices(text,anyarray,boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | 6 | 4 | 1 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 1 - 4 | 2 | 1 | 6 | 1 - 5 | 2 | 3 | 7 | 1 - 6 | 2 | 7 | 10 | 1 - 7 | 2 | 8 | 12 | 1 - 8 | 2 | 12 | -1 | 0 -(8 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 4 | 0.5 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 0.5 - 4 | 1 | -2 | -1 | 0 - 5 | 2 | -2 | 6 | 0.5 - 6 | 2 | 3 | 7 | 1 - 7 | 2 | 7 | 8 | 1 - 8 | 2 | 11 | 11 | 0.5 - 9 | 2 | -3 | -2 | 0 -(9 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 11 | 8 | 1 - 8 | 2 | 7 | 7 | 1 - 9 | 2 | 3 | 6 | 0.5 - 10 | 2 | -3 | -2 | 0 -(10 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - true /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 11 | 8 | 1 - 8 | 2 | 7 | 7 | 1 - 9 | 2 | 3 | 6 | 0.5 - 10 | 2 | -3 | -2 | 0 -(10 rows) - -SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaVertices(text,anyarray,boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | 6 | 4 | 1 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 1 - 4 | 2 | 1 | 6 | 1 - 5 | 2 | 3 | 7 | 1 - 6 | 2 | 7 | 10 | 1 - 7 | 2 | 8 | 12 | 1 - 8 | 2 | 12 | -1 | 0 -(8 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 4 | 0.5 - 2 | 1 | 7 | 7 | 1 - 3 | 1 | 3 | 6 | 0.5 - 4 | 1 | -2 | -1 | 0 - 5 | 2 | -2 | 6 | 0.5 - 6 | 2 | 3 | 7 | 1 - 7 | 2 | 7 | 8 | 1 - 8 | 2 | 11 | 11 | 0.5 - 9 | 2 | -3 | -2 | 0 -(9 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 11 | 8 | 1 - 8 | 2 | 7 | 7 | 1 - 9 | 2 | 3 | 6 | 0.5 - 10 | 2 | -3 | -2 | 0 -(10 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - false, /* directed graph? */ - false /* has_reverse_cost? */ -); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 11 | 0.5 - 5 | 1 | -2 | -1 | 0 - 6 | 2 | -2 | 11 | 0.5 - 7 | 2 | 11 | 8 | 1 - 8 | 2 | 7 | 7 | 1 - 9 | 2 | 3 | 6 | 0.5 - 10 | 2 | -3 | -2 | 0 -(10 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/test.conf b/docqueries/trsp/test.conf index d3c981e3e64..d6640dc5402 100644 --- a/docqueries/trsp/test.conf +++ b/docqueries/trsp/test.conf @@ -4,16 +4,10 @@ 'any' => { 'data' => ['trsp-issue244.data'], 'files' => [qw( - trsp-renumber.pg trsp.pg trsp_withPoints.pg trspVia.pg trspVia_withPoints.pg - trsp-any-02.pg - trsp_vias-any-04.pg - issue693.pg - issue704.pg - issue717.pg )], }, ); diff --git a/docqueries/trsp/trsp-any-02.pg b/docqueries/trsp/trsp-any-02.pg deleted file mode 100644 index 5a41a599a93..00000000000 --- a/docqueries/trsp/trsp-any-02.pg +++ /dev/null @@ -1,29 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -SET extra_float_digits=-3; - -CREATE TABLE restrictions2 ( - rid integer NOT NULL, - to_cost double precision, - teid integer, - feid integer, - via text -); - -INSERT INTO restrictions2 (rid, to_cost, teid, feid, via) VALUES -(1,100,7,4,NULL), -(2,4,8,3,'5'), -(3,100,9,16,NULL); - -UPDATE edges SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id; - -select * from pgr_trsp( - 'select id::integer, source::integer, target::integer,cost, reverse_cost from edges ORDER BY ID', - 1, /* edge_id for start */ - 0.5, /* midpoint of edge */ - 6, /* edge_id of route end */ - 0.5, /* midpoint of edge */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'select to_cost, teid as target_id, feid||coalesce('',''||via,'''') as via_path from restrictions2'); diff --git a/docqueries/trsp/trsp-any-02.result b/docqueries/trsp/trsp-any-02.result deleted file mode 100644 index 53346e2fde5..00000000000 --- a/docqueries/trsp/trsp-any-02.result +++ /dev/null @@ -1,48 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -SET extra_float_digits=-3; -SET -CREATE TABLE restrictions2 ( - rid integer NOT NULL, - to_cost double precision, - teid integer, - feid integer, - via text -); -CREATE TABLE -INSERT INTO restrictions2 (rid, to_cost, teid, feid, via) VALUES -(1,100,7,4,NULL), -(2,4,8,3,'5'), -(3,100,9,16,NULL); -INSERT 0 3 -UPDATE edges SET cost = cost + 0.001 * id * id, reverse_cost = reverse_cost + 0.001 * id * id; -UPDATE 18 -select * from pgr_trsp( - 'select id::integer, source::integer, target::integer,cost, reverse_cost from edges ORDER BY ID', - 1, /* edge_id for start */ - 0.5, /* midpoint of edge */ - 6, /* edge_id of route end */ - 0.5, /* midpoint of edge */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'select to_cost, teid as target_id, feid||coalesce('',''||via,'''') as via_path from restrictions2'); -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | cost ------+-----+-----+-------- - 0 | -1 | 1 | 0.5005 - 1 | 6 | 4 | 1.016 - 2 | 7 | 8 | 1.064 - 3 | 11 | 9 | 1.081 - 4 | 16 | 16 | 1.256 - 5 | 15 | 3 | 1.009 - 6 | 10 | 5 | 1.025 - 7 | 11 | 8 | 1.064 - 8 | 7 | 7 | 1.049 - 9 | 3 | 6 | 0.518 -(10 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/trsp-renumber.pg b/docqueries/trsp/trsp-renumber.pg deleted file mode 100644 index 3002b64ca89..00000000000 --- a/docqueries/trsp/trsp-renumber.pg +++ /dev/null @@ -1,33 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ - - - -SELECT * FROM pgr_trsp( - 'SELECT id::INTEGER, (source+10)::INTEGER AS source, (target+10)::INTEGER AS target, cost::FLOAT FROM edges', - 11, 27, false, false -); - -SELECT * FROM _pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - $$ SELECT 1 AS id, ARRAY[4,7] AS path, 100 AS cost $$, - 6, 1, false -); - -SELECT * FROM _pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - $$ SELECT * FROM restrictions $$, - 6, 1, false -); - - -SELECT * FROM pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - 6, 1, false, false, - 'SELECT to_cost, target_id::int4, via_path - FROM old_restrictions' -); - - - - diff --git a/docqueries/trsp/trsp-renumber.result b/docqueries/trsp/trsp-renumber.result deleted file mode 100644 index 8a9dcf7a111..00000000000 --- a/docqueries/trsp/trsp-renumber.result +++ /dev/null @@ -1,74 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -SELECT * FROM pgr_trsp( - 'SELECT id::INTEGER, (source+10)::INTEGER AS source, (target+10)::INTEGER AS target, cost::FLOAT FROM edges', - 11, 27, false, false -); -WARNING: pgr_trsp(text,integer,integer,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | cost ------+-----+-----+------ - 0 | 11 | 6 | 1 - 1 | 13 | 7 | 1 - 2 | 17 | 8 | 1 - 3 | 21 | 9 | 1 - 4 | 26 | 15 | 1 - 5 | 27 | -1 | 0 -(6 rows) - -SELECT * FROM _pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - $$ SELECT 1 AS id, ARRAY[4,7] AS path, 100 AS cost $$, - 6, 1, false -); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 10 | 1 | 1 - 3 | 3 | 8 | 12 | 1 | 2 - 4 | 4 | 12 | 11 | 1 | 3 - 5 | 5 | 11 | 8 | 1 | 4 - 6 | 6 | 7 | 7 | 1 | 5 - 7 | 7 | 3 | 6 | 1 | 6 - 8 | 8 | 1 | -1 | 0 | 7 -(8 rows) - -SELECT * FROM _pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - $$ SELECT * FROM restrictions $$, - 6, 1, false -); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | 6 | 4 | 1 | 0 - 2 | 2 | 7 | 10 | 1 | 1 - 3 | 3 | 8 | 12 | 1 | 2 - 4 | 4 | 12 | 11 | 1 | 3 - 5 | 5 | 11 | 8 | 1 | 4 - 6 | 6 | 7 | 7 | 1 | 5 - 7 | 7 | 3 | 6 | 1 | 6 - 8 | 8 | 1 | -1 | 0 | 7 -(8 rows) - -SELECT * FROM pgr_trsp( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER, cost FROM edges', - 6, 1, false, false, - 'SELECT to_cost, target_id::int4, via_path - FROM old_restrictions' -); -WARNING: pgr_trsp(text,integer,integer,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | cost ------+-----+-----+------ - 0 | 6 | 4 | 1 - 1 | 7 | 10 | 1 - 2 | 8 | 12 | 1 - 3 | 12 | 11 | 1 - 4 | 11 | 8 | 1 - 5 | 7 | 7 | 1 - 6 | 3 | 6 | 1 - 7 | 1 | -1 | 0 -(8 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/trspVia_withPoints.pg b/docqueries/trsp/trspVia_withPoints.pg index 1ca7943e3f7..21e8bd7db3d 100644 --- a/docqueries/trsp/trspVia_withPoints.pg +++ b/docqueries/trsp/trspVia_withPoints.pg @@ -12,8 +12,7 @@ SELECT * FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -); + ARRAY[-6, 7, -4, 8, -2], 'L', directed => true); /* -- q2 */ SELECT agg_cost FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, @@ -21,14 +20,13 @@ SELECT agg_cost FROM pgr_trspVia_withPoints( $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, ARRAY[-6, 7, -4, 8, -2] ) -WHERE path_id = 3 AND edge <0; +WHERE path_id = 3 AND edge < 0; /* -- q3 */ SELECT route_agg_cost FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE path_id = 3 AND edge < 0; /* -- q4 */ SELECT row_number() over () as node_seq, node @@ -36,19 +34,17 @@ FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE edge <> -1 ORDER BY seq; /* -- q5 */ SELECT path_id, route_agg_cost FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE edge < 0; /* -- q6 */ -SELECT seq, route_agg_cost, node, agg_cost , +SELECT seq, node, agg_cost, route_agg_cost, CASE WHEN edge = -1 THEN $$visits$$ ELSE $$passes in front$$ END as status @@ -56,8 +52,8 @@ FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2]) -WHERE agg_cost <> 0 or seq = 1; + ARRAY[-6, 7, -4, 8, -2], details => true) +WHERE agg_cost <> 0 or seq = 1; /* -- q7 */ SELECT * FROM pgr_withPointsVia( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, diff --git a/docqueries/trsp/trspVia_withPoints.result b/docqueries/trsp/trspVia_withPoints.result index f685ce3a9f6..7a37d00d48b 100644 --- a/docqueries/trsp/trspVia_withPoints.result +++ b/docqueries/trsp/trspVia_withPoints.result @@ -29,26 +29,24 @@ SELECT * FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -); + ARRAY[-6, 7, -4, 8, -2], 'L', directed => true); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost -----+---------+----------+-----------+---------+------+------+------+----------+---------------- 1 | 1 | 1 | -6 | 7 | -6 | 4 | 0.3 | 0 | 0 2 | 1 | 2 | -6 | 7 | 7 | -1 | 0 | 0.3 | 0.3 3 | 2 | 1 | 7 | -4 | 7 | 7 | 1 | 0 | 0.3 - 4 | 2 | 2 | 7 | -4 | 3 | 6 | 1.3 | 1 | 1.3 - 5 | 2 | 3 | 7 | -4 | -4 | -1 | 0 | 2.3 | 2.6 - 6 | 3 | 1 | -4 | 8 | -4 | 6 | 0.7 | 0 | 2.6 - 7 | 3 | 2 | -4 | 8 | 3 | 7 | 1 | 0.7 | 3.3 - 8 | 3 | 3 | -4 | 8 | 7 | 4 | 0.6 | 1.7 | 4.3 - 9 | 3 | 4 | -4 | 8 | 7 | 10 | 1 | 2.3 | 4.9 - 10 | 3 | 5 | -4 | 8 | 8 | -1 | 0 | 3.3 | 5.9 - 11 | 4 | 1 | 8 | -2 | 8 | 10 | 1 | 0 | 5.9 - 12 | 4 | 2 | 8 | -2 | 7 | 8 | 1 | 1 | 6.9 - 13 | 4 | 3 | 8 | -2 | 11 | 9 | 1 | 2 | 7.9 - 14 | 4 | 4 | 8 | -2 | 16 | 15 | 0.4 | 3 | 8.9 - 15 | 4 | 5 | 8 | -2 | -2 | -2 | 0 | 3.4 | 9.3 -(15 rows) + 4 | 2 | 2 | 7 | -4 | 3 | 6 | 0.7 | 1 | 1.3 + 5 | 2 | 3 | 7 | -4 | -4 | -1 | 0 | 1.7 | 2 + 6 | 3 | 1 | -4 | 8 | -4 | 6 | 1.3 | 0 | 2 + 7 | 3 | 2 | -4 | 8 | 3 | 7 | 1 | 1.3 | 3.3 + 8 | 3 | 3 | -4 | 8 | 7 | 4 | 0.6 | 2.3 | 4.3 + 9 | 3 | 4 | -4 | 8 | 7 | 10 | 1 | 2.9 | 4.9 + 10 | 3 | 5 | -4 | 8 | 8 | -1 | 0 | 3.9 | 5.9 + 11 | 4 | 1 | 8 | -2 | 8 | 12 | 1 | 0 | 5.9 + 12 | 4 | 2 | 8 | -2 | 12 | 13 | 1 | 1 | 6.9 + 13 | 4 | 3 | 8 | -2 | 17 | 15 | 0.6 | 2 | 7.9 + 14 | 4 | 4 | 8 | -2 | -2 | -2 | 0 | 2.6 | 8.5 +(14 rows) /* -- q2 */ SELECT agg_cost FROM pgr_trspVia_withPoints( @@ -57,7 +55,7 @@ SELECT agg_cost FROM pgr_trspVia_withPoints( $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, ARRAY[-6, 7, -4, 8, -2] ) -WHERE path_id = 3 AND edge <0; +WHERE path_id = 3 AND edge < 0; agg_cost ---------- 3.3 @@ -68,8 +66,7 @@ SELECT route_agg_cost FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE path_id = 3 AND edge < 0; route_agg_cost ---------------- @@ -82,8 +79,7 @@ FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE edge <> -1 ORDER BY seq; node_seq | node ----------+------ @@ -106,8 +102,7 @@ SELECT path_id, route_agg_cost FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2] -) + ARRAY[-6, 7, -4, 8, -2]) WHERE edge < 0; path_id | route_agg_cost ---------+---------------- @@ -118,7 +113,7 @@ WHERE edge < 0; (4 rows) /* -- q6 */ -SELECT seq, route_agg_cost, node, agg_cost , +SELECT seq, node, agg_cost, route_agg_cost, CASE WHEN edge = -1 THEN $$visits$$ ELSE $$passes in front$$ END as status @@ -126,23 +121,25 @@ FROM pgr_trspVia_withPoints( $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, $$SELECT path, cost FROM restrictions$$, $$SELECT pid, edge_id, side, fraction FROM pointsOfInterest$$, - ARRAY[-6, 7, -4, 8, -2]) -WHERE agg_cost <> 0 or seq = 1; - seq | route_agg_cost | node | agg_cost | status ------+----------------+------+----------+----------------- - 1 | 0 | -6 | 0 | passes in front - 2 | 0.3 | 7 | 0.3 | visits - 4 | 1.3 | 3 | 1 | passes in front - 5 | 2.6 | -4 | 2.3 | visits - 7 | 3.3 | 3 | 0.7 | passes in front - 8 | 4.3 | 7 | 1.7 | passes in front - 9 | 4.9 | 7 | 2.3 | passes in front - 10 | 5.9 | 8 | 3.3 | visits - 12 | 6.9 | 7 | 1 | passes in front - 13 | 7.9 | 11 | 2 | passes in front - 14 | 8.9 | 16 | 3 | passes in front - 15 | 9.3 | -2 | 3.4 | passes in front -(12 rows) + ARRAY[-6, 7, -4, 8, -2], details => true) +WHERE agg_cost <> 0 or seq = 1; + seq | node | agg_cost | route_agg_cost | status +-----+------+----------+----------------+----------------- + 1 | -6 | 0 | 0 | passes in front + 2 | 7 | 0.3 | 0.3 | visits + 4 | 3 | 1 | 1.3 | passes in front + 5 | 1 | 2 | 2.3 | passes in front + 6 | -4 | 2.3 | 2.6 | visits + 8 | 3 | 0.7 | 3.3 | passes in front + 9 | 7 | 1.7 | 4.3 | passes in front + 10 | -6 | 2 | 4.6 | passes in front + 11 | 7 | 2.3 | 4.9 | passes in front + 12 | 8 | 3.3 | 5.9 | visits + 14 | 7 | 1 | 6.9 | passes in front + 15 | 11 | 2 | 7.9 | passes in front + 16 | 16 | 3 | 8.9 | passes in front + 17 | -2 | 3.4 | 9.3 | passes in front +(14 rows) /* -- q7 */ SELECT * FROM pgr_withPointsVia( diff --git a/docqueries/trsp/trsp_vias-any-04.pg b/docqueries/trsp/trsp_vias-any-04.pg deleted file mode 100644 index a25b8b5e6ae..00000000000 --- a/docqueries/trsp/trsp_vias-any-04.pg +++ /dev/null @@ -1,59 +0,0 @@ --- CopyRight(c) pgRouting developers --- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License AS published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ - - - - SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); - - SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); - SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); - SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); diff --git a/docqueries/trsp/trsp_vias-any-04.result b/docqueries/trsp/trsp_vias-any-04.result deleted file mode 100644 index 95eaebe8cb9..00000000000 --- a/docqueries/trsp/trsp_vias-any-04.result +++ /dev/null @@ -1,147 +0,0 @@ -BEGIN; -BEGIN -SET client_min_messages TO NOTICE; -SET -/*PGR-GNU***************************************************************** - -Copyright (c) 2015 pgRouting developers -Mail: project@pgrouting.org - ------- - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License AS published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -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. - -********************************************************************PGR-GNU*/ - SELECT * FROM pgr_trspViaVertices( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[6, 1, 12]::INTEGER[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); -WARNING: pgr_trspViaVertices(text,anyarray,boolean,boolean,text) deprecated function on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | 6 | 4 | 1 - 2 | 1 | 7 | 8 | 1 - 3 | 1 | 11 | 9 | 1 - 4 | 1 | 16 | 16 | 1 - 5 | 1 | 15 | 3 | 1 - 6 | 1 | 10 | 5 | 1 - 7 | 1 | 11 | 8 | 1 - 8 | 1 | 7 | 7 | 1 - 9 | 1 | 3 | 6 | 1 - 10 | 2 | 1 | 6 | 1 - 11 | 2 | 3 | 7 | 1 - 12 | 2 | 7 | 8 | 1 - 13 | 2 | 11 | 9 | 1 - 14 | 2 | 16 | 16 | 1 - 15 | 2 | 15 | 3 | 1 - 16 | 2 | 10 | 5 | 1 - 17 | 2 | 11 | 11 | 1 - 18 | 2 | 12 | -1 | 0 -(18 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[4,6,11]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 4 | 0.5 - 2 | 1 | 7 | 8 | 1 - 3 | 1 | 11 | 9 | 1 - 4 | 1 | 16 | 16 | 1 - 5 | 1 | 15 | 3 | 1 - 6 | 1 | 10 | 5 | 1 - 7 | 1 | 11 | 8 | 1 - 8 | 1 | 7 | 7 | 1 - 9 | 1 | 3 | 6 | 1 - 10 | 2 | 3 | 7 | 1 - 11 | 2 | 7 | 8 | 1 - 12 | 2 | 11 | 9 | 1 - 13 | 2 | 16 | 16 | 1 - 14 | 2 | 15 | 3 | 1 - 15 | 2 | 10 | 5 | 1 - 16 | 2 | 11 | 11 | 0.5 -(16 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 9 | 1 - 5 | 1 | 16 | 16 | 1 - 6 | 1 | 15 | 3 | 1 - 7 | 1 | 10 | 5 | 1 - 8 | 1 | 11 | 11 | 1 - 9 | 2 | 12 | 13 | 1 - 10 | 2 | 17 | 15 | 1 - 11 | 2 | 16 | 9 | 1 - 12 | 2 | 11 | 8 | 1 - 13 | 2 | 7 | 7 | 1 - 14 | 2 | 3 | 6 | 0.5 -(14 rows) - -SELECT * FROM pgr_trspViaEdges( - 'SELECT id::INTEGER, source::INTEGER, target::INTEGER,cost, reverse_cost FROM edges', - ARRAY[1,11,6]::INTEGER[], /* array of eids */ - ARRAY[0.5, 0.5, 0.5]::float8[], /* array of vids */ - true, /* directed graph? */ - true, /* has_reverse_cost? */ - /* include the turn restrictions */ - 'SELECT to_cost, target_id::INTEGER, via_path FROM old_restrictions'); -WARNING: pgr_trspViaEdges(text,integer[],float[],boolean,boolean,text) deprecated function on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 -WARNING: pgr_trsp(text,integer,float,integer,float,boolean,boolean) deprecated signature on v3.4.0 - seq | id1 | id2 | id3 | cost ------+-----+-----+-----+------ - 1 | 1 | -1 | 1 | 0.5 - 2 | 1 | 6 | 4 | 1 - 3 | 1 | 7 | 8 | 1 - 4 | 1 | 11 | 9 | 1 - 5 | 1 | 16 | 16 | 1 - 6 | 1 | 15 | 3 | 1 - 7 | 1 | 10 | 5 | 1 - 8 | 1 | 11 | 11 | 1 - 9 | 2 | 12 | 13 | 1 - 10 | 2 | 17 | 15 | 1 - 11 | 2 | 16 | 9 | 1 - 12 | 2 | 11 | 8 | 1 - 13 | 2 | 7 | 7 | 1 - 14 | 2 | 3 | 6 | 0.5 -(14 rows) - -ROLLBACK; -ROLLBACK diff --git a/docqueries/trsp/trsp_withPoints.pg b/docqueries/trsp/trsp_withPoints.pg index fbbc170e111..00e9eadfb55 100644 --- a/docqueries/trsp/trsp_withPoints.pg +++ b/docqueries/trsp/trsp_withPoints.pg @@ -1,76 +1,83 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ SET extra_float_digits=-3; - -/* --e1 */ +/* -- q1 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - -1, 10, - details => true); -/* --e2 */ + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, 10, details => true); +/* -- q2 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - -1, ARRAY[-3, 7]); -/* --e3 */ + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, ARRAY[-3, 7], 'B', directed => false); +/* -- q3 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', ARRAY[-1, 6], -3); -/* --e4 */ +/* -- q4 */ +SELECT * FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); +/* -- q5 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[-1, 6], ARRAY[-3, 1]); - -/* --e5 */ + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); +/* -- q6 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - $$SELECT * FROM (VALUES (-1, 10), (6, -3)) AS t(source, target)$$, - driving_side => 'r', - details => true); -/* --q1 */ -SELECT ('(' || start_vid || ' => ' || end_vid ||') at ' || path_seq || 'th step:')::TEXT AS path_at, -CASE WHEN edge = -1 THEN ' visits' -ELSE ' passes in front of' + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], + 'r', details => true); +/* -- q7 */ +SELECT (start_vid || ' -> ' || end_vid ||' at ' || path_seq || 'th step:')::TEXT AS path_at, + CASE WHEN edge = -1 THEN ' visits' + ELSE ' passes in front of' END as status, CASE WHEN node < 0 THEN 'Point' - ELSE 'Vertex' + ELSE 'Vertex' END as is_a, abs(node) as id - FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[5, -1], ARRAY[-6, -3, -6, 10, 11], - driving_side => 'r', - details => true) - WHERE node IN (-6, 11); -/* --q2 */ -SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[-1, 6], ARRAY[-3, 1], - directed => false, - details => true); -/* --q3 */ +FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-6, -3, -6, 10, 11], 'r', details => true) +WHERE node IN (-6, 11); +/* -- q8 */ +SELECT (start_vid || ' => ' || end_vid ||' at ' || path_seq || 'th step')::TEXT AS path_at, + CASE WHEN edge = -1 THEN ' visits' + ELSE ' passes in front of' + END as status, + CASE WHEN node < 0 THEN 'Point' + ELSE 'Vertex' + END as is_a, + abs(node) as id +FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'l', details => true) +WHERE node IN (-6, 11); +/* -- q9 */ SELECT * FROM pgr_trsp_withPoints( $e$ SELECT * FROM edges $e$, $r$ SELECT id, path, cost FROM restrictions $r$, $p$ SELECT edge_id, round(fraction::numeric, 2) AS fraction, side FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, + 'SELECT id, geom FROM edges', (SELECT ST_POINT(2.9, 1.8)), 0.5, cap => 2) $p$, - 1, ARRAY[-1, -2], - driving_side => 'r'); -/* -- q4 */ + 1, ARRAY[-1, -2], false); +/* -- q10 */ diff --git a/docqueries/trsp/trsp_withPoints.result b/docqueries/trsp/trsp_withPoints.result index 364d45241d0..29bf125dea6 100644 --- a/docqueries/trsp/trsp_withPoints.result +++ b/docqueries/trsp/trsp_withPoints.result @@ -4,13 +4,12 @@ SET client_min_messages TO NOTICE; SET SET extra_float_digits=-3; SET -/* --e1 */ +/* -- q1 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - -1, 10, - details => true); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, 10, details => true); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 @@ -27,29 +26,29 @@ SELECT * FROM pgr_trsp_withPoints( 12 | 12 | -1 | 10 | 10 | -1 | 0 | 8.4 (12 rows) -/* --e2 */ +/* -- q2 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - -1, ARRAY[-3, 7]); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, ARRAY[-3, 7], 'B', directed => false); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- - 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 - 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 - 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 - 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 - 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 - 6 | 1 | -1 | 7 | -1 | 1 | 1.4 | 0 - 7 | 2 | -1 | 7 | 6 | 4 | 1 | 1.4 - 8 | 3 | -1 | 7 | 7 | -1 | 0 | 2.4 + 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 0.6 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 1.6 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 2.6 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 3.2 + 6 | 1 | -1 | 7 | -1 | 1 | 0.6 | 0 + 7 | 2 | -1 | 7 | 6 | 4 | 1 | 0.6 + 8 | 3 | -1 | 7 | 7 | -1 | 0 | 1.6 (8 rows) -/* --e3 */ +/* -- q3 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', ARRAY[-1, 6], -3); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- @@ -64,30 +63,30 @@ SELECT * FROM pgr_trsp_withPoints( 9 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 (9 rows) -/* --e4 */ +/* -- q4 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[-1, 6], ARRAY[-3, 1]); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- - 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 - 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 - 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 - 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 - 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 - 6 | 1 | -1 | 1 | -1 | 1 | 1.4 | 0 - 7 | 2 | -1 | 1 | 6 | 4 | 1 | 1.4 - 8 | 3 | -1 | 1 | 7 | 10 | 1 | 2.4 - 9 | 4 | -1 | 1 | 8 | 12 | 1 | 3.4 - 10 | 5 | -1 | 1 | 12 | 13 | 1 | 4.4 - 11 | 6 | -1 | 1 | 17 | 15 | 1 | 5.4 - 12 | 7 | -1 | 1 | 16 | 9 | 1 | 6.4 - 13 | 8 | -1 | 1 | 11 | 8 | 1 | 7.4 - 14 | 9 | -1 | 1 | 7 | 7 | 1 | 8.4 - 15 | 10 | -1 | 1 | 3 | 6 | 1 | 9.4 - 16 | 11 | -1 | 1 | 1 | -1 | 0 | 10.4 + 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 0.6 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 1.6 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 2.6 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 3.2 + 6 | 1 | -1 | 1 | -1 | 1 | 0.6 | 0 + 7 | 2 | -1 | 1 | 6 | 4 | 1 | 0.6 + 8 | 3 | -1 | 1 | 7 | 10 | 1 | 1.6 + 9 | 4 | -1 | 1 | 8 | 12 | 1 | 2.6 + 10 | 5 | -1 | 1 | 12 | 13 | 1 | 3.6 + 11 | 6 | -1 | 1 | 17 | 15 | 1 | 4.6 + 12 | 7 | -1 | 1 | 16 | 9 | 1 | 5.6 + 13 | 8 | -1 | 1 | 11 | 8 | 1 | 6.6 + 14 | 9 | -1 | 1 | 7 | 7 | 1 | 7.6 + 15 | 10 | -1 | 1 | 3 | 6 | 1 | 8.6 + 16 | 11 | -1 | 1 | 1 | -1 | 0 | 9.6 17 | 1 | 6 | -3 | 6 | 4 | 1 | 0 18 | 2 | 6 | -3 | 7 | 10 | 1 | 1 19 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 @@ -104,14 +103,13 @@ SELECT * FROM pgr_trsp_withPoints( 30 | 10 | 6 | 1 | 1 | -1 | 0 | 9 (30 rows) -/* --e5 */ +/* -- q5 */ SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - $$SELECT * FROM (VALUES (-1, 10), (6, -3)) AS t(source, target)$$, - driving_side => 'r', - details => true); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', + 'r', details => true); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 @@ -133,85 +131,159 @@ SELECT * FROM pgr_trsp_withPoints( 17 | 5 | 6 | -3 | -3 | -1 | 0 | 2.6 (17 rows) -/* --q1 */ -SELECT ('(' || start_vid || ' => ' || end_vid ||') at ' || path_seq || 'th step:')::TEXT AS path_at, -CASE WHEN edge = -1 THEN ' visits' -ELSE ' passes in front of' +/* -- q6 */ +SELECT * FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], + 'r', details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -6 | -1 | 1 | 0.4 | 0 + 2 | 2 | -1 | -6 | 5 | 1 | 1 | 0.4 + 3 | 3 | -1 | -6 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -1 | -6 | -6 | -1 | 0 | 2.1 + 5 | 1 | -1 | -3 | -1 | 1 | 0.4 | 0 + 6 | 2 | -1 | -3 | 5 | 1 | 1 | 0.4 + 7 | 3 | -1 | -3 | 6 | 4 | 0.7 | 1.4 + 8 | 4 | -1 | -3 | -6 | 4 | 0.3 | 2.1 + 9 | 5 | -1 | -3 | 7 | 10 | 1 | 2.4 + 10 | 6 | -1 | -3 | 8 | 12 | 0.6 | 3.4 + 11 | 7 | -1 | -3 | -3 | -1 | 0 | 4 + 12 | 1 | -1 | -2 | -1 | 1 | 0.4 | 0 + 13 | 2 | -1 | -2 | 5 | 1 | 1 | 0.4 + 14 | 3 | -1 | -2 | 6 | 4 | 0.7 | 1.4 + 15 | 4 | -1 | -2 | -6 | 4 | 0.3 | 2.1 + 16 | 5 | -1 | -2 | 7 | 8 | 1 | 2.4 + 17 | 6 | -1 | -2 | 11 | 9 | 1 | 3.4 + 18 | 7 | -1 | -2 | 16 | 15 | 0.4 | 4.4 + 19 | 8 | -1 | -2 | -2 | -1 | 0 | 4.8 + 20 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 + 21 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 + 22 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 + 23 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 + 24 | 5 | -1 | 10 | 7 | 10 | 1 | 2.4 + 25 | 6 | -1 | 10 | 8 | 12 | 0.6 | 3.4 + 26 | 7 | -1 | 10 | -3 | 12 | 0.4 | 4 + 27 | 8 | -1 | 10 | 12 | 13 | 1 | 4.4 + 28 | 9 | -1 | 10 | 17 | 15 | 1 | 5.4 + 29 | 10 | -1 | 10 | 16 | 16 | 1 | 6.4 + 30 | 11 | -1 | 10 | 15 | 3 | 1 | 7.4 + 31 | 12 | -1 | 10 | 10 | -1 | 0 | 8.4 + 32 | 1 | -1 | 11 | -1 | 1 | 0.4 | 0 + 33 | 2 | -1 | 11 | 5 | 1 | 1 | 0.4 + 34 | 3 | -1 | 11 | 6 | 4 | 0.7 | 1.4 + 35 | 4 | -1 | 11 | -6 | 4 | 0.3 | 2.1 + 36 | 5 | -1 | 11 | 7 | 8 | 1 | 2.4 + 37 | 6 | -1 | 11 | 11 | -1 | 0 | 3.4 + 38 | 1 | 5 | -6 | 5 | 1 | 1 | 0 + 39 | 2 | 5 | -6 | 6 | 4 | 0.7 | 1 + 40 | 3 | 5 | -6 | -6 | -1 | 0 | 1.7 + 41 | 1 | 5 | -3 | 5 | 1 | 1 | 0 + 42 | 2 | 5 | -3 | 6 | 4 | 0.7 | 1 + 43 | 3 | 5 | -3 | -6 | 4 | 0.3 | 1.7 + 44 | 4 | 5 | -3 | 7 | 10 | 1 | 2 + 45 | 5 | 5 | -3 | 8 | 12 | 0.6 | 3 + 46 | 6 | 5 | -3 | -3 | -1 | 0 | 3.6 + 47 | 1 | 5 | -2 | 5 | 1 | 1 | 0 + 48 | 2 | 5 | -2 | 6 | 4 | 0.7 | 1 + 49 | 3 | 5 | -2 | -6 | 4 | 0.3 | 1.7 + 50 | 4 | 5 | -2 | 7 | 8 | 1 | 2 + 51 | 5 | 5 | -2 | 11 | 9 | 1 | 3 + 52 | 6 | 5 | -2 | 16 | 15 | 0.4 | 4 + 53 | 7 | 5 | -2 | -2 | -1 | 0 | 4.4 + 54 | 1 | 5 | 10 | 5 | 1 | 1 | 0 + 55 | 2 | 5 | 10 | 6 | 4 | 0.7 | 1 + 56 | 3 | 5 | 10 | -6 | 4 | 0.3 | 1.7 + 57 | 4 | 5 | 10 | 7 | 10 | 1 | 2 + 58 | 5 | 5 | 10 | 8 | 12 | 0.6 | 3 + 59 | 6 | 5 | 10 | -3 | 12 | 0.4 | 3.6 + 60 | 7 | 5 | 10 | 12 | 13 | 1 | 4 + 61 | 8 | 5 | 10 | 17 | 15 | 1 | 5 + 62 | 9 | 5 | 10 | 16 | 16 | 1 | 6 + 63 | 10 | 5 | 10 | 15 | 3 | 1 | 7 + 64 | 11 | 5 | 10 | 10 | -1 | 0 | 8 + 65 | 1 | 5 | 11 | 5 | 1 | 1 | 0 + 66 | 2 | 5 | 11 | 6 | 4 | 0.7 | 1 + 67 | 3 | 5 | 11 | -6 | 4 | 0.3 | 1.7 + 68 | 4 | 5 | 11 | 7 | 8 | 1 | 2 + 69 | 5 | 5 | 11 | 11 | -1 | 0 | 3 +(69 rows) + +/* -- q7 */ +SELECT (start_vid || ' -> ' || end_vid ||' at ' || path_seq || 'th step:')::TEXT AS path_at, + CASE WHEN edge = -1 THEN ' visits' + ELSE ' passes in front of' END as status, CASE WHEN node < 0 THEN 'Point' - ELSE 'Vertex' + ELSE 'Vertex' END as is_a, abs(node) as id - FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[5, -1], ARRAY[-6, -3, -6, 10, 11], - driving_side => 'r', - details => true) - WHERE node IN (-6, 11); - path_at | status | is_a | id --------------------------+---------------------+--------+---- - (-1 => -6) at 4th step: | visits | Point | 6 - (-1 => -3) at 4th step: | passes in front of | Point | 6 - (-1 => 10) at 4th step: | passes in front of | Point | 6 - (-1 => 11) at 4th step: | passes in front of | Point | 6 - (-1 => 11) at 6th step: | visits | Vertex | 11 - (5 => -6) at 3th step: | visits | Point | 6 - (5 => -3) at 3th step: | passes in front of | Point | 6 - (5 => 10) at 3th step: | passes in front of | Point | 6 - (5 => 11) at 3th step: | passes in front of | Point | 6 - (5 => 11) at 5th step: | visits | Vertex | 11 +FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-6, -3, -6, 10, 11], 'r', details => true) +WHERE node IN (-6, 11); + path_at | status | is_a | id +-----------------------+---------------------+--------+---- + -1 -> -6 at 4th step: | visits | Point | 6 + -1 -> -3 at 4th step: | passes in front of | Point | 6 + -1 -> 10 at 4th step: | passes in front of | Point | 6 + -1 -> 11 at 4th step: | passes in front of | Point | 6 + -1 -> 11 at 6th step: | visits | Vertex | 11 + 5 -> -6 at 3th step: | visits | Point | 6 + 5 -> -3 at 3th step: | passes in front of | Point | 6 + 5 -> 10 at 3th step: | passes in front of | Point | 6 + 5 -> 11 at 3th step: | passes in front of | Point | 6 + 5 -> 11 at 5th step: | visits | Vertex | 11 (10 rows) -/* --q2 */ -SELECT * FROM pgr_trsp_withPoints( - $$SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id$$, - $$SELECT id, path, cost FROM restrictions$$, - $$SELECT pid, edge_id, fraction, side FROM pointsOfInterest$$, - ARRAY[-1, 6], ARRAY[-3, 1], - directed => false, - details => true); - seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost ------+----------+-----------+---------+------+------+------+---------- - 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 - 2 | 2 | -1 | -3 | 6 | 4 | 0.7 | 0.6 - 3 | 3 | -1 | -3 | -6 | 4 | 0.3 | 1.3 - 4 | 4 | -1 | -3 | 7 | 10 | 1 | 1.6 - 5 | 5 | -1 | -3 | 8 | 12 | 0.6 | 2.6 - 6 | 6 | -1 | -3 | -3 | -1 | 0 | 3.2 - 7 | 1 | -1 | 1 | -1 | 1 | 0.6 | 0 - 8 | 2 | -1 | 1 | 6 | 4 | 0.7 | 0.6 - 9 | 3 | -1 | 1 | -6 | 4 | 0.3 | 1.3 - 10 | 4 | -1 | 1 | 7 | 7 | 1 | 1.6 - 11 | 5 | -1 | 1 | 3 | 6 | 0.7 | 2.6 - 12 | 6 | -1 | 1 | -4 | 6 | 0.3 | 3.3 - 13 | 7 | -1 | 1 | 1 | -1 | 0 | 3.6 - 14 | 1 | 6 | -3 | 6 | 4 | 0.7 | 0 - 15 | 2 | 6 | -3 | -6 | 4 | 0.3 | 0.7 - 16 | 3 | 6 | -3 | 7 | 10 | 1 | 1 - 17 | 4 | 6 | -3 | 8 | 12 | 0.6 | 2 - 18 | 5 | 6 | -3 | -3 | -1 | 0 | 2.6 - 19 | 1 | 6 | 1 | 6 | 4 | 0.7 | 0 - 20 | 2 | 6 | 1 | -6 | 4 | 0.3 | 0.7 - 21 | 3 | 6 | 1 | 7 | 7 | 1 | 1 - 22 | 4 | 6 | 1 | 3 | 6 | 0.7 | 2 - 23 | 5 | 6 | 1 | -4 | 6 | 0.3 | 2.7 - 24 | 6 | 6 | 1 | 1 | -1 | 0 | 3 -(24 rows) +/* -- q8 */ +SELECT (start_vid || ' => ' || end_vid ||' at ' || path_seq || 'th step')::TEXT AS path_at, + CASE WHEN edge = -1 THEN ' visits' + ELSE ' passes in front of' + END as status, + CASE WHEN node < 0 THEN 'Point' + ELSE 'Vertex' + END as is_a, + abs(node) as id +FROM pgr_trsp_withPoints( + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT id, path, cost FROM restrictions', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'l', details => true) +WHERE node IN (-6, 11); + path_at | status | is_a | id +----------------------+---------------------+--------+---- + -1 => -6 at 3th step | visits | Point | 6 + -1 => -3 at 3th step | passes in front of | Point | 6 + -1 => -2 at 3th step | passes in front of | Point | 6 + -1 => -2 at 5th step | passes in front of | Vertex | 11 + -1 => 10 at 3th step | passes in front of | Point | 6 + -1 => 11 at 3th step | passes in front of | Point | 6 + -1 => 11 at 5th step | visits | Vertex | 11 + 5 => -6 at 4th step | visits | Point | 6 + 5 => -3 at 4th step | passes in front of | Point | 6 + 5 => -2 at 4th step | passes in front of | Point | 6 + 5 => -2 at 6th step | passes in front of | Vertex | 11 + 5 => 10 at 4th step | passes in front of | Point | 6 + 5 => 11 at 4th step | passes in front of | Point | 6 + 5 => 11 at 6th step | visits | Vertex | 11 +(14 rows) -/* --q3 */ +/* -- q9 */ SELECT * FROM pgr_trsp_withPoints( $e$ SELECT * FROM edges $e$, $r$ SELECT id, path, cost FROM restrictions $r$, $p$ SELECT edge_id, round(fraction::numeric, 2) AS fraction, side FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, + 'SELECT id, geom FROM edges', (SELECT ST_POINT(2.9, 1.8)), 0.5, cap => 2) $p$, - 1, ARRAY[-1, -2], - driving_side => 'r'); + 1, ARRAY[-1, -2], false); seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | 1 | -2 | 1 | 6 | 1 | 0 @@ -220,17 +292,11 @@ SELECT * FROM pgr_trsp_withPoints( 4 | 4 | 1 | -2 | -2 | -1 | 0 | 2.9 5 | 1 | 1 | -1 | 1 | 6 | 1 | 0 6 | 2 | 1 | -1 | 3 | 7 | 1 | 1 - 7 | 3 | 1 | -1 | 7 | 8 | 2 | 2 - 8 | 4 | 1 | -1 | 7 | 10 | 1 | 4 - 9 | 5 | 1 | -1 | 8 | 12 | 1 | 5 - 10 | 6 | 1 | -1 | 12 | 13 | 1 | 6 - 11 | 7 | 1 | -1 | 17 | 15 | 1 | 7 - 12 | 8 | 1 | -1 | 16 | 16 | 1 | 8 - 13 | 9 | 1 | -1 | 15 | 3 | 1 | 9 - 14 | 10 | 1 | -1 | 10 | 5 | 0.8 | 10 - 15 | 11 | 1 | -1 | -1 | -1 | 0 | 10.8 -(15 rows) + 7 | 3 | 1 | -1 | 7 | 8 | 1 | 2 + 8 | 4 | 1 | -1 | 11 | 5 | 0.2 | 3 + 9 | 5 | 1 | -1 | -1 | -1 | 0 | 3.2 +(9 rows) -/* -- q4 */ +/* -- q10 */ ROLLBACK; ROLLBACK diff --git a/docqueries/tsp/CMakeLists.txt b/docqueries/tsp/CMakeLists.txt index 69b00b58c3a..92a0513ca12 100644 --- a/docqueries/tsp/CMakeLists.txt +++ b/docqueries/tsp/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES TSPeuclidean TSP ) diff --git a/docqueries/tsp/TSP.pg b/docqueries/tsp/TSP.pg index 3b24b6b5025..be0a422cc0b 100644 --- a/docqueries/tsp/TSP.pg +++ b/docqueries/tsp/TSP.pg @@ -21,7 +21,7 @@ SELECT * FROM pgr_TSP( $$SELECT * FROM pgr_withPointsCostMatrix( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 10, 7, 11, -6], + array[-1, 10, 7, 11, -6], 'r', directed => true) $$, start_id => 7, end_id => 11); diff --git a/docqueries/tsp/TSP.result b/docqueries/tsp/TSP.result index ec9618218bd..7152ec230a5 100644 --- a/docqueries/tsp/TSP.result +++ b/docqueries/tsp/TSP.result @@ -60,7 +60,7 @@ SELECT * FROM pgr_TSP( $$SELECT * FROM pgr_withPointsCostMatrix( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 10, 7, 11, -6], + array[-1, 10, 7, 11, -6], 'r', directed => true) $$, start_id => 7, end_id => 11); diff --git a/docqueries/tsp/TSPeuclidean.pg b/docqueries/tsp/TSPeuclidean.pg index 78da40ec092..a1c413d9561 100644 --- a/docqueries/tsp/TSPeuclidean.pg +++ b/docqueries/tsp/TSPeuclidean.pg @@ -6,11 +6,11 @@ SET client_min_messages TO WARNING; /* -- q1 */ SELECT * FROM pgr_TSPeuclidean( $$ - SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices + SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices ORDER BY id $$); /* -- q2 */ SELECT * -FROM pgr_TSPeuclidean($$SELECT * FROM wi29$$) +FROM pgr_TSPeuclidean($$SELECT * FROM wi29 ORDER BY id$$) WHERE seq = 30; /* -- q3 */ WITH diff --git a/docqueries/tsp/TSPeuclidean.result b/docqueries/tsp/TSPeuclidean.result index 1cf0f9f9361..f16bada029f 100644 --- a/docqueries/tsp/TSPeuclidean.result +++ b/docqueries/tsp/TSPeuclidean.result @@ -11,7 +11,7 @@ SET /* -- q1 */ SELECT * FROM pgr_TSPeuclidean( $$ - SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices + SELECT id, st_X(geom) AS x, st_Y(geom)AS y FROM vertices ORDER BY id $$); seq | node | cost | agg_cost -----+------+----------------+--------------- @@ -37,7 +37,7 @@ SELECT * FROM pgr_TSPeuclidean( /* -- q2 */ SELECT * -FROM pgr_TSPeuclidean($$SELECT * FROM wi29$$) +FROM pgr_TSPeuclidean($$SELECT * FROM wi29 ORDER BY id$$) WHERE seq = 30; seq | node | cost | agg_cost -----+------+---------------+--------------- diff --git a/docqueries/utilities/CMakeLists.txt b/docqueries/utilities/CMakeLists.txt index 09d6b4fa934..50541f7940a 100644 --- a/docqueries/utilities/CMakeLists.txt +++ b/docqueries/utilities/CMakeLists.txt @@ -1,5 +1,6 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES + extractVertices findCloseEdges separateCrossing separateTouching diff --git a/docqueries/topology/extractVertices.pg b/docqueries/utilities/extractVertices.pg similarity index 100% rename from docqueries/topology/extractVertices.pg rename to docqueries/utilities/extractVertices.pg diff --git a/docqueries/topology/extractVertices.result b/docqueries/utilities/extractVertices.result similarity index 100% rename from docqueries/topology/extractVertices.result rename to docqueries/utilities/extractVertices.result diff --git a/docqueries/utilities/findCloseEdges.pg b/docqueries/utilities/findCloseEdges.pg index e46d13e32a3..a532dbd205f 100644 --- a/docqueries/utilities/findCloseEdges.pg +++ b/docqueries/utilities/findCloseEdges.pg @@ -35,7 +35,7 @@ SELECT * FROM pgr_withPoints( (SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5, cap => 2) $p$, - 1, ARRAY[-1, -2]); + 1, ARRAY[-1, -2], 'r'); /* -- o5 */ SELECT edge_id, fraction, side, distance, ST_AsText(geom) geom, ST_AsText(edge) edge FROM pgr_findCloseEdges( diff --git a/docqueries/utilities/findCloseEdges.result b/docqueries/utilities/findCloseEdges.result index 1541de9cd6c..375b7c65ffb 100644 --- a/docqueries/utilities/findCloseEdges.result +++ b/docqueries/utilities/findCloseEdges.result @@ -59,21 +59,21 @@ SELECT * FROM pgr_withPoints( (SELECT geom FROM pointsOfInterest WHERE pid = 5), 0.5, cap => 2) $p$, - 1, ARRAY[-1, -2]); - seq | path_seq | end_pid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | -2 | 1 | 6 | 1 | 0 - 2 | 2 | -2 | 3 | 7 | 1 | 1 - 3 | 3 | -2 | 7 | 8 | 0.9 | 2 - 4 | 4 | -2 | -2 | -1 | 0 | 2.9 - 5 | 1 | -1 | 1 | 6 | 1 | 0 - 6 | 2 | -1 | 3 | 7 | 1 | 1 - 7 | 3 | -1 | 7 | 8 | 1 | 2 - 8 | 4 | -1 | 11 | 9 | 1 | 3 - 9 | 5 | -1 | 16 | 16 | 1 | 4 - 10 | 6 | -1 | 15 | 3 | 1 | 5 - 11 | 7 | -1 | 10 | 5 | 0.8 | 6 - 12 | 8 | -1 | -1 | -1 | 0 | 6.8 + 1, ARRAY[-1, -2], 'r'); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | -2 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | -2 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | -2 | 7 | 8 | 0.9 | 2 + 4 | 4 | 1 | -2 | -2 | -1 | 0 | 2.9 + 5 | 1 | 1 | -1 | 1 | 6 | 1 | 0 + 6 | 2 | 1 | -1 | 3 | 7 | 1 | 1 + 7 | 3 | 1 | -1 | 7 | 8 | 1 | 2 + 8 | 4 | 1 | -1 | 11 | 9 | 1 | 3 + 9 | 5 | 1 | -1 | 16 | 16 | 1 | 4 + 10 | 6 | 1 | -1 | 15 | 3 | 1 | 5 + 11 | 7 | 1 | -1 | 10 | 5 | 0.8 | 6 + 12 | 8 | 1 | -1 | -1 | -1 | 0 | 6.8 (12 rows) /* -- o5 */ diff --git a/docqueries/utilities/separateCrossing.pg b/docqueries/utilities/separateCrossing.pg index 7db167f73a0..c196890e465 100644 --- a/docqueries/utilities/separateCrossing.pg +++ b/docqueries/utilities/separateCrossing.pg @@ -1,5 +1,6 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ +-- pgr_nodeNetwork -------------------------------------------------------------------------------- /* --q1 */ SELECT id, sub_id, ST_AsText(geom) diff --git a/docqueries/utilities/separateTouching.pg b/docqueries/utilities/separateTouching.pg index 1ee4d521ba3..d7b3b9c16fc 100644 --- a/docqueries/utilities/separateTouching.pg +++ b/docqueries/utilities/separateTouching.pg @@ -1,5 +1,6 @@ -- CopyRight(c) pgRouting developers -- Creative Commons Attribution-Share Alike 3.0 License : https://creativecommons.org/licenses/by-sa/3.0/ +-- pgr_nodeNetwork -------------------------------------------------------------------------------- /* --q1 */ SELECT * diff --git a/docqueries/utilities/test.conf b/docqueries/utilities/test.conf index f94779a1a5a..0a8e0e4c0b5 100644 --- a/docqueries/utilities/test.conf +++ b/docqueries/utilities/test.conf @@ -3,6 +3,7 @@ %main::tests = ( 'any' => { 'files' => [qw( + extractVertices.pg findCloseEdges.pg separateCrossing.pg separateTouching.pg diff --git a/docqueries/version/CMakeLists.txt b/docqueries/version/CMakeLists.txt index 42e8d8a427f..950ca5b3300 100644 --- a/docqueries/version/CMakeLists.txt +++ b/docqueries/version/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES version full_version ) diff --git a/docqueries/version/full_version.result b/docqueries/version/full_version.result index ba1ce30f169..a56f47ad379 100644 --- a/docqueries/version/full_version.result +++ b/docqueries/version/full_version.result @@ -4,9 +4,9 @@ SET client_min_messages TO NOTICE; SET /* -- q1 */ SELECT version, library FROM pgr_full_version(); - version | library ----------+----------------- - 3.8.0 | pgrouting-3.8.0 + version | library +--------------+----------------- + 4.0.0-alpha1 | pgrouting-4.0.0 (1 row) /* -- q2 */ diff --git a/docqueries/version/version.result b/docqueries/version/version.result index 088d0c3eb2e..980afe9d404 100644 --- a/docqueries/version/version.result +++ b/docqueries/version/version.result @@ -5,8 +5,8 @@ SET /* -- q1 */ SELECT pgr_version(); pgr_version -------------- - 3.8.0 +-------------- + 4.0.0-alpha1 (1 row) /* -- q2 */ diff --git a/docqueries/withPoints/CMakeLists.txt b/docqueries/withPoints/CMakeLists.txt index a20fdf84cb0..aa807633dc3 100644 --- a/docqueries/withPoints/CMakeLists.txt +++ b/docqueries/withPoints/CMakeLists.txt @@ -1,5 +1,5 @@ # Do not use extensions -SET(LOCAL_FILES +set(LOCAL_FILES withPointsCostMatrix withPointsCost withPointsDD diff --git a/docqueries/withPoints/withPoints.pg b/docqueries/withPoints/withPoints.pg index 2e68cac5565..2f0c1aa3062 100644 --- a/docqueries/withPoints/withPoints.pg +++ b/docqueries/withPoints/withPoints.pg @@ -4,55 +4,51 @@ SET extra_float_digits=-3; /* -- q1 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 10, - details => true); + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, 10, details => true); /* -- q2 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, ARRAY[-3, 7], - directed => false); + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, ARRAY[-3, 7], directed => false); /* -- q3 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', ARRAY[-1, 6], -3); /* -- q4 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-1, 6], ARRAY[-3, 1]); + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); /* -- q5 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', - driving_side => 'r', details => true); + 'r', details => true); /* -- q6 */ -SELECT * -FROM pgr_withPoints( +SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r', details => true); + 'r', details => true); /* -- q7 */ -SELECT (start_pid || ' -> ' || end_pid ||' at ' || path_seq || 'th step')::TEXT AS path_at, +SELECT (start_vid || ' -> ' || end_vid ||' at ' || path_seq || 'th step:')::TEXT AS path_at, CASE WHEN edge = -1 THEN ' visits' ELSE ' passes in front of' END as status, CASE WHEN node < 0 THEN 'Point' - ELSE 'Vertex' + ELSE 'Vertex' END as is_a, abs(node) as id FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r', details => true) + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'r', details => true) WHERE node IN (-6, 11); /* -- q8 */ -SELECT (start_pid || ' => ' || end_pid ||' at ' || path_seq || 'th step')::TEXT AS path_at, +SELECT (start_vid || ' => ' || end_vid ||' at ' || path_seq || 'th step')::TEXT AS path_at, CASE WHEN edge = -1 THEN ' visits' ELSE ' passes in front of' END as status, @@ -62,16 +58,15 @@ SELECT (start_pid || ' => ' || end_pid ||' at ' || path_seq || 'th step')::TEXT abs(node) as id FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'l', details => true) + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'l', details => true) WHERE node IN (-6, 11); /* -- q9 */ SELECT * FROM pgr_withPoints( $e$ SELECT * FROM edges $e$, $p$ SELECT edge_id, round(fraction::numeric, 2) AS fraction, side FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, + 'SELECT id, geom FROM edges', (SELECT ST_POINT(2.9, 1.8)), 0.5, cap => 2) $p$, diff --git a/docqueries/withPoints/withPoints.result b/docqueries/withPoints/withPoints.result index c9e26400a4f..abf8060e24b 100644 --- a/docqueries/withPoints/withPoints.result +++ b/docqueries/withPoints/withPoints.result @@ -7,63 +7,62 @@ SET /* -- q1 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, 10, - details => true); - seq | path_seq | node | edge | cost | agg_cost ------+----------+------+------+------+---------- - 1 | 1 | -1 | 1 | 0.6 | 0 - 2 | 2 | 6 | 4 | 0.7 | 0.6 - 3 | 3 | -6 | 4 | 0.3 | 1.3 - 4 | 4 | 7 | 8 | 1 | 1.6 - 5 | 5 | 11 | 9 | 1 | 2.6 - 6 | 6 | 16 | 16 | 1 | 3.6 - 7 | 7 | 15 | 3 | 1 | 4.6 - 8 | 8 | 10 | -1 | 0 | 5.6 -(8 rows) + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, 10, details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 + 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 + 3 | 3 | -1 | 10 | 6 | 4 | 0.7 | 1.4 + 4 | 4 | -1 | 10 | -6 | 4 | 0.3 | 2.1 + 5 | 5 | -1 | 10 | 7 | 8 | 1 | 2.4 + 6 | 6 | -1 | 10 | 11 | 9 | 1 | 3.4 + 7 | 7 | -1 | 10 | 16 | 16 | 1 | 4.4 + 8 | 8 | -1 | 10 | 15 | 3 | 1 | 5.4 + 9 | 9 | -1 | 10 | 10 | -1 | 0 | 6.4 +(9 rows) /* -- q2 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - -1, ARRAY[-3, 7], - directed => false); - seq | path_seq | end_pid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | -3 | -1 | 1 | 0.6 | 0 - 2 | 2 | -3 | 6 | 4 | 1 | 0.6 - 3 | 3 | -3 | 7 | 10 | 1 | 1.6 - 4 | 4 | -3 | 8 | 12 | 0.6 | 2.6 - 5 | 5 | -3 | -3 | -1 | 0 | 3.2 - 6 | 1 | 7 | -1 | 1 | 0.6 | 0 - 7 | 2 | 7 | 6 | 4 | 1 | 0.6 - 8 | 3 | 7 | 7 | -1 | 0 | 1.6 + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + -1, ARRAY[-3, 7], directed => false); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 0.6 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 1.6 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 2.6 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 3.2 + 6 | 1 | -1 | 7 | -1 | 1 | 0.6 | 0 + 7 | 2 | -1 | 7 | 6 | 4 | 1 | 0.6 + 8 | 3 | -1 | 7 | 7 | -1 | 0 | 1.6 (8 rows) /* -- q3 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', ARRAY[-1, 6], -3); - seq | path_seq | start_pid | node | edge | cost | agg_cost ------+----------+-----------+------+------+------+---------- - 1 | 1 | -1 | -1 | 1 | 0.6 | 0 - 2 | 2 | -1 | 6 | 4 | 1 | 0.6 - 3 | 3 | -1 | 7 | 10 | 1 | 1.6 - 4 | 4 | -1 | 8 | 12 | 0.6 | 2.6 - 5 | 5 | -1 | -3 | -1 | 0 | 3.2 - 6 | 1 | 6 | 6 | 4 | 1 | 0 - 7 | 2 | 6 | 7 | 10 | 1 | 1 - 8 | 3 | 6 | 8 | 12 | 0.6 | 2 - 9 | 4 | 6 | -3 | -1 | 0 | 2.6 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | -1 | -3 | -1 | 1 | 1.4 | 0 + 2 | 2 | -1 | -3 | 6 | 4 | 1 | 1.4 + 3 | 3 | -1 | -3 | 7 | 10 | 1 | 2.4 + 4 | 4 | -1 | -3 | 8 | 12 | 0.6 | 3.4 + 5 | 5 | -1 | -3 | -3 | -1 | 0 | 4 + 6 | 1 | 6 | -3 | 6 | 4 | 1 | 0 + 7 | 2 | 6 | -3 | 7 | 10 | 1 | 1 + 8 | 3 | 6 | -3 | 8 | 12 | 0.6 | 2 + 9 | 4 | 6 | -3 | -3 | -1 | 0 | 2.6 (9 rows) /* -- q4 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-1, 6], ARRAY[-3, 1]); - seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -1 | -3 | -1 | 1 | 0.6 | 0 2 | 2 | -1 | -3 | 6 | 4 | 1 | 0.6 @@ -88,10 +87,10 @@ SELECT * FROM pgr_withPoints( /* -- q5 */ SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', - driving_side => 'r', details => true); - seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost + 'r', details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -1 | 10 | -1 | 1 | 0.4 | 0 2 | 2 | -1 | 10 | 5 | 1 | 1 | 0.4 @@ -110,13 +109,12 @@ SELECT * FROM pgr_withPoints( (14 rows) /* -- q6 */ -SELECT * -FROM pgr_withPoints( +SELECT * FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r', details => true); - seq | path_seq | start_pid | end_pid | node | edge | cost | agg_cost + 'r', details => true); + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+----------+-----------+---------+------+------+------+---------- 1 | 1 | -1 | -6 | -1 | 1 | 0.4 | 0 2 | 2 | -1 | -6 | 5 | 1 | 1 | 0.4 @@ -184,42 +182,41 @@ FROM pgr_withPoints( (63 rows) /* -- q7 */ -SELECT (start_pid || ' -> ' || end_pid ||' at ' || path_seq || 'th step')::TEXT AS path_at, +SELECT (start_vid || ' -> ' || end_vid ||' at ' || path_seq || 'th step:')::TEXT AS path_at, CASE WHEN edge = -1 THEN ' visits' ELSE ' passes in front of' END as status, CASE WHEN node < 0 THEN 'Point' - ELSE 'Vertex' + ELSE 'Vertex' END as is_a, abs(node) as id FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r', details => true) + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'r', details => true) WHERE node IN (-6, 11); - path_at | status | is_a | id -----------------------+---------------------+--------+---- - -1 -> -6 at 4th step | visits | Point | 6 - -1 -> -3 at 4th step | passes in front of | Point | 6 - -1 -> -2 at 4th step | passes in front of | Point | 6 - -1 -> -2 at 6th step | passes in front of | Vertex | 11 - -1 -> 10 at 4th step | passes in front of | Point | 6 - -1 -> 10 at 6th step | passes in front of | Vertex | 11 - -1 -> 11 at 4th step | passes in front of | Point | 6 - -1 -> 11 at 6th step | visits | Vertex | 11 - 5 -> -6 at 3th step | visits | Point | 6 - 5 -> -3 at 3th step | passes in front of | Point | 6 - 5 -> -2 at 3th step | passes in front of | Point | 6 - 5 -> -2 at 5th step | passes in front of | Vertex | 11 - 5 -> 10 at 3th step | passes in front of | Point | 6 - 5 -> 10 at 5th step | passes in front of | Vertex | 11 - 5 -> 11 at 3th step | passes in front of | Point | 6 - 5 -> 11 at 5th step | visits | Vertex | 11 + path_at | status | is_a | id +-----------------------+---------------------+--------+---- + -1 -> -6 at 4th step: | visits | Point | 6 + -1 -> -3 at 4th step: | passes in front of | Point | 6 + -1 -> -2 at 4th step: | passes in front of | Point | 6 + -1 -> -2 at 6th step: | passes in front of | Vertex | 11 + -1 -> 10 at 4th step: | passes in front of | Point | 6 + -1 -> 10 at 6th step: | passes in front of | Vertex | 11 + -1 -> 11 at 4th step: | passes in front of | Point | 6 + -1 -> 11 at 6th step: | visits | Vertex | 11 + 5 -> -6 at 3th step: | visits | Point | 6 + 5 -> -3 at 3th step: | passes in front of | Point | 6 + 5 -> -2 at 3th step: | passes in front of | Point | 6 + 5 -> -2 at 5th step: | passes in front of | Vertex | 11 + 5 -> 10 at 3th step: | passes in front of | Point | 6 + 5 -> 10 at 5th step: | passes in front of | Vertex | 11 + 5 -> 11 at 3th step: | passes in front of | Point | 6 + 5 -> 11 at 5th step: | visits | Vertex | 11 (16 rows) /* -- q8 */ -SELECT (start_pid || ' => ' || end_pid ||' at ' || path_seq || 'th step')::TEXT AS path_at, +SELECT (start_vid || ' => ' || end_vid ||' at ' || path_seq || 'th step')::TEXT AS path_at, CASE WHEN edge = -1 THEN ' visits' ELSE ' passes in front of' END as status, @@ -229,16 +226,14 @@ SELECT (start_pid || ' => ' || end_pid ||' at ' || path_seq || 'th step')::TEXT abs(node) as id FROM pgr_withPoints( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'l', details => true) + 'SELECT pid, edge_id, fraction, side FROM pointsOfInterest', + ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], 'l', details => true) WHERE node IN (-6, 11); path_at | status | is_a | id ----------------------+---------------------+--------+---- -1 => -6 at 3th step | visits | Point | 6 -1 => -3 at 3th step | passes in front of | Point | 6 -1 => -2 at 3th step | passes in front of | Point | 6 - -1 => -2 at 5th step | passes in front of | Vertex | 11 -1 => 10 at 3th step | passes in front of | Point | 6 -1 => 10 at 5th step | passes in front of | Vertex | 11 -1 => 11 at 3th step | passes in front of | Point | 6 @@ -246,37 +241,36 @@ WHERE node IN (-6, 11); 5 => -6 at 4th step | visits | Point | 6 5 => -3 at 4th step | passes in front of | Point | 6 5 => -2 at 4th step | passes in front of | Point | 6 - 5 => -2 at 6th step | passes in front of | Vertex | 11 5 => 10 at 4th step | passes in front of | Point | 6 5 => 10 at 6th step | passes in front of | Vertex | 11 5 => 11 at 4th step | passes in front of | Point | 6 5 => 11 at 6th step | visits | Vertex | 11 -(16 rows) +(14 rows) /* -- q9 */ SELECT * FROM pgr_withPoints( $e$ SELECT * FROM edges $e$, $p$ SELECT edge_id, round(fraction::numeric, 2) AS fraction, side FROM pgr_findCloseEdges( - $$SELECT id, geom FROM edges$$, + 'SELECT id, geom FROM edges', (SELECT ST_POINT(2.9, 1.8)), 0.5, cap => 2) $p$, 1, ARRAY[-1, -2]); - seq | path_seq | end_pid | node | edge | cost | agg_cost ------+----------+---------+------+------+------+---------- - 1 | 1 | -2 | 1 | 6 | 1 | 0 - 2 | 2 | -2 | 3 | 7 | 1 | 1 - 3 | 3 | -2 | 7 | 8 | 0.9 | 2 - 4 | 4 | -2 | -2 | -1 | 0 | 2.9 - 5 | 1 | -1 | 1 | 6 | 1 | 0 - 6 | 2 | -1 | 3 | 7 | 1 | 1 - 7 | 3 | -1 | 7 | 8 | 1 | 2 - 8 | 4 | -1 | 11 | 9 | 1 | 3 - 9 | 5 | -1 | 16 | 16 | 1 | 4 - 10 | 6 | -1 | 15 | 3 | 1 | 5 - 11 | 7 | -1 | 10 | 5 | 0.8 | 6 - 12 | 8 | -1 | -1 | -1 | 0 | 6.8 + seq | path_seq | start_vid | end_vid | node | edge | cost | agg_cost +-----+----------+-----------+---------+------+------+------+---------- + 1 | 1 | 1 | -2 | 1 | 6 | 1 | 0 + 2 | 2 | 1 | -2 | 3 | 7 | 1 | 1 + 3 | 3 | 1 | -2 | 7 | 8 | 0.9 | 2 + 4 | 4 | 1 | -2 | -2 | -1 | 0 | 2.9 + 5 | 1 | 1 | -1 | 1 | 6 | 1 | 0 + 6 | 2 | 1 | -1 | 3 | 7 | 1 | 1 + 7 | 3 | 1 | -1 | 7 | 8 | 1 | 2 + 8 | 4 | 1 | -1 | 11 | 9 | 1 | 3 + 9 | 5 | 1 | -1 | 16 | 16 | 1 | 4 + 10 | 6 | 1 | -1 | 15 | 3 | 1 | 5 + 11 | 7 | 1 | -1 | 10 | 5 | 0.8 | 6 + 12 | 8 | 1 | -1 | -1 | -1 | 0 | 6.8 (12 rows) /* -- q10 */ diff --git a/docqueries/withPoints/withPointsCost.pg b/docqueries/withPoints/withPointsCost.pg index 1a625cd941a..1c029a3ce8c 100644 --- a/docqueries/withPoints/withPointsCost.pg +++ b/docqueries/withPoints/withPointsCost.pg @@ -21,25 +21,25 @@ SELECT * FROM pgr_withPointsCost( SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-1, 6], ARRAY[-3, 1]); + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); /* -- q5 */ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', - driving_side => 'r'); + 'r'); /* -- q6 */ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r'); + 'r'); /* -- q7 */ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'l'); + 'l'); /* -- q8 */ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', diff --git a/docqueries/withPoints/withPointsCost.result b/docqueries/withPoints/withPointsCost.result index e439595bd28..d5f038f2f79 100644 --- a/docqueries/withPoints/withPointsCost.result +++ b/docqueries/withPoints/withPointsCost.result @@ -9,9 +9,9 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, 10); - start_pid | end_pid | agg_cost + start_vid | end_vid | agg_cost -----------+---------+---------- - -1 | 10 | 5.6 + -1 | 10 | 6.4 (1 row) /* -- q2 */ @@ -20,7 +20,7 @@ SELECT * FROM pgr_withPointsCost( 'SELECT pid, edge_id, fraction, side from pointsOfInterest', -1, ARRAY[-3, 7], directed => false); - start_pid | end_pid | agg_cost + start_vid | end_vid | agg_cost -----------+---------+---------- -1 | -3 | 3.2 -1 | 7 | 1.6 @@ -31,9 +31,9 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[-1, 6], -3); - start_pid | end_pid | agg_cost + start_vid | end_vid | agg_cost -----------+---------+---------- - -1 | -3 | 3.2 + -1 | -3 | 4 6 | -3 | 2.6 (2 rows) @@ -41,8 +41,8 @@ SELECT * FROM pgr_withPointsCost( SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-1, 6], ARRAY[-3, 1]); - start_pid | end_pid | agg_cost + ARRAY[-1, 6], ARRAY[-3, 1], 'L'); + start_vid | end_vid | agg_cost -----------+---------+---------- -1 | -3 | 3.2 -1 | 1 | 3.6 @@ -55,8 +55,8 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', 'SELECT * FROM (VALUES (-1, 10), (6, -3)) AS combinations(source, target)', - driving_side => 'r'); - start_pid | end_pid | agg_cost + 'r'); + start_vid | end_vid | agg_cost -----------+---------+---------- -1 | 10 | 6.4 6 | -3 | 2.6 @@ -67,8 +67,8 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'r'); - start_pid | end_pid | agg_cost + 'r'); + start_vid | end_vid | agg_cost -----------+---------+---------- -1 | -6 | 2.1 -1 | -3 | 4 @@ -87,8 +87,8 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11], - driving_side => 'l'); - start_pid | end_pid | agg_cost + 'l'); + start_vid | end_vid | agg_cost -----------+---------+---------- -1 | -6 | 1.3 -1 | -3 | 3.2 @@ -107,13 +107,13 @@ SELECT * FROM pgr_withPointsCost( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction, side from pointsOfInterest', ARRAY[5, -1], ARRAY[-2, -3, -6, 10, 11]); - start_pid | end_pid | agg_cost + start_vid | end_vid | agg_cost -----------+---------+---------- - -1 | -6 | 1.3 - -1 | -3 | 3.2 - -1 | -2 | 4 - -1 | 10 | 5.6 - -1 | 11 | 2.6 + -1 | -6 | 2.1 + -1 | -3 | 4 + -1 | -2 | 4.8 + -1 | 10 | 6.4 + -1 | 11 | 3.4 5 | -6 | 1.7 5 | -3 | 3.6 5 | -2 | 4.4 @@ -131,7 +131,7 @@ SELECT * FROM pgr_withPointsCost( 0.5, cap => 2) $p$, 1, ARRAY[-1, -2]); - start_pid | end_pid | agg_cost + start_vid | end_vid | agg_cost -----------+---------+---------- 1 | -2 | 2.9 1 | -1 | 6.8 diff --git a/docqueries/withPoints/withPointsCostMatrix.pg b/docqueries/withPoints/withPointsCostMatrix.pg index aa28062d911..c576f355e30 100644 --- a/docqueries/withPoints/withPointsCostMatrix.pg +++ b/docqueries/withPoints/withPointsCostMatrix.pg @@ -12,7 +12,7 @@ SELECT * FROM pgr_TSP( SELECT * FROM pgr_withPointsCostMatrix( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 10, 11, -6], directed := false); + array[-1, 10, 11, -6], directed => false); $$ ); /* -- q3 */ diff --git a/docqueries/withPoints/withPointsCostMatrix.result b/docqueries/withPoints/withPointsCostMatrix.result index 8ee9a418c99..3af8aeb9da1 100644 --- a/docqueries/withPoints/withPointsCostMatrix.result +++ b/docqueries/withPoints/withPointsCostMatrix.result @@ -31,11 +31,9 @@ SELECT * FROM pgr_TSP( SELECT * FROM pgr_withPointsCostMatrix( 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', 'SELECT pid, edge_id, fraction from pointsOfInterest', - array[-1, 10, 11, -6], directed := false); + array[-1, 10, 11, -6], directed => false); $$ ); -NOTICE: pgr_TSP no longer solving with simulated annaeling -HINT: Ignoring annaeling parameters seq | node | cost | agg_cost -----+------+------+---------- 1 | -6 | 0 | 0 @@ -58,15 +56,15 @@ SELECT * FROM pgr_withPointsCostMatrix( start_vid | end_vid | agg_cost -----------+---------+---------- -2 | -1 | 3.9 - -2 | 5 | 2.9 + -2 | 5 | 3.1 -2 | 10 | 3.1 - -1 | -2 | 0.3 + -1 | -2 | 2.1 -1 | 5 | 3.2 -1 | 10 | 3.2 5 | -2 | 2.9 5 | -1 | 6.8 5 | 10 | 6 - 10 | -2 | 1.1 + 10 | -2 | 2.9 10 | -1 | 0.8 10 | 5 | 2 (12 rows) diff --git a/docqueries/withPoints/withPointsVia.pg b/docqueries/withPoints/withPointsVia.pg index fdd6613df17..462d1f104b8 100644 --- a/docqueries/withPoints/withPointsVia.pg +++ b/docqueries/withPoints/withPointsVia.pg @@ -3,37 +3,37 @@ SET extra_float_digits=-3; /* -- q0 */ SELECT * FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-6, 15, -1]); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', + ARRAY[-6, 15, -5]); /* -- q1 */ SELECT * FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]); /* -- q2 */ SELECT agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE path_id = 3 AND edge < 0; /* -- q3 */ SELECT route_agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE path_id = 3 AND edge < 0; /* -- q4 */ SELECT row_number() over () as node_seq, node FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE edge <> -1 ORDER BY seq; /* -- q5 */ SELECT path_id, route_agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE edge < 0; /* -- q6 */ @@ -42,8 +42,8 @@ CASE WHEN edge = -1 THEN 'visits' ELSE 'passes in front' END as status FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15], details => true) WHERE agg_cost <> 0 or seq = 1; /* -- q7 */ diff --git a/docqueries/withPoints/withPointsVia.result b/docqueries/withPoints/withPointsVia.result index a69f59e74c3..d2ef890157c 100644 --- a/docqueries/withPoints/withPointsVia.result +++ b/docqueries/withPoints/withPointsVia.result @@ -6,9 +6,9 @@ SET extra_float_digits=-3; SET /* -- q0 */ SELECT * FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', - ARRAY[-6, 15, -1]); + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', + ARRAY[-6, 15, -5]); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost -----+---------+----------+-----------+---------+------+------+------+----------+---------------- 1 | 1 | 1 | -6 | 15 | -6 | 4 | 0.3 | 0 | 0 @@ -16,37 +16,36 @@ SELECT * FROM pgr_withPointsVia( 3 | 1 | 3 | -6 | 15 | 11 | 9 | 1 | 1.3 | 1.3 4 | 1 | 4 | -6 | 15 | 16 | 16 | 1 | 2.3 | 2.3 5 | 1 | 5 | -6 | 15 | 15 | -1 | 0 | 3.3 | 3.3 - 6 | 2 | 1 | 15 | -1 | 15 | 3 | 1 | 0 | 3.3 - 7 | 2 | 2 | 15 | -1 | 10 | 2 | 1 | 1 | 4.3 - 8 | 2 | 3 | 15 | -1 | 6 | 1 | 0.6 | 2 | 5.3 - 9 | 2 | 4 | 15 | -1 | -1 | -2 | 0 | 2.6 | 5.9 -(9 rows) + 6 | 2 | 1 | 15 | -5 | 15 | 3 | 1 | 0 | 3.3 + 7 | 2 | 2 | 15 | -5 | 10 | 5 | 0.8 | 1 | 4.3 + 8 | 2 | 3 | 15 | -5 | -5 | -2 | 0 | 1.8 | 5.1 +(8 rows) /* -- q1 */ SELECT * FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost | route_agg_cost -----+---------+----------+-----------+---------+------+------+------+----------+---------------- - 1 | 1 | 1 | -1 | 7 | -1 | 1 | 0.6 | 0 | 0 - 2 | 1 | 2 | -1 | 7 | 6 | 4 | 1 | 0.6 | 0.6 - 3 | 1 | 3 | -1 | 7 | 7 | -1 | 0 | 1.6 | 1.6 - 4 | 2 | 1 | 7 | -3 | 7 | 10 | 1 | 0 | 1.6 - 5 | 2 | 2 | 7 | -3 | 8 | 12 | 0.6 | 1 | 2.6 - 6 | 2 | 3 | 7 | -3 | -3 | -1 | 0 | 1.6 | 3.2 - 7 | 3 | 1 | -3 | 16 | -3 | 12 | 0.4 | 0 | 3.2 - 8 | 3 | 2 | -3 | 16 | 12 | 13 | 1 | 0.4 | 3.6 - 9 | 3 | 3 | -3 | 16 | 17 | 15 | 1 | 1.4 | 4.6 - 10 | 3 | 4 | -3 | 16 | 16 | -1 | 0 | 2.4 | 5.6 - 11 | 4 | 1 | 16 | 15 | 16 | 16 | 1 | 0 | 5.6 - 12 | 4 | 2 | 16 | 15 | 15 | -2 | 0 | 1 | 6.6 + 1 | 1 | 1 | -1 | 7 | -1 | 1 | 1.4 | 0 | 0 + 2 | 1 | 2 | -1 | 7 | 6 | 4 | 1 | 1.4 | 1.4 + 3 | 1 | 3 | -1 | 7 | 7 | -1 | 0 | 2.4 | 2.4 + 4 | 2 | 1 | 7 | -3 | 7 | 10 | 1 | 0 | 2.4 + 5 | 2 | 2 | 7 | -3 | 8 | 12 | 0.6 | 1 | 3.4 + 6 | 2 | 3 | 7 | -3 | -3 | -1 | 0 | 1.6 | 4 + 7 | 3 | 1 | -3 | 16 | -3 | 12 | 0.4 | 0 | 4 + 8 | 3 | 2 | -3 | 16 | 12 | 13 | 1 | 0.4 | 4.4 + 9 | 3 | 3 | -3 | 16 | 17 | 15 | 1 | 1.4 | 5.4 + 10 | 3 | 4 | -3 | 16 | 16 | -1 | 0 | 2.4 | 6.4 + 11 | 4 | 1 | 16 | 15 | 16 | 16 | 1 | 0 | 6.4 + 12 | 4 | 2 | 16 | 15 | 15 | -2 | 0 | 1 | 7.4 (12 rows) /* -- q2 */ SELECT agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE path_id = 3 AND edge < 0; agg_cost @@ -56,20 +55,20 @@ WHERE path_id = 3 AND edge < 0; /* -- q3 */ SELECT route_agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE path_id = 3 AND edge < 0; route_agg_cost ---------------- - 5.6 + 6.4 (1 row) /* -- q4 */ SELECT row_number() over () as node_seq, node FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE edge <> -1 ORDER BY seq; node_seq | node @@ -87,16 +86,16 @@ WHERE edge <> -1 ORDER BY seq; /* -- q5 */ SELECT path_id, route_agg_cost FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15]) WHERE edge < 0; path_id | route_agg_cost ---------+---------------- - 1 | 1.6 - 2 | 3.2 - 3 | 5.6 - 4 | 6.6 + 1 | 2.4 + 2 | 4 + 3 | 6.4 + 4 | 7.4 (4 rows) /* -- q6 */ @@ -105,21 +104,21 @@ CASE WHEN edge = -1 THEN 'visits' ELSE 'passes in front' END as status FROM pgr_withPointsVia( - 'SELECT id, source, target, cost, reverse_cost FROM edges order by id', - 'SELECT pid, edge_id, fraction, side from pointsOfInterest', + 'SELECT id, source, target, cost, reverse_cost FROM edges ORDER BY id', + 'SELECT pid, edge_id, side, fraction FROM pointsOfInterest', ARRAY[-1, 7, -3, 16, 15], details => true) WHERE agg_cost <> 0 or seq = 1; seq | node | status -----+------+----------------- 1 | -1 | passes in front - 2 | 6 | passes in front - 3 | -6 | passes in front - 4 | 7 | visits - 6 | 8 | passes in front - 7 | -3 | visits - 9 | 12 | passes in front - 10 | 17 | passes in front - 11 | -2 | passes in front + 2 | 5 | passes in front + 3 | 6 | passes in front + 4 | -6 | passes in front + 5 | 7 | visits + 7 | 8 | passes in front + 8 | -3 | visits + 10 | 12 | passes in front + 11 | 17 | passes in front 12 | 16 | visits 14 | 15 | passes in front (11 rows) @@ -146,9 +145,10 @@ SELECT * FROM pgr_withPointsVia( 8 | 1 | 8 | 1 | -1 | 10 | 5 | 0.8 | 6 | 6 9 | 1 | 9 | 1 | -1 | -1 | -1 | 0 | 6.8 | 6.8 10 | 2 | 1 | -1 | -2 | -1 | 5 | 0.2 | 0 | 6.8 - 11 | 2 | 2 | -1 | -2 | 11 | 8 | 0.1 | 0.2 | 7 - 12 | 2 | 3 | -1 | -2 | -2 | -2 | 0 | 0.3 | 7.1 -(12 rows) + 11 | 2 | 2 | -1 | -2 | 11 | 8 | 1 | 0.2 | 7 + 12 | 2 | 3 | -1 | -2 | 7 | 8 | 0.9 | 1.2 | 8 + 13 | 2 | 4 | -1 | -2 | -2 | -2 | 0 | 2.1 | 8.9 +(13 rows) /* -- q8 */ ROLLBACK; diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt index d3ce93aaa5a..0ec31c7e137 100644 --- a/doxygen/CMakeLists.txt +++ b/doxygen/CMakeLists.txt @@ -1,22 +1,19 @@ -# -# Based on: -# https://majewsky.wordpress.com/2010/08/14/tip-of-the-day-cmake-and-doxygen/ -# +# Main changes +# developers is build by default unless other wise stated -option(BUILD_DOXY - "Set ON|OFF (default=OFF) to build Developers Documentation" ON) +option(BUILD_DOXY "Set ON|OFF (default=ON) to build Developers Documentation" ON) -if (BUILD_DOXY AND WITH_DOC) - message(STATUS "Developers documentation.") +if (BUILD_DOXY) find_package(Doxygen ${DOXYGEN_MINIMUM_VERSION}) - if(DOXYGEN_FOUND) + if(Doxygen_FOUND) + message(STATUS "DOXYGEN_VERSION=${DOXYGEN_VERSION}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) - add_custom_target(doxy - ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + doxygen_add_docs(doxy ALL USE_STAMP_FILE WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMENT "Generating API documentation with Doxygen" VERBATIM - ) + COMMENT "Generating API documentation with Doxygen" + CONFIG_FILE ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + ) endif() endif() diff --git a/doxygen/Doxyfile.in b/doxygen/Doxyfile.in index 516939a811a..7542ec17119 100644 --- a/doxygen/Doxyfile.in +++ b/doxygen/Doxyfile.in @@ -1,2287 +1,354 @@ -# Doxyfile 1.8.7 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). +# Doxyfile 1.9.8 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "@PROJECT_NAME@" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = "@PROJECT_SHORT_VERSION@" - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "@PROJECT_BRIEF@" - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - +PROJECT_NAME = @PROJECT_NAME@ +PROJECT_NUMBER = @PROJECT_SHORT_VERSION@ +PROJECT_BRIEF = @PROJECT_BRIEF@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/../doc/_static/images/pgrouting-logo.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@ - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -#ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - +CREATE_SUBDIRS_LEVEL = 8 +ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - ALWAYS_DETAILED_SEC = YES - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - INLINE_INHERITED_MEMB = YES - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - FULL_PATH_NAMES = NO - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - +JAVADOC_BANNER = NO QT_AUTOBRIEF = YES - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - +PYTHON_DOCSTRING = INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - +OPTIMIZE_OUTPUT_SLICE = NO EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - +TOC_INCLUDE_HEADINGS = 5 +MARKDOWN_ID_STYLE = DOXYGEN AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - BUILTIN_STL_SUPPORT = YES - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - +GROUP_NESTED_COMPOUNDS = NO SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - LOOKUP_CACHE_SIZE = 0 - +NUM_PROC_THREADS = 1 +TIMESTAMP = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - EXTRACT_PRIVATE = YES - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - +EXTRACT_PRIV_VIRTUAL = NO EXTRACT_PACKAGE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - EXTRACT_ANON_NSPACES = YES - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - +RESOLVE_UNNAMED_PARAMS = YES HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - +HIDE_COMPOUND_REFERENCE= NO +SHOW_HEADERFILE = YES SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader - -# The default value is: NO. - SHOW_GROUPED_MEMB_INC = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - FORCE_LOCAL_INCLUDES = YES - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - SORT_BRIEF_DOCS = YES - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - SORT_MEMBERS_CTORS_1ST = YES - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - SORT_BY_SCOPE_NAME = YES - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - STRICT_PROTO_MATCHING = YES - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - +HIDE_UNDOC_NAMESPACES = YES FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - CITE_BIB_FILES = - #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - QUIET = YES - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - +WARN_IF_INCOMPLETE_DOC = YES WARN_NO_PARAMDOC = YES - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - +WARN_IF_UNDOC_ENUM_VAL = NO +WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = ./LOG - +WARN_LINE_FORMAT = "at line $line of file $file." +WARN_LOGFILE = ../DOXYLOG #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = @CMAKE_CURRENT_SOURCE_DIR@/../src @CMAKE_CURRENT_SOURCE_DIR@/../include @CMAKE_CURRENT_SOURCE_DIR@ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - +INPUT = @CMAKE_SOURCE_DIR@/src \ + @CMAKE_SOURCE_DIR@/include \ + @CMAKE_SOURCE_DIR@/README.md INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - +INPUT_FILE_ENCODING = FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = @CMAKE_CURRENT_SOURCE_DIR@/../include/boost -# ../../tools ../../doc ../../build ../../cmake ../../.tx - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - +EXCLUDE = EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = */notUsed/* */test/* */src/trsp/doc/README.md - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - +EXCLUDE_PATTERNS = EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/../doc/_static/images/developers \ @CMAKE_CURRENT_SOURCE_DIR@/../doc/contraction/images - - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = ../../README.md - +USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_SOURCE_DIR@/../README.md +FORTRAN_COMMENT_AFTER = 72 #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - VERBATIM_HEADERS = YES - +CLANG_ASSISTED_PARSING = NO +CLANG_ADD_INC_PATHS = YES +CLANG_OPTIONS = +CLANG_DATABASE_PATH = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - ALPHABETICAL_INDEX = YES - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - IGNORE_PREFIX = - #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - +HTML_COLORSTYLE = AUTO_LIGHT HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - +HTML_DYNAMIC_MENUS = YES HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - +HTML_CODE_FOLDING = YES HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - +DOCSET_FEEDURL = DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - +SITEMAP_URL = GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - +FULL_SIDEBAR = NO ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - EXT_LINKS_IN_WINDOW = YES - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - +OBFUSCATE_EMAILS = YES +HTML_FORMULA_FORMAT = png FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANSPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - +FORMULA_MACROFILE = USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - +MATHJAX_VERSION = MathJax_2 MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /