diff --git a/.github/scripts/update_locale.sh b/.github/scripts/update_locale.sh index 119704a59..c9788b868 100755 --- a/.github/scripts/update_locale.sh +++ b/.github/scripts/update_locale.sh @@ -1,5 +1,4 @@ #!/bin/bash -# ------------------------------------------------------------------------------ # /*PGR-GNU***************************************************************** # File: update_locale.sh # Copyright (c) 2021 pgRouting developers @@ -17,7 +16,6 @@ # 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*/ -# ------------------------------------------------------------------------------ DIR=$(git rev-parse --show-toplevel) @@ -25,7 +23,7 @@ pushd "${DIR}" > /dev/null || exit 1 mkdir -p build pushd build > /dev/null || exit 1 -cmake -DLOCALE=ON .. +cmake -DBUILD_HTML=OFF -DBUILD_LOCALE=ON .. make locale popd > /dev/null || exit 1 @@ -33,16 +31,19 @@ popd > /dev/null || exit 1 # List all the files that needs to be committed in build/docs/locale_changes.txt awk '/^Update|^Create/{print $2}' build/docs/locale_changes.txt > build/docs/locale_changes_po.txt # .po files cp build/docs/locale_changes_po.txt build/docs/locale_changes_po_pot.txt -perl -ne '/\/en\// && print' build/docs/locale_changes_po.txt | \ + +if [ -s build/docs/locale_changes_po.txt ]; then + + perl -ne '/\/en\// && print' build/docs/locale_changes_po.txt | \ perl -pe 's/(.*)en\/LC_MESSAGES(.*)/$1pot$2t/' >> build/docs/locale_changes_po_pot.txt # .pot files -# Do not create empty translation files -git status locale/es --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf -git status locale/ja --porcelain | awk 'match($1, "?"){print $2}' | xargs -r rm -rf +fi # Remove obsolete entries #~ from .po files -bash .github/scripts/remove_obsolete_entries.sh +find locale -type f -name '*.po' -exec sh -c ' + msgattrib --no-obsolete -o "$1" "$1" + ' sh {} \; -cat build/docs/locale_changes_po_pot.txt | xargs -I {} sh -c "(ls {} >> /dev/null 2>&1 && git add {} )" +while read -r f; do git add "$f"; done < build/docs/locale_changes_po_pot.txt popd > /dev/null || exit 1 diff --git a/.github/workflows/locale.yml b/.github/workflows/locale.yml index bf317eb29..8fa952850 100644 --- a/.github/workflows/locale.yml +++ b/.github/workflows/locale.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -55,6 +55,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y osm2pgrouting \ + gettext \ postgresql-${PGVER}-postgis-${PGIS} \ postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-${PGVER}-pgrouting @@ -74,8 +75,6 @@ jobs: sudo -u postgres psql -c 'CREATE ROLE "user" SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN PASSWORD $$user$$;' -d setup echo :5432:*:user:user >> .pgpass mkdir build - cd build - cmake -DLOCALE=ON .. env: POSTGRES_HOST: localhost POSTGRES_PORT: 5432 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 634c81a4f..d257aa073 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Get postgres version run: | diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index ff9a7353f..20dc387ff 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -83,7 +83,7 @@ jobs: - name: Build run: | cd build - make -j 4 + make doc - name: Initialize mandatory git config run: | @@ -95,7 +95,7 @@ jobs: if [[ "${{ env.BRANCH }}" == "develop" ]]; then FOLDER_NAME="dev" elif [[ "${{ env.BRANCH }}" == "main" ]]; then - FOLDER_NAME="3.0" + FOLDER_NAME="3.1" fi git checkout -f origin/gh-pages git checkout -b gh-pages diff --git a/.tx/config b/.tx/config deleted file mode 100644 index a0e259dff..000000000 --- a/.tx/config +++ /dev/null @@ -1,159 +0,0 @@ -[main] -host = https://www.transifex.com - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-advanced-chapter-12-po--develop] -file_filter = locale//LC_MESSAGES/advanced/chapter-12.po -source_file = locale/pot/advanced/chapter-12.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-appendix-appendix-2-po--develop] -file_filter = locale//LC_MESSAGES/appendix/appendix-2.po -source_file = locale/pot/appendix/appendix-2.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-appendix-appendix-3-po--develop] -file_filter = locale//LC_MESSAGES/appendix/appendix-3.po -source_file = locale/pot/appendix/appendix-3.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-appendix-appendix-4-po--develop] -file_filter = locale//LC_MESSAGES/appendix/appendix-4.po -source_file = locale/pot/appendix/appendix-4.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-appendix-po--develop] -file_filter = locale//LC_MESSAGES/basic/appendix.po -source_file = locale/pot/basic/appendix.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-data-po--develop] -file_filter = locale//LC_MESSAGES/basic/data.po -source_file = locale/pot/basic/data.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-pedestrian-po--develop] -file_filter = locale//LC_MESSAGES/basic/pedestrian.po -source_file = locale/pot/basic/pedestrian.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-plpgsql-function-po--develop] -file_filter = locale//LC_MESSAGES/basic/plpgsql_function.po -source_file = locale/pot/basic/plpgsql_function.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-sql-function-po--develop] -file_filter = locale//LC_MESSAGES/basic/sql_function.po -source_file = locale/pot/basic/sql_function.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-basic-vehicle-po--develop] -file_filter = locale//LC_MESSAGES/basic/vehicle.po -source_file = locale/pot/basic/vehicle.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-examples-boost-dijkstra-po--develop] -file_filter = locale//LC_MESSAGES/examples/boost_dijkstra.po -source_file = locale/pot/examples/boost_dijkstra.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-examples-hanoslav-po--develop] -file_filter = locale//LC_MESSAGES/examples/hanoslav.po -source_file = locale/pot/examples/hanoslav.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-examples-wiki-example-po--develop] -file_filter = locale//LC_MESSAGES/examples/wiki_example.po -source_file = locale/pot/examples/wiki_example.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-general-intro-chapter-1-po--develop] -file_filter = locale//LC_MESSAGES/general-intro/chapter-1.po -source_file = locale/pot/general-intro/chapter-1.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-general-intro-chapter-2-po--develop] -file_filter = locale//LC_MESSAGES/general-intro/chapter-2.po -source_file = locale/pot/general-intro/chapter-2.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-general-intro-chapter-3-po--develop] -file_filter = locale//LC_MESSAGES/general-intro/chapter-3.po -source_file = locale/pot/general-intro/chapter-3.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-index-po--develop] -file_filter = locale//LC_MESSAGES/index.po -source_file = locale/pot/index.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-interactions-chapter-10-po--develop] -file_filter = locale//LC_MESSAGES/interactions/chapter-10.po -source_file = locale/pot/interactions/chapter-10.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-interactions-chapter-11-po--develop] -file_filter = locale//LC_MESSAGES/interactions/chapter-11.po -source_file = locale/pot/interactions/chapter-11.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-interactions-chapter-9-po--develop] -file_filter = locale//LC_MESSAGES/interactions/chapter-9.po -source_file = locale/pot/interactions/chapter-9.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-appendix-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/appendix.po -source_file = locale/pot/un-sdg/appendix.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-data-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/data.po -source_file = locale/pot/un-sdg/data.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-introduction-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/introduction.po -source_file = locale/pot/un-sdg/introduction.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-sdg11-cities-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/sdg11-cities.po -source_file = locale/pot/un-sdg/sdg11-cities.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-sdg3-health-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/sdg3-health.po -source_file = locale/pot/un-sdg/sdg3-health.pot -source_lang = en -type = PO - -[o:pgrouting:p:pgrouting-workshop:r:locale-en-lc-messages-un-sdg-sdg7-energy-po--develop] -file_filter = locale//LC_MESSAGES/un_sdg/sdg7-energy.po -source_file = locale/pot/un-sdg/sdg7-energy.pot -source_lang = en -type = PO - diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d91641d..7ad1b3ea3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,13 +16,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") #--------------------------------------------- # Setting the version number #--------------------------------------------- -set(PGR_WORKSHOP_CITY "Belém") +set(PGR_WORKSHOP_CITY "Auckland") set(WORKSHOP_AREA "FOSS4G ${PGR_WORKSHOP_CITY}") -set(COPYRIGHT "2010-2024 pgRouting Developers") +set(COPYRIGHT "2010-2025 pgRouting Developers") set(PGR_WORKSHOP_VERSION_MAJOR "3") -set(PGR_WORKSHOP_VERSION_MINOR "0") -set(PGR_WORKSHOP_VERSION_PATCH "1") -set(PGR_WORKSHOP_VERSION_DEV "") +set(PGR_WORKSHOP_VERSION_MINOR "1") +set(PGR_WORKSHOP_VERSION_PATCH "0") +set(PGR_WORKSHOP_VERSION_DEV "-dev") set(PGR_WORKSHOP_VERSION "${PGR_WORKSHOP_VERSION_MAJOR}.${PGR_WORKSHOP_VERSION_MINOR}") set(PGR_WORKSHOP_RELEASE "${PGR_WORKSHOP_VERSION_MAJOR}.${PGR_WORKSHOP_VERSION_MINOR}.${PGR_WORKSHOP_VERSION_PATCH}${PGR_WORKSHOP_VERSION_DEV}") set(PGR_WORKSHOP_NAME "pgRouting workshop") @@ -45,53 +45,47 @@ option(PGR_WORKSHOP_VERBOSE_DEBUG #--------------------------------------------- # CONFIGURATION #--------------------------------------------- -set(PGR_WORKSHOP_CITY_FILE "BELEM_BR") +set(PGR_WORKSHOP_CITY_FILE "AUCKLAND_NZ") # https://github.com/OSGeo/OSGeoLive/blob/master/bin/install_osm.sh # around line 117 -set(PGR_WORKSHOP_CITY_BBOX "-48.52,-1.49,-48.4,-1.36") +set(PGR_WORKSHOP_CITY_BBOX "-36.8798,174.8,-36.8344,174.72") # Make it smaller -set(PGR_WORKSHOP_LITTLE_NET_BBOX "-48.52,-1.46,-48.45,-1.41") +set(PGR_WORKSHOP_LITTLE_NET_BBOX "174.775,-36.855,174.76,-36.84") # Use git blame to get the date when the line was changed -set(PGR_WORKSHOP_DOWNLOAD_DIR "workshop-2024") -set(DATE_OF_DATA "Sep 2024") +set(PGR_WORKSHOP_DOWNLOAD_DIR "workshop-2025") +set(DATE_OF_DATA "Jun 2025") if (WORKSHOP_DEBUG) message(STATUS "WORKSHOP_CITY_FILE=${WORKSHOP_CITY_FILE}") endif() -set(OSMID_1 "10982869752") -set(OSMID_2 "11818739588") -set(OSMID_3 "491465035") -set(OSMID_4 "1069202329") -set(OSMID_5 "5661895682") - -set(LAT1 "-1.422066") -set(LON1 "-48.45665") - +set(OSMID_1 "9451619540") +set(OSMID_2 "60662678") +set(OSMID_3 "11045827672") +set(OSMID_4 "9452115611") +set(OSMID_5 "11045833969") # 3->1: routes for vehicles with penalty & no penalty must be different -set(PLACE_1 "Hangar Convention Center") -set(PLACE_2 "Instituto Federal do Pará, Campus Belém") -set(PLACE_3 "Palacete Bolonha") -set(PLACE_4 "Forte do Castelo") -set(PLACE_5 "Estação das Docas") - +set(PLACE_1 "Auckland University of Technology") +set(PLACE_2 "The Band Rotunda") +set(PLACE_3 "Four Points by Sheraton") +set(PLACE_4 "Sky tower") +set(PLACE_5 "Emily Place Reserve") -set(POINT1_LAT "-1.455829") -set(POINT1_LON "-48.446044") -set(POINT2_LAT "-1.453448") -set(POINT2_LON "-48.447142") -# by chapters set(CH7_PLACE_1 ${PLACE_5}) +set(CH7_ID_1 ${OSMID_5}) set(CH7_PLACE_2 ${PLACE_1}) -set(CH7_OSMID_1 ${OSMID_5}) -set(CH7_OSMID_2 ${OSMID_1}) +set(CH7_ID_2 ${OSMID_1}) +set(POINT1_LAT "-36.850329") +set(POINT1_LON "174.763094") +set(POINT2_LAT "-36.853675") +set(POINT2_LON "174.764448") #--------------------------------------------- # minimum versions diff --git a/REQUIREMENTS.txt b/REQUIREMENTS.txt index 7f8bb9084..37608c95d 100644 --- a/REQUIREMENTS.txt +++ b/REQUIREMENTS.txt @@ -2,3 +2,4 @@ Sphinx>4.0.0 sphinx_bootstrap_theme>=0.4 sphinx-intl sphinx-collapse +sphinx-copybutton diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index afd25b383..ec52e2550 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -43,68 +43,73 @@ add_subdirectory(_themes) set(SPHINX_DOCUMENTATION_DIR "${CMAKE_CURRENT_BINARY_DIR}") set(SPHINX_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build") +foreach (format ${PGR_WORKSHOP_DOC_TARGETS}) -# build the locale files -if (LOCALE) - add_custom_target(locale ALL - COMMAND ${SPHINX_EXECUTABLE} + message(STATUS "format=${format}") + if ("${format}" STREQUAL "locale") - -b gettext + find_program(SPHINX_INTL_EXECUTABLE + NAMES sphinx-intl + DOC "Sphinx Documentation Builder (sphinx-doc.org)" + ) - # the location of the documentation to be build - "${CMAKE_CURRENT_BINARY_DIR}" - "${CMAKE_SOURCE_DIR}/locale/pot" + if (SPHINX_INTL_EXECUTABLE) - COMMAND sphinx-intl update -d ${CMAKE_SOURCE_DIR}/locale -l ${SPHINXINTL_LANGUAGE} > locale_changes.txt - DEPENDS "conf.py" + add_custom_target(locale + COMMAND ${SPHINX_EXECUTABLE} + -b gettext + -c "${SPHINX_DOCUMENTATION_DIR}" + "${SPHINX_DOCUMENTATION_DIR}" + "${CMAKE_SOURCE_DIR}/locale/pot" - COMMENT "Generating POT & PO files ..." - ) - add_dependencies(locale examples general-intro advanced appendix basic un_sdg scripts interactions) - add_dependencies(doc locale) -endif() + 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}) + add_dependencies("${format}" examples general-intro advanced appendix basic un_sdg scripts interactions) + add_dependencies(doc "${format}") -foreach (target ${PGR_WORKSHOP_DOC_TARGETS}) - add_custom_target(${target} ALL - COMMENT "Building documentation with Sphinx") + else() - configure_file("forward.html" "${SPHINX_BUILD_DIR}/${target}/index.html") + message(WARNING "sphinx-intl not found. + Not building the pot and po locale files") - foreach (lang ${PGR_WORKSHOP_BUILD_LANGUAGES}) - if (lang STREQUAL "en") - set(WARNINGS_TO_ERRORS "") - else() - set(WARNINGS_TO_ERRORS "") endif() - message(STATUS "lang ${lang}") - message(STATUS "WARNINGS_TO_ERRORS ${WARNINGS_TO_ERRORS}") + else() - add_custom_target( - "${target}-${lang}" - COMMAND ${SPHINX_EXECUTABLE} + add_custom_target("${format}" + COMMENT "Building ${format} documentation with Sphinx") - -b ${target} - -c "${CMAKE_CURRENT_BINARY_DIR}" - -D language='${lang}' + configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/forward.html" + "${SPHINX_BUILD_DIR}/${format}/index.html") - # Convert warnings to errors - ${WARNINGS_TO_ERRORS} + foreach (lang ${PGR_WORKSHOP_BUILD_LANGUAGES}) - # the location of the documentation to be build - "${CMAKE_CURRENT_BINARY_DIR}" + 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} + "${CMAKE_CURRENT_BINARY_DIR}" + "${SPHINX_BUILD_DIR}/${format}/${lang}" - #where the documentations is written - "${SPHINX_BUILD_DIR}/${target}/${lang}" + COMMENT "Generating ${format}/${lang} documentation" + DEPENDS "conf.py" + ) + add_dependencies("${format}-${lang}" examples general-intro advanced appendix basic un_sdg scripts interactions) + add_dependencies("${format}" "${format}-${lang}") + endforeach() - COMMENT "Generating ${target}/${lang} documentation ${WARNINGS_TO_ERRORS}..." + add_dependencies(doc "${format}") + + endif() - DEPENDS "conf.py" - ) - add_dependencies("${target}-${lang}" examples general-intro advanced appendix basic un_sdg scripts interactions) - add_dependencies("${target}" "${target}-${lang}") - endforeach() - add_dependencies(doc "${target}") endforeach() diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 312cf8330..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,158 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build -POTFILESDIR = ../locale/pot - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -server: - @echo "Running dev. server on port 4001." - cd build/html && python -m SimpleHTTPServer 4001 - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/SDPlanning.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/SDPlanning.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/SDPlanning" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/SDPlanning" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(POTFILESDIR) - @echo - @echo "Build finished. The message catalogs are in $(POTFILESDIR)" - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." diff --git a/docs/basic/CMakeLists.txt b/docs/basic/CMakeLists.txt index 973895bbc..80d0bd020 100644 --- a/docs/basic/CMakeLists.txt +++ b/docs/basic/CMakeLists.txt @@ -7,11 +7,11 @@ add_dependencies(basic scripts) #--------------------- set(PGR_WORKSHOP_FILES data.rst + graphs.rst pedestrian.rst vehicle.rst - graph_views.rst sql_function.rst - plpgsql_function.rst + withPoints.rst ) set(PGR_WORKSHOP_SUBDIRS diff --git a/docs/basic/data.rst b/docs/basic/data.rst index cbc1c4520..54a90e859 100644 --- a/docs/basic/data.rst +++ b/docs/basic/data.rst @@ -11,7 +11,7 @@ Prepare Data ############################################################################### -.. image:: images/chapter4/prepareData.png +.. image:: images/data/prepareData.png :align: center To be able to use pgRouting, data has to be imported into a database. @@ -147,13 +147,13 @@ Run the osm2pgrouting converter Tables on the database ------------------------------------------------------------------------------- -.. literalinclude:: ../scripts/basic/chapter_4/section-4.3.2.sh +.. literalinclude:: ../scripts/basic/data/data.sh :start-after: 4.3.2 from-here :end-before: 4.3.2 to-here If everything went well the result should look like this: -.. literalinclude:: ../scripts/basic/chapter_4/section-4.3.2.txt +.. literalinclude:: ../scripts/basic/data/data.txt Chapter: Appendix diff --git a/docs/basic/graph_views.rst b/docs/basic/graphs.rst similarity index 55% rename from docs/basic/graph_views.rst rename to docs/basic/graphs.rst index 9417aa80a..6246380da 100644 --- a/docs/basic/graph_views.rst +++ b/docs/basic/graphs.rst @@ -8,10 +8,10 @@ **************************************************************************** -Graph views +Graphs ############################################################################### -.. image:: images/chapter5/route.png +.. image:: images/graphs/taxi_net.png :scale: 25% :align: center @@ -20,13 +20,19 @@ Graph views Different application require different graphs. This chapter covers how to discard disconnected segments and different approaches to create graphs. +pgRouting functions in this chapter + +- `pgr_extractVertices`_ +- `pgr_connectedComponents`_ +- `pgr_dijkstraCostMatrix`_ + The graph requirements =============================================================================== In this chapter there are three graph requirements. It consists on three graphs based on a **fully connected** graph derived from ``ways``: two for different types of vehicles and one for pedestrian, the source and the target in all of them are -based on the ``source_osm`` and ``target_osm``. +based on the ``source`` and ``target``. The description of the graphs: @@ -34,7 +40,7 @@ The description of the graphs: - Circulate on the whole @PGR_WORKSHOP_CITY@ area. - - Do not use `steps`, `footway`, `path`, `cycleway`. + - Do not use `pedestrian`, `steps`, `footway`, `path`, `cycleway` - Speed is the default speed from OSM information. @@ -43,25 +49,84 @@ The description of the graphs: - Circulate on a smaller area: - Bounding box: ``(@PGR_WORKSHOP_LITTLE_NET_BBOX@)`` - - Do not use `steps`, `footway`, `path`, `cycleway`. + - Do not use `pedestrian`, `steps`, `footway`, `path`, `cycleway` - Speed is 10% slower than that of the particular vehicles. - Pedestrians: - Walk on the whole @PGR_WORKSHOP_CITY@ area. - - Can not walk on exclusive vehicle ways + - Can only use pedestrian only ways: - - `motorways` and on `primary` segments. + - `pedestrian`, `steps`, `footway`, `path`, `cycleway` - - The speed is ``2 mts/sec``. + - The walking speed is ``2 mts/sec``. + +Configuration from osm2pgrouting +================================================================================ + +When dealing with data, being aware of what kind of data is being used can +improve results. + +* Vehicles can not circulate on pedestrian ways + +.. image:: images/graphs/pedestrian_only_roads.png + :scale: 25% + +| + +Penalizing or removal of pedestrian ways will make the results closer to reality. + +When converting data from OSM format using the `osm2pgrouting` tool, there is an +additional table: ``configuration``. + +.. rubric:: The ``configuration`` table structure can be obtained with the following command. + +.. literalinclude:: ../scripts/basic/graphs/graphs.sql + :start-after: configuration_structure + :end-before: configuration_contents + +.. collapse:: The table description + + .. literalinclude:: ../scripts/basic/graphs/configuration_structure.txt + +.. image:: images/graphs/roads_tag_ids.png + :scale: 25% + :alt: tag_id values + +| + +In the image above there is a detail of the ``tag_id`` of the roads. + +.. rubric:: The `OSM highway `__ + types: + +.. literalinclude:: ../scripts/basic/graphs/graphs.sql + :start-after: configuration_contents + :end-before: configuration_used + :language: sql + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/graphs/configuration_contents.txt + +Also, on the ``ways`` table there is a column that can be used to ``JOIN`` with the ``configuration`` table. + +.. rubric:: The configuration types in the @PGR_WORKSHOP_CITY@ data + +.. literalinclude:: ../scripts/basic/graphs/graphs.sql + :start-after: configuration_used + :end-before: create_vertices + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/graphs/configuration_used.txt pgr_extractVertices ================================================================================ -``pgr_extractVertices`` compute the connected components of an undirected -graph using a Depth First Search approach. A connected component of an -undirected graph is a set of vertices that are all reachable from each other. +``pgr_extractVertices`` extracting the vertex information of the set of edges of +a graph. .. rubric:: Signature summary @@ -70,10 +135,10 @@ undirected graph is a set of vertices that are all reachable from each other. pgr_extractVertices(Edges SQL, [dryrun]) RETURNS SETOF (id, in_edges, out_edges, x, y, geom) - OR EMTPY SET + OR EMPTY SET Description of the function can be found in `pgr_extractVertices -`__ +`__ Exercise 1: Create a vertices table ------------------------------------------------------------------------------- @@ -88,10 +153,11 @@ Create the vertices table corresponding to the edges in ``ways``. - In this case, the ``ways`` table is a set of edges. - In order to make use of all the graph functions from pgRouting, it is required have the set of vertices defined. -- From the requirements, the graph is going to be based on OSM identifiers. +- From the requirements, a fully connected graph is needed, therefore adding a + ``component`` column. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :emphasize-lines: 3 :start-after: create_vertices.txt @@ -99,28 +165,28 @@ Create the vertices table corresponding to the edges in ``ways``. .. collapse:: Number of inserted records - .. literalinclude:: ../scripts/basic/chapter_7/create_vertices.txt + .. literalinclude:: ../scripts/basic/graphs/create_vertices.txt Reviewing the description of the vertices table -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :start-after: vertices_description.txt :end-before: selected_rows.txt -.. collapse:: Description +.. collapse:: The table description - .. literalinclude:: ../scripts/basic/chapter_7/vertices_description.txt + .. literalinclude:: ../scripts/basic/graphs/vertices_description.txt Inspecting the information on the vertices table -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: selected_rows.txt :end-before: fill_columns_1.txt -.. collapse:: Data on table +.. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/selected_rows.txt + .. literalinclude:: ../scripts/basic/graphs/selected_rows.txt Exercise 2: Fill up other columns in the vertices table @@ -134,73 +200,89 @@ Fill up geometry information on the vertices table. Count the number of rows that need to be filled up. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :start-after: fill_columns_1.txt :end-before: fill_columns_2.txt .. collapse:: Number of rows with empty geometry - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_1.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_1.txt + +.. rubric:: Update the ``geom`` and ``osm_id`` columns -* Update the ``geom`` columns based on the ``source_osm`` column - from ``ways`` table. -* Use the start point of the geometry. +* The update based on the ``source`` column from ``ways`` table and the ``id`` + column of the vertices table. +* To update ``geom`` column, use the start point of the geometry on the ``ways`` + table. +* Use the ``source_osm`` value to fill up ``osm_id`` column. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: fill_columns_2.txt :end-before: fill_columns_3.txt +.. rubric:: Verification + .. collapse:: Number of updated records - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_2.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_2.txt -Not expecting to be done due to the fact that some vertices are only dead ends. +Not expecting to be done due to the fact that some vertices are dead ends. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: fill_columns_3.txt :end-before: fill_columns_4.txt .. collapse:: Numbers of records that need update - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_3.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_3.txt + +.. rubric:: Continue update the ``geom`` and ``osm_id`` columns -* Update the ``geom`` columns based on the ``target_osm`` column - from ``ways`` table. -* Use the end point of the geometry. +* The update based on the ``target`` column from ``ways`` table and the ``id`` + column of the vertices table. +* To update ``geom`` column, use the end point of the geometry on the ``ways`` + table. +* Use the ``target_osm`` value to fill up ``osm_id`` column. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: fill_columns_4.txt :end-before: fill_columns_5.txt +.. rubric:: Verification + .. collapse:: Number of updated records - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_4.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_4.txt Expecting to be done, that is the geometry column should not have a ``NULL`` value. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: fill_columns_5.txt :end-before: fill_columns_6.txt .. collapse:: Count should be 0 - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_5.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_5.txt + +.. rubric:: Update the ``x`` and ``y`` columns Update the ``x`` and ``y`` columns based on the ``geom`` column. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: fill_columns_6.txt :end-before: set_components1.txt +.. rubric:: Verification + .. collapse:: Number of updated records - .. literalinclude:: ../scripts/basic/chapter_7/fill_columns_6.txt + .. literalinclude:: ../scripts/basic/graphs/fill_columns_6.txt pgr_connectedComponents @@ -232,43 +314,41 @@ Get the information about the graph components. .. rubric:: Solution -Create additional columns on the edges and vertices tables. +Create additional columns on the edges tables. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: set_components1.txt :end-before: set_components2.txt -.. collapse:: Message about creation of columns +.. collapse:: Command output - .. literalinclude:: ../scripts/basic/chapter_7/set_components1.txt + .. literalinclude:: ../scripts/basic/graphs/set_components1.txt -- Use the ``pgr_connectedComponents`` to fill up the vertices table. +.. rubric:: Use the ``pgr_connectedComponents`` to fill up the vertices table. - - Use the results to store the component numbers on the vertices table. - (**line 1**) - - Use the OSM identifiers of the vertices. (**lines 4-5**) +- Use the results to store the component numbers on the vertices table. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql - :emphasize-lines: 1, 4-5 + :emphasize-lines: 1 :start-after: set_components2.txt :end-before: set_components3.txt .. collapse:: Number of updated records - .. literalinclude:: ../scripts/basic/chapter_7/set_components2.txt + .. literalinclude:: ../scripts/basic/graphs/set_components2.txt -- Update the edges table with based on the component number of the vertex +.. rubric:: Update the edges table with based on the component number of the vertex -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: set_components3.txt :end-before: see_components1.txt .. collapse:: Number of updated records - .. literalinclude:: ../scripts/basic/chapter_7/set_components3.txt + .. literalinclude:: ../scripts/basic/graphs/set_components3.txt Exercise 4: Inspect the components @@ -285,61 +365,59 @@ Answer the following questions: .. rubric:: Solution -1. How many components are in the vertices table? +.. rubric:: 1. How many components are in the vertices table? Count the distinct components. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: see_components1.txt :end-before: see_components2.txt .. collapse:: Number of components on vertex table - .. literalinclude:: ../scripts/basic/chapter_7/see_components1.txt + .. literalinclude:: ../scripts/basic/graphs/see_components1.txt -2. How many components are in the edges table? +.. rubric:: 2. How many components are in the edges table? Count the distinct components. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: see_components2.txt :end-before: see_components3.txt .. collapse:: Number of components on edge table - .. literalinclude:: ../scripts/basic/chapter_7/see_components2.txt + .. literalinclude:: ../scripts/basic/graphs/see_components2.txt -3. List the 10 components with more edges. +.. rubric:: 3. List the 10 components with more edges. * Count number of rows grouped by component. (**line 1**) * Inverse order to display the top 10. (**line 2**) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: see_components3.txt :end-before: see_components4.txt .. collapse:: Top 10 components - .. literalinclude:: ../scripts/basic/chapter_7/see_components3.txt + .. literalinclude:: ../scripts/basic/graphs/see_components3.txt -4. Get the component with the maximum number of edges. +.. rubric:: 4. Get the component with the maximum number of edges. * Use the query from last question to get the maximum count * Get the component that matches the maximum value. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: see_components4.txt :end-before: create_vehicle_net1.txt .. collapse:: Component with maxmum edge count - .. literalinclude:: ../scripts/basic/chapter_7/see_components4.txt - - + .. literalinclude:: ../scripts/basic/graphs/see_components4.txt Preparing the graphs ================================================================================ @@ -347,21 +425,21 @@ Preparing the graphs Exercise 5: Creating a view for routing ------------------------------------------------------------------------------- -.. image:: images/chapter7/vehicle_net.png +.. image:: images/graphs/vehicle_net.png :scale: 25% :alt: View of roads for vehicles .. rubric:: Problem - Create a view with minimal amount of information for processing the particular vehicles. -- Use the OSM identifiers on the vertices. - Routing `cost` and `reverse_cost` in terms of seconds for routing calculations. - Exclude `steps`, `footway`, `path`, `cycleway` segments. - Data needed in the view for further processing. - - `name` The name of the segment. - - `length_m` The length in meters rename to ``length``. - - `the_geom` The geometry rename to ``geom``. + - ``name`` The name of the segment. + - ``length_m`` The length in meters rename to ``length``. + - ``the_geom`` The geometry rename to ``geom``. + - ``tag_id`` Keep as is. - Verify the number of edges was reduced. @@ -382,43 +460,43 @@ Creating the view: - Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :emphasize-lines: 6-10,14-16,18 - :start-after: create_vehicle_net1.txt - :end-before: create_vehicle_net2.txt +.. literalinclude:: ../scripts/basic/graphs/graphs.sql + :language: sql + :linenos: + :start-after: create_vehicle_net1.txt + :end-before: create_vehicle_net2.txt -.. collapse:: Response of command +.. collapse:: Command output - .. literalinclude:: ../scripts/basic/chapter_7/create_vehicle_net1.txt + .. literalinclude:: ../scripts/basic/graphs/create_vehicle_net1.txt -Verification: +.. rubric:: Verification Count the rows on the original ``ways`` and on ``vehicle_net``. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :start-after: create_vehicle_net2.txt - :end-before: create_vehicle_net3.txt +.. literalinclude:: ../scripts/basic/graphs/graphs.sql + :start-after: create_vehicle_net2.txt + :end-before: create_vehicle_net3.txt .. collapse:: Row count results - .. literalinclude:: ../scripts/basic/chapter_7/create_vehicle_net2.txt + .. literalinclude:: ../scripts/basic/graphs/create_vehicle_net2.txt Get the description of the view -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :start-after: create_vehicle_net3.txt :end-before: create_taxi_net1.txt .. collapse:: The view description - .. literalinclude:: ../scripts/basic/chapter_7/create_vehicle_net3.txt + .. literalinclude:: ../scripts/basic/graphs/create_vehicle_net3.txt Exercise 6: Limiting the road network within an area ------------------------------------------------------------------------------- -.. image:: images/chapter7/taxi_net.png +.. image:: images/graphs/taxi_net.png :scale: 25% :alt: View of smaller set of roads for vehicles @@ -441,7 +519,7 @@ Creating the view: * Can only circulate inside the bounding box: ``(@PGR_WORKSHOP_LITTLE_NET_BBOX@)``. (line **10**) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :emphasize-lines: 7,9,10 :start-after: create_taxi_net1.txt @@ -449,49 +527,51 @@ Creating the view: .. collapse:: Response of command - .. literalinclude:: ../scripts/basic/chapter_7/create_taxi_net1.txt + .. literalinclude:: ../scripts/basic/graphs/create_taxi_net1.txt Count the rows on ``taxi_net``. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: create_taxi_net2.txt :end-before: create_taxi_net3.txt .. collapse:: Row count results - .. literalinclude:: ../scripts/basic/chapter_7/create_taxi_net2.txt + .. literalinclude:: ../scripts/basic/graphs/create_taxi_net2.txt Get the description. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :start-after: create_taxi_net3.txt :end-before: create_walk_net1.txt .. collapse:: The view description - .. literalinclude:: ../scripts/basic/chapter_7/create_taxi_net3.txt + .. literalinclude:: ../scripts/basic/graphs/create_taxi_net3.txt Exercise 7: Creating a materialized view for routing pedestrians ------------------------------------------------------------------------------- -.. image:: images/chapter7/walk_net.png +.. image:: images/graphs/walk_net.png :scale: 25% :alt: View of roads for pedestrians .. rubric:: Problem -- Create a materialized view with minimal amount of information for processing pedestrians. +- Create a materialized view with minimal amount of information for processing + pedestrians. - Routing `cost` and `reverse_cost` will be on seconds for routing calculations. - The speed is ``2 mts/sec``. -- Exclude `motorway` , `primary` and `secondary` segments. +- Only include the pedestrian only roads: ``pedestrian``, ``steps``, ``footway``, + ``path``, ``cycleway`` - Data needed in the view for further processing. - - `length_m` The length in meters. - - `the_geom` The geometry. + - ``length_m`` The length in meters. + - ``the_geom`` The geometry. - Verify the number of edges was reduced. @@ -501,10 +581,11 @@ Exercise 7: Creating a materialized view for routing pedestrians - Similar to `Exercise 5: Creating a view for routing`_: - - The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 mts/sec``. (line **7**) - - Exclude `motorway`, `primary` and `secondary` . (line **11**) + - The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of + ``2 mts/sec``. (line **7**) + - Exclude ``motorway``, ``primary`` and ``secondary`` . (line **11**) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :emphasize-lines: 7, 11 :start-after: create_walk_net1.txt @@ -512,37 +593,52 @@ Exercise 7: Creating a materialized view for routing pedestrians .. collapse:: Response of command - .. literalinclude:: ../scripts/basic/chapter_7/create_walk_net1.txt + .. literalinclude:: ../scripts/basic/graphs/create_walk_net1.txt Count the rows on the view ``walk_net``. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :start-after: create_walk_net2.txt :end-before: create_walk_net3.txt .. collapse:: Row count results - .. literalinclude:: ../scripts/basic/chapter_7/create_walk_net2.txt + .. literalinclude:: ../scripts/basic/graphs/create_walk_net2.txt Get the description. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :start-after: create_walk_net3.txt - :end-before: test_view1.txt + :end-before: create_net_vertices.txt .. collapse:: The view description - .. literalinclude:: ../scripts/basic/chapter_7/create_walk_net3.txt + .. literalinclude:: ../scripts/basic/graphs/create_walk_net3.txt + +pgr_dijkstraCostMatrix +================================================================================ +``pgr_dijkstraCostMatrix`` Calculates a cost matrix using Dijkstra algorithm. -Exercise 8: Testing the views for routing +.. rubric:: Signature summary + +.. code-block:: sql + + pgr_dijkstraCostMatrix(Edges SQL, start vids, [directed]) + + RETURNS SETOF (start_vid, end_vid, agg_cost) + OR EMPTY SET + +Description of the function can be found in `pgr_dijkstraCostMatrix +`__ + +Exercise 8: Testing the views ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e3.png +.. image:: images/graphs/costMatrix.png :scale: 25% - :alt: From the |ch7_place_1| to the |ch7_place_2| .. rubric:: Problem @@ -550,25 +646,19 @@ Exercise 8: Testing the views for routing In particular: -* From the |ch7_place_1| to the "|ch7_place_2| using the OSM identifier +* Get a traveling cost matrix in seconds from all locations to all locations. * the views to be tested are: * ``vehicle_net`` * ``taxi_net`` * ``walk_net`` -* Only show the following results, as the other columns are to be ignored on the function. - - * ``seq`` - * ``edge`` with the name ``id`` - * ``cost`` with the name: ``seconds`` - .. rubric:: Solution -* In general +* The locations are: - * The departure is |ch7_place_1| with OSM identifier |ch7_osmid_1|. - * The destination is |ch7_place_2| with OSM identifier |ch7_osmid_2|. + * |id_1|, |id_2|, |id_3|, |id_4| and |id_5|. + * Passed as an array to the function. For ``vehicle_net``: @@ -580,16 +670,16 @@ For ``vehicle_net``: * The OSM identifiers of the departure and destination are used. (line **4**) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :linenos: :emphasize-lines: 1,3,4 :start-after: test_view1.txt :end-before: test_view2.txt -.. collapse:: Query resultes +.. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/test_view1.txt + .. literalinclude:: ../scripts/basic/graphs/test_view1.txt For ``taxi_net``: @@ -597,27 +687,27 @@ For ``taxi_net``: * The results give the same route as with ``vehicle_net`` but ``cost`` is higher. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :emphasize-lines: 3 :start-after: test_view2.txt :end-before: test_view3.txt -.. collapse:: Query resultes +.. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/test_view2.txt + .. literalinclude:: ../scripts/basic/graphs/test_view2.txt For ``walk_net``: * Similar as the previous one but with ``walk_net``. (line **3**) * The results give a different route than of the vehicles. - .. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql + .. literalinclude:: ../scripts/basic/graphs/graphs.sql :language: sql :emphasize-lines: 3 :start-after: test_view3.txt - :end-before: exercise_7_5.txt + :end-before: graphs_end.txt -.. collapse:: Query resultes +.. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/test_view3.txt + .. literalinclude:: ../scripts/basic/graphs/test_view3.txt diff --git a/docs/basic/images/CMakeLists.txt b/docs/basic/images/CMakeLists.txt index 9ec4025f0..91cdd0458 100644 --- a/docs/basic/images/CMakeLists.txt +++ b/docs/basic/images/CMakeLists.txt @@ -3,22 +3,20 @@ # Directories #--------------------- set(PGR_WORKSHOP_IMG_SUBDIRS - chapter4 - chapter5 - chapter6 - chapter7 - chapter8 - ) - - - -#--------------------------------------------- -# Adding the documentation subdirectories & files -#--------------------------------------------- + data + pedestrian + vehicle + graphs + sql_function + withPoints +) foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS}) - file(COPY "${dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") if (PGR_WORKSHOP_DEBUG) - message(STATUS " Adding images directory ${dir}") + message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + endif() + add_subdirectory("${dir}") + if (PGR_WORKSHOP_DEBUG) + message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") endif() endforeach() diff --git a/docs/basic/images/chapter5/CMakeLists.txt b/docs/basic/images/chapter5/CMakeLists.txt deleted file mode 100644 index d53fc7eda..000000000 --- a/docs/basic/images/chapter5/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ - -#--------------------- -# Files -#--------------------- -set(PGR_WORKSHOP_IMG_FILES - pedestrian_combinations.png - pedestrian_route1.png - pedestrian_route2.png - pedestrian_route4.png - pedestrian_route5.png - route.png - ) - - -foreach (f ${PGR_WORKSHOP_IMG_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -endforeach() - diff --git a/docs/basic/images/chapter5/pedestrian_combinations.png b/docs/basic/images/chapter5/pedestrian_combinations.png deleted file mode 100644 index fe569fa87..000000000 Binary files a/docs/basic/images/chapter5/pedestrian_combinations.png and /dev/null differ diff --git a/docs/basic/images/chapter5/pedestrian_route1.png b/docs/basic/images/chapter5/pedestrian_route1.png deleted file mode 100644 index ab38e08ee..000000000 Binary files a/docs/basic/images/chapter5/pedestrian_route1.png and /dev/null differ diff --git a/docs/basic/images/chapter5/pedestrian_route2.png b/docs/basic/images/chapter5/pedestrian_route2.png deleted file mode 100644 index a0674e7b8..000000000 Binary files a/docs/basic/images/chapter5/pedestrian_route2.png and /dev/null differ diff --git a/docs/basic/images/chapter5/pedestrian_route4.png b/docs/basic/images/chapter5/pedestrian_route4.png deleted file mode 100644 index 76540d6b5..000000000 Binary files a/docs/basic/images/chapter5/pedestrian_route4.png and /dev/null differ diff --git a/docs/basic/images/chapter5/pedestrian_route5.png b/docs/basic/images/chapter5/pedestrian_route5.png deleted file mode 100644 index 78bfb6007..000000000 Binary files a/docs/basic/images/chapter5/pedestrian_route5.png and /dev/null differ diff --git a/docs/basic/images/chapter5/route.png b/docs/basic/images/chapter5/route.png deleted file mode 100644 index 918ce0b35..000000000 Binary files a/docs/basic/images/chapter5/route.png and /dev/null differ diff --git a/docs/basic/images/chapter6/ad11.png b/docs/basic/images/chapter6/ad11.png deleted file mode 100644 index 292491f22..000000000 Binary files a/docs/basic/images/chapter6/ad11.png and /dev/null differ diff --git a/docs/basic/images/chapter6/ad7.png b/docs/basic/images/chapter6/ad7.png deleted file mode 100644 index eef046f83..000000000 Binary files a/docs/basic/images/chapter6/ad7.png and /dev/null differ diff --git a/docs/basic/images/chapter6/ad8.png b/docs/basic/images/chapter6/ad8.png deleted file mode 100644 index 45074ea09..000000000 Binary files a/docs/basic/images/chapter6/ad8.png and /dev/null differ diff --git a/docs/basic/images/chapter6/pedestrian_only_roads.png b/docs/basic/images/chapter6/pedestrian_only_roads.png deleted file mode 100644 index 76d060cb9..000000000 Binary files a/docs/basic/images/chapter6/pedestrian_only_roads.png and /dev/null differ diff --git a/docs/basic/images/chapter6/route_using_pedestrian.png b/docs/basic/images/chapter6/route_using_pedestrian.png deleted file mode 100644 index 425157183..000000000 Binary files a/docs/basic/images/chapter6/route_using_pedestrian.png and /dev/null differ diff --git a/docs/basic/images/chapter7/CMakeLists.txt b/docs/basic/images/chapter7/CMakeLists.txt deleted file mode 100644 index 3069ae2a3..000000000 --- a/docs/basic/images/chapter7/CMakeLists.txt +++ /dev/null @@ -1,25 +0,0 @@ - -#--------------------- -# Files -#--------------------- -set(PGR_WORKSHOP_IMG_FILES - ch7-e3.png - ch7-e4.png - ch7-e5.png - ch7-e6.png - ch7-e7.png - ch7-e8-1.png - ch7-e8.png - vehicle_net.png - walk_net.png - taxi_net.png - ) - - -foreach (f ${PGR_WORKSHOP_IMG_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -endforeach() - diff --git a/docs/basic/images/chapter7/ch7-e3.png b/docs/basic/images/chapter7/ch7-e3.png deleted file mode 100644 index 0dd9f552d..000000000 Binary files a/docs/basic/images/chapter7/ch7-e3.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e4.png b/docs/basic/images/chapter7/ch7-e4.png deleted file mode 100644 index 355e03825..000000000 Binary files a/docs/basic/images/chapter7/ch7-e4.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e5.png b/docs/basic/images/chapter7/ch7-e5.png deleted file mode 100644 index e6d39463c..000000000 Binary files a/docs/basic/images/chapter7/ch7-e5.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e6.png b/docs/basic/images/chapter7/ch7-e6.png deleted file mode 100644 index b51e26fde..000000000 Binary files a/docs/basic/images/chapter7/ch7-e6.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e7.png b/docs/basic/images/chapter7/ch7-e7.png deleted file mode 100644 index 702ee8a81..000000000 Binary files a/docs/basic/images/chapter7/ch7-e7.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e8-1.png b/docs/basic/images/chapter7/ch7-e8-1.png deleted file mode 100644 index c73d1a859..000000000 Binary files a/docs/basic/images/chapter7/ch7-e8-1.png and /dev/null differ diff --git a/docs/basic/images/chapter7/ch7-e8.png b/docs/basic/images/chapter7/ch7-e8.png deleted file mode 100644 index c53961fa3..000000000 Binary files a/docs/basic/images/chapter7/ch7-e8.png and /dev/null differ diff --git a/docs/basic/images/chapter7/taxi_net.png b/docs/basic/images/chapter7/taxi_net.png deleted file mode 100644 index 933a5879f..000000000 Binary files a/docs/basic/images/chapter7/taxi_net.png and /dev/null differ diff --git a/docs/basic/images/chapter7/vehicle_net.png b/docs/basic/images/chapter7/vehicle_net.png deleted file mode 100644 index 984b6816b..000000000 Binary files a/docs/basic/images/chapter7/vehicle_net.png and /dev/null differ diff --git a/docs/basic/images/chapter7/walk_net.png b/docs/basic/images/chapter7/walk_net.png deleted file mode 100644 index a1ab93789..000000000 Binary files a/docs/basic/images/chapter7/walk_net.png and /dev/null differ diff --git a/docs/basic/images/chapter8/CMakeLists.txt b/docs/basic/images/chapter8/CMakeLists.txt deleted file mode 100644 index b1156634f..000000000 --- a/docs/basic/images/chapter8/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -#--------------------- -# Files -#--------------------- -set(PGR_WORKSHOP_IMG_FILES - closest_vertex.png - ch8-e7.png - ch8-taxinet.png - ch8-vehiclenet.png - ch8-walknet.png - ) - - -foreach (f ${PGR_WORKSHOP_IMG_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") -endforeach() - diff --git a/docs/basic/images/chapter8/ch8-e7.png b/docs/basic/images/chapter8/ch8-e7.png deleted file mode 100644 index 124664ae2..000000000 Binary files a/docs/basic/images/chapter8/ch8-e7.png and /dev/null differ diff --git a/docs/basic/images/chapter8/ch8-taxinet.png b/docs/basic/images/chapter8/ch8-taxinet.png deleted file mode 100644 index b847422ef..000000000 Binary files a/docs/basic/images/chapter8/ch8-taxinet.png and /dev/null differ diff --git a/docs/basic/images/chapter8/ch8-vehiclenet.png b/docs/basic/images/chapter8/ch8-vehiclenet.png deleted file mode 100644 index bd8adee91..000000000 Binary files a/docs/basic/images/chapter8/ch8-vehiclenet.png and /dev/null differ diff --git a/docs/basic/images/chapter8/ch8-walknet.png b/docs/basic/images/chapter8/ch8-walknet.png deleted file mode 100644 index 2ab22e074..000000000 Binary files a/docs/basic/images/chapter8/ch8-walknet.png and /dev/null differ diff --git a/docs/basic/images/chapter8/closest_vertex.png b/docs/basic/images/chapter8/closest_vertex.png deleted file mode 100644 index 668a2cda9..000000000 Binary files a/docs/basic/images/chapter8/closest_vertex.png and /dev/null differ diff --git a/docs/basic/images/chapter4/CMakeLists.txt b/docs/basic/images/data/CMakeLists.txt similarity index 65% rename from docs/basic/images/chapter4/CMakeLists.txt rename to docs/basic/images/data/CMakeLists.txt index 4ab9488bf..b44a5147e 100644 --- a/docs/basic/images/chapter4/CMakeLists.txt +++ b/docs/basic/images/data/CMakeLists.txt @@ -9,8 +9,7 @@ set(PGR_WORKSHOP_IMG_FILES foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/basic/images/chapter4/prepareData.png b/docs/basic/images/data/prepareData.png similarity index 100% rename from docs/basic/images/chapter4/prepareData.png rename to docs/basic/images/data/prepareData.png diff --git a/docs/basic/images/chapter6/CMakeLists.txt b/docs/basic/images/graphs/CMakeLists.txt similarity index 55% rename from docs/basic/images/chapter6/CMakeLists.txt rename to docs/basic/images/graphs/CMakeLists.txt index 9660f6705..dc4542969 100644 --- a/docs/basic/images/chapter6/CMakeLists.txt +++ b/docs/basic/images/graphs/CMakeLists.txt @@ -3,18 +3,18 @@ # Files #--------------------- set(PGR_WORKSHOP_IMG_FILES - ad11.png - ad7.png - ad8.png - route_using_pedestrian.png + costMatrix.png pedestrian_only_roads.png - ) + roads_tag_ids.png + taxi_net.png + vehicle_net.png + walk_net.png +) foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/basic/images/graphs/costMatrix.png b/docs/basic/images/graphs/costMatrix.png new file mode 100644 index 000000000..5ca41ce5e Binary files /dev/null and b/docs/basic/images/graphs/costMatrix.png differ diff --git a/docs/basic/images/graphs/pedestrian_only_roads.png b/docs/basic/images/graphs/pedestrian_only_roads.png new file mode 100644 index 000000000..70700cf82 Binary files /dev/null and b/docs/basic/images/graphs/pedestrian_only_roads.png differ diff --git a/docs/basic/images/graphs/roads_tag_ids.png b/docs/basic/images/graphs/roads_tag_ids.png new file mode 100644 index 000000000..d91053b8c Binary files /dev/null and b/docs/basic/images/graphs/roads_tag_ids.png differ diff --git a/docs/basic/images/graphs/taxi_net.png b/docs/basic/images/graphs/taxi_net.png new file mode 100644 index 000000000..bd47ad33f Binary files /dev/null and b/docs/basic/images/graphs/taxi_net.png differ diff --git a/docs/basic/images/graphs/vehicle_net.png b/docs/basic/images/graphs/vehicle_net.png new file mode 100644 index 000000000..bae43aaed Binary files /dev/null and b/docs/basic/images/graphs/vehicle_net.png differ diff --git a/docs/basic/images/graphs/walk_net.png b/docs/basic/images/graphs/walk_net.png new file mode 100644 index 000000000..085ca2827 Binary files /dev/null and b/docs/basic/images/graphs/walk_net.png differ diff --git a/docs/basic/images/pedestrian/CMakeLists.txt b/docs/basic/images/pedestrian/CMakeLists.txt new file mode 100644 index 000000000..5d839aa85 --- /dev/null +++ b/docs/basic/images/pedestrian/CMakeLists.txt @@ -0,0 +1,19 @@ + +#--------------------- +# Files +#--------------------- +set(PGR_WORKSHOP_IMG_FILES + pedestrian_combinations.png + pedestrian_dijkstracost.png + pedestrian_many_to_many.png + pedestrian_one_to_many.png + pedestrian_one_to_one.png +) + + +foreach (f ${PGR_WORKSHOP_IMG_FILES}) + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) +endforeach() diff --git a/docs/basic/images/pedestrian/pedestrian_combinations.png b/docs/basic/images/pedestrian/pedestrian_combinations.png new file mode 100644 index 000000000..778d04e04 Binary files /dev/null and b/docs/basic/images/pedestrian/pedestrian_combinations.png differ diff --git a/docs/basic/images/pedestrian/pedestrian_dijkstracost.png b/docs/basic/images/pedestrian/pedestrian_dijkstracost.png new file mode 100644 index 000000000..af50f68ee Binary files /dev/null and b/docs/basic/images/pedestrian/pedestrian_dijkstracost.png differ diff --git a/docs/basic/images/pedestrian/pedestrian_many_to_many.png b/docs/basic/images/pedestrian/pedestrian_many_to_many.png new file mode 100644 index 000000000..0812f6bb7 Binary files /dev/null and b/docs/basic/images/pedestrian/pedestrian_many_to_many.png differ diff --git a/docs/basic/images/pedestrian/pedestrian_one_to_many.png b/docs/basic/images/pedestrian/pedestrian_one_to_many.png new file mode 100644 index 000000000..2bac5a228 Binary files /dev/null and b/docs/basic/images/pedestrian/pedestrian_one_to_many.png differ diff --git a/docs/basic/images/pedestrian/pedestrian_one_to_one.png b/docs/basic/images/pedestrian/pedestrian_one_to_one.png new file mode 100644 index 000000000..811698883 Binary files /dev/null and b/docs/basic/images/pedestrian/pedestrian_one_to_one.png differ diff --git a/docs/basic/images/sql_function/CMakeLists.txt b/docs/basic/images/sql_function/CMakeLists.txt new file mode 100644 index 000000000..b03b3052c --- /dev/null +++ b/docs/basic/images/sql_function/CMakeLists.txt @@ -0,0 +1,19 @@ + +#--------------------- +# Files +#--------------------- +set(PGR_WORKSHOP_IMG_FILES + sql_azimuth_fixed.png + sql_route_geom.png + sql_route_names.png + sql_route_readable.png + sql_route_geom_detail.png +) + + +foreach (f ${PGR_WORKSHOP_IMG_FILES}) + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) +endforeach() diff --git a/docs/basic/images/sql_function/sql_azimuth_fixed.png b/docs/basic/images/sql_function/sql_azimuth_fixed.png new file mode 100644 index 000000000..983371d40 Binary files /dev/null and b/docs/basic/images/sql_function/sql_azimuth_fixed.png differ diff --git a/docs/basic/images/sql_function/sql_route_geom.png b/docs/basic/images/sql_function/sql_route_geom.png new file mode 100644 index 000000000..38866b71f Binary files /dev/null and b/docs/basic/images/sql_function/sql_route_geom.png differ diff --git a/docs/basic/images/sql_function/sql_route_geom_detail.png b/docs/basic/images/sql_function/sql_route_geom_detail.png new file mode 100644 index 000000000..f11713d49 Binary files /dev/null and b/docs/basic/images/sql_function/sql_route_geom_detail.png differ diff --git a/docs/basic/images/sql_function/sql_route_names.png b/docs/basic/images/sql_function/sql_route_names.png new file mode 100644 index 000000000..532164c9f Binary files /dev/null and b/docs/basic/images/sql_function/sql_route_names.png differ diff --git a/docs/basic/images/sql_function/sql_route_readable.png b/docs/basic/images/sql_function/sql_route_readable.png new file mode 100644 index 000000000..b064852c4 Binary files /dev/null and b/docs/basic/images/sql_function/sql_route_readable.png differ diff --git a/docs/basic/images/vehicle/CMakeLists.txt b/docs/basic/images/vehicle/CMakeLists.txt new file mode 100644 index 000000000..3206f614b --- /dev/null +++ b/docs/basic/images/vehicle/CMakeLists.txt @@ -0,0 +1,17 @@ +#--------------------- +# Files +#--------------------- +set(PGR_WORKSHOP_IMG_FILES + vehicle_route_coming.png + vehicle_route_going.png + vehicle_time_is_money.png + vehicle_use_penalty.png +) + + +foreach (f ${PGR_WORKSHOP_IMG_FILES}) + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) +endforeach() diff --git a/docs/basic/images/vehicle/vehicle_route_coming.png b/docs/basic/images/vehicle/vehicle_route_coming.png new file mode 100644 index 000000000..689614f90 Binary files /dev/null and b/docs/basic/images/vehicle/vehicle_route_coming.png differ diff --git a/docs/basic/images/vehicle/vehicle_route_going.png b/docs/basic/images/vehicle/vehicle_route_going.png new file mode 100644 index 000000000..027eadaa9 Binary files /dev/null and b/docs/basic/images/vehicle/vehicle_route_going.png differ diff --git a/docs/basic/images/vehicle/vehicle_time_is_money.png b/docs/basic/images/vehicle/vehicle_time_is_money.png new file mode 100644 index 000000000..09fd60ea9 Binary files /dev/null and b/docs/basic/images/vehicle/vehicle_time_is_money.png differ diff --git a/docs/basic/images/vehicle/vehicle_use_penalty.png b/docs/basic/images/vehicle/vehicle_use_penalty.png new file mode 100644 index 000000000..e074e9d49 Binary files /dev/null and b/docs/basic/images/vehicle/vehicle_use_penalty.png differ diff --git a/docs/basic/images/withPoints/CMakeLists.txt b/docs/basic/images/withPoints/CMakeLists.txt new file mode 100644 index 000000000..58830f01e --- /dev/null +++ b/docs/basic/images/withPoints/CMakeLists.txt @@ -0,0 +1,16 @@ + +#--------------------- +# Files +#--------------------- +set(PGR_WORKSHOP_IMG_FILES + points_on_map.png + points_routing.png +) + + +foreach (f ${PGR_WORKSHOP_IMG_FILES}) + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) +endforeach() diff --git a/docs/basic/images/withPoints/points_on_map.png b/docs/basic/images/withPoints/points_on_map.png new file mode 100644 index 000000000..2bc819557 Binary files /dev/null and b/docs/basic/images/withPoints/points_on_map.png differ diff --git a/docs/basic/images/withPoints/points_routing.png b/docs/basic/images/withPoints/points_routing.png new file mode 100644 index 000000000..0d0534485 Binary files /dev/null and b/docs/basic/images/withPoints/points_routing.png differ diff --git a/docs/basic/pedestrian.rst b/docs/basic/pedestrian.rst index b17b49eca..254fabddd 100644 --- a/docs/basic/pedestrian.rst +++ b/docs/basic/pedestrian.rst @@ -10,7 +10,7 @@ Pedestrian Routing =============================================================================== -.. image:: images/chapter5/route.png +.. image:: images/pedestrian/pedestrian_one_to_one.png :scale: 25% :align: center @@ -18,6 +18,10 @@ Pedestrian Routing path search with *Dijkstra* algorithm. Later other functions were added and the library was renamed to pgRouting. +pgRouting functions in this chapter + +- `pgr_dijkstra`_ +- `pgr_dijkstraCost`_ .. contents:: Chapter Contents @@ -62,7 +66,7 @@ Description of the function can be found in `pgr_dijkstra The assignment of the vertices identifiers on the source and target columns may be different, the following exercises will use the results of this query. For the workshop, some locations near of the FOSS4G event are going to be used. -These locations are within this area https://www.openstreetmap.org/#map=14/-1.44228/-48.46069 +These locations are within this area https://www.openstreetmap.org/#map=16/-36.8520950/174.7631803 * |osmid_1| |place_1| * |osmid_2| |place_2| @@ -79,14 +83,14 @@ Connect to the database, if not connected: Get the vertex identifiers -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql :language: sql - :start-after: exercise_5_0.txt - :end-before: exercise_5_1.txt + :start-after: get_id.txt + :end-before: one_to_one.txt | -.. literalinclude:: ../scripts/basic/chapter_5/exercise_5_0.txt +.. literalinclude:: ../scripts/basic/pedestrian/get_id.txt * |osmid_1| |place_1| (|id_1|) * |osmid_2| |place_2| (|id_2|) @@ -96,9 +100,9 @@ Get the vertex identifiers The corresponding :code:`id` are shown in the following image, and a sample route from -"|place_3|" to "|place_5|". +"|place_3|" to "|place_1|". -.. image:: images/chapter5/route.png +.. image:: images/pedestrian/pedestrian_one_to_one.png :scale: 25% Exercise 1: Single pedestrian routing @@ -111,34 +115,32 @@ Exercise 1: Single pedestrian routing * from "|place_1|" * to "|place_3|". -* Calculate routes with costs in *osm2pgRouting* ``length`` default units. +* Calculate routes with costs in ``length`` in meters. -.. image:: images/chapter5/pedestrian_route1.png +.. image:: images/pedestrian/pedestrian_one_to_one.png :scale: 25% - :alt: From the |place_1| to the |place_3| .. rubric:: Solution: -* The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines **9** and **10**). -* The pedestrian's cost is in terms of length. In this case ``length`` (line **6**), which - was calculated by osm2pgrouting, is in unit ``degrees``. -* From a pedestrian perspective the graph is ``undirected`` (line **11**), that is, the +* The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines **5** and **6**). +* The pedestrian's cost is in terms of length. In this case ``length`` (line **3**). +* From a pedestrian perspective the graph is ``undirected`` (line **7**), that is, the pedestrian can move in both directions on all segments. -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_1.txt - :end-before: exercise_5_2.txt - :emphasize-lines: 3-7 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: one_to_one.txt + :end-before: many_to_one.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_1.txt + .. literalinclude:: ../scripts/basic/pedestrian/one_to_one.txt .. note:: - * The returned cost attribute represents the cost specified in the - inner SQL query (``edges_sql::text`` argument). In this example cost is ``length`` in unit - "degrees". Cost may be time, distance or any combination of both or any + * The returned cost attribute represents the cost specified in the inner SQL + query (``edges_sql::text`` argument). In this example cost is ``length`` in + unit "meters". Cost may be time, distance or any combination of both or any other attributes or a custom formula. * ``node`` and ``edge`` results may vary depending on the assignment of the identifiers to the vertices given by osm2pgrouting. @@ -153,27 +155,26 @@ Exercise 2: Many Pedestrians going to the same destination * from "|place_1|" and "|place_2|" * to the "|place_3|". -* Calculate routes with costs in *osm2pgRouting* ``length_m`` which is in meters. +* Calculate routes with costs in ``length`` in kilometers. -.. image:: images/chapter5/pedestrian_route2.png +.. image:: images/pedestrian/pedestrian_one_to_many.png :scale: 25% - :alt: From |place_1| and |place_2| to |place_3| .. rubric:: Solution: -* The pedestrians are departing at vertices |id_1| and |id_2| (line **9**). -* All pedestrians want to go to vertex |id_3| (line **10**). -* The cost to be in meters using attribute ``length_m`` (line **6**). +* The pedestrians are departing at vertices |id_1| and |id_2| (line **5**). +* All pedestrians want to go to vertex |id_3| (line **6**). +* The cost to be in kilometers using attribute ``length`` (line **3**). -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_2.txt - :end-before: exercise_5_3.txt - :emphasize-lines: 6, 9 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: many_to_one.txt + :end-before: one_to_many.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_2.txt + .. literalinclude:: ../scripts/basic/pedestrian/many_to_one.txt Exercise 3: Many Pedestrians departing from the same location ............................................................................... @@ -185,26 +186,29 @@ Exercise 3: Many Pedestrians departing from the same location * from "|place_3|" * to "|place_1|" and "|place_2|" -* Calculate routes with costs in seconds. +* Calculate routes using the ``cost`` which is in seconds for a walking speed of + ``2 mts/sec``. + + * See :doc:`graphs` for the costs setup. -.. image:: images/chapter5/pedestrian_route2.png +.. image:: images/pedestrian/pedestrian_one_to_many.png :scale: 25% .. rubric:: Solution: -* All pedestrians are departing from vertex |id_3| (line **9**). -* Pedestrians want to go to locations |id_1| and |id_2| (line **10**). -* The cost to be in seconds, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` (line **6**). +* All pedestrians are departing from vertex |id_3| (line **5**). +* Pedestrians want to go to locations |id_1| and |id_2| (line **6**). +* The ``cost`` column on ``walk_net`` is in seconds. (line **3**) -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_3.txt - :end-before: exercise_5_4.txt - :emphasize-lines: 6, 9, 10 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: one_to_many.txt + :end-before: many_to_many.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_3.txt + .. literalinclude:: ../scripts/basic/pedestrian/one_to_many.txt Exercise 4: Many Pedestrians going to different destinations @@ -217,29 +221,28 @@ Exercise 4: Many Pedestrians going to different destinations * from "|place_1|" and "|place_2|" * to "|place_4|" and "|place_5|" -* Calculate routes with costs in minutes. +* Calculate routes with costs in minutes at walking speed ``s = 1.3 m/s``. -.. image:: images/chapter5/pedestrian_route4.png +.. image:: images/pedestrian/pedestrian_many_to_many.png :scale: 25% .. rubric:: Solution: -* The pedestrians depart from |id_1| and |id_2| (line **9**). -* The pedestrians want to go to destinations |id_4| and |id_5| (line **10**). -* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` (line **6**). -* Result adds the costs per destination. +* The pedestrians depart from |id_1| and |id_2| (line **5**). +* The pedestrians want to go to destinations |id_4| and |id_5| (line **6**). +* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s``. -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_4.txt - :end-before: exercise_5_5.txt - :emphasize-lines: 6, 9-10 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: many_to_many.txt + :end-before: combinations.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_4.txt + .. literalinclude:: ../scripts/basic/pedestrian/many_to_many.txt -.. note:: .. include:: ../scripts/basic/chapter_5/note_1.txt +.. note:: .. include:: ../scripts/basic/pedestrian/note_1.txt Exercise 5: Combination of routes ............................................................................... @@ -251,26 +254,26 @@ Exercise 5: Combination of routes * First pedestrian goes from "|place_1|" to "|place_4|" * Second pedestrian goes from "|place_2|" to "|place_5|" -* Calculate routes with costs in minutes. +* Calculate routes with costs in minutes at walking speed ``s = 1.3 m/s``. -.. image:: images/chapter5/pedestrian_combinations.png +.. image:: images/pedestrian/pedestrian_combinations.png :scale: 25% .. rubric:: Solution: -* First pedestrian departs from |id_1| and the destination is |id_4| (line **11**). -* Second pedestrian departs from |id_2| and the destination is |id_5| (line **12**). -* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` +* First pedestrian departs from |id_1| and the destination is |id_4| (line **6**). +* Second pedestrian departs from |id_2| and the destination is |id_5| (line **7**). +* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s``. -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_5.txt - :end-before: exercise_5_6.txt - :emphasize-lines: 11-12 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: combinations.txt + :end-before: dijkstracost.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_5.txt + .. literalinclude:: ../scripts/basic/pedestrian/combinations.txt pgr_dijkstraCost ------------------------------------------------------------------------------- @@ -307,57 +310,24 @@ Exercise 6: Time for many Pedestrians going to different destinations * Get only the cost in minutes. -.. image:: images/chapter5/pedestrian_route5.png +.. image:: images/pedestrian/pedestrian_dijkstracost.png :scale: 25% - :alt: From the hotels to the |place_4| and |place_5| .. rubric:: Solution: -* The pedestrians depart from |id_1| and |id_2| (line **9**). -* The pedestrians want to go to destinations |id_4| and |id_5| (line **10**). -* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` (line **6**). +* The pedestrians depart from |id_1| and |id_2| (line **5**). +* The pedestrians want to go to destinations |id_4| and |id_5| (line **6**). +* The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s``. * Result as aggregated costs. -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_6.txt - :end-before: exercise_5_7.txt - :emphasize-lines: 2 +.. literalinclude:: ../scripts/basic/pedestrian/pedestrian.sql + :language: sql + :start-after: dijkstracost.txt + :end-before: note_1.txt + :linenos: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_6.txt + .. literalinclude:: ../scripts/basic/pedestrian/dijkstracost.txt Compare with `Exercise 4: Many Pedestrians going to different destinations`_ 's note. - - -Exercise 7: Many Pedestrians going to different destinations summarizing the total costs per departure -........................................................................................................... - -.. rubric:: Problem: - -* Walking - - * from "|place_1|" or "|place_2|" - * to "|place_4|" or "|place_5|" - -* Summarize cost in minutes. - -.. rubric:: Solution: - -* The pedestrians depart from |id_1| and |id_2| (line **9**). -* The pedestrians want to go to destinations |id_4| and |id_5| (line **10**). -* The cost to be in minutes, with a walking speed s = 1.3 m/s and t = d/s (line **6**). -* Result adds the costs per destination. - -.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql - :language: sql - :start-after: exercise_5_7.txt - :end-before: note_1.txt - :emphasize-lines: 13-14 - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_5/exercise_5_7.txt - -.. note:: .. include:: ../scripts/basic/chapter_5/note_2.txt diff --git a/docs/basic/plpgsql_function.rst b/docs/basic/plpgsql_function.rst deleted file mode 100644 index 0156716dd..000000000 --- a/docs/basic/plpgsql_function.rst +++ /dev/null @@ -1,466 +0,0 @@ -.. - **************************************************************************** - pgRouting Workshop Manual - 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/ - **************************************************************************** - -pl/pgsql function -############################################################################### - -.. image:: images/chapter5/route.png - :width: 250pt - :align: center - -Other kind of functions are `pl/pgsql -`__. As the applications -requirements become more complex, using wrappers of previously defined functions -becomes necessary for clarity. - -.. contents:: Chapter contents - -Requirements for routing from A to B -=============================================================================== - -.. rubric:: Chapter problem: - -* Create a function ``wrk_fromAtoB`` that allows routing from 2 geometries. -* The function takes latitude/longitude points as input parameters. -* Returns a route that includes a geometry so that if can be displayed, for example, in QGIS. -* Will also return some other attributes. - -The detailed description: - -.. rubric:: Input parameters - -================ ========== ================================================ -Parameter type Description -================ ========== ================================================ -``edges_subset`` REGCLASS Edge table name identifier. -``lat1`` NUMERIC The latitude of the `departure` point. -``lon1`` NUMERIC The longitude of the `departure` point. -``lat2`` NUMERIC The latitude of the `destination` point. -``lon2`` NUMERIC The longitude of the `destination` point. -``do_debug`` BOOLEAN Flag to create a ``WARNING`` with the query that - is been executed -================ ========== ================================================ - - -.. rubric:: Output columns - -================= ================================================= -Column Description -================= ================================================= -``seq`` For ordering purposes. -``gid`` The edge identifier that can be used to JOIN the results to the ``ways`` table. -``name`` The street name. -``azimuth`` Between start and end node of an edge. -``length`` In meters. -``minutes`` Minutes taken to traverse the segment. -``route_geom`` The road geometry with corrected directionality. -================= ================================================= - - -For this chapter, the following points will be used for testing. - -* (lat,lon) = (@POINT1_LAT@, @POINT1_LON@) -* (lat,lon) = (@POINT2_LAT@, @POINT2_LON@) - -The Vertices Table -=============================================================================== - -Graphs have a `set of edges` and a `set of vertices` associated to it. -The views need their vertices table. - -Exercise 1: Create vertices table -------------------------------------------------------------------------------- - -.. rubric:: Problem - -* Create a vertices table for the views: - - * ``vehicle_net`` - * ``taxi_net`` - * ``walk_net`` - -.. rubric:: Solution - - -* Use ``pgr_extractVertices`` (explained in :doc:`graph_views`) to create the - vertices table -* ``JOIN`` the vertices table with ``ways_vertices`` (created in - :doc:`graph_views`) to get the ``x``, ``y``, ``geom`` information. - -For ``vehicle_net``: - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :emphasize-lines: 1,6 - :start-after: views_vertices1.txt - :end-before: views_vertices2.txt - -For ``taxi_net``: - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :start-after: views_vertices2.txt - :end-before: views_vertices3.txt - -For ``walk_net``: - -Modify the above queries to create the ``walk_net_vertices`` table. - -.. collapse:: Answer - - .. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :start-after: views_vertices3.txt - :end-before: exercise_8_3_1.txt - -.. note:: It is left to the reader to remove disconected components on the views. - - See :doc:`graph_views` - -Exercise 3: Nearest Vertex -------------------------------------------------------------------------------- - -.. rubric:: Problem - -Calculate the (OSM) identifier of the nearest vertex to a point. - -In particular use the following (lat, lon) value: ``(@POINT1_LAT@, @POINT1_LON@)``. - -* calculate the nearest OSM identifier of the vertex to: - - * ``ways_vertices`` - * ``vehicle_net_vertices`` - * ``taxi_net_vertices`` - * ``walk_net_vertices`` - -.. rubric:: Solution - -* Remember that the ``id`` has an OSM vertex identifier on the vertices tables. -* Using the Postgis distance operator `<-> `__ to order by distance. -* Get only the first row, to obtain the nearest identifier of the vertex. - -For ``ways_vertices``: - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_3_1.txt - :end-before: exercise_8_3_2.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_3_1.txt - -For ``vehicle_net_vertices``: - -Modify the previous query. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :linenos: - :emphasize-lines: 1,2 - :start-after: exercise_8_3_2.txt - :end-before: exercise_8_3_3.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_3_2.txt - -For ``taxi_net_vertices``: - -Modify the previous query. - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_3_3.txt - -For ``walk_net_vertices``: - -Modify the previous query. - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_3_4.txt - - -Exercise 4: Nearest vertex function -------------------------------------------------------------------------------- - -.. rubric:: Problem - -When operations look similar for different tables, a function can be created. - -* Create a function that calculates the OSM identifier of the nearest vertex to a point. -* Function name: ``wrk_nearest``. -* Needs to work only for the **final application** views and table. - - -The input parameters: - -============ ========== === -Column type Description -============ ========== === -vertex_table REGCLASS Table name identifier. -lat NUMERIC The latitude of a point. -lon NUMERIC The longitude of a point. -============ ========== === - -The output: - -========= ===== -type Description -========= ===== -BIGINT the OSM identifier that is nearest to (lat,lon). -========= ===== - -.. rubric:: Solution - -* The function returns only one ``BIGINT`` value. -* Using `format - `__ - to build the query. - - * The structure of the query is similar to `Exercise 3: Nearest Vertex`_ - solutions. - * ``%1$I`` for the table name identifier. - * ``%2$s`` and ``%3$s`` for the latitude and longitude. - - * The point is formed with (lon/lat) ``(%3$s, %2$s)``. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :force: - :start-after: exercise_8_4.txt - :end-before: exercise_8_5_1.txt - - -Exercise 5: Test nearest vertex function -------------------------------------------------------------------------------- - -.. image:: images/chapter8/ch8-vehiclenet.png - :scale: 15% - :alt: Nearest Vertex in vehicle network - -.. image:: images/chapter8/ch8-taxinet.png - :scale: 15% - :alt: Nearest Vertex in taxi network - -.. image:: images/chapter8/ch8-walknet.png - :scale: 15% - :alt: Nearest Vertex in walk network - -.. rubric:: Problem - -* Test the ``wrk_Nearest`` function. - -Use the following (lat,lon) values: ``(@POINT1_LAT@, @POINT1_LON@)``. - -* The point is the same as in `Exercise 3: Nearest Vertex`_ problem. - - * Verify the results are the same. - -* calculate the nearest OSM identifier of the vertex to: - - * ``ways_vertices`` - * ``vehicle_net_vertices`` - * ``taxi_net_vertices`` - * ``walk_net_vertices`` - -.. rubric:: Solution - -For ``ways_vertices``: - -* Use the function with ``ways_vertices`` as the ``vertex_table`` parameter. -* Pass the (lat,lon) values as second and third parameters. -* Using the function on the original data does not return the OSM identifier. - - The value stored in ``id`` column is not the OSM identifier. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_5_1.txt - :end-before: exercise_8_5_2.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_5_1.txt - -For ``vehicles_net_vertices``: - -* Modify the previous query. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_5_2.txt - :end-before: exercise_8_5_3.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_5_2.txt - -For ``taxi_net_vertices``: - -* Modify the previous query. - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_5_3.txt - -For ``walk_net_vertices``: - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_5_4.txt - - -wrk_fromAtoB function -=============================================================================== - -In this section, creation and testing the required function will be tackled. - - -Exercise 6: Creating the main function -------------------------------------------------------------------------------- - -.. rubric:: Problem - -* Create the function ``wrk_fromAtoB``. -* Follow the description given at `Requirements for routing from A to B`_. -* Use specialized functions: - - * ``wrk_NearestOSM`` created on `Exercise 4: Nearest vertex function`_. - - * It receives the point in natural language format. - * Obtains the OSM identifier needed by ``wrk_dijkstra``. - - * ``wrk_dijkstra`` created in :doc:`sql_function` - -.. rubric:: Solution - -The function's signature: - -* The input parameters highlighted. -* The output columns are not highlighted. -* The function returns a set of values. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :emphasize-lines: 2-5 - :start-after: exercise_8_6.txt - :end-before: signature ends - -| - -The function's body: - -Call to the function ``wrk_dijkstra`` - -* Using PostgreSQL ``format`` to make substitutions - - * The first parameter is the string to be replaced - * The rest are the data parameters, are the strings use for replacement. - -* ``wrk_dijkstra`` obtains the values for the output -* The ``edges_subset`` value will replace ``%1$I``: -* For the ``source`` and ``target``: - - * ``wrk_Nearest`` is used to find the identifier. - - * The vertices table name is formed with ``%1$I_vertices``. - - * ``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively. - * ``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively. - -* To get the constructed query in form of a warning: - - * The ``WARNING`` will be issued only when ``do_debug`` is true. - * No output will be generated. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :force: - :emphasize-lines: 9-13, 16-18, 20-22 - :start-after: signature ends - :end-before: exercise_8_7_1.txt - -.. collapse:: The complete function - - .. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :force: - :start-after: exercise_8_6.txt - :end-before: exercise_8_7_1.txt - -Exercise 7: Using the main function -------------------------------------------------------------------------------- - -.. image:: images/chapter8/ch8-e7.png - :scale: 25% - :alt: View of roads for taxis along with source and destination - -.. rubric:: Problem - -Use ``wrk_fromAtoB`` - -* Departure point is: (lat,lon) = ``(@POINT1_LAT@, @POINT1_LON@)`` -* Destination point is: (lat,lon) = ``(@POINT2_LAT@, @POINT2_LON@)`` -* For ``vehicle_net``: - - * Use with default value of ``do_debug``. - -* For ``taxi_net``: - - * Use with ``do_debug`` set to ``true``. - -* For ``walk_net``: - - * Use with default value of ``do_debug``. - * Store results on a table. - * Show the table contents. - - -.. Note:: The function is not meant to be used with ``ways`` - -.. rubric:: Solution - -For ``vehicle_net``: - -* The first parameter is the table name. -* The next two parameters are the latitude and longitude of the departure point. -* The next two parameters are the latitude and longitude of the destination point. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_7_1.txt - :end-before: exercise_8_7_2.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_7_1.txt - -For ``taxi_net``: - -* Do a dry run by adding ``true`` to get the query that is executed. - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_7_2.txt - :end-before: exercise_8_7_3.txt - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_7_2.txt - -For ``walk_net``: - -.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql - :language: sql - :start-after: exercise_8_7_3.txt - :end-before: \o - -.. collapse:: Query results - - .. literalinclude:: ../scripts/basic/chapter_8/exercise_8_7_3.txt diff --git a/docs/basic/sql_function.rst b/docs/basic/sql_function.rst index 0754b8eba..2aa414699 100644 --- a/docs/basic/sql_function.rst +++ b/docs/basic/sql_function.rst @@ -11,7 +11,7 @@ SQL function ############################################################################### -.. image:: images/chapter5/route.png +.. image:: images/sql_function/sql_route_names.png :scale: 25% :align: center @@ -26,18 +26,26 @@ stored procedures or functions. Stored procedures or functions are an effective way to wrap application logic, in this case, related to routing logic and requirements. -The application requirements +The function requirements =============================================================================== -A front end needs the following routing information: - - ``seq`` - A unique identifier of the rows - - ``id`` - The segment's identifier - - ``name`` - The segment's name - - ``length`` - The segment's length - - ``seconds`` - Number of seconds to traverse the segment - - ``azimuth`` - The azimuth of the segment - - ``route_geom`` - The routing geometry - - ``route_readable`` - The geometry in human readable form. +The function will wrap ``pgr_dijkstra``. + +The function needs to work on any of the networks designed: + +- ``vehicle_net`` +- ``taxi_net`` + +The function needs to return the following routing information: + +- ``seq`` - A unique identifier of the rows +- ``id`` - The segment's identifier +- ``name`` - The segment's name +- ``length`` - The segment's length +- ``seconds`` - Number of seconds to traverse the segment +- ``azimuth`` - The azimuth of the segment +- ``route_geom`` - The routing geometry +- ``route_readable`` - The geometry in human readable form. .. rubric:: Design of the function @@ -50,8 +58,8 @@ output columns: Parameter Type Description ================= ========= ================= ``edges_subset`` REGCLASS The table/view that is going to be used for processing -``source_osm`` BIGINT The OSM identifier of the `departure` location. -``target_osm`` BIGINT The OSM identifier of the `destination` location. +``source`` BIGINT The identifier of the `departure` location. +``target`` BIGINT The identifier of the `destination` location. ================= ========= ================= .. rubric:: output columns @@ -63,16 +71,13 @@ Name Type Description ``id`` BIGINT The edge identifier. ``name`` TEXT The name of the segment. ``seconds`` FLOAT The number of seconds it takes to traverse the segment. +``length`` FLOAT The length in meters of the segment. ``azimuth`` FLOAT The azimuth of the segment. -``length`` FLOAT The leng in meters of the segment. ``route_readable`` TEXT The geometry in human readable form. ``route_geom`` geometry The geometry of the segment in the correct direction. ================== ========= ================= -.. note:: For the following exercises only ``vehicle_net`` will be used, but - you can test the queries with the other views. - Additional information handling =============================================================================== @@ -82,13 +87,13 @@ When the application needs additional information, like the name of the street, Exercise 1: Get additional information ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e4.png +.. image:: images/sql_function/sql_route_names.png :width: 300pt :alt: Route showing names .. rubric:: Problem -* From |ch7_place_1| to |ch7_place_2|, using OSM identifiers. +* From |ch7_place_1| to |ch7_place_2| * Get the following information: * ``seq`` @@ -99,23 +104,28 @@ Exercise 1: Get additional information .. rubric:: Solution -* The columns asked (line **2**). -* Rename ``pgr_dijkstra`` results to application requirements names. (line **4**). -* ``LEFT JOIN`` the results with ``vehicle_net`` to get the additional information. (line **9**) +* The function returns the columns asked. (line **4**) +* Rename ``pgr_dijkstra`` results to application requirements names. (line + **12**). +* ``LEFT JOIN`` the results with ``vehicle_net`` to get the additional + information. (line **17**) - * ``LEFT`` to include the row with ``id = -1`` because it does not - exist on ``vehicle_net`` + * ``LEFT`` to include the row with ``id = -1`` because it does not exist on + ``vehicle_net`` -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :linenos: - :emphasize-lines: 2, 4,9 - :start-after: exercise_7_5.txt - :end-before: exercise_7_6.txt +* Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line) + +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql + :language: sql + :linenos: + :force: + :emphasize-lines: 4,12,17 + :start-after: get_more_info.txt + :end-before: get_read_geom.txt .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_5.txt + .. literalinclude:: ../scripts/basic/sql_function/get_more_info.txt Geometry handling @@ -129,7 +139,7 @@ with PostGIS functions. Exercise 2: Route geometry (human readable) ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e4.png +.. image:: images/sql_function/sql_route_readable.png :width: 300pt :alt: From |ch7_place_1| to |ch7_place_2| @@ -141,48 +151,36 @@ Route from the |ch7_place_1| to |ch7_place_2| * geometry ``geom`` in human readable form named as ``route_readable`` -.. tip:: - - ``WITH`` provides a way to write auxiliary statements in larger queries. - It can be thought of as defining temporary tables that exist just for one query. - .. rubric:: Solution -* The routing query named ``results`` in a WITH clause. (lines **2** to **5**) -* The results from the previous exercise. (lines **8** and **9**) - - .. note:: For result reading purposes, the result columns from the previous - are in a comment. Uncomment to see the complete results for the problem. - +* The function returns ``route_readable``. (line **6**) +* The routing query named ``results`` in a WITH clause. (line **11**) * The ``geom`` processed with ``ST_AsText`` to get the human readable form. - (line **12**) - - * Renaming the result to ``route_readable`` + (line **19**). +* Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line) -* The ``LEFT JOIN`` with ``vehicle_net``. (line **14**) - - -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :linenos: - :emphasize-lines: 2-5,8-9,12,14 - :start-after: exercise_7_6.txt - :end-before: exercise_7_7.txt +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql + :language: sql + :linenos: + :force: + :emphasize-lines: 6,11,19 + :start-after: get_read_geom.txt + :end-before: get_geom.txt .. exercise 2 results .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_6.txt + .. literalinclude:: ../scripts/basic/sql_function/get_read_geom.txt Exercise 3: Route geometry (binary format) ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e6.png +.. image:: images/sql_function/sql_route_geom.png :width: 300pt - :alt: From |ch7_place_1| to |ch7_place_2| showing arrows. + :alt: From |ch7_place_1| to |ch7_place_2| .. rubric:: Problem @@ -194,28 +192,27 @@ Route from the |ch7_place_1| to |ch7_place_2| .. rubric:: Solution -* The query from the previous exercise is used -* The ``SELECT`` clause also contains: - - * The ``geom`` including the renaming (line **9**) +* The function returns ``route_geom``. (line **7**) +* The geometry ``geom`` of the segments (line **21**) +* Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line) -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :emphasize-lines: 10 - :linenos: - :start-after: exercise_7_7.txt - :end-before: wrong_directionality.txt +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql + :language: sql + :emphasize-lines: 7,21 + :force: + :linenos: + :start-after: get_geom.txt + :end-before: wrong_directionality.txt .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_7.txt - + .. literalinclude:: ../scripts/basic/sql_function/get_geom.txt Exercise 4: Route geometry directionality ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e8.png +.. image:: images/sql_function/sql_route_geom_detail.png :width: 300pt :alt: From |ch7_place_1| to |ch7_place_2| @@ -228,16 +225,14 @@ starting point of the next geometry * Inspecting the detail of the results of `Exercise 2: Route geometry (human readable)`_ - * Rows **59** to **61** do not match that criteria - .. collapse:: Query: Rows where criteria is not met - .. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql + .. literalinclude:: ../scripts/basic/sql_function/sql_function.sql :language: sql :start-after: wrong_directionality.txt - :end-before: exercise_7_8.txt + :end-before: fix_directionality.txt -.. literalinclude:: ../scripts/basic/chapter_7/wrong_directionality.txt +.. literalinclude:: ../scripts/basic/sql_function/wrong_directionality.txt :language: sql .. rubric:: Problem @@ -255,46 +250,46 @@ Route from the |ch7_place_1| to |ch7_place_2| To get the correct direction some geometries need to be reversed: * Reversing a geometry will depend on the ``node`` column of the query to - Dijkstra (line **2**) + Dijkstra. * A conditional ``CASE`` statement that returns the geometry in human readable form: - * Of the geometry when ``node`` is the ``source`` column. (line **11**) - * Of the reversed geometry when ``node`` is not the ``source`` column. (line **12**) + * Of the geometry when ``node`` is the ``source`` column. + * Of the reversed geometry when ``node`` is not the ``source`` column. * A conditional ``CASE`` statement that returns: - * The geometry when ``node`` is the ``source`` column. (line **17**) - * The reversed geometry when ``node`` is not the ``source`` column. (line **16**) + * The geometry when ``node`` is the ``source`` column. + * The reversed geometry when ``node`` is not the ``source`` column. -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :linenos: - :emphasize-lines: 3,9,11,12,16,17 - :start-after: exercise_7_8.txt - :end-before: good_directionality.txt +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql + :language: sql + :linenos: + :force: + :start-after: fix_directionality.txt + :end-before: good_directionality.txt .. collapse:: results - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_8.txt + .. literalinclude:: ../scripts/basic/sql_function/fix_directionality.txt -Inspecting some the problematic rows, the directionality has been fixed. +Inspecting the problematic rows, the directionality has been fixed. .. collapse:: Query: Rows where criteria is not met - .. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql + .. literalinclude:: ../scripts/basic/sql_function/sql_function.sql :language: sql :start-after: good_directionality.txt - :end-before: exercise_7_9.txt + :end-before: use_directionality.txt -.. literalinclude:: ../scripts/basic/chapter_7/good_directionality.txt +.. literalinclude:: ../scripts/basic/sql_function/good_directionality.txt Exercise 5: Using the geometry ------------------------------------------------------------------------------- -.. image:: images/chapter7/ch7-e7.png +.. image:: images/sql_function/sql_azimuth_fixed.png :width: 300pt :alt: From |ch7_place_1| to the |ch7_place_2| show azimuth @@ -308,144 +303,73 @@ This exercise will make use an additional function ``ST_Azimuth``. Modify the query from the previous exercise -* Additionally obtain the azimuth of the correct geometry. -* Because ``vehicle_net`` and the other 2 views are sub graphs of ``ways``, do - the ``JOIN`` with ``ways``. +* Additionally obtain the azimuth in degrees of the corrected geometry. .. rubric:: Solution -* Move the query that gets the additional information into the ``WITH`` statement. - - * Name it ``additional``. (line **6**) - -* The ``ways`` table geometry name is ``the_geom``. -* Final ``SELECT`` statements gets: +* The function returns ``aximuth``. (line **8**) +* The query from previous exercise is wrapped under additional subquery. (line + **18**) +* The ``azimuth`` is processed in degrees. (line **35**). +* Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line) - * Calculates the azimuth of ``route_geom``. (line **27**) - -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :language: sql - :emphasize-lines: 6,27 - :start-after: exercise_7_9.txt - :end-before: exercise_7_10.txt +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql + :language: sql + :force: + :linenos: + :emphasize-lines: 8,18,35 + :start-after: use_directionality.txt + :end-before: using_fn1.txt .. collapse:: results - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_9.txt - -Creating the Function -=============================================================================== - -The following function simplifies (and sets default values) when it calls the -shortest path Dijkstra function. - -.. warning:: - pgRouting uses heavely function overloading: - - * Avoid creating functions with a name of a pgRouting routing function - * Avoid the name of a function to start with `pgr_`, `_pgr` or `ST_` + .. literalinclude:: ../scripts/basic/sql_function/use_directionality.txt -Exercise 6: Function for an application +Exercise 6: Using the function ------------------------------------------------------------------------------- -.. rubric:: Problem - -Putting all together in a SQL function - -* function name ``wrk_dijkstra`` -* Should work for any given view. - - * Allow a view as a parameter - * A table can be used if the columns have the correct names. - -* ``source`` and ``target`` are in terms of ``osm_id``. -* The result should meet the requirements indicated at the beginning of the chapter - - -.. rubric:: Solution - -* The signature of the function: - - * The input parameters are from line **4** to **6**. - * The output columns are from line **7** to **14** (not highlighted). - * The function returns a set. (line **16**) - -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :emphasize-lines: 4-6,16 - :language: sql - :start-after: exercise_7_10.txt - :end-before: BODY - -* The body of the function: - - * Appending the view name on line **7** in the ``SELECT`` query to ``pgr_dijkstra``. - * Using the data to get the route from ``source`` to ``target``. (line **8**) - * The ``JOIN`` with ``ways`` is necessary, as the views are subset of ``ways`` (line **25**) - - -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql - :emphasize-lines: 7,8,25 - :language: sql - :force: - :start-after: RETURNS SETOF - :end-before: using_fn1.txt - -.. collapse:: Response of command - - .. literalinclude:: ../scripts/basic/chapter_7/exercise_7_10.txt - -.. _exercise-ch7-e10: - -Exercise 7: Using the function -------------------------------------------------------------------------------- - -.. rubric:: Problem +Try the function with a combination of the interesting places: -* Test the function with the three views -* From the |ch7_place_1| to the |ch7_place_2| using the OSM identifier +* |id_1| |place_1| +* |id_2| |place_2| +* |id_3| |place_3| +* |id_4| |place_4| +* |id_5| |place_5| -.. rubric:: Solution +Using different networks: -* Use the function on the ``SELECT`` statement -* The first parameter changes based on the view to be tested +- ``vehicle_net`` +- ``taxi_net`` +- ``walk_net`` Names of the streets in the route -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql :language: sql :start-after: using_fn1.txt :end-before: using_fn2.txt .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/using_fn1.txt + .. literalinclude:: ../scripts/basic/sql_function/using_fn1.txt Total seconds spent in each street -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql :language: sql :start-after: using_fn2.txt :end-before: using_fn3.txt .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/using_fn2.txt + .. literalinclude:: ../scripts/basic/sql_function/using_fn2.txt -Get all the information of the route +Why it does not fully work with ``walk_net``? -.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql +.. literalinclude:: ../scripts/basic/sql_function/sql_function.sql :language: sql :start-after: using_fn3.txt .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_7/using_fn3.txt - - -Try the function with a combination of the interesting places: - -* |osmid_1| |place_1| -* |osmid_2| |place_2| -* |osmid_3| |place_3| -* |osmid_4| |place_4| -* |osmid_5| |place_5| + .. literalinclude:: ../scripts/basic/sql_function/using_fn3.txt diff --git a/docs/basic/vehicle.rst b/docs/basic/vehicle.rst index c9f0875bf..27902bfd5 100644 --- a/docs/basic/vehicle.rst +++ b/docs/basic/vehicle.rst @@ -11,7 +11,7 @@ Vehicle Routing =============================================================================== -.. image:: images/chapter6/ad7.png +.. image:: images/vehicle/vehicle_route_coming.png :scale: 25% :align: center @@ -61,23 +61,22 @@ be a combination of multiple parameters. #. Number of (``source, target``) segments with ``cost < 0`` (line **3**). - .. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.1-1 - :end-before: section-6.1-2 + .. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: oneway_cost.txt + :end-before: oneway_revc.txt :language: sql - :emphasize-lines: 3 - .. literalinclude:: ../scripts/basic/chapter_6/section-6.1-1.txt + .. literalinclude:: ../scripts/basic/vehicles/oneway_cost.txt #. Number of (``target, source``) segments with ``reverse_cost < 0`` (line **3**). - .. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.1-2 - :end-before: section-6.1.1 + .. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: oneway_revc.txt + :end-before: route_going.txt :language: sql :emphasize-lines: 3 - .. literalinclude:: ../scripts/basic/chapter_6/section-6.1-2.txt + .. literalinclude:: ../scripts/basic/vehicles/oneway_revc.txt Exercise 1: Vehicle routing - going @@ -87,25 +86,23 @@ Exercise 1: Vehicle routing - going * From the "|place_1|" to the "|place_3|" by car. -.. image:: images/chapter6/ad7.png +.. image:: images/vehicle/vehicle_route_going.png :scale: 25% :alt: From |place_1| to the |place_3| by car. .. rubric:: Solution: -* Use ``cost`` (line **6**) and ``reverse_cost`` (line **7**) columns, which are in unit ``degrees``. -* The vehicle is going from vertex |id_1| (line **10**) to |id_3| (line **11**). +* ``cost`` and ``reverse_cost`` columns, are in seconds. +* The vehicle is going from vertex |id_1| to |id_3|. -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.1.1 - :end-before: section-6.1.2 +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: route_going.txt + :end-before: route_coming.txt :language: sql - :emphasize-lines: 6,7,10,11 - .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_6/section-6.1.1.txt + .. literalinclude:: ../scripts/basic/vehicles/route_going.txt Exercise 2: Vehicle routing - returning @@ -115,25 +112,22 @@ Exercise 2: Vehicle routing - returning * From "|place_3|" to the "|place_1|" by car. -.. image:: images/chapter6/ad8.png +.. image:: images/vehicle/vehicle_route_coming.png :scale: 25% :alt: From |place_3| to the |place_1| by car. .. rubric:: Solution: -* Use ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, in - units seconds. -* The vehicle is going from vertex |id_3| (line **10**) to |id_1| (line **11**). +* The vehicle is going from vertex |id_3| to |id_1|. -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.1.2 - :end-before: section-6.1.3 +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: route_coming.txt + :end-before: time_is_money.txt :language: sql - :emphasize-lines: 6,7,10,11 .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_6/section-6.1.2.txt + .. literalinclude:: ../scripts/basic/vehicles/route_coming.txt .. note:: On a directed graph, going and coming back routes, most of the time are different. @@ -145,30 +139,30 @@ Exercise 3: Vehicle routing when time is money * From "|place_3|" to the "|place_1|" by taxi. -.. image:: images/chapter6/ad8.png +.. image:: images/vehicle/vehicle_time_is_money.png :width: 300pt :alt: From |place_3| to |place_1| by taxi. .. rubric:: Solution: +* Use the ``taxi_net``. * The cost is ``$100 per hour``. - * Using ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, which are in unit ``seconds``. + * Using ``cost`` and ``reverse_cost`` columns, which are in seconds. - * The duration in hours is ``cost_s / 3600``. - * The cost in ``dollars`` is ``cost_s / 3600 * 100``. + * The duration in hours is ``cost / 3600``. + * The cost in ``dollars`` is ``cost / 3600 * 100``. -* The vehicle is going from vertex |id_3| (line **10**) to |id_1| (line **11**). +* The vehicle is going from vertex |id_3| to |id_1|. -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.1.3 - :end-before: section-6.2-1 +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: time_is_money.txt + :end-before: add_penalty.txt :language: sql - :emphasize-lines: 6-7,10-11 .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_6/section-6.1.3.txt + .. literalinclude:: ../scripts/basic/vehicles/time_is_money.txt .. note:: Comparing with `Exercise 2: Vehicle routing - returning`_: @@ -182,63 +176,8 @@ Exercise 3: Vehicle routing when time is money Cost manipulations ------------------------------------------------------------------------------- -When dealing with data, being aware of what kind of data is being used can improve results. - -* Vehicles can not circulate on pedestrian ways - -.. image:: images/chapter6/pedestrian_only_roads.png - :scale: 25% - :alt: - -| - -Penalizing or removal of pedestrian ways will make the results closer to reality. - -When converting data from OSM format using the `osm2pgrouting` tool, there is an -additional table: ``configuration``. - -.. rubric:: The ``configuration`` table structure can be obtained with the following command. - -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.2-1 - :end-before: section-6.2-2 - - -.. literalinclude:: ../scripts/basic/chapter_6/section-6.2-1.txt - - -.. image:: images/chapter6/route_using_pedestrian.png - :scale: 25% - :alt: tag_id values - -| - -In the image above there is a detail of the ``tag_id`` of the roads. - -.. rubric:: The ``OSM way`` types: - -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.2-2 - :end-before: section-6.2-3 - :language: sql - -.. literalinclude:: ../scripts/basic/chapter_6/section-6.2-2.txt - -Also, on the ``ways`` table there is a column that can be used to ``JOIN`` with the ``configuration`` table. - -.. rubric:: The ``ways`` types: - -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.2-3 - :end-before: section-6.2.1 - :language: sql - -.. literalinclude:: ../scripts/basic/chapter_6/section-6.2-3.txt - - In this workshop, costs are going to be manipulated using the ``configuration`` table. - Exercise 4: Vehicle routing without penalization ............................................................................... @@ -246,36 +185,39 @@ Exercise 4: Vehicle routing without penalization * From the "|place_3|" to "|place_1|" -.. image:: images/chapter6/ad7.png +.. image:: images/vehicle/vehicle_route_coming.png :scale: 25% :alt: From |place_3| to |place_1| .. rubric:: Solution: -.. rubric:: Add a penalty column +* Add a penalty column -* All roads have a ``penalty`` of ``1`` (line **3**). + * All roads have a ``penalty`` of ``1``. -.. rubric:: Query + .. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: add_penalty.txt + :end-before: use_penalty.txt * The vehicle's cost in this case will be in penalized seconds. - * Costs (in seconds) are to be multiplied by :code:`penalty` (lines **12** and **13**). - * Costs wont change (times 1 leaves the value unchanged). + * Costs are to be multiplied by :code:`penalty` (lines **5** and **6**). + * Costs won't change (:math:`cost * 1 = cost`). * The :code:`configuration` table is linked with the :code:`ways` table by the - :code:`tag_id` field using a ``JOIN`` (lines **14** and **15**). -* The vehicle is going from vertex |id_3| (line **17**) to vertex |id_1| (line **18**). + :code:`tag_id` field using a ``JOIN`` +* The vehicle is going from vertex |id_3| to vertex |id_1|. -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.2.1 - :end-before: section-6.2.2-1 - :language: sql - :emphasize-lines: 14,15 +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: use_penalty.txt + :end-before: update_penalty.txt + :language: sql + :linenos: + :force: .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_6/section-6.2.1.txt + .. literalinclude:: ../scripts/basic/vehicles/use_penalty.txt Exercise 5: Vehicle routing with penalization @@ -285,7 +227,7 @@ Exercise 5: Vehicle routing with penalization Change the cost values for the :code:`configuration` table, in such a way, that the -* Pedestrian roads are not used. +* Bicycle roads are not used. * ``penalty < 0`` makes the road not to be included in the graph. @@ -297,41 +239,41 @@ Change the cost values for the :code:`configuration` table, in such a way, that * ``penalty < 1`` makes the road faster for the calculations. +* All other roads are not penalized. + + * ``penalty = 1`` does not modify the road times. + The ``penalty`` values can be changed with ``UPDATE`` queries. .. note:: These values are an exaggeration. -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: section-6.2.2-1 - :end-before: section-6.2.2-2 - :language: sql +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: update_penalty.txt + :end-before: get_penalized_route.txt + :language: sql + :force: .. rubric:: Problem: * From the "|place_3|" to "|place_1|" with penalization. -.. image:: images/chapter6/ad11.png +.. image:: images/vehicle/vehicle_use_penalty.png :scale: 25% :alt: From |place_3| to |place_1| .. rubric:: Solution: -* Using ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, which are in unit ``seconds``. - - * Costs are to be multiplied by :code:`penalty` (lines **6** and **7**). +* Using the same query from `Exercise 4: Vehicle routing without penalization`_ -* The :code:`configuration` table is linked with the :code:`ways` table by the - :code:`tag_id` field using a ``JOIN`` (lines **8** and **9**). -* The vehicle is going from vertex |id_3| (line **11**) to vertex |id_1| (line **12**). - -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: 6.2.2-2 - :end-before: 6.6 - :language: sql +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: get_penalized_route.txt + :end-before: time_in_secs.txt + :linenos: + :language: sql .. collapse:: Query results - .. literalinclude:: ../scripts/basic/chapter_6/section-6.2.2-2.txt + .. literalinclude:: ../scripts/basic/vehicles/get_penalized_route.txt .. note:: Comparing with `Exercise 3: Vehicle routing when time is money`_: @@ -341,38 +283,37 @@ The ``penalty`` values can be changed with ``UPDATE`` queries. * The node sequence changed. * The edge sequence changed. - * The route is avoiding the residential roads that have ``tag_id = 110``. * The costs do not change proportionally. -Exercise 6: Time in seconds of penalized route +Exercise 6: Time in seconds of penalized route using a view ............................................................................... - .. rubric:: Problem: Get the times in seconds of a penalized route .. rubric:: Solution: -* Use as inner query the penalized query joined with the ways table - - * Keep the ``edge`` as ``gid`` (line **6**) - * Join using ``gid`` (line **18**) +* Create a penalized view by joining the ``vehicle_net`` joined with the + ``configuration`` table + * Use the inner query from `Exercise 5: Vehicle routing with penalization`_ -.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql - :start-after: 6.6 - :language: sql - :force: + .. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: penalized_view.txt + :end-before: using_view.txt + :language: sql + :force: -.. collapse:: Query results +* Get the route + ``configuration`` table - .. literalinclude:: ../scripts/basic/chapter_6/section-6.6.txt +.. literalinclude:: ../scripts/basic/vehicles/vehicles.sql + :start-after: using_view.txt + :end-before: vehicles_end.txt + :language: sql + :force: -.. note:: - Comparing with `Exercise 5: Vehicle routing with penalization`_: - - * The total number of records is the same. - * The route is the same - * The ``cost`` column have the original vales from the ways table. +.. collapse:: Query results + .. literalinclude:: ../scripts/basic/vehicles/using_view.txt diff --git a/docs/basic/withPoints.rst b/docs/basic/withPoints.rst new file mode 100644 index 000000000..222eec895 --- /dev/null +++ b/docs/basic/withPoints.rst @@ -0,0 +1,354 @@ +.. + **************************************************************************** + pgRouting Workshop Manual + 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/ + **************************************************************************** + +Routing using points +############################################################################### + +.. image:: images/withPoints/points_routing.png + :width: 250pt + :align: center + +Other kind of functions are `pl/pgsql +`__. As the applications +requirements become more complex, building queries and storing queries in a +variable becomes necessary + +pgRouting functions in this chapter + +- `pgr_findCloseEdges`_ +- `pgr_withPoints`_ + +.. contents:: Chapter contents + +Requirements for routing lat,lon points +=============================================================================== + +.. rubric:: Chapter problem: + +* Create a function ``wrk_withPoints`` that allows routing from two point + geometries and works for + + * ``vehicle_net`` + * ``taxi_net`` + * ``walk_net`` + +* The function takes as input parameters: + + - The edges table name + - Latitude/longitude of two point + +* Returns + + - the same information as in :doc:`sql_function` chapter problem. + - or the query that it builds + + +The detailed description: + +.. rubric:: Input parameters + +================ ========== ================================================ +Parameter type Description +================ ========== ================================================ +``edges_subset`` REGCLASS Edge table name identifier. +``lat1`` NUMERIC The latitude of the `departure` point. +``lon1`` NUMERIC The longitude of the `departure` point. +``lat2`` NUMERIC The latitude of the `destination` point. +``lon2`` NUMERIC The longitude of the `destination` point. +``do_debug`` BOOLEAN Flag to create a ``NOTICE`` with the query that + is been executed +================ ========== ================================================ + + +.. rubric:: Output columns + +================== ========= ================= +Name Type Description +================== ========= ================= +``seq`` INTEGER A unique number for each result row. +``id`` BIGINT The edge identifier. +``name`` TEXT The name of the segment. +``seconds`` FLOAT The number of seconds it takes to traverse the segment. +``length`` FLOAT The length in meters of the segment. +``azimuth`` FLOAT The azimuth of the segment. +``route_readable`` TEXT The geometry in human readable form. +``route_geom`` geometry The geometry of the segment in the correct direction. +================== ========= ================= + + +For this chapter, the following points will be used for testing. + +* (lat,lon) = (@POINT1_LAT@, @POINT1_LON@) +* (lat,lon) = (@POINT2_LAT@, @POINT2_LON@) + +pgr_findCloseEdges +------------------------------------------------------------------------------- + +Finds the close edges to a point geometry. + +.. rubric:: Signature Summary + +.. code-block:: sql + + pgr_findCloseEdges(Edges SQL, point, tolerance, [options]) + pgr_findCloseEdges(Edges SQL, points, tolerance, [options]) + + Options: [cap, dryrun] + + Returns set of (edge_id, fraction, side, distance, geom, edge) + OR EMPTY SET + +Exercise 1: Get the nearest edge +............................................................................... + +.. image:: images/withPoints/points_on_map.png + :scale: 25% + :align: center + +.. rubric:: Problem + +Get the nearest edge on the graph of the following points. + +* (pid, lat, lon) = (1, @POINT1_LAT@, @POINT1_LON@) +* (pid, lat, lon) = (2, @POINT2_LAT@, @POINT2_LON@) + +.. rubric:: Solution + +* Build the geometry of the points with the appropiate SRID. (lines **4** and + **10**) +* Get the union of the individual queries + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :linenos: + :start-after: closestedges.txt + :end-before: route_withPoints.txt + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/withPoints/closestedges.txt + +pgr_withPoints +------------------------------------------------------------------------------- + +Returns the shortest path in a graph with additional temporary vertices. + +.. rubric:: Signature Summary + +.. code-block:: sql + + 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 (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost) + OR EMPTY SET + +Exercise 2: Point routing +............................................................................... + +.. image:: images/withPoints/points_routing.png + :scale: 25% + :align: center + +.. rubric:: Problem + +Route from point **1** to point **2** on the ``vehicle_net`` where: + +* point **1**: (lat, lon) = (1, @POINT1_LAT@, @POINT1_LON@) +* point **2**: (lat, lon) = (2, @POINT2_LAT@, @POINT2_LON@) + +.. rubric:: Solution + +* The query from `Exercise 1: Get the nearest edge`_ is used as the inner query + for points. +* Using negative values to avoid conficts with vertices with the same value: + + * Routing from point **-1** to point **-2** + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :start-after: route_withPoints.txt + :end-before: wrk_withPoints.txt + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/withPoints/route_withPoints.txt + +Exercise 3: Creating the point routing function +............................................................................... + +.. rubric:: Problem + +Create the function ``wrk_withPoints`` to route from locations using latitude +and longitude values. + +* Analyze the function. + +.. rubric:: Solution + +Creating a ``plpgsql`` function. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :start-after: wrk_withPoints.txt + :end-before: use_fn_1.txt + +.. rubric:: Analysis + +The function's signature: + +* The input parameters instead of vertex identifiers, now it has the latitude + and longitude of a couple of points. +* The function returns the same set of values calculated on the + :doc:`sql_function`. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :linenos: + :start-after: wrk_withPoints.txt + :end-before: signature ends + +Getting the closest query: + +* The query looks like the one on `Exercise 1: Get the nearest edge`_ +* Using PostgreSQL ``format`` to make substitutions. + + * The first parameter is the string to be replaced + * The rest are the data parameters, are the strings use for replacement. + * ``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively. + * ``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :linenos: + :start-after: -- 0 + :end-before: -- 1 + +Getting the routing results: + +* The query looks like the one on `Exercise 2: Point routing` +* Using PostgreSQL ``format`` to make substitutions. + + * The ``edges_subset`` value will replace ``%1$I``. + * The ``closest_query`` value will replace ``%2$s``. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :linenos: + :start-after: -- 1 + :end-before: -- 2 + +Getting the additional information: + +* The subquery looks like the one in the function created on + :doc:`sql_function`. +* A joined table can not be a variable + + * Using PostgreSQL ``format`` to make substitutions. + * To make it work on the ``walk_net``, the whole query needs to be in + ``TEXT``. + * The ``edges_subset`` value will replace ``%1$I``: + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :linenos: + :start-after: -- 2 + :end-before: -- 3 + +Building the complete query: + +* The complete query looks like the one in the function created on + :doc:`sql_function`. +* Concatenation of strings is used. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :force: + :linenos: + :start-after: -- 3 + :end-before: -- 4 + +Exercise 4: Using wrk_withPoints +............................................................................... + +.. image:: images/withPoints/points_routing.png + :scale: 25% + :align: center + +.. rubric:: Problem + +Use ``wrk_withPoints`` + +* Departure point is: (lat,lon) = ``(@POINT1_LAT@, @POINT1_LON@)`` +* Destination point is: (lat,lon) = ``(@POINT2_LAT@, @POINT2_LON@)`` +* For ``vehicle_net``: + + * Get the names of the streets of the route. + +* For ``taxi_net``: + + * Get the query that is been generated. + +* For ``walk_net``: + + * Use with default value of ``do_debug``. + * Store results on a table. + * Show the table contents. + +.. rubric:: Solution + +For ``vehicle_net``: + +* The first parameter is the table name. +* The next two parameters are the latitude and longitude of the departure point. +* The next two parameters are the latitude and longitude of the destination point. +* Use with default value of ``do_debug``. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :start-after: use_fn_1.txt + :end-before: use_fn_2.txt + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/withPoints/use_fn_1.txt + +For ``taxi_net``: + +* Do a dry run by adding ``true`` to get the query that is executed. + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :start-after: use_fn_2.txt + :end-before: use_fn_3.txt + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/withPoints/warnings.txt + +For ``walk_net``: + +.. literalinclude:: ../scripts/basic/withPoints/withPoints.sql + :language: sql + :start-after: use_fn_3.txt + :end-before: \o + +.. collapse:: Query results + + .. literalinclude:: ../scripts/basic/withPoints/use_fn_3.txt diff --git a/docs/conf.py b/docs/conf.py index 0190df449..83dde6625 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,6 +30,7 @@ 'sphinx.ext.todo', 'sphinx.ext.autosectionlabel', 'sphinx_collapse', + 'sphinx_copybutton', ] autosectionlabel_prefix_document = True @@ -298,8 +299,8 @@ def setup(app): .. |place_3| replace:: @PLACE_3@ .. |place_4| replace:: @PLACE_4@ .. |place_5| replace:: @PLACE_5@ -.. |ch7_osmid_1| replace:: ``@CH7_OSMID_1@`` -.. |ch7_osmid_2| replace:: ``@CH7_OSMID_2@`` +.. |ch7_id_1| replace:: ``@CH7_ID_1@`` +.. |ch7_id_2| replace:: ``@CH7_ID_2@`` .. |ch7_place_1| replace:: @CH7_PLACE_1@ .. |ch7_place_2| replace:: @CH7_PLACE_2@ """ diff --git a/docs/images/CMakeLists.txt b/docs/images/CMakeLists.txt index 0fee77486..d3841ccbe 100644 --- a/docs/images/CMakeLists.txt +++ b/docs/images/CMakeLists.txt @@ -7,15 +7,13 @@ set(PGR_WORKSHOP_IMG_SUBDIRS osgeolive ) - -#--------------------------------------------- -# Adding the documentation subdirectories & files -#--------------------------------------------- - foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS}) - add_subdirectory(${dir}) if (PGR_WORKSHOP_DEBUG) - message(STATUS " Adding images directory ${dir}") + message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + endif() + add_subdirectory("${dir}") + if (PGR_WORKSHOP_DEBUG) + message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") endif() endforeach() @@ -29,8 +27,7 @@ set(PGR_WORKSHOP_IMG_FILES foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/images/_dsZWQsq b/docs/images/_dsZWQsq deleted file mode 100644 index 9d897a701..000000000 --- a/docs/images/_dsZWQsq +++ /dev/null @@ -1,83 +0,0 @@ - - - - OSGeo - - https://www.osgeo.org/ - Your Open Source Compass - Tue, 19 Dec 2023 17:20:33 +0000 - en-US - - hourly - - 1 - - - - https://www.osgeo.org/wp-content/uploads/cropped-osgeo-emblem-rgb-1-32x32.png - OSGeo - https://www.osgeo.org/ - 32 - 32 - - - ETF - https://www.osgeo.org/etf/ - - - Wed, 06 Jul 2022 00:26:21 +0000 - - - https://www.osgeo.org/?p=18896 - - ETF is an open source testing framework for validating data and APIs in Spatial Data Infrastructures (SDIs). It is used by software solutions and data providers to validate the conformity of geospatial data sets, metadata and APIs. Goals in designing … Continued

-

Het bericht ETF verscheen eerst op OSGeo.

-]]>
- ETF is an open source testing framework for validating data and APIs in Spatial Data Infrastructures (SDIs). It is used by software solutions and data providers to validate the conformity of geospatial data sets, metadata and APIs.

-

Goals in designing the ETF software were to create test reports that are user-friendly and self-explanatory as well as to be able to validate large amounts of data, which can be several hundred GB in size. In order to cover different validation tasks and present them in a unified report, the architecture is modular and different test engines can be used. Currently the following test engines are supported: SoapUI for testing web services, BaseX database for testing XML data, TEAM Engine to validate WFS and OGC Web APIs using the OGC CITE tests, NeoTL Engine for testing WFS, OGC Web APIs and datasets.

-

ETF is the underlying framework used by the INSPIRE Reference Validator to validate metadata, datasets and services against the INSPIRE requirements. ETF is also used extensively in Germany by the Surveying Authorities of the Laender to validate their datasets. Other European Union (EU) Member States are also reusing the ETF to allow their data providers to test resources against national requirements. Finally, some software tools include validation based on the ETF API in their workflow.

-

Core Features
- Testable resources
- datasets (up to multiple hundreds GB): GML
- metadata: XML
- view services: WMS/WMTS
- download services: Atom, WFS, WCS, SOS
- catalogue services: CSW

-

Access
-web-based user interface

-

REST API

-

OpenAPI Specification

-

Java client library

-

Supported test engines
-SoapUI for testing web services

-

BaseX for testing sets of XML documents

-

TEAM Engine to support CITE tests developed using TestNG

-

NeoTL for testing OGC WFS and OGC APIs (in development)

-

Test reports
-user-friendly and self-explanatory

-

downloadable in HTML, XML and JSON

-

Implemented Standards
-Catalogue Service for the Web (CSW)

-

ISO 19105

-

Sensor Observation Service (SOS)

-

Web Feature Service (WFS)

-

OpenGIS Web Map Tile Service (WMTS)

-

Geography Markup Language (GML)

-

OGC API – Features

-

Web Coverage Service (WCS)

-

Web Map Service (WMS)

-

Het bericht ETF verscheen eerst op OSGeo.

-]]>
- - - -
-
-
diff --git a/docs/images/ch7-e1.png b/docs/images/ch7-e1.png deleted file mode 100644 index 5a5249760..000000000 Binary files a/docs/images/ch7-e1.png and /dev/null differ diff --git a/docs/images/chapter7/ch7-e2-1.png b/docs/images/chapter7/ch7-e2-1.png deleted file mode 100644 index c3315e302..000000000 Binary files a/docs/images/chapter7/ch7-e2-1.png and /dev/null differ diff --git a/docs/images/introduction/CMakeLists.txt b/docs/images/introduction/CMakeLists.txt index ab1e7429d..291add1ff 100644 --- a/docs/images/introduction/CMakeLists.txt +++ b/docs/images/introduction/CMakeLists.txt @@ -9,8 +9,7 @@ set(PGR_WORKSHOP_IMG_FILES foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/images/logos/CMakeLists.txt b/docs/images/logos/CMakeLists.txt index 223cf1fd0..3ecb882f3 100644 --- a/docs/images/logos/CMakeLists.txt +++ b/docs/images/logos/CMakeLists.txt @@ -16,9 +16,8 @@ set(PGR_WORKSHOP_IMG_FILES foreach (f ${PGR_WORKSHOP_IMG_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding image ${f}") - endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/images/osgeolive/CMakeLists.txt b/docs/images/osgeolive/CMakeLists.txt index a2c880df6..9aa3f8acd 100644 --- a/docs/images/osgeolive/CMakeLists.txt +++ b/docs/images/osgeolive/CMakeLists.txt @@ -21,9 +21,8 @@ set(PGR_WORKSHOP_IMG_FILES foreach (f ${PGR_WORKSHOP_IMG_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + if (PGR_WORKSHOP_VERBOSE_DEBUG) + message(STATUS " -> ${f}") + endif() + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/index.rst b/docs/index.rst index 6d384e52b..4938fd44d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,11 +31,11 @@ Basic :maxdepth: 2 basic/data.rst + basic/graphs.rst basic/pedestrian.rst basic/vehicle.rst - basic/graph_views.rst basic/sql_function.rst - basic/plpgsql_function.rst + basic/withPoints.rst United Nations Sustainable Development Goals =============================================================================== diff --git a/docs/interactions/chapter-9.rst b/docs/interactions/chapter-9.rst index 499e4333f..e0f2024ab 100644 --- a/docs/interactions/chapter-9.rst +++ b/docs/interactions/chapter-9.rst @@ -11,7 +11,7 @@ Using Qgis ############################################################################### -.. image:: ../basic/images/chapter5/route.png +.. image:: ../basic/images/pedestrian/pedestrian_one_to_one.png :width: 250pt :align: center diff --git a/docs/interactions/images/CMakeLists.txt b/docs/interactions/images/CMakeLists.txt index db24c56b4..5fc94c58a 100644 --- a/docs/interactions/images/CMakeLists.txt +++ b/docs/interactions/images/CMakeLists.txt @@ -4,18 +4,18 @@ #--------------------- set(PGR_WORKSHOP_IMG_SUBDIRS chap_QGIS - chapter9 - ) - - +) #--------------------------------------------- # Adding the documentation subdirectories & files #--------------------------------------------- foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS}) - file(COPY "${dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") if (PGR_WORKSHOP_DEBUG) - message(STATUS " Adding images directory ${dir}") + message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + endif() + add_subdirectory("${dir}") + if (PGR_WORKSHOP_DEBUG) + message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") endif() endforeach() diff --git a/docs/interactions/images/chap_QGIS/CMakeLists.txt b/docs/interactions/images/chap_QGIS/CMakeLists.txt index bc25efc0f..61cdd4bd4 100644 --- a/docs/interactions/images/chap_QGIS/CMakeLists.txt +++ b/docs/interactions/images/chap_QGIS/CMakeLists.txt @@ -21,29 +21,9 @@ set(PGR_WORKSHOP_IMG_FILES qgis9.png ) -#--------------------- -# Directories -#--------------------- -set(PGR_WORKSHOP_IMG_SUBDIRS - ) - - - -#--------------------------------------------- -# Adding the documentation subdirectories & files -#--------------------------------------------- - -foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS}) - file(COPY "${dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") - if (PGR_WORKSHOP_DEBUG) - message(STATUS " Adding images directory ${dir}") - endif() -endforeach() - foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/scripts/basic/CMakeLists.txt b/docs/scripts/basic/CMakeLists.txt index 1ceb124db..dc43b9577 100644 --- a/docs/scripts/basic/CMakeLists.txt +++ b/docs/scripts/basic/CMakeLists.txt @@ -3,12 +3,13 @@ add_custom_target(basic_scripts ALL) #--------------------- # Directories #--------------------- -SET(PGR_WORKSHOP_DIR - chapter_4 - chapter_5 - chapter_6 - chapter_7 - chapter_8 +SET(PGR_WORKSHOP_DIR + data + graphs + pedestrian + vehicles + sql_function + withPoints ) foreach (d ${PGR_WORKSHOP_DIR}) @@ -19,7 +20,9 @@ foreach (d ${PGR_WORKSHOP_DIR}) add_dependencies(basic_scripts basic_${d}_scripts) endforeach() -add_dependencies(basic_chapter_5_scripts basic_chapter_4_scripts) -add_dependencies(basic_chapter_6_scripts basic_chapter_5_scripts) -add_dependencies(basic_chapter_7_scripts basic_chapter_6_scripts) -add_dependencies(basic_chapter_8_scripts basic_chapter_7_scripts) +add_dependencies(basic_graphs_scripts basic_data_scripts) +add_dependencies(basic_pedestrian_scripts basic_graphs_scripts) +add_dependencies(basic_vehicles_scripts basic_graphs_scripts) +add_dependencies(basic_sql_function_scripts basic_graphs_scripts) +add_dependencies(basic_sql_function_scripts basic_vehicles_scripts) +add_dependencies(basic_withPoints_scripts basic_sql_function_scripts) diff --git a/docs/scripts/basic/chapter_4/CMakeLists.txt b/docs/scripts/basic/chapter_4/CMakeLists.txt deleted file mode 100644 index 892445380..000000000 --- a/docs/scripts/basic/chapter_4/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -#--------------------- -# Files -#--------------------- -set(PGR_WORKSHOP_FILES - "section-4.3.2.sh" -) - -foreach (f ${PGR_WORKSHOP_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - configure_file(${f} ${f}) -endforeach() - -add_custom_command( - OUTPUT section-4.3.2.txt - COMMAND bash section-4.3.2.sh > section-4.3.2.txt - DEPENDS section-4.3.2.sh - ) - -add_custom_target(basic_chapter_4_scripts - DEPENDS "section-4.3.2.txt" - ) diff --git a/docs/scripts/basic/chapter_5/CMakeLists.txt b/docs/scripts/basic/chapter_5/CMakeLists.txt deleted file mode 100644 index 83b205140..000000000 --- a/docs/scripts/basic/chapter_5/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -add_custom_target(basic_chapter_5_scripts) - -#--------------------- -# Files -#--------------------- -set(PGR_WORKSHOP_FILES - "all_exercises_5.sql" - "images.sql" - ) - -foreach (f ${PGR_WORKSHOP_FILES}) - if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") - endif() - configure_file(${f} ${f}) -endforeach() - -add_custom_command( - TARGET basic_chapter_5_scripts - PRE_BUILD - BYPRODUCTS - exercise_5_1.txt - exercise_5_2.txt - exercise_5_3.txt - exercise_5_4.txt - exercise_5_5.txt - exercise_5_6.txt - COMMAND psql -d city_routing -f all_exercises_5.sql - COMMAND psql -d city_routing -f images.sql - COMMENT "running chapter 5 scripts" - DEPENDS all_exercises_5.sql - ) - diff --git a/docs/scripts/basic/chapter_5/all_exercises_5.sql b/docs/scripts/basic/chapter_5/all_exercises_5.sql deleted file mode 100644 index 9bf4bc0e6..000000000 --- a/docs/scripts/basic/chapter_5/all_exercises_5.sql +++ /dev/null @@ -1,181 +0,0 @@ -\o exercise_5_0.txt - -SELECT osm_id, id FROM ways_vertices_pgr -WHERE osm_id IN (@OSMID_1@, @OSMID_2@, @OSMID_3@, @OSMID_4@, @OSMID_5@) -ORDER BY osm_id; - -\o exercise_5_1.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length AS cost -- line 6 - FROM ways - ', - @ID_1@, -- line 9 - @ID_3@, -- line 10 - directed := false); -- line 11 - -\o exercise_5_2.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m AS cost -- line 6 - FROM ways - ', - ARRAY[@ID_1@,@ID_2@], -- line 9 - @ID_3@, -- line 10 - directed := false); - -\o exercise_5_3.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 AS cost -- line 6 - FROM ways - ', - @ID_3@, -- line 9 - ARRAY[@ID_1@,@ID_2@], -- line 10 - directed := false); - -\o exercise_5_4.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost -- line 6 - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], -- line 9 - ARRAY[@ID_4@, @ID_5@], -- line 10 - directed := false); - -\o exercise_5_5.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost - FROM ways - ', - 'SELECT * FROM - (VALUES - (@ID_1@, @ID_4@), -- line 11 - (@ID_2@, @ID_5@)) -- line 12 - AS combinations (source, target)', - directed := false); - -\o exercise_5_6.txt - -SELECT * FROM pgr_dijkstraCost( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost -- line 6 - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], -- line 9 - ARRAY[@ID_4@, @ID_5@], -- line 10 - directed := false); - -\o exercise_5_7.txt - -SELECT start_vid, sum(agg_cost) FROM pgr_dijkstraCost( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost -- line 6 - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], -- line 9 - ARRAY[@ID_4@, @ID_5@], -- line 10 - directed := false) -GROUP BY start_vid -ORDER BY start_vid; - -\o note_1.txt -\t -SELECT 'Inspecting the results, looking for totals (edge = -1):'; - -SELECT '- From @ID_1@ to vertex @ID_4@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' -FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -WHERE edge = -1 AND start_vid = @ID_1@ AND end_vid = @ID_4@; -SELECT '- From @ID_1@ to vertex @ID_5@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' -FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -WHERE edge = -1 AND start_vid = @ID_1@ AND end_vid = @ID_5@; -SELECT '- From @ID_2@ to vertex @ID_4@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' -FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -WHERE edge = -1 AND start_vid = @ID_2@ AND end_vid = @ID_4@; -SELECT '- From @ID_2@ to vertex @ID_5@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' -FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - length_m / 1.3 / 60 AS cost - FROM ways - ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -WHERE edge = -1 AND start_vid = @ID_2@ AND end_vid = @ID_5@; -\o note_2.txt -WITH summary AS (SELECT start_vid, sum(agg_cost) - FROM pgr_dijkstraCost( - 'SELECT gid AS id, source, target, length_m / 1.3 / 60 AS cost FROM ways ', - ARRAY[@ID_1@, @ID_2@], ARRAY[@ID_4@, @ID_5@], - directed := false) - GROUP BY start_vid - ORDER BY start_vid), -the_min AS (select min(sum) from summary) -SELECT -'An interpretation of the result can be: In general, it is faster to depart from "' || -CASE WHEN start_vid = @ID_1@ THEN '@PLACE_1@' WHEN start_vid = @ID_2@ THEN '@PLACE_2@' END - || '" than from "' || - CASE WHEN start_vid = @ID_1@ THEN '@PLACE_2@' WHEN start_vid = @ID_2@ THEN '@PLACE_1@' END - || '"' - FROM summary WHERE sum = (SELECT min from the_min); diff --git a/docs/scripts/basic/chapter_5/example.svg b/docs/scripts/basic/chapter_5/example.svg deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/scripts/basic/chapter_5/images.sql b/docs/scripts/basic/chapter_5/images.sql deleted file mode 100644 index 7a820d845..000000000 --- a/docs/scripts/basic/chapter_5/images.sql +++ /dev/null @@ -1,76 +0,0 @@ -CREATE VIEW stars AS -SELECT osm_id, id, the_geom, -CASE - WHEN osm_id = @OSMID_1@ THEN '@PLACE_1@' - WHEN osm_id = @OSMID_2@ THEN '@PLACE_2@' - WHEN osm_id = @OSMID_3@ THEN '@PLACE_3@' - WHEN osm_id = @OSMID_4@ THEN '@PLACE_4@' - WHEN osm_id = @OSMID_5@ THEN '@PLACE_5@' -END AS name -FROM ways_vertices_pgr -WHERE osm_id IN (@OSMID_1@, @OSMID_2@, @OSMID_3@, @OSMID_4@, @OSMID_5@) -ORDER BY osm_id; - -CREATE VIEW route_png AS -WITH dijkstra AS ( -SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, length AS cost FROM ways ', - @ID_1@, - @ID_3@, - directed := false) -) -SELECT seq, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); - -CREATE VIEW pedestrian_route1 AS -WITH dijkstra AS ( -SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, length AS cost FROM ways ', - @ID_1@, - @ID_3@, - directed := false) -) -SELECT seq, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); - -CREATE VIEW pedestrian_route2 AS -WITH dijkstra AS ( -SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, length_m AS cost FROM ways ', - ARRAY[@ID_1@,@ID_2@], - @ID_3@, - directed := false) -) -SELECT seq, start_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); - - -CREATE VIEW pedestrian_route4 AS -WITH dijkstra AS ( -SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, length_m / 1.3 / 60 AS cost FROM ways ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -) -SELECT seq, start_vid, end_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); - - -CREATE VIEW pedestrian_route5 AS -WITH dijkstra AS ( -SELECT start_vid, end_vid, round(agg_cost::numeric,2) AS agg_cost -FROM pgr_dijkstraCost( - ' SELECT gid AS id, source, target, length_m / 1.3 / 60 AS cost FROM ways ', - ARRAY[@ID_1@, @ID_2@], - ARRAY[@ID_4@, @ID_5@], - directed := false) -) -SELECT row_number() over() AS gid, start_vid, end_vid, agg_cost, ST_MakeLine(v1.the_geom, v2.the_geom) AS geom FROM dijkstra -JOIN ways_vertices_pgr AS v1 ON (start_vid = v1.id) -JOIN ways_vertices_pgr AS v2 ON (end_vid = v2.id); - -CREATE VIEW pedestrian_combinations AS -WITH dijkstra AS ( - SELECT * FROM pgr_dijkstra( - 'SELECT gid AS id, source, target, length_m / 1.3 / 60 AS cost FROM ways', - 'SELECT * FROM (VALUES (@ID_1@, @ID_4@), (@ID_2@, @ID_5@)) AS combinations (source, target)', - directed := false) -) -SELECT seq, start_vid, end_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); diff --git a/docs/scripts/basic/chapter_5/map_5.1.json b/docs/scripts/basic/chapter_5/map_5.1.json deleted file mode 100644 index e8909c857..000000000 --- a/docs/scripts/basic/chapter_5/map_5.1.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "type": "LineString", - "coordinates": [ - [ - 26.0738841, - 44.4223446 - ], - [ - 26.0733967, - 44.422098 - ] - ] -} -{ - "type": "LineString", - "coordinates": [ - [ - 26.0866602, - 44.4247989 - ], - [ - 26.0866554, - 44.4247436 - ] - ] -} diff --git a/docs/scripts/basic/chapter_6/CMakeLists.txt b/docs/scripts/basic/chapter_6/CMakeLists.txt deleted file mode 100644 index bac31a6d2..000000000 --- a/docs/scripts/basic/chapter_6/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -add_custom_target(basic_chapter_6_scripts) - -#--------------------- -# Files -#--------------------- -configure_file(all_exercises.sql all_exercises.sql) -configure_file(images.sql images.sql) - -#---------------------------------------------- -# Generating the results files -#--------------------------------------------- - -add_custom_command( - TARGET basic_chapter_6_scripts - PRE_BUILD - BYPRODUCTS - section-6.1-1.txt - section-6.1-2.txt - section-6.1.1.txt - section-6.1.2.txt - section-6.1.3.txt - section-6.2-1.txt - section-6.2-2.txt - section-6.2-3.txt - section-6.2.1.txt - section-6.2.2-1.txt - section-6.2.2-2.txt - section-6.6.txt - - COMMAND psql -d city_routing -f all_exercises.sql - COMMAND psql -d city_routing -f images.sql - COMMENT "running chapter 6 scripts" - DEPENDS section-6.1.sql) diff --git a/docs/scripts/basic/chapter_6/all_exercises.sql b/docs/scripts/basic/chapter_6/all_exercises.sql deleted file mode 100644 index 793a6e927..000000000 --- a/docs/scripts/basic/chapter_6/all_exercises.sql +++ /dev/null @@ -1,148 +0,0 @@ -\o section-6.1-1.txt - -SELECT count(*) -FROM ways -WHERE cost < 0; -- line 3 - -\o section-6.1-2.txt - - -SELECT count(*) -FROM ways -WHERE reverse_cost < 0; -- line 3 - - -\o section-6.1.1.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - cost, -- line 6 - reverse_cost -- line 7 - FROM ways - ', - @ID_1@, -- line 10 - @ID_3@, -- line 11 - directed := true); - -\o section-6.1.2.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - cost_s AS cost, -- line 6 - reverse_cost_s AS reverse_cost -- line 7 - FROM ways - ', - @ID_3@, -- line 10 - @ID_1@, -- line 11 - directed := true); - -\o section-6.1.3.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - cost_s / 3600 * 100 AS cost, -- line 6 - reverse_cost_s / 3600 * 100 AS reverse_cost -- line 7 - FROM ways - ', - @ID_3@, -- line 10 - @ID_1@); -- line 11 - -\o section-6.2-1.txt -\dS+ configuration -\o section-6.2-2.txt - -SELECT tag_id, tag_key, tag_value -FROM configuration -ORDER BY tag_id; - -\o section-6.2-3.txt - -SELECT distinct tag_id, tag_key, tag_value -FROM ways JOIN configuration USING (tag_id) -ORDER BY tag_id; - -\o section-6.2.1.txt - -ALTER TABLE configuration ADD COLUMN penalty FLOAT; --- No penalty -UPDATE configuration SET penalty=1; -- line 3 - - -SELECT * -FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - cost_s * penalty AS cost, -- line 12 - reverse_cost_s * penalty AS reverse_cost -- line 13 - FROM ways JOIN configuration -- line 14 - USING (tag_id) -- line 15 - ', - @ID_3@, -- line 17 - @ID_1@); -- line 18 - -\o section-6.2.2-1.txt - --- Not including pedestrian ways -UPDATE configuration SET penalty=-1.0 -WHERE tag_value IN ('steps','footway','pedestrian','cycleway'); - --- Penalizing with 5 times the costs the unknown -UPDATE configuration SET penalty=5 WHERE tag_value IN ('unclassified'); - --- Encuraging the use of "fast" roads -UPDATE configuration SET penalty=0.5 WHERE tag_value IN ('tertiary'); -UPDATE configuration SET penalty=0.3 -WHERE tag_value IN ( - 'primary','primary_link', - 'trunk','trunk_link', - 'motorway','motorway_junction','motorway_link', - 'secondary'); - -\o section-6.2.2-2.txt - -SELECT * FROM pgr_dijkstra( - ' - SELECT gid AS id, - source, - target, - cost_s * penalty AS cost, -- line 6 - reverse_cost_s * penalty AS reverse_cost -- line 7 - FROM ways JOIN configuration -- line 8 - USING (tag_id) -- line 9 - ', - @ID_3@, -- line 11 - @ID_1@); -- line 12 - -\o section-6.6.txt - -SELECT * FROM pgr_dijkstra( - $$ - SELECT gid AS id, source, target, cost_s AS cost, reverse_cost_s AS reverse_cost - FROM ( - -- penalized query - SELECT edge AS gid FROM pgr_dijkstra( -- line 6 - ' - SELECT gid AS id, - source, - target, - cost_s * penalty AS cost, - reverse_cost_s * penalty AS reverse_cost - FROM ways JOIN configuration - USING (tag_id) - ', - @ID_3@, - @ID_1@) ) AS edges_in_route - JOIN ways USING (gid) -- line 18 - $$, - @ID_3@, @ID_1@); diff --git a/docs/scripts/basic/chapter_7/CMakeLists.txt b/docs/scripts/basic/chapter_7/CMakeLists.txt deleted file mode 100644 index 0ab1ceabb..000000000 --- a/docs/scripts/basic/chapter_7/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -add_custom_target(basic_chapter_7_scripts) - -#--------------------- -# Files -#--------------------- -configure_file(all_sections.sql all_sections.sql) -configure_file(images.sql images.sql) - -#---------------------------------------------- -# Generating the results files -#--------------------------------------------- - -add_custom_command( - TARGET basic_chapter_7_scripts - PRE_BUILD - BYPRODUCTS - exercise_7_1.txt - exercise_7_2.txt - exercise_7_3.txt - exercise_7_4.txt - exercise_7_5.txt - exercise_7_6.txt - exercise_7_7.txt - exercise_7_8.txt - exercise_7_9.txt - exercise_7_10.txt - exercise_7_11.txt - COMMAND psql -d city_routing -f all_sections.sql - COMMAND psql -d city_routing -f images.sql - COMMENT "running chapter 7 scripts" - DEPENDS all_sections.sql - ) diff --git a/docs/scripts/basic/chapter_7/all_sections.sql b/docs/scripts/basic/chapter_7/all_sections.sql deleted file mode 100644 index 231a5cb3b..000000000 --- a/docs/scripts/basic/chapter_7/all_sections.sql +++ /dev/null @@ -1,361 +0,0 @@ - -DROP VIEW IF EXISTS vehicle_net CASCADE; -DROP VIEW IF EXISTS taxi_net CASCADE; -DROP MATERIALIZED VIEW IF EXISTS walk_net CASCADE; -DROP FUNCTION IF EXISTS wrk_dijkstra(regclass, bigint, bigint); - -\o create_vertices.txt - -SELECT * INTO ways_vertices -FROM pgr_extractVertices( - 'SELECT gid AS id, source_osm AS source, target_osm AS target - FROM ways ORDER BY id'); - -\o vertices_description.txt -\dS+ ways_vertices -\o selected_rows.txt -SELECT * FROM ways_vertices Limit 10; - -\o fill_columns_1.txt -SELECT count(*) FROM ways_vertices WHERE geom IS NULL; -\o fill_columns_2.txt -UPDATE ways_vertices SET geom = ST_startPoint(the_geom) FROM ways WHERE source_osm = id; -\o fill_columns_3.txt -SELECT count(*) FROM ways_vertices WHERE geom IS NULL; -\o fill_columns_4.txt -UPDATE ways_vertices SET geom = ST_endPoint(the_geom) FROM ways WHERE geom IS NULL AND target_osm = id; -\o fill_columns_5.txt -SELECT count(*) FROM ways_vertices WHERE geom IS NULL; -\o fill_columns_6.txt -UPDATE ways_vertices set (x,y) = (ST_X(geom), ST_Y(geom)); - - -\o set_components1.txt -ALTER TABLE ways ADD COLUMN component BIGINT; -ALTER TABLE ways_vertices ADD COLUMN component BIGINT; - -\o set_components2.txt -UPDATE ways_vertices SET component = c.component -FROM (SELECT * FROM pgr_connectedComponents( - 'SELECT gid as id, - source_osm AS source, - target_osm AS target, - cost, reverse_cost FROM ways' -)) AS c -WHERE id = node; -\o set_components3.txt - -UPDATE ways SET component = v.component -FROM (SELECT id, component FROM ways_vertices) AS v -WHERE source_osm = v.id; - -\o see_components1.txt -SELECT count(DISTINCT component) FROM ways_vertices; -\o see_components2.txt -SELECT count(DISTINCT component) FROM ways; -\o see_components3.txt -SELECT component, count(*) FROM ways GROUP BY component -ORDER BY count DESC LIMIT 10; -\o see_components4.txt -WITH -all_components AS (SELECT component, count(*) FROM ways GROUP BY component), -max_component AS (SELECT max(count) from all_components) -SELECT component FROM all_components WHERE count = (SELECT max FROM max_component); - -\o create_vehicle_net1.txt --- DROP VIEW vehicle_net CASCADE; - -CREATE VIEW vehicle_net AS - -WITH -all_components AS (SELECT component, count(*) FROM ways GROUP BY component), -- line 6 -max_component AS (SELECT max(count) from all_components), -the_component AS ( - SELECT component FROM all_components - WHERE count = (SELECT max FROM max_component)) - -SELECT - gid AS id, - source_osm AS source, target_osm AS target, -- line 14 - cost_s AS cost, reverse_cost_s AS reverse_cost, - name, length_m AS length, the_geom AS geom -FROM ways JOIN the_component USING (component) JOIN configuration USING (tag_id) -WHERE tag_value NOT IN ('steps','footway','path','cycleway'); -- line 18 - -\o create_vehicle_net2.txt -SELECT count(*) FROM ways; -SELECT count(*) FROM vehicle_net; -\o create_vehicle_net3.txt -\dS+ vehicle_net -\o create_taxi_net1.txt - --- DROP VIEW taxi_net; - -CREATE VIEW taxi_net AS - SELECT - id, - source, target, - cost * 1.10 AS cost, reverse_cost * 1.10 AS reverse_cost, - name, length, geom - FROM vehicle_net - WHERE vehicle_net.geom && ST_MakeEnvelope(@PGR_WORKSHOP_LITTLE_NET_BBOX@); - -\o create_taxi_net2.txt -SELECT count(*) FROM taxi_net; -\o create_taxi_net3.txt -\dS+ taxi_net -\o create_walk_net1.txt - --- DROP MATERIALIZED VIEW walk_net CASCADE; - -CREATE MATERIALIZED VIEW walk_net AS - -WITH -allc AS (SELECT component, count(*) FROM ways GROUP BY component), -maxcount AS (SELECT max(count) from allc), -the_component AS (SELECT component FROM allc WHERE count = (SELECT max FROM maxcount)) - -SELECT - gid AS id, - source_osm AS source, target_osm AS target, - cost_s AS cost, reverse_cost_s AS reverse_cost, - name, length_m AS length, the_geom AS geom -FROM ways JOIN the_component USING (component) JOIN configuration USING (tag_id) -WHERE tag_value NOT IN ('motorway','primary','secondary'); - -\o create_walk_net2.txt - -SELECT count(*) FROM walk_net; - -\o create_walk_net3.txt -\dS+ walk_net -\o test_view1.txt - -SELECT start_vid, end_vid, agg_cost AS seconds -FROM pgr_dijkstraCost( - 'SELECT * FROM vehicle_net', - @CH7_OSMID_1@, @CH7_OSMID_2@); - -\o test_view2.txt - -SELECT start_vid, end_vid, agg_cost AS seconds -FROM pgr_dijkstraCost( - 'SELECT * FROM taxi_net', - @CH7_OSMID_1@, @CH7_OSMID_2@); - -\o test_view3.txt - -SELECT start_vid, end_vid, agg_cost AS seconds -FROM pgr_dijkstraCost( - 'SELECT * FROM walk_net', - @CH7_OSMID_1@, @CH7_OSMID_2@); - -\o exercise_7_5.txt - -SELECT - seq, id, seconds, name, length -FROM ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra( - 'SELECT * FROM vehicle_net', - @CH7_OSMID_1@, @CH7_OSMID_2@) - ) AS results -LEFT JOIN vehicle_net USING (id) -ORDER BY seq; - -\o exercise_7_6.txt - -WITH -results AS ( -- line 2 - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@) -) -SELECT - -- from previous excercise - seq, -- line 8 - -- id, seconds, name, length, - - -- additionally get - ST_AsText(geom) AS route_readable --line 12 -FROM results -LEFT JOIN vehicle_net USING (id) -- line 14 -ORDER BY seq; - -\o exercise_7_7.txt - -WITH results AS ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@) - ) -SELECT - -- from previous excercise - seq, - -- id, seconds, name, length, ST_AsText(geom) AS route_readable, - - -- additionally get - geom AS route_geom -FROM results -LEFT JOIN vehicle_net - USING (id) -ORDER BY seq; - -\o wrong_directionality.txt - -WITH -results AS ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@) -), -compare AS ( - SELECT seq, id, lead(seq) over(ORDER BY seq) AS next_seq, - ST_AsText(ST_endPoint(geom)) AS id_end, - ST_AsText(ST_startPoint(lead(geom) over(ORDER BY seq))) AS next_id_start - - FROM results LEFT JOIN vehicle_net USING (id) - ORDER BY seq) -SELECT * FROM compare WHERE id_end != next_id_start; - -\o exercise_7_8.txt - -WITH results AS ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@) - ) -SELECT - -- from previous excercise - seq, - -- id, seconds, name, length, - - -- fixing the directionality - CASE - WHEN node = source THEN ST_AsText(geom) - ELSE ST_AsText(ST_Reverse(geom)) - END AS route_readable, - - CASE - WHEN node = source THEN geom - ELSE ST_Reverse(geom) - END AS route_geom - -FROM results -LEFT JOIN vehicle_net USING (id) -ORDER BY seq; - -\o good_directionality.txt - -WITH -results AS ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', 5661895682, 10982869752) -), -fix AS ( - SELECT seq, id, - CASE - WHEN node = source THEN geom - ELSE ST_Reverse(geom) - END AS geom -FROM results LEFT JOIN vehicle_net USING (id) -), -compare AS ( - SELECT seq, id, lead(geom) over(ORDER BY seq) AS next_id, - ST_AsText(ST_endPoint(geom)) AS id_end, ST_AsText(ST_startPoint(lead(geom) over(ORDER BY seq))) AS next_id_start - -FROM fix -ORDER BY seq) -SELECT * FROM compare WHERE id_end != next_id_start; - -\o exercise_7_9.txt - -WITH -results AS ( - SELECT seq, edge AS id, node, cost AS seconds - FROM pgr_dijkstra('SELECT * FROM vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@) - ), -additional AS ( - SELECT - seq, id, seconds, name, length, - CASE - WHEN node = source THEN ST_AsText(the_geom) - ELSE ST_AsText(ST_Reverse(the_geom)) - END AS route_readable, - - CASE - WHEN node = source THEN the_geom - ELSE ST_Reverse(the_geom) - END AS route_geom - - FROM results - LEFT JOIN ways ON (gid = id) -) -SELECT - seq, - -- from previous excercise - -- id, seconds, name, length, route_readable, route_geom - - degrees(ST_azimuth(ST_StartPoint(route_geom), ST_EndPoint(route_geom))) AS azimuth -FROM additional -ORDER BY seq; - -\o exercise_7_10.txt --- DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); - -CREATE OR REPLACE FUNCTION wrk_dijkstra( - IN edges_subset REGCLASS, - IN source BIGINT, -- in terms of osm_id - IN target BIGINT, -- in terms of osm_id - OUT seq INTEGER, - OUT id BIGINT, - OUT seconds FLOAT, - OUT name TEXT, - OUT length_m FLOAT, - OUT route_readable TEXT, - OUT route_geom geometry, - OUT azimuth FLOAT - ) - RETURNS SETOF record AS -$BODY$ - WITH - results AS ( - SELECT seq, edge AS id, cost AS seconds, - node - FROM pgr_dijkstra( - 'SELECT * FROM ' || edges_subset, - source, target) - ), - additional AS ( - SELECT - seq, id, seconds, - name, length_m, - CASE - WHEN node = source THEN ST_AsText(the_geom) - ELSE ST_AsText(ST_Reverse(the_geom)) - END AS route_readable, - - CASE - WHEN node = source_osm THEN the_geom - ELSE ST_Reverse(the_geom) - END AS route_geom - - FROM results - LEFT JOIN ways ON (gid = id) - ) - SELECT *, - degrees(ST_azimuth(ST_StartPoint(route_geom), ST_EndPoint(route_geom))) AS azimuth - FROM additional - ORDER BY seq; -$BODY$ -LANGUAGE 'sql'; -\o using_fn1.txt -SELECT DISTINCT name -FROM wrk_dijkstra('vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@); - -\o using_fn2.txt -SELECT name, sum(seconds) -FROM wrk_dijkstra('taxi_net', @CH7_OSMID_1@, @CH7_OSMID_2@) -GROUP BY name; - -\o using_fn3.txt -SELECT * -FROM wrk_dijkstra('walk_net', @CH7_OSMID_1@, @CH7_OSMID_2@); - - diff --git a/docs/scripts/basic/chapter_7/images.sql b/docs/scripts/basic/chapter_7/images.sql deleted file mode 100644 index 49841fc75..000000000 --- a/docs/scripts/basic/chapter_7/images.sql +++ /dev/null @@ -1,69 +0,0 @@ -DROP FUNCTION IF EXISTS wrk_image; -DROP VIEW IF EXISTS chap7_view; - -CREATE OR REPLACE FUNCTION wrk_image( - IN edges_subset REGCLASS, - IN source BIGINT, -- in terms of osm_id - IN target BIGINT, -- in terms of osm_id - OUT seq INTEGER, - OUT id BIGINT, - OUT node BIGINT, - OUT source BIGINT, - OUT seconds FLOAT, - OUT name TEXT, - OUT length_m FLOAT, - OUT geom geometry, - OUT geom_readable TEXT, - OUT azimuth_geom FLOAT, - OUT route_readable TEXT, - OUT route_geom geometry, - OUT azimuth FLOAT -) -RETURNS SETOF record AS -$BODY$ -WITH -results AS ( - SELECT seq, edge AS id, cost AS seconds, - node - FROM pgr_dijkstra( - 'SELECT * FROM ' || edges_subset, - source, target) -), -additional AS ( - SELECT - seq, id, node, source_osm, seconds, - name, length_m, - the_geom, - ST_AsText(the_geom), - degrees(ST_azimuth(ST_StartPoint(the_geom), ST_EndPoint(the_geom))) AS azimuth_geom, - CASE - WHEN node = source_osm THEN ST_AsText(the_geom) - ELSE ST_AsText(ST_Reverse(the_geom)) - END AS route_readable, - - CASE - WHEN node = source_osm THEN the_geom - ELSE ST_Reverse(the_geom) - END AS route_geom - - FROM results - LEFT JOIN ways ON (gid = id) -) -SELECT *, -degrees(ST_azimuth(ST_StartPoint(route_geom), ST_EndPoint(route_geom))) AS azimuth -FROM additional -ORDER BY seq; -$BODY$ -LANGUAGE 'sql'; - -CREATE VIEW using_vehicle AS -SELECT * -FROM wrk_image('vehicle_net', @CH7_OSMID_1@, @CH7_OSMID_2@); - -CREATE VIEW using_taxi AS -SELECT * -FROM wrk_image('taxi_net', @CH7_OSMID_1@, @CH7_OSMID_2@); - -CREATE VIEW using_walk AS -SELECT * -FROM wrk_image('walk_net', @CH7_OSMID_1@, @CH7_OSMID_2@); diff --git a/docs/scripts/basic/chapter_8/CMakeLists.txt b/docs/scripts/basic/chapter_8/CMakeLists.txt deleted file mode 100644 index 851d3b32b..000000000 --- a/docs/scripts/basic/chapter_8/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -add_custom_target(basic_chapter_8_scripts) - -#--------------------- -# Files -#--------------------- -configure_file(all-sections-8.sql all-sections-8.sql) - -#--------------------------------------------- -# Generating the results files -#--------------------------------------------- - -add_custom_command( - TARGET basic_chapter_8_scripts - PRE_BUILD - BYPRODUCTS - excercise-8_1_1.txt - excercise-8_1_2.txt - excercise-8_1_3.txt - excercise-8_1_4.txt - - excercise-8_2_1.txt - excercise-8_2_2.txt - excercise-8_2_3.txt - - excercise-8_3_1.txt - excercise-8_3_2.txt - excercise-8_3_3.txt - excercise-8_3_4.txt - - excercise-8_4.txt - - excercise-8_5_1.txt - excercise-8_5_2.txt - excercise-8_5_3.txt - excercise-8_5_4.txt - - excercise-8_6.txt - - excercise-8_7_1.txt - excercise-8_7_2.txt - excercise-8_7_3.txt - - warnings.txt - COMMAND psql -d city_routing -f all-sections-8.sql 2> warnings.txt - COMMENT "running chapter 8 scripts" - DEPENDS all-sections-8.sql - ) diff --git a/docs/scripts/basic/chapter_8/all-sections-8.sql b/docs/scripts/basic/chapter_8/all-sections-8.sql deleted file mode 100644 index db67b00e9..000000000 --- a/docs/scripts/basic/chapter_8/all-sections-8.sql +++ /dev/null @@ -1,207 +0,0 @@ -SELECT * -INTO points -FROM ( - SELECT 1 AS gid, ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) AS geom - UNION - SELECT 2, ST_SetSRID(ST_Point(@POINT2_LON@, @POINT2_LAT@), 4326) - ) AS info; - -\o created_points.txt - -SELECT * FROM points; - -\o views_vertices1.txt - -SELECT * INTO vehicle_net_vertices -FROM pgr_extractVertices( - 'SELECT id, source, target - FROM vehicle_net ORDER BY id'); - -UPDATE vehicle_net_vertices AS v -SET (x,y,geom) = (w.x, w.y, w.geom) -FROM ways_vertices AS w WHERE v.id = w.id; - -\o views_vertices2.txt -SELECT * INTO taxi_net_vertices -FROM pgr_extractVertices( - 'SELECT id, source, target - FROM taxi_net ORDER BY id'); - -UPDATE taxi_net_vertices AS v -SET (x,y,geom) = (w.x, w.y, w.geom) -FROM ways_vertices AS w WHERE v.id = w.id; -\o views_vertices3.txt -SELECT * INTO walk_net_vertices -FROM pgr_extractVertices( - 'SELECT id, source, target - FROM walk_net ORDER BY id'); - -UPDATE walk_net_vertices AS v -SET (x,y,geom) = (w.x, w.y, w.geom) -FROM ways_vertices AS w WHERE v.id = w.id; -\o exercise_8_3_1.txt - -SELECT id -FROM ways_vertices -ORDER BY geom <-> ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) -LIMIT 1; - -\o exercise_8_3_2.txt - -SELECT id -FROM vehicle_net_vertices -ORDER BY geom <-> ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) -LIMIT 1; - -\o exercise_8_3_3.txt - -SELECT id -FROM taxi_net_vertices -ORDER BY geom <-> ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) -LIMIT 1; - -\o exercise_8_3_4.txt - -SELECT id -FROM walk_net_vertices -ORDER BY geom <-> ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) -LIMIT 1; - -\o exercise_8_4.txt -CREATE OR REPLACE FUNCTION wrk_Nearest( - IN vertex_table REGCLASS, - IN lat NUMERIC, - IN lon NUMERIC) -RETURNS BIGINT AS -$BODY$ -DECLARE result BIGINT; -BEGIN - - EXECUTE format( - $$ - SELECT id - FROM %1$I - ORDER BY geom <-> ST_SetSRID(ST_Point(%3$s, %2$s), 4326) - LIMIT 1 - $$, - vertex_table, lat, lon) - INTO result; - RETURN result; - -END -$BODY$ -LANGUAGE 'plpgsql'; -\o exercise_8_5_1.txt - -SELECT wrk_Nearest('ways_vertices', @POINT1_LAT@, @POINT1_LON@); - -\o exercise_8_5_2.txt - -SELECT wrk_Nearest('vehicle_net_vertices', @POINT1_LAT@, @POINT1_LON@); - -\o exercise_8_5_3.txt - -SELECT wrk_Nearest('taxi_net_vertices', @POINT1_LAT@, @POINT1_LON@); - -\o exercise_8_5_4.txt - -SELECT wrk_Nearest('walk_net_vertices', @POINT1_LAT@, @POINT1_LON@); - -\o exercise_8_6.txt -CREATE OR REPLACE FUNCTION wrk_fromAtoB( - IN edges_subset REGCLASS, - IN lat1 NUMERIC, IN lon1 NUMERIC, - IN lat2 NUMERIC, IN lon2 NUMERIC, - IN do_debug BOOLEAN DEFAULT false, - - OUT seq INTEGER, - OUT id BIGINT, - OUT seconds FLOAT, - OUT name TEXT, - OUT length_m FLOAT, - OUT route_readable TEXT, - OUT route_geom geometry, - OUT azimuth FLOAT -) -RETURNS SETOF record AS --- signature ends -$BODY$ -DECLARE -final_query TEXT; -BEGIN - final_query := format( - $$ - SELECT * - FROM wrk_dijkstra( - '%1$I', - (SELECT wrk_Nearest('%1$I_vertices', %2$s, %3$s)), - (SELECT wrk_Nearest('%1$I_vertices', %4$s, %5$s)) - ) - $$, - -- Subtitutions on the query are in order - edges_subset, lat1, lon1, lat2, lon2); - - IF do_debug THEN - RAISE NOTICE '%', final_query; - RETURN; - END IF; - RETURN QUERY EXECUTE final_query; -END; -$BODY$ -LANGUAGE 'plpgsql'; -\o exercise_8_7_1.txt - -SELECT DISTINCT name -FROM wrk_fromAtoB( - 'vehicle_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@); - -\o exercise_8_7_2.txt - -SELECT * -FROM wrk_fromAtoB( - 'taxi_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@, - true); - -\o exercise_8_7_3.txt - -SELECT * -INTO example -FROM wrk_fromAtoB( - 'walk_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@); - -SELECT * FROM example; - -\o - -WITH the_points AS ( -SELECT 1 AS id, ST_MakePoint(@POINT1_LON@, @POINT1_LAT@) -UNION -SELECT 1 AS id, ST_MakePoint(@POINT2_LON@, @POINT2_LAT@) -) -SELECT * INTO points_on_the_fly -FROM the_points; - -CREATE VIEW ch8_using_vehicle AS -SELECT * FROM wrk_fromAtoB( - 'vehicle_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@); - -CREATE VIEW ch8_using_taxi AS -SELECT * FROM wrk_fromAtoB( - 'taxi_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@); - -CREATE VIEW ch8_using_walk AS -SELECT * -FROM wrk_fromAtoB( - 'walk_net', - @POINT1_LAT@, @POINT1_LON@, - @POINT2_LAT@, @POINT2_LON@); diff --git a/docs/scripts/basic/data/CMakeLists.txt b/docs/scripts/basic/data/CMakeLists.txt new file mode 100644 index 000000000..1bb2c6e18 --- /dev/null +++ b/docs/scripts/basic/data/CMakeLists.txt @@ -0,0 +1,11 @@ +# Script for basic/data chapter +configure_file(data.sh data.sh) + +add_custom_command( + OUTPUT data.txt + COMMAND bash data.sh > data.txt +) + +add_custom_target(basic_data_scripts + DEPENDS "data.txt" +) diff --git a/docs/scripts/basic/chapter_4/section-4.3.2.sh b/docs/scripts/basic/data/data.sh similarity index 100% rename from docs/scripts/basic/chapter_4/section-4.3.2.sh rename to docs/scripts/basic/data/data.sh diff --git a/docs/scripts/basic/graphs/CMakeLists.txt b/docs/scripts/basic/graphs/CMakeLists.txt new file mode 100644 index 000000000..6b11410b8 --- /dev/null +++ b/docs/scripts/basic/graphs/CMakeLists.txt @@ -0,0 +1,56 @@ +# Script for basic/graphs chapter +configure_file(graphs.sql graphs.sql) +configure_file(images.sql images.sql) + +set(GENERATED_FILES + configuration_structure.txt + configuration_contents.txt + configuration-used.txt + + create_vertices.txt + vertices_description.txt + selected_rows.txt + fill_columns_1.txt + fill_columns_2.txt + fill_columns_3.txt + fill_columns_4.txt + fill_columns_5.txt + fill_columns_6.txt + set_components1.txt + set_components2.txt + set_components3.txt + see_components1.txt + see_components2.txt + see_components3.txt + see_components4.txt + create_vehicle_net1.txt + create_vehicle_net2.txt + create_vehicle_net3.txt + create_taxi_net1.txt + create_taxi_net2.txt + create_taxi_net3.txt + create_walk_net1.txt + create_walk_net2.txt + create_walk_net3.txt + create_net_vertices.txt + test_view1.txt + test_view2.txt + test_view3.txt + graphs_end.txt +) + +#---------------------------------------------- +# Generating the results files +#--------------------------------------------- + +add_custom_command( + COMMAND psql -d city_routing -f graphs.sql + COMMAND psql -d city_routing -f images.sql + OUTPUT ${GENERATED_FILES} + + COMMENT "running chapter graphs scripts" +) + +add_custom_target(basic_graphs_scripts + DEPENDS ${GENERATED_FILES} +) diff --git a/docs/scripts/basic/graphs/graphs.sql b/docs/scripts/basic/graphs/graphs.sql new file mode 100644 index 000000000..44009784e --- /dev/null +++ b/docs/scripts/basic/graphs/graphs.sql @@ -0,0 +1,185 @@ +DROP TABLE IF EXISTS vertices CASCADE; +DROP VIEW IF EXISTS vehicle_net CASCADE; +DROP VIEW IF EXISTS taxi_net CASCADE; +DROP MATERIALIZED VIEW IF EXISTS walk_net CASCADE; + +\o configuration_structure.txt +\dS+ configuration +\o configuration_contents.txt + +SELECT tag_id, tag_key, tag_value +FROM configuration +ORDER BY tag_id; + +\o configuration_used.txt + +SELECT distinct tag_id, tag_key, tag_value +FROM ways JOIN configuration USING (tag_id) +ORDER BY tag_id; + +\o create_vertices.txt + +SELECT id, in_edges, out_edges, x, y, NULL::BIGINT osm_id, NULL::BIGINT component, geom +INTO vertices +FROM pgr_extractVertices( + 'SELECT gid AS id, source, target + FROM ways ORDER BY id'); + +\o vertices_description.txt +\dS+ vertices +\o selected_rows.txt +SELECT * FROM vertices Limit 10; + +\o fill_columns_1.txt +SELECT count(*) FROM vertices WHERE geom IS NULL; +\o fill_columns_2.txt +UPDATE vertices SET (geom, osm_id) = (ST_startPoint(the_geom), source_osm) +FROM ways WHERE source = id; +\o fill_columns_3.txt +SELECT count(*) FROM vertices WHERE geom IS NULL; +\o fill_columns_4.txt +UPDATE vertices SET (geom, osm_id) = (ST_endPoint(the_geom), target_osm) +FROM ways WHERE geom IS NULL AND target = id; +\o fill_columns_5.txt +SELECT count(*) FROM vertices WHERE geom IS NULL; +\o fill_columns_6.txt +UPDATE vertices set (x,y) = (ST_X(geom), ST_Y(geom)); + + +\o set_components1.txt +ALTER TABLE ways ADD COLUMN component BIGINT; + +\o set_components2.txt +UPDATE vertices AS v SET component = c.component +FROM ( + SELECT seq, component, node + FROM pgr_connectedComponents( + 'SELECT gid as id, source, target, cost, reverse_cost FROM ways' +)) AS c +WHERE v.id = c.node; +\o set_components3.txt + +UPDATE ways SET component = v.component +FROM (SELECT id, component FROM vertices) AS v +WHERE source = v.id; + +\o see_components1.txt +SELECT count(DISTINCT component) FROM vertices; +\o see_components2.txt +SELECT count(DISTINCT component) FROM ways; +\o see_components3.txt +SELECT component, count(*) FROM ways GROUP BY component +ORDER BY count DESC LIMIT 10; +\o see_components4.txt +WITH +all_components AS (SELECT component, count(*) FROM ways GROUP BY component), +max_component AS (SELECT max(count) from all_components) +SELECT component FROM all_components WHERE count = (SELECT max FROM max_component); + +\o create_vehicle_net1.txt +-- DROP VIEW vehicle_net CASCADE; + +CREATE OR REPLACE VIEW vehicle_net AS + +WITH +all_components AS (SELECT component, count(*) FROM ways GROUP BY component), -- line 6 +max_component AS (SELECT max(count) from all_components), +the_component AS ( + SELECT component FROM all_components + WHERE count = (SELECT max FROM max_component)) + +SELECT + gid AS id, + source, target, + cost_s AS cost, reverse_cost_s AS reverse_cost, + name, length_m AS length, tag_id, the_geom AS geom +FROM ways JOIN the_component USING (component) JOIN configuration USING (tag_id) +WHERE tag_value NOT IN ('pedestrian', 'steps','footway','path','cycleway'); -- line 18 + +\o create_vehicle_net2.txt +SELECT count(*) FROM ways; +SELECT count(*) FROM vehicle_net; +\o create_vehicle_net3.txt +\dS+ vehicle_net +\o create_taxi_net1.txt + +-- DROP VIEW taxi_net; + +CREATE OR REPLACE VIEW taxi_net AS + SELECT + id, + source, target, + cost * 1.10 AS cost, reverse_cost * 1.10 AS reverse_cost, + name, length, tag_id, geom + FROM vehicle_net + WHERE vehicle_net.geom && ST_MakeEnvelope(@PGR_WORKSHOP_LITTLE_NET_BBOX@); + +\o create_taxi_net2.txt +SELECT count(*) FROM taxi_net; +\o create_taxi_net3.txt +\dS+ taxi_net +\o create_walk_net1.txt + +-- DROP MATERIALIZED VIEW walk_net CASCADE; + +CREATE MATERIALIZED VIEW walk_net AS + +WITH +allc AS (SELECT component, count(*) FROM ways GROUP BY component), +maxcount AS (SELECT max(count) from allc), +the_component AS (SELECT component FROM allc WHERE count = (SELECT max FROM maxcount)) + +SELECT + gid AS id, + source, target, + length_m / 2.0 AS cost, length_m / 2.0 AS reverse_cost, + name, length_m AS length, the_geom AS geom +FROM ways JOIN the_component USING (component) JOIN configuration USING (tag_id) +WHERE tag_value IN ('pedestrian', 'steps','footway','path','cycleway'); -- line 18 + +\o create_walk_net2.txt + +SELECT count(*) FROM walk_net; + +\o create_walk_net3.txt +\dS+ walk_net +\o create_net_vertices.txt + +SELECT * INTO vehicle_vertices +FROM pgr_extractVertices( + 'SELECT id, source, target + FROM vehicle_net ORDER BY id'); + +SELECT * INTO taxi_vertices +FROM pgr_extractVertices( + 'SELECT id, source, target + FROM taxi_net ORDER BY id'); + +SELECT * INTO walk_vertices +FROM pgr_extractVertices( + 'SELECT id, source, target + FROM walk_net ORDER BY id'); + +\o test_view1.txt + +SELECT start_vid, end_vid, agg_cost +FROM pgr_dijkstraCostMatrix( + 'SELECT * FROM vehicle_net', + ARRAY[@ID_1@, @ID_2@, @ID_3@, @ID_4@, @ID_5@]); + +\o test_view2.txt + +SELECT start_vid, end_vid, agg_cost +FROM pgr_dijkstraCostMatrix( + 'SELECT * FROM taxi_net', + ARRAY[@ID_1@, @ID_2@, @ID_3@, @ID_4@, @ID_5@]); + +\o test_view3.txt + +SELECT start_vid, end_vid, agg_cost +FROM pgr_dijkstraCostMatrix( + 'SELECT * FROM walk_net', + ARRAY[@ID_1@, @ID_2@, @ID_3@, @ID_4@, @ID_5@]); + +\o graphs_end.txt +\o diff --git a/docs/scripts/basic/graphs/images.sql b/docs/scripts/basic/graphs/images.sql new file mode 100644 index 000000000..7645a317f --- /dev/null +++ b/docs/scripts/basic/graphs/images.sql @@ -0,0 +1,10 @@ +DROP TABLE IF EXISTS costMatrix_png; + +SELECT row_number() over() as gid, ST_makeline(v1.geom, v2.geom) AS geom, +'('||start_vid||', '||end_vid||') t= ' || round(agg_cost::NUMERIC, 2) AS name +INTO costMatrix_png +FROM pgr_dijkstraCostMatrix( + 'SELECT * FROM vehicle_net', + ARRAY[@ID_1@, @ID_2@, @ID_3@, @ID_4@, @ID_5@]) +JOIN vertices v1 ON (start_vid=v1.id) +JOIN vertices v2 ON (end_vid=v2.id); diff --git a/docs/scripts/basic/pedestrian/CMakeLists.txt b/docs/scripts/basic/pedestrian/CMakeLists.txt new file mode 100644 index 000000000..30ade5990 --- /dev/null +++ b/docs/scripts/basic/pedestrian/CMakeLists.txt @@ -0,0 +1,31 @@ +# Script for basic/graphs chapter +configure_file(pedestrian.sql pedestrian.sql) +configure_file(images.sql images.sql) + +set(GENERATED_FILES + combinations.txt + get_id.txt + many_to_many.txt + many_to_one.txt + note_1.txt + one_to_many.txt + one_to_one.txt + dijkstracost.txt +) + +#---------------------------------------------- +# Generating the results files +#--------------------------------------------- + +add_custom_command( + COMMAND psql -d city_routing -f pedestrian.sql + COMMAND psql -d city_routing -f images.sql + OUTPUT ${GENERATED_FILES} + + DEPENDS pedestrian.sql images.sql + COMMENT "running chapter pedestrian scripts" +) + +add_custom_target(basic_pedestrian_scripts + DEPENDS ${GENERATED_FILES} +) diff --git a/docs/scripts/basic/pedestrian/images.sql b/docs/scripts/basic/pedestrian/images.sql new file mode 100644 index 000000000..7d13565f0 --- /dev/null +++ b/docs/scripts/basic/pedestrian/images.sql @@ -0,0 +1,89 @@ +CREATE OR REPLACE VIEW stars AS +SELECT osm_id, id, geom, +CASE + WHEN osm_id = @OSMID_1@ THEN '@PLACE_1@' + WHEN osm_id = @OSMID_2@ THEN '@PLACE_2@' + WHEN osm_id = @OSMID_3@ THEN '@PLACE_3@' + WHEN osm_id = @OSMID_4@ THEN '@PLACE_4@' + WHEN osm_id = @OSMID_5@ THEN '@PLACE_5@' +END AS name +FROM vertices +WHERE osm_id IN (@OSMID_1@, @OSMID_2@, @OSMID_3@, @OSMID_4@, @OSMID_5@) +ORDER BY osm_id; + +CREATE OR REPLACE VIEW pedestrian_one_to_one AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length AS cost + FROM walk_net', + @ID_1@, + @ID_3@, + directed := false) +) +SELECT seq, start_vid, end_vid, geom AS geom FROM dijkstra JOIN walk_net ON(edge = id); + +CREATE OR REPLACE VIEW pedestrian_many_to_one AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length/1000 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + @ID_3@, + directed := false) +) +SELECT seq, start_vid, end_vid, geom AS geom FROM dijkstra JOIN walk_net ON(edge = id); + +CREATE OR REPLACE VIEW pedestrian_one_to_many AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + cost + FROM walk_net', + @ID_3@, + ARRAY[@ID_1@, @ID_2@], + directed := false) +) +SELECT seq, start_vid, end_vid, geom AS geom FROM dijkstra JOIN walk_net ON(edge = id); + +CREATE OR REPLACE VIEW pedestrian_many_to_many AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +) +SELECT seq, start_vid, end_vid, geom AS geom FROM dijkstra JOIN walk_net ON(edge = id); + +CREATE OR REPLACE VIEW pedestrian_combinations AS +WITH dijkstra AS ( + SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + 'SELECT * FROM (VALUES + (@ID_1@, @ID_4@), + (@ID_2@, @ID_5@)) + AS combinations (source, target)', + directed := false) +) +SELECT seq, start_vid, end_vid, geom AS geom FROM dijkstra JOIN walk_net ON(edge = id); + +CREATE OR REPLACE VIEW pedestrian_dijkstraCost AS +WITH dijkstra AS ( +SELECT start_vid, end_vid, round(agg_cost::numeric,2) AS agg_cost +FROM pgr_dijkstraCost( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +) +SELECT row_number() over() AS gid, start_vid, end_vid, agg_cost, ST_MakeLine(v1.geom, v2.geom) AS geom FROM dijkstra +JOIN vertices AS v1 ON (start_vid = v1.id) +JOIN vertices AS v2 ON (end_vid = v2.id); diff --git a/docs/scripts/basic/pedestrian/pedestrian.sql b/docs/scripts/basic/pedestrian/pedestrian.sql new file mode 100644 index 000000000..e6985de52 --- /dev/null +++ b/docs/scripts/basic/pedestrian/pedestrian.sql @@ -0,0 +1,124 @@ +\o get_id.txt + +SELECT osm_id, id FROM vertices +WHERE osm_id IN (@OSMID_1@, @OSMID_2@, @OSMID_3@, @OSMID_4@, @OSMID_5@) +ORDER BY osm_id; + +\o one_to_one.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length AS cost + FROM walk_net', + @ID_1@, + @ID_3@, + directed := false); + +\o many_to_one.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length/1000 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + @ID_3@, + directed := false); + +\o one_to_many.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + cost + FROM walk_net', + @ID_3@, + ARRAY[@ID_1@, @ID_2@], + directed := false); + +\o many_to_many.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false); + +\o combinations.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + 'SELECT * FROM (VALUES + (@ID_1@, @ID_4@), + (@ID_2@, @ID_5@)) + AS combinations (source, target)', + directed := false); + +\o dijkstracost.txt + +SELECT * FROM pgr_dijkstraCost( + 'SELECT id, source, target, + length / 1.3 / 60 AS cost + FROM walk_net', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false); + +\o note_1.txt +\t +SELECT 'Inspecting the results, looking for totals (edge = -1):'; + +SELECT '- From @ID_1@ to vertex @ID_4@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' +FROM pgr_dijkstra( + ' + SELECT id, + source, + target, + length / 1.3 / 60 AS cost + FROM walk_net + ', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +WHERE edge = -1 AND start_vid = @ID_1@ AND end_vid = @ID_4@; +SELECT '- From @ID_1@ to vertex @ID_5@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' +FROM pgr_dijkstra( + ' + SELECT id, + source, + target, + length / 1.3 / 60 AS cost + FROM walk_net + ', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +WHERE edge = -1 AND start_vid = @ID_1@ AND end_vid = @ID_5@; +SELECT '- From @ID_2@ to vertex @ID_4@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' +FROM pgr_dijkstra( + ' + SELECT id, + source, + target, + length / 1.3 / 60 AS cost + FROM walk_net + ', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +WHERE edge = -1 AND start_vid = @ID_2@ AND end_vid = @ID_4@; +SELECT '- From @ID_2@ to vertex @ID_5@ takes ' || round(agg_cost::numeric, 2) || ' minutes (seq = ' || seq || ')' +FROM pgr_dijkstra( + ' + SELECT id, + source, + target, + length / 1.3 / 60 AS cost + FROM walk_net + ', + ARRAY[@ID_1@, @ID_2@], + ARRAY[@ID_4@, @ID_5@], + directed := false) +WHERE edge = -1 AND start_vid = @ID_2@ AND end_vid = @ID_5@; diff --git a/docs/scripts/basic/sql_function/CMakeLists.txt b/docs/scripts/basic/sql_function/CMakeLists.txt new file mode 100644 index 000000000..7b338e8fc --- /dev/null +++ b/docs/scripts/basic/sql_function/CMakeLists.txt @@ -0,0 +1,28 @@ +add_custom_target(basic_sql_function_scripts) + +#--------------------- +# Files +#--------------------- +configure_file(sql_function.sql sql_function.sql) +configure_file(images.sql images.sql) + +add_custom_command( + TARGET basic_sql_function_scripts + PRE_BUILD + BYPRODUCTS + + get_more_info.txt + get_read_geom.txt + get_geom.txt + wrong_directionality.txt + fix_directionality.txt + good_directionality.txt + use_directionality.txt + using_fn1.txt + using_fn2.txt + using_fn3.txt + + COMMAND psql -d city_routing -f sql_function.sql + COMMAND psql -d city_routing -f images.sql + COMMENT "running sql function scripts" +) diff --git a/docs/scripts/basic/sql_function/images.sql b/docs/scripts/basic/sql_function/images.sql new file mode 100644 index 000000000..7e8a4ada2 --- /dev/null +++ b/docs/scripts/basic/sql_function/images.sql @@ -0,0 +1,9 @@ + +CREATE OR REPLACE VIEW using_vehicle AS +SELECT * +FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +CREATE OR REPLACE VIEW sql_route_geom AS +SELECT seq, id, geom +FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@) +JOIN vehicle_net USING (id); diff --git a/docs/scripts/basic/sql_function/sql_function.sql b/docs/scripts/basic/sql_function/sql_function.sql new file mode 100644 index 000000000..5831941e6 --- /dev/null +++ b/docs/scripts/basic/sql_function/sql_function.sql @@ -0,0 +1,213 @@ + +DROP FUNCTION IF EXISTS wrk_dijkstra(regclass, bigint, bigint); + + +\o get_more_info.txt + +-- DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_dijkstra( + IN edges_subset REGCLASS, IN source BIGINT, IN target BIGINT, + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT +) +RETURNS SETOF record AS +$BODY$ +SELECT +seq, id, seconds, name, length +FROM ( + SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_dijkstra( + 'SELECT * FROM ' || $1, + source, target) +) AS results +LEFT JOIN vehicle_net USING (id) +ORDER BY seq; +$BODY$ +LANGUAGE SQL; + +SELECT * FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o get_read_geom.txt + +DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_dijkstra( + IN edges_subset REGCLASS, IN source BIGINT, IN target BIGINT, + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT, + OUT route_readable TEXT +) +RETURNS SETOF record AS +$BODY$ +WITH +results AS ( + SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_dijkstra( + 'SELECT * FROM ' || $1, + source, target) +) +SELECT + seq, id, seconds, name, length, + ST_AsText(geom) +FROM results +LEFT JOIN vehicle_net USING (id) +ORDER BY seq; +$BODY$ +LANGUAGE SQL; + +SELECT seq, route_readable FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o get_geom.txt + +DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_dijkstra( + IN edges_subset REGCLASS, IN source BIGINT, IN target BIGINT, + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT, + OUT route_readable TEXT, + OUT route_geom geometry +) +RETURNS SETOF record AS +$BODY$ +WITH +results AS ( + SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_dijkstra( + 'SELECT * FROM ' || $1, + source, target) +) +SELECT + seq, id, seconds, name, length, + ST_AsText(geom), + geom +FROM results +LEFT JOIN vehicle_net USING (id) +ORDER BY seq; +$BODY$ +LANGUAGE SQL; + +SELECT seq, route_geom FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o wrong_directionality.txt + +WITH +results AS ( + SELECT seq, id, route_geom + FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@) +), +compare AS ( + SELECT seq, id, lead(seq) over(ORDER BY seq) AS next_seq, + ST_AsText(ST_endPoint(route_geom)) AS id_end, + ST_AsText(ST_startPoint(lead(route_geom) over(ORDER BY seq))) AS next_id_start + + FROM results + ORDER BY seq) +SELECT * FROM compare WHERE id_end != next_id_start; + +\o fix_directionality.txt + +DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_dijkstra( + IN edges_subset REGCLASS, IN source BIGINT, IN target BIGINT, + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT, + OUT route_readable TEXT, + OUT route_geom geometry +) +RETURNS SETOF record AS +$BODY$ +WITH +results AS ( + SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_dijkstra( + 'SELECT * FROM ' || $1, + source, target) +) +SELECT + seq, id, seconds, name, length, + CASE + WHEN node = source THEN ST_AsText(geom) + ELSE ST_AsText(ST_Reverse(geom)) + END, + + CASE + WHEN node = source THEN geom + ELSE ST_Reverse(geom) + END +FROM results +LEFT JOIN vehicle_net USING (id) +ORDER BY seq; +$BODY$ +LANGUAGE SQL; + +SELECT seq, route_readable FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o good_directionality.txt + +WITH +results AS ( + SELECT seq, id, seconds, route_geom + FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@) +), +compare AS ( + SELECT seq, id, lead(route_geom) over(ORDER BY seq) AS next_id, + ST_AsText(ST_endPoint(route_geom)) AS id_end, + ST_AsText(ST_startPoint(lead(route_geom) over(ORDER BY seq))) AS next_id_start +FROM results +ORDER BY seq) +SELECT * FROM compare WHERE id_end != next_id_start; + +\o use_directionality.txt + +DROP FUNCTION wrk_dijkstra(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_dijkstra( + IN edges_subset REGCLASS, IN source BIGINT, IN target BIGINT, + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT, + OUT route_readable TEXT, + OUT route_geom geometry, + OUT azimuth FLOAT +) +RETURNS SETOF record AS +$BODY$ +WITH +results AS ( + SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_dijkstra( + 'SELECT * FROM ' || $1, + source, target)), +additional AS ( + SELECT + seq, id, seconds, name, length, + CASE + WHEN node = source THEN ST_AsText(geom) + ELSE ST_AsText(ST_Reverse(geom)) + END AS readable, + + CASE + WHEN node = source THEN geom + ELSE ST_Reverse(geom) + END AS geom + FROM results + LEFT JOIN vehicle_net USING (id) + ORDER BY seq) + +SELECT *, + degrees(ST_azimuth(ST_StartPoint(geom), ST_EndPoint(geom))) AS azimuth +FROM additional ORDER BY seq; +$BODY$ +LANGUAGE SQL; + +SELECT seq, azimuth FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o using_fn1.txt +SELECT DISTINCT name +FROM wrk_dijkstra('vehicle_net', @CH7_ID_1@, @CH7_ID_2@); + +\o using_fn2.txt +SELECT name, sum(seconds) +FROM wrk_dijkstra('taxi_net', @CH7_ID_1@, @CH7_ID_2@) +GROUP BY name; + +\o using_fn3.txt +SELECT * +FROM wrk_dijkstra('walk_net', @CH7_ID_1@, @CH7_ID_2@); diff --git a/docs/scripts/basic/vehicles/CMakeLists.txt b/docs/scripts/basic/vehicles/CMakeLists.txt new file mode 100644 index 000000000..d2de8e7f9 --- /dev/null +++ b/docs/scripts/basic/vehicles/CMakeLists.txt @@ -0,0 +1,34 @@ +add_custom_target(basic_vehicles_scripts) + +#--------------------- +# Files +#--------------------- +configure_file(vehicles.sql vehicles.sql) +configure_file(images.sql images.sql) + +#---------------------------------------------- +# Generating the results files +#--------------------------------------------- + +add_custom_command( + TARGET basic_vehicles_scripts + PRE_BUILD + BYPRODUCTS + oneway_cost.txt + oneway_revc.txt + route_going.txt + route_coming.txt + time_is_money.txt + add_penalty.txt + use_penalty.txt + update_penalty.txt + get_penalized_route.txt + time_in_secs.txt + penalized_view.txt + using_view.txt + vehicles_end.txt + + COMMAND psql -d city_routing -f vehicles.sql + COMMAND psql -d city_routing -f images.sql + COMMENT "running vehicles scripts" + DEPENDS vehicles.sql images.sql) diff --git a/docs/scripts/basic/chapter_6/images.sql b/docs/scripts/basic/vehicles/images.sql similarity index 51% rename from docs/scripts/basic/chapter_6/images.sql rename to docs/scripts/basic/vehicles/images.sql index 140840da1..a5dd573b2 100644 --- a/docs/scripts/basic/chapter_6/images.sql +++ b/docs/scripts/basic/vehicles/images.sql @@ -1,57 +1,79 @@ -CREATE VIEW ad7_png AS +CREATE OR REPLACE VIEW vehicle_route_going_png AS WITH dijkstra AS ( SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, cost, reverse_cost FROM ways ', -@ID_1@, -@ID_3@, -directed := true) + 'SELECT id, source, target, cost, reverse_cost + FROM vehicle_net', + @ID_1@, @ID_3@, + directed := true) ) -SELECT seq, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); +SELECT seq, start_vid, end_vid, geom FROM dijkstra JOIN vehicle_net ON(edge = id); -CREATE VIEW ad8_png AS +CREATE OR REPLACE VIEW vehicle_route_coming_png AS WITH dijkstra AS ( SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, cost, reverse_cost FROM ways ', -@ID_3@, @ID_1@, -directed := true) + 'SELECT id, source, target, cost, reverse_cost + FROM vehicle_net', + @ID_3@, @ID_1@, + directed := true) ) -SELECT seq, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); +SELECT seq, start_vid, end_vid, geom FROM dijkstra JOIN vehicle_net ON(edge = id); +CREATE OR REPLACE VIEW vehicle_time_is_money_png AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + cost / 3600 * 100 AS cost, + reverse_cost / 3600 * 100 AS reverse_cost + FROM taxi_net', + @ID_3@, @ID_1@) +) +SELECT seq, start_vid, end_vid, geom FROM dijkstra JOIN taxi_net ON(edge = id); -ALTER TABLE configuration ADD COLUMN penalty FLOAT; --- No penalty UPDATE configuration SET penalty=1; +CREATE OR REPLACE VIEW vehicle_use_penalty_png AS +WITH dijkstra AS ( +SELECT * FROM pgr_dijkstra( + 'SELECT v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost + FROM vehicle_net AS v JOIN configuration + USING (tag_id)', + @ID_3@, @ID_1@) +) +SELECT seq, start_vid, end_vid, geom FROM dijkstra JOIN vehicle_net ON(edge = id); --- Not including pedestrian ways -UPDATE configuration SET penalty=-1.0 WHERE tag_value IN ('steps','footway','pedestrian','cycleway'); +-- Not including cycleways +UPDATE configuration SET penalty=-1.0 +WHERE tag_key IN ('cycleway') OR tag_value IN ('cycleway'); --- Penalizing with 5 times the costs +-- Penalizing with 5 times the costs the unknown UPDATE configuration SET penalty=5 WHERE tag_value IN ('unclassified'); -- Encuraging the use of "fast" roads UPDATE configuration SET penalty=0.5 WHERE tag_value IN ('tertiary'); -UPDATE configuration SET penalty=0.3 WHERE tag_value IN ( +UPDATE configuration SET penalty=0.3 +WHERE tag_value IN ( 'primary','primary_link', 'trunk','trunk_link', 'motorway','motorway_junction','motorway_link', 'secondary'); - - -CREATE VIEW ad11_png AS +CREATE OR REPLACE VIEW vehicle_get_penalized_route_png AS WITH dijkstra AS ( SELECT * FROM pgr_dijkstra( - ' SELECT gid AS id, source, target, cost_s * penalty AS cost, reverse_cost_s * penalty AS reverse_cost - FROM ways JOIN configuration - USING (tag_id) ', + 'SELECT v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost + FROM vehicle_net AS v JOIN configuration + USING (tag_id)', @ID_3@, @ID_1@) ) -SELECT seq, start_vid, end_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); +SELECT seq, geom AS geom FROM dijkstra JOIN vehicle_net ON(edge = id); -CREATE VIEW penalty_routes AS +CREATE OR REPLACE VIEW vehicle_penalty_routes AS WITH dijkstra AS ( SELECT * FROM pgr_dijkstra( ' SELECT gid AS id, source, target, cost_s * penalty AS cost, reverse_cost_s * penalty AS reverse_cost @@ -72,7 +94,7 @@ SELECT seq, start_vid, end_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); -CREATE VIEW no_penalty_routes AS +CREATE OR REPLACE VIEW vehicle_no_penalty_routes AS WITH dijkstra AS ( SELECT * FROM pgr_dijkstra( ' SELECT gid AS id, source, target, cost_s AS cost, reverse_cost_s AS reverse_cost FROM ways ', @@ -91,5 +113,5 @@ SELECT seq, start_vid, end_vid, the_geom AS geom FROM dijkstra JOIN ways ON(edge = gid); -CREATE VIEW pedestrian_only_roads AS +CREATE OR REPLACE VIEW pedestrian_only_roads AS SELECT * FROM ways where tag_id in (119, 122, 114, 118); diff --git a/docs/scripts/basic/vehicles/vehicles.sql b/docs/scripts/basic/vehicles/vehicles.sql new file mode 100644 index 000000000..ddd11c0e0 --- /dev/null +++ b/docs/scripts/basic/vehicles/vehicles.sql @@ -0,0 +1,125 @@ +\o oneway_cost.txt + +SELECT count(*) FROM vehicle_net +WHERE cost < 0; + +\o oneway_revc.txt + + +SELECT count(*) FROM vehicle_net +WHERE reverse_cost < 0; + + +\o route_going.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, cost, reverse_cost + FROM vehicle_net', + @ID_1@, @ID_3@, + directed := true); + +\o route_coming.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, cost, reverse_cost + FROM vehicle_net', + @ID_3@, @ID_1@, + directed := true); + +\o time_is_money.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT id, source, target, + cost / 3600 * 100 AS cost, + reverse_cost / 3600 * 100 AS reverse_cost + FROM taxi_net', + @ID_3@, @ID_1@); + +\o add_penalty.txt + +ALTER TABLE configuration + ADD COLUMN IF NOT EXISTS penalty FLOAT DEFAULT 1.0; + +\o use_penalty.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost + FROM vehicle_net AS v JOIN configuration + USING (tag_id)', + @ID_3@, @ID_1@); + +\o update_penalty.txt + +-- Not including cycleways +UPDATE configuration SET penalty=-1.0 +WHERE tag_key IN ('cycleway') OR tag_value IN ('cycleway'); + +-- Penalizing with 5 times the costs the unknown +UPDATE configuration SET penalty=5 WHERE tag_value IN ('unclassified'); + +-- Encuraging the use of "fast" roads +UPDATE configuration SET penalty=0.5 WHERE tag_value IN ('tertiary'); +UPDATE configuration SET penalty=0.3 +WHERE tag_value IN ( + 'primary','primary_link', + 'trunk','trunk_link', + 'motorway','motorway_junction','motorway_link', + 'secondary'); + +\o get_penalized_route.txt + +SELECT * FROM pgr_dijkstra( + 'SELECT v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost + FROM vehicle_net AS v JOIN configuration + USING (tag_id)', + @ID_3@, @ID_1@); + +\o time_in_secs.txt + +SELECT * FROM pgr_dijkstra( + $$ + SELECT id, source, target, cost, reverse_cost + FROM ( + -- Nested call + SELECT edge AS id FROM pgr_dijkstra( + 'SELECT v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost + FROM vehicle_net AS v JOIN configuration + USING (tag_id)', + @ID_3@, @ID_1@) ) AS edges_in_route + JOIN vehicle_net USING (id) + $$, + @ID_3@, @ID_1@); + +\o penalized_view.txt + +CREATE OR REPLACE VIEW penalized AS +SELECT + v.id, source, target, + CASE WHEN cost <= 0 THEN -1 ELSE cost * penalty END AS cost, + CASE WHEN reverse_cost <= 0 THEN -1 ELSE reverse_cost * penalty END AS reverse_cost +FROM vehicle_net AS v JOIN configuration +USING (tag_id); + +\o using_view.txt + +SELECT * FROM pgr_dijkstra( + $$ + SELECT id, source, target, cost, reverse_cost + FROM ( + -- Nested call + SELECT edge AS id FROM pgr_dijkstra( + 'SELECT id, source, target, cost, reverse_cost + FROM penalized', + @ID_3@, @ID_1@) ) AS edges_in_route + JOIN vehicle_net USING (id) + $$, + @ID_3@, @ID_1@); + +\o vehicles_end.txt +\o diff --git a/docs/scripts/basic/withPoints/CMakeLists.txt b/docs/scripts/basic/withPoints/CMakeLists.txt new file mode 100644 index 000000000..3049bb54b --- /dev/null +++ b/docs/scripts/basic/withPoints/CMakeLists.txt @@ -0,0 +1,29 @@ +#--------------------- +# Files +#--------------------- +configure_file(withPoints.sql withPoints.sql) +configure_file(images.sql images.sql) + +set(GENERATED_FILES + closestedges.txt + route_withPoints.txt + wrk_withPoints.txt + use_fn_1.txt + use_fn_2.txt + use_fn_3.txt + file_end.txt + warnings.txt +) + +add_custom_command( + COMMAND psql -d city_routing -f withPoints.sql 2> warnings.txt + COMMAND psql -d city_routing -f images.sql + OUTPUT ${GENERATED_FILES} + + DEPENDS withPoints.sql images.sql + COMMENT "running chapter withPoints scripts" +) + +add_custom_target(basic_withPoints_scripts + DEPENDS ${GENERATED_FILES} +) diff --git a/docs/scripts/basic/withPoints/images.sql b/docs/scripts/basic/withPoints/images.sql new file mode 100644 index 000000000..31cfe6202 --- /dev/null +++ b/docs/scripts/basic/withPoints/images.sql @@ -0,0 +1,42 @@ +DROP TABLE IF EXISTS points_on_map; +WITH the_points AS ( +SELECT 1 AS id, ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) +UNION +SELECT 2 AS id, ST_SetSRID(ST_Point(@POINT2_LON@, @POINT2_LAT@), 4326) +) +SELECT * INTO points_on_map +FROM the_points; + + +DROP TABLE IF EXISTS closest_walk; +WITH the_closest AS ( +SELECT 1 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from walk_net', + ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) , 0.5) + +UNION + +SELECT 2 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from walk_net', + ST_SetSRID(ST_Point(@POINT2_LON@, @POINT2_LAT@), 4326) , 0.5) +) +SELECT * INTO closest_walk FROM the_closest; + +CREATE OR REPLACE VIEW using_vehicle AS +SELECT * FROM wrk_withPoints( + 'vehicle_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@); + +CREATE OR REPLACE VIEW using_taxi AS +SELECT * FROM wrk_withPoints( + 'taxi_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@); + +CREATE OR REPLACE VIEW using_walk AS +SELECT * +FROM wrk_withPoints( + 'walk_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@); diff --git a/docs/scripts/basic/withPoints/withPoints.sql b/docs/scripts/basic/withPoints/withPoints.sql new file mode 100644 index 000000000..1a74dfb53 --- /dev/null +++ b/docs/scripts/basic/withPoints/withPoints.sql @@ -0,0 +1,145 @@ +\o closestedges.txt + +SELECT 1 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from vehicle_net', + ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326) , 0.5) + +UNION + +SELECT 2 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from vehicle_net', + ST_SetSRID(ST_Point(@POINT2_LON@, @POINT2_LAT@), 4326) , 0.5); + + +\o route_withPoints.txt + +SELECT * FROM pgr_withPoints( + 'SELECT id, source, target, cost, reverse_cost from vehicle_net', + $$ + SELECT 2 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from vehicle_net', + ST_SetSRID(ST_Point(@POINT1_LON@, @POINT1_LAT@), 4326), 0.5) + UNION + SELECT 1 AS pid, * from pgr_findCloseEdges( + 'SELECT id, geom from vehicle_net', + ST_SetSRID(ST_Point(@POINT2_LON@, @POINT2_LAT@), 4326), 0.5) + $$, + -1, -2); + +\o wrk_withPoints.txt +-- DROP FUNCTION wrk_withPoints(regclass, bigint, bigint); + +CREATE OR REPLACE FUNCTION wrk_withPoints( + IN edges_subset REGCLASS, + IN lat1 NUMERIC, IN lon1 NUMERIC, + IN lat2 NUMERIC, IN lon2 NUMERIC, + IN do_debug BOOLEAN DEFAULT false, + + OUT seq INTEGER, OUT id BIGINT, OUT seconds FLOAT, OUT name TEXT, OUT length FLOAT, + OUT route_readable TEXT, + OUT route_geom geometry, + OUT azimuth FLOAT +) +-- signature ends +RETURNS SETOF record AS +$BODY$ +DECLARE + closest_query TEXT; + resuts_query TEXT; + additional_query TEXT; + final_query TEXT; +BEGIN + -- 0 + + closest_query := format( + $cq$SELECT 1 AS pid, * from pgr_findCloseEdges( + $q1$ SELECT id, geom from %1$I $q1$, + ST_SetSRID(ST_Point(%2$s, %3$s), 4326) , 0.5) + + UNION + + SELECT 2 AS pid, * from pgr_findCloseEdges( + $q1$ SELECT id, geom from %1$I $q1$, + ST_SetSRID(ST_Point(%4$s, %5$s), 4326) , 0.5) + $cq$, edges_subset, lon1, lat1, lon2, lat2); + + -- 1 + + resuts_query := format( + $$SELECT seq, edge AS id, node, cost AS seconds + FROM pgr_withPoints( + 'SELECT * FROM %1$I', + '%2$s', + -1, -2) + $$, edges_subset, closest_query); + + -- 2 + + additional_query := format( + $$SELECT + seq, id, seconds, name, length, + CASE + WHEN node = source THEN ST_AsText(geom) + ELSE ST_AsText(ST_Reverse(geom)) + END AS readable, + + CASE + WHEN node = source THEN geom + ELSE ST_Reverse(geom) + END AS geom + FROM results + LEFT JOIN %1$I USING (id) + ORDER BY seq + $$, edges_subset); + + -- 3 + + final_query := + 'WITH + results AS (' || resuts_query || '), + additional AS ( ' || additional_query || ') + SELECT *, degrees(ST_azimuth(ST_StartPoint(geom), ST_EndPoint(geom))) AS azimuth + FROM additional ORDER BY seq'; + + -- 4 + + IF do_debug THEN + RAISE NOTICE '%', final_query; + RETURN; + END IF; + + RETURN QUERY EXECUTE final_query; + +END; +$BODY$ +LANGUAGE plpgsql; + +\o use_fn_1.txt + +SELECT DISTINCT name +FROM wrk_withPoints( + 'vehicle_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@); + +\o use_fn_2.txt + +SELECT * +FROM wrk_withPoints( + 'taxi_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@, + true); + +\o use_fn_3.txt + +SELECT * +INTO example +FROM wrk_withPoints( + 'walk_net', + @POINT1_LAT@, @POINT1_LON@, + @POINT2_LAT@, @POINT2_LON@); + +SELECT * FROM example; + +\o file_end.txt diff --git a/docs/scripts/configuration/osmid_configuration.sql b/docs/scripts/configuration/osmid_configuration.sql index 501575d34..e8c879abb 100644 --- a/docs/scripts/configuration/osmid_configuration.sql +++ b/docs/scripts/configuration/osmid_configuration.sql @@ -19,3 +19,11 @@ SELECT 'ID_' || r, id from a; WITH a AS (SELECT 5 AS r, osm_id, id FROM ways_vertices_pgr WHERE osm_id = @OSMID_5@) SELECT 'ID_' || r, id from a; + +WITH a AS (SELECT 1 AS r, osm_id, id FROM ways_vertices_pgr +WHERE osm_id = @CH7_ID_1@) +SELECT 'CH7_ID_' || r, id from a; + +WITH a AS (SELECT 2 AS r, osm_id, id FROM ways_vertices_pgr +WHERE osm_id = @CH7_ID_2@) +SELECT 'CH7_ID_' || r, id from a; diff --git a/docs/scripts/un_sdg/sdg11/CMakeLists.txt b/docs/scripts/un_sdg/sdg11/CMakeLists.txt index da8dea19e..d61c61dbf 100644 --- a/docs/scripts/un_sdg/sdg11/CMakeLists.txt +++ b/docs/scripts/un_sdg/sdg11/CMakeLists.txt @@ -51,5 +51,4 @@ add_custom_command( exercise_10.txt COMMAND psql -d bangladesh -f all_exercises_sdg11.sql COMMENT "running sdg11 scripts" - DEPENDS all_exercises_sdg11.sql - ) +) diff --git a/docs/scripts/un_sdg/sdg3/CMakeLists.txt b/docs/scripts/un_sdg/sdg3/CMakeLists.txt index fba0ebcfc..366d66fbc 100644 --- a/docs/scripts/un_sdg/sdg3/CMakeLists.txt +++ b/docs/scripts/un_sdg/sdg3/CMakeLists.txt @@ -67,5 +67,4 @@ add_custom_command( exercise_20.txt COMMAND psql -d mumbai -f all_exercises_sdg3.sql COMMENT "running chapter sdg3 scripts" - DEPENDS all_exercises_sdg3.sql - ) +) diff --git a/docs/scripts/un_sdg/sdg7/CMakeLists.txt b/docs/scripts/un_sdg/sdg7/CMakeLists.txt index a6894470d..b977dc11a 100644 --- a/docs/scripts/un_sdg/sdg7/CMakeLists.txt +++ b/docs/scripts/un_sdg/sdg7/CMakeLists.txt @@ -33,5 +33,4 @@ add_custom_command( exercise_12.txt COMMAND psql -d mumbai -f all_exercises_sdg7.sql COMMENT "running chapter sdg7 scripts" - DEPENDS all_exercises_sdg7.sql - ) +) diff --git a/docs/source/_themes/bootstrap b/docs/source/_themes/bootstrap deleted file mode 120000 index 57a1195e2..000000000 --- a/docs/source/_themes/bootstrap +++ /dev/null @@ -1 +0,0 @@ -../../../bootstrap \ No newline at end of file diff --git a/docs/source/latex.rst b/docs/source/latex.rst deleted file mode 100644 index 810f23409..000000000 --- a/docs/source/latex.rst +++ /dev/null @@ -1,34 +0,0 @@ -.. - **************************************************************************** - pgRouting Workshop Manual - 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/ - **************************************************************************** - -.. _index_latex: - -pgRouting Workshop - Latex generation (doesn't include this page) -=============================================================================== - -.. toctree:: - :numbered: - :maxdepth: 3 - - chapters/introduction.rst - chapters/about.rst - chapters/installation.rst - chapters/prepare_data.rst - chapters/shortest_path.rst - chapters/advanced.rst - chapters/wrapper.rst - chapters/function.rst - chapters/geoserver.rst - chapters/ol_client.rst - chapters/topology.rst - chapters/the_solutions.rst - chapters/additional_installation.rst - chapters/osm2pgrouting - - diff --git a/docs/un_sdg/data.rst b/docs/un_sdg/data.rst index 997eca186..07601db18 100644 --- a/docs/un_sdg/data.rst +++ b/docs/un_sdg/data.rst @@ -10,7 +10,7 @@ Data for Sustainable Development Goals ############################################################################### -.. image:: ../basic/images/chapter4/prepareData.png +.. image:: ../basic/images/data/prepareData.png :align: center To be able to use pgRouting, data has to be imported into a database. This chapter diff --git a/docs/un_sdg/images/CMakeLists.txt b/docs/un_sdg/images/CMakeLists.txt index d00e3e707..2eda896c3 100644 --- a/docs/un_sdg/images/CMakeLists.txt +++ b/docs/un_sdg/images/CMakeLists.txt @@ -7,17 +7,15 @@ set(PGR_WORKSHOP_IMG_SUBDIRS sdg3 sdg11 sdg7 - ) +) - -#--------------------------------------------- -# Adding the documentation subdirectories & files -#--------------------------------------------- - foreach (dir ${PGR_WORKSHOP_IMG_SUBDIRS}) - file(COPY "${dir}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") if (PGR_WORKSHOP_DEBUG) - message(STATUS " Adding images directory ${dir}") + message(STATUS " -> ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") + endif() + add_subdirectory("${dir}") + if (PGR_WORKSHOP_DEBUG) + message(STATUS " <- ${CMAKE_CURRENT_SOURCE_DIR}/${dir}") endif() endforeach() diff --git a/docs/un_sdg/images/introduction/CMakeLists.txt b/docs/un_sdg/images/introduction/CMakeLists.txt index 916e8dd13..5b233483f 100644 --- a/docs/un_sdg/images/introduction/CMakeLists.txt +++ b/docs/un_sdg/images/introduction/CMakeLists.txt @@ -1,17 +1,15 @@ - #--------------------- # Files #--------------------- set(PGR_WORKSHOP_IMG_FILES un_17_sdgs.png un_logo.jpg - ) +) foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/un_sdg/images/sdg11/CMakeLists.txt b/docs/un_sdg/images/sdg11/CMakeLists.txt index 2bb9377e9..884c30da5 100644 --- a/docs/un_sdg/images/sdg11/CMakeLists.txt +++ b/docs/un_sdg/images/sdg11/CMakeLists.txt @@ -6,13 +6,12 @@ set(PGR_WORKSHOP_IMG_FILES un_sdg11.png sdg11_output.png remove_waterways.png - ) +) foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/un_sdg/images/sdg3/CMakeLists.txt b/docs/un_sdg/images/sdg3/CMakeLists.txt index 4eab8c1e5..6e5259b26 100644 --- a/docs/un_sdg/images/sdg3/CMakeLists.txt +++ b/docs/un_sdg/images/sdg3/CMakeLists.txt @@ -10,13 +10,12 @@ set(PGR_WORKSHOP_IMG_FILES service_area.png generalised_service_area.png road_population.png - ) +) foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/un_sdg/images/sdg7/CMakeLists.txt b/docs/un_sdg/images/sdg7/CMakeLists.txt index 4457f943a..3f84424bb 100644 --- a/docs/un_sdg/images/sdg7/CMakeLists.txt +++ b/docs/un_sdg/images/sdg7/CMakeLists.txt @@ -5,13 +5,12 @@ set(PGR_WORKSHOP_IMG_FILES un_sdg7.png sdg7_output.png - ) +) foreach (f ${PGR_WORKSHOP_IMG_FILES}) if (PGR_WORKSHOP_VERBOSE_DEBUG) - message(STATUS " Adding file ${f}") + message(STATUS " -> ${f}") endif() - FILE(COPY ${f} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") + configure_file(${f} ${f} COPYONLY) endforeach() - diff --git a/docs/un_sdg/sdg11-cities.rst b/docs/un_sdg/sdg11-cities.rst index 8e04b1538..ae9634597 100644 --- a/docs/un_sdg/sdg11-cities.rst +++ b/docs/un_sdg/sdg11-cities.rst @@ -239,7 +239,7 @@ a river. First, the connected components are found and then stored in a new colu named ``component``. The pgRouting function ``pgr_connectedComponents`` is used to complete this task -and its explaind with more detail in :doc:`../basic/graph_views`. +and its explaind with more detail in :doc:`../basic/graphs`. A sub-query is created to find out all the connected components. After that, the ``component`` column is updated using the results obtained from the sub-query. diff --git a/docs/un_sdg/sdg3-health.rst b/docs/un_sdg/sdg3-health.rst index 29b2ddc54..bbe2fdd64 100644 --- a/docs/un_sdg/sdg3-health.rst +++ b/docs/un_sdg/sdg3-health.rst @@ -421,7 +421,7 @@ Exercise 12: Remove disconnected components ............................................................................... To remove the disconnected components on the road network, the following -pgRouting functions, discussed on :doc:`../basic/graph_views`, will be used: +pgRouting functions, discussed on :doc:`../basic/graphs`, will be used: * ``pgr_extractVertices`` * ``pgr_connectedComponents`` diff --git a/docs/un_sdg/sdg7-energy.rst b/docs/un_sdg/sdg7-energy.rst index 52959976a..79aca4942 100644 --- a/docs/un_sdg/sdg7-energy.rst +++ b/docs/un_sdg/sdg7-energy.rst @@ -97,7 +97,7 @@ Exercise 2: Remove disconnected components ............................................................................... To remove the disconnected components on the road network, the following -pgRouting functions, discussed on :doc:`../basic/graph_views`, will be used: +pgRouting functions, discussed on :doc:`../basic/graphs`, will be used: * ``pgr_extractVertices`` * ``pgr_connectedComponents`` diff --git a/locale/en/LC_MESSAGES/basic/data.po b/locale/en/LC_MESSAGES/basic/data.po index 6717b00fc..e6a9a9fd1 100644 --- a/locale/en/LC_MESSAGES/basic/data.po +++ b/locale/en/LC_MESSAGES/basic/data.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-11-28 19:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../build/docs/basic/data.rst:12 msgid "Prepare Data" @@ -51,8 +51,8 @@ msgstr "" #: ../../build/docs/basic/data.rst:30 msgid "" "These requirements are met on OSGeoLive. When the required software is " -"installed, open a terminal window by pressing :code:`ctrl-alt-t` and " -"follow the instructions." +"installed, open a terminal window by pressing :code:`ctrl-alt-t` and follow " +"the instructions." msgstr "" #: ../../build/docs/basic/data.rst:34 @@ -63,8 +63,8 @@ msgstr "" #: ../../build/docs/basic/data.rst:37 msgid "" -"If OSGeoLive is not being used, please refer to the chapter's appendix to" -" set up the user ``user``." +"If OSGeoLive is not being used, please refer to the chapter's appendix to " +"set up the user ``user``." msgstr "" #: ../../build/docs/basic/data.rst:41 @@ -73,8 +73,8 @@ msgstr "" #: ../../build/docs/basic/data.rst:43 msgid "" -"Depending on the postgres configuration :code:`-U ` is needed on " -":code:`psql` commands" +"Depending on the postgres configuration :code:`-U ` is needed on :code:" +"`psql` commands" msgstr "" #: ../../build/docs/basic/data.rst:51 @@ -87,9 +87,9 @@ msgstr "" #: ../../build/docs/basic/data.rst:58 msgid "" -"The pgRouting workshop will make use of OpenStreetMap data, which is " -"already available on `OSGeoLive `_. This workshop" -" will use the ``Belém`` city data and is a snapshot of Sep 2024." +"The pgRouting workshop will make use of OpenStreetMap data, which is already " +"available on `OSGeoLive `_. This workshop will use " +"the ``Auckland`` city data and is a snapshot of Jun 2025." msgstr "" #: ../../build/docs/basic/data.rst:63 @@ -101,7 +101,7 @@ msgid "Option 1) When using OSGeoLive" msgstr "" #: ../../build/docs/basic/data.rst:68 -msgid "OSGeoLive comes with OSM data from the city of Belém." +msgid "OSGeoLive comes with OSM data from the city of Auckland." msgstr "" #: ../../build/docs/basic/data.rst:76 @@ -118,15 +118,15 @@ msgstr "" #: ../../build/docs/basic/data.rst:88 msgid "" -"The following downloads the latest OSM data on using the same area. Using" -" this data in the workshop can generate variations in the results, due to" -" changes since Sep 2024." +"The following downloads the latest OSM data on using the same area. Using " +"this data in the workshop can generate variations in the results, due to " +"changes since Jun 2025." msgstr "" #: ../../build/docs/basic/data.rst:98 msgid "" -"More information about how to download OpenStreetMap data can be found in" -" https://wiki.openstreetmap.org/wiki/Downloading_data" +"More information about how to download OpenStreetMap data can be found in " +"https://wiki.openstreetmap.org/wiki/Downloading_data" msgstr "" #: ../../build/docs/basic/data.rst:101 @@ -141,10 +141,10 @@ msgstr "" #: ../../build/docs/basic/data.rst:108 msgid "" -"The next step is to run ``osm2pgrouting`` converter, which is a command " -"line tool that inserts the data in the database, \"ready\" to be used " -"with pgRouting. Additional information about ``osm2pgrouting`` can be " -"found at the :doc:`../appendix/appendix-3`" +"The next step is to run ``osm2pgrouting`` converter, which is a command line " +"tool that inserts the data in the database, \"ready\" to be used with " +"pgRouting. Additional information about ``osm2pgrouting`` can be found at " +"the :doc:`../appendix/appendix-3`" msgstr "" #: ../../build/docs/basic/data.rst:112 @@ -156,7 +156,7 @@ msgid "the osm2pgrouting default ``mapconfig.xml`` configuration file is used" msgstr "" #: ../../build/docs/basic/data.rst:115 -msgid "and the ``~/Desktop/workshop/BELEM_BR.osm`` data" +msgid "and the ``~/Desktop/workshop/AUCKLAND_NZ.osm`` data" msgstr "" #: ../../build/docs/basic/data.rst:116 @@ -196,4 +196,3 @@ msgid "" "OSGeoLive's account name on the database is ``user``. To easily use the " "workshop when not using OSGeoLive this extra steps are needed:" msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/graph_views.po b/locale/en/LC_MESSAGES/basic/graph_views.po deleted file mode 100644 index 1576c9f5e..000000000 --- a/locale/en/LC_MESSAGES/basic/graph_views.po +++ /dev/null @@ -1,662 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G -# Belém package. -# FIRST AUTHOR , 2024. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: en\n" -"Language-Team: en \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" - -#: ../../build/docs/basic/graph_views.rst:12 -msgid "Graph views" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:18 -msgid "Chapter Contents" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:20 -msgid "" -"Different application require different graphs. This chapter covers how " -"to discard disconnected segments and different approaches to create " -"graphs." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:24 -msgid "The graph requirements" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:26 -msgid "" -"In this chapter there are three graph requirements. It consists on three " -"graphs based on a **fully connected** graph derived from ``ways``: two " -"for different types of vehicles and one for pedestrian, the source and " -"the target in all of them are based on the ``source_osm`` and " -"``target_osm``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:31 -msgid "The description of the graphs:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:33 -msgid "Particular vehicle:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:35 -msgid "Circulate on the whole Belém area." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:37 -#: ../../build/docs/basic/graph_views.rst:46 -msgid "Do not use `steps`, `footway`, `path`, `cycleway`." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:39 -msgid "Speed is the default speed from OSM information." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:41 -msgid "Taxi vehicle:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:43 -msgid "Circulate on a smaller area:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:45 -msgid "Bounding box: ``(-48.52,-1.46,-48.45,-1.41)``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:48 -#, python-format -msgid "Speed is 10% slower than that of the particular vehicles." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:50 -msgid "Pedestrians:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:52 -msgid "Walk on the whole Belém area." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:53 -msgid "Can not walk on exclusive vehicle ways" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:55 -msgid "`motorways` and on `primary` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:57 -#: ../../build/docs/basic/graph_views.rst:488 -msgid "The speed is ``2 mts/sec``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:60 -msgid "pgr_extractVertices" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:62 -msgid "" -"``pgr_extractVertices`` compute the connected components of an undirected" -" graph using a Depth First Search approach. A connected component of an " -"undirected graph is a set of vertices that are all reachable from each " -"other." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:67 -#: ../../build/docs/basic/graph_views.rst:214 -msgid "Signature summary" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:75 -msgid "" -"Description of the function can be found in `pgr_extractVertices " -"`__" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:79 -msgid "Exercise 1: Create a vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:82 -#: ../../build/docs/basic/graph_views.rst:130 -#: ../../build/docs/basic/graph_views.rst:230 -#: ../../build/docs/basic/graph_views.rst:278 -#: ../../build/docs/basic/graph_views.rst:355 -#: ../../build/docs/basic/graph_views.rst:426 -#: ../../build/docs/basic/graph_views.rst:484 -#: ../../build/docs/basic/graph_views.rst:548 -msgid "Problem" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:83 -msgid "Create the vertices table corresponding to the edges in ``ways``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:86 -#: ../../build/docs/basic/graph_views.rst:134 -#: ../../build/docs/basic/graph_views.rst:234 -#: ../../build/docs/basic/graph_views.rst:287 -#: ../../build/docs/basic/graph_views.rst:369 -#: ../../build/docs/basic/graph_views.rst:435 -#: ../../build/docs/basic/graph_views.rst:499 -#: ../../build/docs/basic/graph_views.rst:567 -msgid "Solution" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:87 -msgid "A graph consists of a set of vertices and a set of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:88 -msgid "In this case, the ``ways`` table is a set of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:89 -msgid "" -"In order to make use of all the graph functions from pgRouting, it is " -"required have the set of vertices defined." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:91 -msgid "From the requirements, the graph is going to be based on OSM identifiers." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:104 -msgid "Reviewing the description of the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:114 -msgid "Inspecting the information on the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:127 -msgid "Exercise 2: Fill up other columns in the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:131 -msgid "Fill up geometry information on the vertices table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:135 -msgid "Count the number of rows that need to be filled up." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:145 -msgid "" -"Update the ``geom`` columns based on the ``source_osm`` column from " -"``ways`` table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:147 -msgid "Use the start point of the geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:158 -msgid "" -"Not expecting to be done due to the fact that some vertices are only dead" -" ends." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:169 -msgid "" -"Update the ``geom`` columns based on the ``target_osm`` column from " -"``ways`` table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:171 -msgid "Use the end point of the geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:182 -msgid "" -"Expecting to be done, that is the geometry column should not have a " -"``NULL`` value." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:194 -msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:207 -msgid "pgr_connectedComponents" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:209 -msgid "" -"``pgr_connectedComponents`` compute the connected components of an " -"undirected graph using a Depth First Search approach. A connected " -"component of an undirected graph is a set of vertices that are all " -"reachable from each other." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:222 -msgid "" -"Description of the function can be found in `pgr_connectedComponents " -"`__" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:227 -msgid "Exercise 3: Set components on edges and vertices tables" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:231 -msgid "Get the information about the graph components." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:235 -msgid "Create additional columns on the edges and vertices tables." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:246 -msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:248 -msgid "" -"Use the results to store the component numbers on the vertices table. " -"(**line 1**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:250 -msgid "Use the OSM identifiers of the vertices. (**lines 4-5**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:262 -msgid "Update the edges table with based on the component number of the vertex" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:275 -msgid "Exercise 4: Inspect the components" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:279 -msgid "Answer the following questions:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:281 -#: ../../build/docs/basic/graph_views.rst:288 -msgid "How many components are in the vertices table?" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:282 -#: ../../build/docs/basic/graph_views.rst:301 -msgid "How many components are in the edges table?" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:283 -#: ../../build/docs/basic/graph_views.rst:314 -msgid "List the 10 components with more edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:284 -#: ../../build/docs/basic/graph_views.rst:328 -msgid "Get the component with the maximum number of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:290 -#: ../../build/docs/basic/graph_views.rst:303 -msgid "Count the distinct components." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:316 -msgid "Count number of rows grouped by component. (**line 1**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:317 -msgid "Inverse order to display the top 10. (**line 2**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:330 -msgid "Use the query from last question to get the maximum count" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:331 -msgid "Get the component that matches the maximum value." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:345 -msgid "Preparing the graphs" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:348 -msgid "Exercise 5: Creating a view for routing" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:350 -msgid "View of roads for vehicles" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:356 -msgid "" -"Create a view with minimal amount of information for processing the " -"particular vehicles." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:357 -msgid "Use the OSM identifiers on the vertices." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:358 -msgid "" -"Routing `cost` and `reverse_cost` in terms of seconds for routing " -"calculations." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:359 -msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:360 -#: ../../build/docs/basic/graph_views.rst:491 -msgid "Data needed in the view for further processing." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:362 -msgid "`name` The name of the segment." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:363 -msgid "`length_m` The length in meters rename to ``length``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:364 -msgid "`the_geom` The geometry rename to ``geom``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:366 -#: ../../build/docs/basic/graph_views.rst:496 -msgid "Verify the number of edges was reduced." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:370 -#: ../../build/docs/basic/graph_views.rst:436 -#: ../../build/docs/basic/graph_views.rst:500 -msgid "Creating the view:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:372 -msgid "" -"If you need to reconstruct the view, first drop it using the command on " -"**line 1**." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:374 -msgid "Get the component with maximum number of edges (**lines 6-10**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:375 -msgid "" -"The `source` and `target` requirements for the function are to be with " -"OSM identifiers. (line **14**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:377 -msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:378 -msgid "" -"The additional parameters ``length_m`` and ``the_geom`` are renamed, " -"``name`` is also included. (line **16**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:380 -msgid "``JOIN`` with the `configuration`:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:382 -msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:395 -msgid "Verification:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:397 -msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:407 -msgid "Get the description of the view" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:419 -msgid "Exercise 6: Limiting the road network within an area" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:421 -msgid "View of smaller set of roads for vehicles" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:427 -msgid "Create a view ``taxi_net`` for the `taxi`:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:429 -msgid "" -"The taxi can only circulate inside this Bounding Box: " -"``(-48.52,-1.46,-48.45,-1.41)``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:430 -#, python-format -msgid "The taxi speed is 10% slower than the particular vehicle." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:432 -msgid "Verify the reduced number of road segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:438 -#, python-format -msgid "" -"Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of " -"the particular vehicle. (line **7**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:440 -msgid "" -"The graph for the taxi is a subset of the ``vehicle_net`` graph. (line " -"**9**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:441 -msgid "" -"Can only circulate inside the bounding box: " -"``(-48.52,-1.46,-48.45,-1.41)``. (line **10**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:455 -msgid "Count the rows on ``taxi_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:466 -#: ../../build/docs/basic/graph_views.rst:529 -msgid "Get the description." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:477 -msgid "Exercise 7: Creating a materialized view for routing pedestrians" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:479 -msgid "View of roads for pedestrians" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:485 -msgid "" -"Create a materialized view with minimal amount of information for " -"processing pedestrians." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:486 -msgid "" -"Routing `cost` and `reverse_cost` will be on seconds for routing " -"calculations." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:490 -msgid "Exclude `motorway` , `primary` and `secondary` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:493 -msgid "`length_m` The length in meters." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:494 -msgid "`the_geom` The geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:502 -msgid "Similar to `Exercise 5: Creating a view for routing`_:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:504 -msgid "" -"The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of " -"``2 mts/sec``. (line **7**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:505 -msgid "Exclude `motorway`, `primary` and `secondary` . (line **11**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:518 -msgid "Count the rows on the view ``walk_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:541 -msgid "Exercise 8: Testing the views for routing" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:543 -msgid "From the |ch7_place_1| to the |ch7_place_2|" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:549 -msgid "Test the created views" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:551 -msgid "In particular:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:553 -msgid "From the |ch7_place_1| to the \"|ch7_place_2| using the OSM identifier" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:554 -msgid "the views to be tested are:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:556 -msgid "``vehicle_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:557 -msgid "``taxi_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:558 -msgid "``walk_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:560 -msgid "" -"Only show the following results, as the other columns are to be ignored " -"on the function." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:562 -msgid "``seq``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:563 -msgid "``edge`` with the name ``id``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:564 -msgid "``cost`` with the name: ``seconds``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:568 -msgid "In general" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:570 -msgid "The departure is |ch7_place_1| with OSM identifier |ch7_osmid_1|." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:571 -msgid "The destination is |ch7_place_2| with OSM identifier |ch7_osmid_2|." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:573 -msgid "For ``vehicle_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:575 -msgid "``vehicle_net`` is used." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:576 -msgid "Selection of the columns with the corresponding names are on line **1**." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:577 -msgid "The view is prepared with the column names that pgRouting use." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:579 -msgid "There is no need to rename columns. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:581 -msgid "" -"The OSM identifiers of the departure and destination are used. (line " -"**4**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:594 -msgid "For ``taxi_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:596 -msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:597 -msgid "" -"The results give the same route as with ``vehicle_net`` but ``cost`` is " -"higher." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:610 -msgid "For ``walk_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:612 -msgid "Similar as the previous one but with ``walk_net``. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:613 -msgid "The results give a different route than of the vehicles." -msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/graphs.po b/locale/en/LC_MESSAGES/basic/graphs.po new file mode 100644 index 000000000..6b1207357 --- /dev/null +++ b/locale/en/LC_MESSAGES/basic/graphs.po @@ -0,0 +1,745 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2024 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G +# Belém package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-03 17:35+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: en\n" +"Language-Team: en \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" + +#: ../../build/docs/basic/graphs.rst:12 +msgid "Graphs" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:18 +msgid "Chapter Contents" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:20 +msgid "" +"Different application require different graphs. This chapter covers how to " +"discard disconnected segments and different approaches to create graphs." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:23 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:25 +msgid "`pgr_extractVertices`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:26 +msgid "`pgr_connectedComponents`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:27 +msgid "`pgr_dijkstraCostMatrix`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:30 +msgid "The graph requirements" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:32 +msgid "" +"In this chapter there are three graph requirements. It consists on three " +"graphs based on a **fully connected** graph derived from ``ways``: two for " +"different types of vehicles and one for pedestrian, the source and the " +"target in all of them are based on the ``source`` and ``target``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:37 +msgid "The description of the graphs:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:39 +msgid "Particular vehicle:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:41 +msgid "Circulate on the whole Auckland area." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:43 ../../build/docs/basic/graphs.rst:52 +msgid "Do not use `pedestrian`, `steps`, `footway`, `path`, `cycleway`" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:45 +msgid "Speed is the default speed from OSM information." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:47 +msgid "Taxi vehicle:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:49 +msgid "Circulate on a smaller area:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:51 +msgid "Bounding box: ``(174.775,-36.855,174.76,-36.84)``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:54 +#, python-format +msgid "Speed is 10% slower than that of the particular vehicles." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:56 +msgid "Pedestrians:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:58 +msgid "Walk on the whole Auckland area." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:59 +msgid "Can only use pedestrian only ways:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:61 +msgid "`pedestrian`, `steps`, `footway`, `path`, `cycleway`" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:63 +msgid "The walking speed is ``2 mts/sec``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:66 +msgid "Configuration from osm2pgrouting" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:68 +msgid "" +"When dealing with data, being aware of what kind of data is being used can " +"improve results." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:71 +msgid "Vehicles can not circulate on pedestrian ways" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:78 +msgid "" +"Penalizing or removal of pedestrian ways will make the results closer to " +"reality." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:80 +msgid "" +"When converting data from OSM format using the `osm2pgrouting` tool, there " +"is an additional table: ``configuration``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:84 +msgid "" +"The ``configuration`` table structure can be obtained with the following " +"command." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:93 +msgid "tag_id values" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:99 +msgid "In the image above there is a detail of the ``tag_id`` of the roads." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:103 +msgid "" +"The `OSM highway `__ types:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:113 +msgid "" +"Also, on the ``ways`` table there is a column that can be used to ``JOIN`` " +"with the ``configuration`` table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:116 +msgid "The configuration types in the Auckland data" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:126 +msgid "pgr_extractVertices" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:128 +msgid "" +"``pgr_extractVertices`` extracting the vertex information of the set of " +"edges of a graph." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:132 ../../build/docs/basic/graphs.rst:296 +#: ../../build/docs/basic/graphs.rst:626 +msgid "Signature summary" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:140 +msgid "" +"Description of the function can be found in `pgr_extractVertices `__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:144 +msgid "Exercise 1: Create a vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:147 ../../build/docs/basic/graphs.rst:196 +#: ../../build/docs/basic/graphs.rst:312 ../../build/docs/basic/graphs.rst:358 +#: ../../build/docs/basic/graphs.rst:433 ../../build/docs/basic/graphs.rst:504 +#: ../../build/docs/basic/graphs.rst:562 ../../build/docs/basic/graphs.rst:644 +msgid "Problem" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:148 +msgid "Create the vertices table corresponding to the edges in ``ways``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:151 ../../build/docs/basic/graphs.rst:200 +#: ../../build/docs/basic/graphs.rst:316 ../../build/docs/basic/graphs.rst:367 +#: ../../build/docs/basic/graphs.rst:447 ../../build/docs/basic/graphs.rst:513 +#: ../../build/docs/basic/graphs.rst:579 ../../build/docs/basic/graphs.rst:657 +msgid "Solution" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:152 +msgid "A graph consists of a set of vertices and a set of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:153 +msgid "In this case, the ``ways`` table is a set of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:154 +msgid "" +"In order to make use of all the graph functions from pgRouting, it is " +"required have the set of vertices defined." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:156 +msgid "" +"From the requirements, a fully connected graph is needed, therefore adding a " +"``component`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:170 +msgid "Reviewing the description of the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:180 +msgid "Inspecting the information on the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:193 +msgid "Exercise 2: Fill up other columns in the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:197 +msgid "Fill up geometry information on the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:201 +msgid "Count the number of rows that need to be filled up." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:212 +msgid "Update the ``geom`` and ``osm_id`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:213 +msgid "" +"The update based on the ``source`` column from ``ways`` table and the ``id`` " +"column of the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:215 +msgid "" +"To update ``geom`` column, use the start point of the geometry on the " +"``ways`` table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:217 +msgid "Use the ``source_osm`` value to fill up ``osm_id`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:225 ../../build/docs/basic/graphs.rst:255 +#: ../../build/docs/basic/graphs.rst:282 ../../build/docs/basic/graphs.rst:474 +msgid "Verification" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:230 +msgid "" +"Not expecting to be done due to the fact that some vertices are dead ends." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:242 +msgid "Continue update the ``geom`` and ``osm_id`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:243 +msgid "" +"The update based on the ``target`` column from ``ways`` table and the ``id`` " +"column of the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:245 +msgid "" +"To update ``geom`` column, use the end point of the geometry on the ``ways`` " +"table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:247 +msgid "Use the ``target_osm`` value to fill up ``osm_id`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:260 +msgid "" +"Expecting to be done, that is the geometry column should not have a ``NULL`` " +"value." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:273 +msgid "Update the ``x`` and ``y`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:274 +msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:289 +msgid "pgr_connectedComponents" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:291 +msgid "" +"``pgr_connectedComponents`` compute the connected components of an " +"undirected graph using a Depth First Search approach. A connected component " +"of an undirected graph is a set of vertices that are all reachable from each " +"other." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:304 +msgid "" +"Description of the function can be found in `pgr_connectedComponents " +"`__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:309 +msgid "Exercise 3: Set components on edges and vertices tables" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:313 +msgid "Get the information about the graph components." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:317 +msgid "Create additional columns on the edges tables." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:329 +msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:330 +msgid "Use the results to store the component numbers on the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:343 +msgid "Update the edges table with based on the component number of the vertex" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:355 +msgid "Exercise 4: Inspect the components" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:359 +msgid "Answer the following questions:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:361 +msgid "How many components are in the vertices table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:362 +msgid "How many components are in the edges table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:363 +msgid "List the 10 components with more edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:364 +msgid "Get the component with the maximum number of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:369 +msgid "1. How many components are in the vertices table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:370 ../../build/docs/basic/graphs.rst:383 +msgid "Count the distinct components." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:382 +msgid "2. How many components are in the edges table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:395 +msgid "3. List the 10 components with more edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:396 +msgid "Count number of rows grouped by component. (**line 1**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:397 +msgid "Inverse order to display the top 10. (**line 2**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:409 +msgid "4. Get the component with the maximum number of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:410 +msgid "Use the query from last question to get the maximum count" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:411 +msgid "Get the component that matches the maximum value." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:423 +msgid "Preparing the graphs" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:426 +msgid "Exercise 5: Creating a view for routing" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:428 +msgid "View of roads for vehicles" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:434 +msgid "" +"Create a view with minimal amount of information for processing the " +"particular vehicles." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:435 +msgid "" +"Routing `cost` and `reverse_cost` in terms of seconds for routing " +"calculations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:436 +msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:437 ../../build/docs/basic/graphs.rst:571 +msgid "Data needed in the view for further processing." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:439 +msgid "``name`` The name of the segment." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:440 +msgid "``length_m`` The length in meters rename to ``length``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:441 +msgid "``the_geom`` The geometry rename to ``geom``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:442 +msgid "``tag_id`` Keep as is." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:444 ../../build/docs/basic/graphs.rst:576 +msgid "Verify the number of edges was reduced." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:448 ../../build/docs/basic/graphs.rst:514 +#: ../../build/docs/basic/graphs.rst:580 +msgid "Creating the view:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:450 +msgid "" +"If you need to reconstruct the view, first drop it using the command on " +"**line 1**." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:452 +msgid "Get the component with maximum number of edges (**lines 6-10**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:453 +msgid "" +"The `source` and `target` requirements for the function are to be with OSM " +"identifiers. (line **14**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:455 +msgid "" +"The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:456 +msgid "" +"The additional parameters ``length_m`` and ``the_geom`` are renamed, " +"``name`` is also included. (line **16**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:458 +msgid "``JOIN`` with the `configuration`:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:460 +msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:475 +msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:485 +msgid "Get the description of the view" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:497 +msgid "Exercise 6: Limiting the road network within an area" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:499 +msgid "View of smaller set of roads for vehicles" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:505 +msgid "Create a view ``taxi_net`` for the `taxi`:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:507 +msgid "" +"The taxi can only circulate inside this Bounding Box: " +"``(174.775,-36.855,174.76,-36.84)``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:508 +#, python-format +msgid "The taxi speed is 10% slower than the particular vehicle." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:510 +msgid "Verify the reduced number of road segments." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:516 +#, python-format +msgid "" +"Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of the " +"particular vehicle. (line **7**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:518 +msgid "" +"The graph for the taxi is a subset of the ``vehicle_net`` graph. (line **9**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:519 +msgid "" +"Can only circulate inside the bounding box: " +"``(174.775,-36.855,174.76,-36.84)``. (line **10**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:533 +msgid "Count the rows on ``taxi_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:544 ../../build/docs/basic/graphs.rst:610 +msgid "Get the description." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:555 +msgid "Exercise 7: Creating a materialized view for routing pedestrians" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:557 +msgid "View of roads for pedestrians" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:563 +msgid "" +"Create a materialized view with minimal amount of information for processing " +"pedestrians." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:565 +msgid "" +"Routing `cost` and `reverse_cost` will be on seconds for routing " +"calculations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:567 +msgid "The speed is ``2 mts/sec``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:569 +msgid "" +"Only include the pedestrian only roads: ``pedestrian``, ``steps``, " +"``footway``, ``path``, ``cycleway``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:573 +msgid "``length_m`` The length in meters." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:574 +msgid "``the_geom`` The geometry." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:582 +msgid "Similar to `Exercise 5: Creating a view for routing`_:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:584 +msgid "" +"The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 " +"mts/sec``. (line **7**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:586 +msgid "Exclude ``motorway``, ``primary`` and ``secondary`` . (line **11**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:599 +msgid "Count the rows on the view ``walk_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:621 +msgid "pgr_dijkstraCostMatrix" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:623 +msgid "" +"``pgr_dijkstraCostMatrix`` Calculates a cost matrix using Dijkstra algorithm." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:634 +msgid "" +"Description of the function can be found in `pgr_dijkstraCostMatrix `__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:638 +msgid "Exercise 8: Testing the views" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:645 +msgid "Test the created views" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:647 +msgid "In particular:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:649 +msgid "" +"Get a traveling cost matrix in seconds from all locations to all locations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:650 +msgid "the views to be tested are:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:652 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:653 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:654 +msgid "``walk_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:658 +msgid "The locations are:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:660 +msgid "|id_1|, |id_2|, |id_3|, |id_4| and |id_5|." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:661 +msgid "Passed as an array to the function." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:663 +msgid "For ``vehicle_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:665 +msgid "``vehicle_net`` is used." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:666 +msgid "" +"Selection of the columns with the corresponding names are on line **1**." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:667 +msgid "The view is prepared with the column names that pgRouting use." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:669 +msgid "There is no need to rename columns. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:671 +msgid "" +"The OSM identifiers of the departure and destination are used. (line **4**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:684 +msgid "For ``taxi_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:686 +msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:687 +msgid "" +"The results give the same route as with ``vehicle_net`` but ``cost`` is " +"higher." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:700 +msgid "For ``walk_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:702 +msgid "Similar as the previous one but with ``walk_net``. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:703 +msgid "The results give a different route than of the vehicles." +msgstr "" diff --git a/locale/en/LC_MESSAGES/basic/pedestrian.po b/locale/en/LC_MESSAGES/basic/pedestrian.po index 02913656d..bc53b885a 100644 --- a/locale/en/LC_MESSAGES/basic/pedestrian.po +++ b/locale/en/LC_MESSAGES/basic/pedestrian.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" +"POT-Creation-Date: 2025-11-28 19:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../build/docs/basic/pedestrian.rst:11 msgid "Pedestrian Routing" @@ -27,435 +27,397 @@ msgstr "" #: ../../build/docs/basic/pedestrian.rst:17 msgid "" "**pgRouting** was first called *pgDijkstra*, because it implemented only " -"shortest path search with *Dijkstra* algorithm. Later other functions " -"were added and the library was renamed to pgRouting." +"shortest path search with *Dijkstra* algorithm. Later other functions were " +"added and the library was renamed to pgRouting." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:22 +#: ../../build/docs/basic/pedestrian.rst:21 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:23 +msgid "`pgr_dijkstra`_" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:24 +msgid "`pgr_dijkstraCost`_" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:26 msgid "Chapter Contents" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:25 +#: ../../build/docs/basic/pedestrian.rst:29 msgid "pgr_dijkstra" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:27 +#: ../../build/docs/basic/pedestrian.rst:31 msgid "" "Dijkstra algorithm was the first algorithm implemented in pgRouting. It " -"doesn't require other attributes than the identifiers ``id``, ``source`` " -"and ``target`` and the weights ``cost`` and ``reverse_cost``." +"doesn't require other attributes than the identifiers ``id``, ``source`` and " +"``target`` and the weights ``cost`` and ``reverse_cost``." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:31 +#: ../../build/docs/basic/pedestrian.rst:35 msgid "" -"You can specify when to consider the graph as `directed " -"`__ or undirected." +"You can specify when to consider the graph as `directed `__ or undirected." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:35 -#: ../../build/docs/basic/pedestrian.rst:282 +#: ../../build/docs/basic/pedestrian.rst:39 +#: ../../build/docs/basic/pedestrian.rst:285 msgid "Signature Summary" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:47 +#: ../../build/docs/basic/pedestrian.rst:51 msgid "" -"Description of the function can be found in `pgr_dijkstra " -"`__." +"Description of the function can be found in `pgr_dijkstra `__." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:51 +#: ../../build/docs/basic/pedestrian.rst:55 msgid "" -"Many pgRouting functions have ``sql::text`` as one of their arguments. " -"While this may look confusing at first, it makes the functions very " -"flexible as the user can pass a ``SELECT`` statement as function argument" -" as long as the returned result contains the required number of " -"attributes and the correct attribute names." +"Many pgRouting functions have ``sql::text`` as one of their arguments. While " +"this may look confusing at first, it makes the functions very flexible as " +"the user can pass a ``SELECT`` statement as function argument as long as the " +"returned result contains the required number of attributes and the correct " +"attribute names." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:56 -msgid "Most of pgRouting implemented algorithms do not require the **geometry**." +#: ../../build/docs/basic/pedestrian.rst:60 +msgid "" +"Most of pgRouting implemented algorithms do not require the **geometry**." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:57 +#: ../../build/docs/basic/pedestrian.rst:61 msgid "" -"The pgRouting functions **do not** return a geometry, but only an ordered" -" list of nodes or edges." +"The pgRouting functions **do not** return a geometry, but only an ordered " +"list of nodes or edges." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:61 +#: ../../build/docs/basic/pedestrian.rst:65 msgid "Identifiers for the Queries" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:62 +#: ../../build/docs/basic/pedestrian.rst:66 msgid "" -"The assignment of the vertices identifiers on the source and target " -"columns may be different, the following exercises will use the results of" -" this query. For the workshop, some locations near of the FOSS4G event " -"are going to be used. These locations are within this area " -"https://www.openstreetmap.org/#map=14/-1.44228/-48.46069" +"The assignment of the vertices identifiers on the source and target columns " +"may be different, the following exercises will use the results of this " +"query. For the workshop, some locations near of the FOSS4G event are going " +"to be used. These locations are within this area https://www.openstreetmap." +"org/#map=16/-36.8520950/174.7631803" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:67 +#: ../../build/docs/basic/pedestrian.rst:71 msgid "|osmid_1| |place_1|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:68 +#: ../../build/docs/basic/pedestrian.rst:72 msgid "|osmid_2| |place_2|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:69 +#: ../../build/docs/basic/pedestrian.rst:73 msgid "|osmid_3| |place_3|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:70 +#: ../../build/docs/basic/pedestrian.rst:74 msgid "|osmid_4| |place_4|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:71 +#: ../../build/docs/basic/pedestrian.rst:75 msgid "|osmid_5| |place_5|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:74 +#: ../../build/docs/basic/pedestrian.rst:78 msgid "Connect to the database, if not connected:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:80 +#: ../../build/docs/basic/pedestrian.rst:84 msgid "Get the vertex identifiers" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:91 +#: ../../build/docs/basic/pedestrian.rst:95 msgid "|osmid_1| |place_1| (|id_1|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:92 +#: ../../build/docs/basic/pedestrian.rst:96 msgid "|osmid_2| |place_2| (|id_2|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:93 +#: ../../build/docs/basic/pedestrian.rst:97 msgid "|osmid_3| |place_3| (|id_3|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:94 +#: ../../build/docs/basic/pedestrian.rst:98 msgid "|osmid_4| |place_4| (|id_4|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:95 +#: ../../build/docs/basic/pedestrian.rst:99 msgid "|osmid_5| |place_5| (|id_5|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:98 +#: ../../build/docs/basic/pedestrian.rst:102 msgid "" -"The corresponding :code:`id` are shown in the following image, and a " -"sample route from \"|place_3|\" to \"|place_5|\"." +"The corresponding :code:`id` are shown in the following image, and a sample " +"route from \"|place_3|\" to \"|place_1|\"." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:105 +#: ../../build/docs/basic/pedestrian.rst:109 msgid "Exercise 1: Single pedestrian routing" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:108 -#: ../../build/docs/basic/pedestrian.rst:150 -#: ../../build/docs/basic/pedestrian.rst:182 -#: ../../build/docs/basic/pedestrian.rst:214 -#: ../../build/docs/basic/pedestrian.rst:248 -#: ../../build/docs/basic/pedestrian.rst:302 -#: ../../build/docs/basic/pedestrian.rst:338 +#: ../../build/docs/basic/pedestrian.rst:112 +#: ../../build/docs/basic/pedestrian.rst:152 +#: ../../build/docs/basic/pedestrian.rst:183 +#: ../../build/docs/basic/pedestrian.rst:218 +#: ../../build/docs/basic/pedestrian.rst:251 +#: ../../build/docs/basic/pedestrian.rst:305 msgid "Problem:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:109 -#: ../../build/docs/basic/pedestrian.rst:151 -#: ../../build/docs/basic/pedestrian.rst:183 -#: ../../build/docs/basic/pedestrian.rst:215 -#: ../../build/docs/basic/pedestrian.rst:249 -#: ../../build/docs/basic/pedestrian.rst:303 -#: ../../build/docs/basic/pedestrian.rst:339 +#: ../../build/docs/basic/pedestrian.rst:113 +#: ../../build/docs/basic/pedestrian.rst:153 +#: ../../build/docs/basic/pedestrian.rst:184 +#: ../../build/docs/basic/pedestrian.rst:219 +#: ../../build/docs/basic/pedestrian.rst:252 +#: ../../build/docs/basic/pedestrian.rst:306 msgid "Walking" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:111 +#: ../../build/docs/basic/pedestrian.rst:115 msgid "from \"|place_1|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:112 +#: ../../build/docs/basic/pedestrian.rst:116 msgid "to \"|place_3|\"." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:114 -msgid "Calculate routes with costs in *osm2pgRouting* ``length`` default units." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:116 -msgid "From the |place_1| to the |place_3|" +#: ../../build/docs/basic/pedestrian.rst:118 +msgid "Calculate routes with costs in ``length`` in meters." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:121 -#: ../../build/docs/basic/pedestrian.rst:163 -#: ../../build/docs/basic/pedestrian.rst:194 -#: ../../build/docs/basic/pedestrian.rst:226 -#: ../../build/docs/basic/pedestrian.rst:260 -#: ../../build/docs/basic/pedestrian.rst:315 -#: ../../build/docs/basic/pedestrian.rst:347 +#: ../../build/docs/basic/pedestrian.rst:124 +#: ../../build/docs/basic/pedestrian.rst:164 +#: ../../build/docs/basic/pedestrian.rst:198 +#: ../../build/docs/basic/pedestrian.rst:230 +#: ../../build/docs/basic/pedestrian.rst:263 +#: ../../build/docs/basic/pedestrian.rst:317 msgid "Solution:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:122 +#: ../../build/docs/basic/pedestrian.rst:125 msgid "" -"The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines " -"**9** and **10**)." +"The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines **5** " +"and **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:123 +#: ../../build/docs/basic/pedestrian.rst:126 msgid "" -"The pedestrian's cost is in terms of length. In this case ``length`` " -"(line **6**), which was calculated by osm2pgrouting, is in unit " -"``degrees``." +"The pedestrian's cost is in terms of length. In this case ``length`` (line " +"**3**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:125 +#: ../../build/docs/basic/pedestrian.rst:127 msgid "" -"From a pedestrian perspective the graph is ``undirected`` (line **11**), " -"that is, the pedestrian can move in both directions on all segments." +"From a pedestrian perspective the graph is ``undirected`` (line **7**), that " +"is, the pedestrian can move in both directions on all segments." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:139 +#: ../../build/docs/basic/pedestrian.rst:141 msgid "" -"The returned cost attribute represents the cost specified in the inner " -"SQL query (``edges_sql::text`` argument). In this example cost is " -"``length`` in unit \"degrees\". Cost may be time, distance or any " -"combination of both or any other attributes or a custom formula." +"The returned cost attribute represents the cost specified in the inner SQL " +"query (``edges_sql::text`` argument). In this example cost is ``length`` in " +"unit \"meters\". Cost may be time, distance or any combination of both or " +"any other attributes or a custom formula." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:143 +#: ../../build/docs/basic/pedestrian.rst:145 msgid "" -"``node`` and ``edge`` results may vary depending on the assignment of the" -" identifiers to the vertices given by osm2pgrouting." +"``node`` and ``edge`` results may vary depending on the assignment of the " +"identifiers to the vertices given by osm2pgrouting." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:147 +#: ../../build/docs/basic/pedestrian.rst:149 msgid "Exercise 2: Many Pedestrians going to the same destination" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:153 -#: ../../build/docs/basic/pedestrian.rst:217 +#: ../../build/docs/basic/pedestrian.rst:155 +#: ../../build/docs/basic/pedestrian.rst:221 msgid "from \"|place_1|\" and \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:154 -msgid "to the \"|place_3|\"." -msgstr "" - #: ../../build/docs/basic/pedestrian.rst:156 -msgid "" -"Calculate routes with costs in *osm2pgRouting* ``length_m`` which is in " -"meters." +msgid "to the \"|place_3|\"." msgstr "" #: ../../build/docs/basic/pedestrian.rst:158 -msgid "From |place_1| and |place_2| to |place_3|" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:164 -msgid "The pedestrians are departing at vertices |id_1| and |id_2| (line **9**)." +msgid "Calculate routes with costs in ``length`` in kilometers." msgstr "" #: ../../build/docs/basic/pedestrian.rst:165 -msgid "All pedestrians want to go to vertex |id_3| (line **10**)." +msgid "" +"The pedestrians are departing at vertices |id_1| and |id_2| (line **5**)." msgstr "" #: ../../build/docs/basic/pedestrian.rst:166 -msgid "The cost to be in meters using attribute ``length_m`` (line **6**)." +msgid "All pedestrians want to go to vertex |id_3| (line **6**)." +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:167 +msgid "The cost to be in kilometers using attribute ``length`` (line **3**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:179 +#: ../../build/docs/basic/pedestrian.rst:180 msgid "Exercise 3: Many Pedestrians departing from the same location" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:185 +#: ../../build/docs/basic/pedestrian.rst:186 msgid "from \"|place_3|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:186 +#: ../../build/docs/basic/pedestrian.rst:187 msgid "to \"|place_1|\" and \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:188 -msgid "Calculate routes with costs in seconds." +#: ../../build/docs/basic/pedestrian.rst:189 +msgid "" +"Calculate routes using the ``cost`` which is in seconds for a walking speed " +"of ``2 mts/sec``." +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:192 +msgid "See :doc:`graphs` for the costs setup." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:195 -msgid "All pedestrians are departing from vertex |id_3| (line **9**)." +#: ../../build/docs/basic/pedestrian.rst:199 +msgid "All pedestrians are departing from vertex |id_3| (line **5**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:196 -msgid "Pedestrians want to go to locations |id_1| and |id_2| (line **10**)." +#: ../../build/docs/basic/pedestrian.rst:200 +msgid "Pedestrians want to go to locations |id_1| and |id_2| (line **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:197 -msgid "" -"The cost to be in seconds, with a walking speed ``s = 1.3 m/s`` and ``t =" -" d/s`` (line **6**)." +#: ../../build/docs/basic/pedestrian.rst:201 +msgid "The ``cost`` column on ``walk_net`` is in seconds. (line **3**)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:211 +#: ../../build/docs/basic/pedestrian.rst:215 msgid "Exercise 4: Many Pedestrians going to different destinations" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:218 +#: ../../build/docs/basic/pedestrian.rst:222 msgid "to \"|place_4|\" and \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:220 -#: ../../build/docs/basic/pedestrian.rst:254 -msgid "Calculate routes with costs in minutes." +#: ../../build/docs/basic/pedestrian.rst:224 +#: ../../build/docs/basic/pedestrian.rst:257 +msgid "" +"Calculate routes with costs in minutes at walking speed ``s = 1.3 m/s``." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:227 -#: ../../build/docs/basic/pedestrian.rst:316 -#: ../../build/docs/basic/pedestrian.rst:348 -msgid "The pedestrians depart from |id_1| and |id_2| (line **9**)." +#: ../../build/docs/basic/pedestrian.rst:231 +#: ../../build/docs/basic/pedestrian.rst:318 +msgid "The pedestrians depart from |id_1| and |id_2| (line **5**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:228 -#: ../../build/docs/basic/pedestrian.rst:317 -#: ../../build/docs/basic/pedestrian.rst:349 +#: ../../build/docs/basic/pedestrian.rst:232 +#: ../../build/docs/basic/pedestrian.rst:319 msgid "" -"The pedestrians want to go to destinations |id_4| and |id_5| (line " -"**10**)." +"The pedestrians want to go to destinations |id_4| and |id_5| (line **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:229 -#: ../../build/docs/basic/pedestrian.rst:318 +#: ../../build/docs/basic/pedestrian.rst:233 +#: ../../build/docs/basic/pedestrian.rst:266 +#: ../../build/docs/basic/pedestrian.rst:320 msgid "" -"The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t =" -" d/s`` (line **6**)." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:230 -#: ../../build/docs/basic/pedestrian.rst:351 -msgid "Result adds the costs per destination." +"The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/" +"s``." msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:1 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:1 msgid "Inspecting the results, looking for totals (edge = -1):" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:3 -msgid "From 20297 to vertex 6548 takes 92.58 minutes (seq = 147)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:3 +msgid "From 10832 to vertex 11046 takes 9.82 minutes (seq = 134)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:5 -msgid "From 20297 to vertex 12712 takes 83.18 minutes (seq = 267)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:5 +msgid "From 10832 to vertex 14824 takes 10.85 minutes (seq = 185)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:7 -msgid "From 23872 to vertex 6548 takes 76.26 minutes (seq = 385)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:7 +msgid "From 593 to vertex 11046 takes 9.07 minutes (seq = 50)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:9 -msgid "From 23872 to vertex 12712 takes 67.76 minutes (seq = 495)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:9 +msgid "From 593 to vertex 14824 takes 9.04 minutes (seq = 85)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:245 +#: ../../build/docs/basic/pedestrian.rst:248 msgid "Exercise 5: Combination of routes" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:251 +#: ../../build/docs/basic/pedestrian.rst:254 msgid "First pedestrian goes from \"|place_1|\" to \"|place_4|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:252 +#: ../../build/docs/basic/pedestrian.rst:255 msgid "Second pedestrian goes from \"|place_2|\" to \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:261 +#: ../../build/docs/basic/pedestrian.rst:264 msgid "" "First pedestrian departs from |id_1| and the destination is |id_4| (line " -"**11**)." +"**6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:262 +#: ../../build/docs/basic/pedestrian.rst:265 msgid "" -"Second pedestrian departs from |id_2| and the destination is |id_5| (line" -" **12**)." +"Second pedestrian departs from |id_2| and the destination is |id_5| (line " +"**7**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:263 -msgid "" -"The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t =" -" d/s``" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:276 +#: ../../build/docs/basic/pedestrian.rst:279 msgid "pgr_dijkstraCost" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:278 +#: ../../build/docs/basic/pedestrian.rst:281 msgid "" -"When the main goal is to calculate the total cost, without \"inspecting\"" -" the `pgr_dijkstra` results, using ``pgr_dijkstraCost`` returns a more " +"When the main goal is to calculate the total cost, without \"inspecting\" " +"the `pgr_dijkstra` results, using ``pgr_dijkstraCost`` returns a more " "compact result." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:294 +#: ../../build/docs/basic/pedestrian.rst:297 msgid "" -"Description of the parameters can be found in `pgr_dijkstraCost " -"`__" +"Description of the parameters can be found in `pgr_dijkstraCost `__" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:299 +#: ../../build/docs/basic/pedestrian.rst:302 msgid "Exercise 6: Time for many Pedestrians going to different destinations" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:305 -#: ../../build/docs/basic/pedestrian.rst:341 +#: ../../build/docs/basic/pedestrian.rst:308 msgid "from \"|place_1|\" or \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:306 -#: ../../build/docs/basic/pedestrian.rst:342 +#: ../../build/docs/basic/pedestrian.rst:309 msgid "to \"|place_4|\" or \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:308 +#: ../../build/docs/basic/pedestrian.rst:311 msgid "Get only the cost in minutes." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:310 -msgid "From the hotels to the |place_4| and |place_5|" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:319 +#: ../../build/docs/basic/pedestrian.rst:321 msgid "Result as aggregated costs." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:331 -msgid "" -"Compare with `Exercise 4: Many Pedestrians going to different " -"destinations`_ 's note." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:335 +#: ../../build/docs/basic/pedestrian.rst:333 msgid "" -"Exercise 7: Many Pedestrians going to different destinations summarizing " -"the total costs per departure" +"Compare with `Exercise 4: Many Pedestrians going to different destinations`_ " +"'s note." msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:344 -msgid "Summarize cost in minutes." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:350 -msgid "" -"The cost to be in minutes, with a walking speed s = 1.3 m/s and t = d/s " -"(line **6**)." -msgstr "" - -#: ../../build/docs/scripts/basic/chapter_5/note_2.txt:1 -msgid "" -"An interpretation of the result can be: In general, it is faster to " -"depart from \"Instituto Federal do Pará, Campus Belém\" than from " -"\"Hangar Convention Center\"" -msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/plpgsql_function.po b/locale/en/LC_MESSAGES/basic/plpgsql_function.po deleted file mode 100644 index 35c4674ae..000000000 --- a/locale/en/LC_MESSAGES/basic/plpgsql_function.po +++ /dev/null @@ -1,732 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G -# Belém package. -# FIRST AUTHOR , 2024. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: en\n" -"Language-Team: en \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" - -#: ../../build/docs/basic/plpgsql_function.rst:11 -msgid "pl/pgsql function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:17 -msgid "" -"Other kind of functions are `pl/pgsql " -"`__. As the " -"applications requirements become more complex, using wrappers of " -"previously defined functions becomes necessary for clarity." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:22 -msgid "Chapter contents" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:25 -msgid "Requirements for routing from A to B" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:28 -msgid "Chapter problem:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:29 -msgid "Create a function ``wrk_fromAtoB`` that allows routing from 2 geometries." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:30 -msgid "The function takes latitude/longitude points as input parameters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:31 -msgid "" -"Returns a route that includes a geometry so that if can be displayed, for" -" example, in QGIS." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:32 -msgid "Will also return some other attributes." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:34 -msgid "The detailed description:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:37 -msgid "Input parameters" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -msgid "Parameter" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 -msgid "type" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 -msgid "Description" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -msgid "``edges_subset``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "REGCLASS" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -msgid "Edge table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -msgid "``lat1``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -#: ../../build/docs/basic/plpgsql_function.rst:43 -#: ../../build/docs/basic/plpgsql_function.rst:44 -#: ../../build/docs/basic/plpgsql_function.rst:45 -#: ../../build/docs/basic/plpgsql_function.rst:207 -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "NUMERIC" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -msgid "The latitude of the `departure` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:43 -msgid "``lon1``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:43 -msgid "The longitude of the `departure` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:44 -msgid "``lat2``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:44 -msgid "The latitude of the `destination` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:45 -msgid "``lon2``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:45 -msgid "The longitude of the `destination` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "``do_debug``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "BOOLEAN" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "Flag to create a ``WARNING`` with the query that is been executed" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:52 -msgid "Output columns" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 -msgid "Column" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:56 -msgid "``seq``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:56 -msgid "For ordering purposes." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:57 -msgid "``gid``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:57 -msgid "" -"The edge identifier that can be used to JOIN the results to the ``ways`` " -"table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:58 -msgid "``name``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:58 -msgid "The street name." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:59 -msgid "``azimuth``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:59 -msgid "Between start and end node of an edge." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:60 -msgid "``length``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:60 -msgid "In meters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:61 -msgid "``minutes``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:61 -msgid "Minutes taken to traverse the segment." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:62 -msgid "``route_geom``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:62 -msgid "The road geometry with corrected directionality." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:66 -msgid "For this chapter, the following points will be used for testing." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:68 -msgid "(lat,lon) = (-1.455829, -48.446044)" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:69 -msgid "(lat,lon) = (-1.453448, -48.447142)" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:72 -msgid "The Vertices Table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:74 -msgid "" -"Graphs have a `set of edges` and a `set of vertices` associated to it. " -"The views need their vertices table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:78 -msgid "Exercise 1: Create vertices table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:81 -#: ../../build/docs/basic/plpgsql_function.rst:128 -#: ../../build/docs/basic/plpgsql_function.rst:193 -#: ../../build/docs/basic/plpgsql_function.rst:256 -#: ../../build/docs/basic/plpgsql_function.rst:329 -#: ../../build/docs/basic/plpgsql_function.rst:405 -msgid "Problem" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:82 -msgid "Create a vertices table for the views:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:84 -msgid "``vehicle_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:85 -msgid "``taxi_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:86 -msgid "``walk_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:90 -#: ../../build/docs/basic/plpgsql_function.rst:141 -#: ../../build/docs/basic/plpgsql_function.rst:220 -#: ../../build/docs/basic/plpgsql_function.rst:273 -#: ../../build/docs/basic/plpgsql_function.rst:342 -#: ../../build/docs/basic/plpgsql_function.rst:428 -msgid "Solution" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:91 -msgid "" -"Use ``pgr_extractVertices`` (explained in :doc:`graph_views`) to create " -"the vertices table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:93 -msgid "" -"``JOIN`` the vertices table with ``ways_vertices`` (created in " -":doc:`graph_views`) to get the ``x``, ``y``, ``geom`` information." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:96 -#: ../../build/docs/basic/plpgsql_function.rst:410 -#: ../../build/docs/basic/plpgsql_function.rst:429 -msgid "For ``vehicle_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:104 -#: ../../build/docs/basic/plpgsql_function.rst:414 -#: ../../build/docs/basic/plpgsql_function.rst:444 -msgid "For ``taxi_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:110 -#: ../../build/docs/basic/plpgsql_function.rst:418 -#: ../../build/docs/basic/plpgsql_function.rst:457 -msgid "For ``walk_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:112 -msgid "Modify the above queries to create the ``walk_net_vertices`` table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:120 -msgid "It is left to the reader to remove disconected components on the views." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:122 -msgid "See :doc:`graph_views`" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:125 -msgid "Exercise 3: Nearest Vertex" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:129 -msgid "Calculate the (OSM) identifier of the nearest vertex to a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:131 -msgid "" -"In particular use the following (lat, lon) value: ``(-1.455829, " -"-48.446044)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:133 -#: ../../build/docs/basic/plpgsql_function.rst:265 -msgid "calculate the nearest OSM identifier of the vertex to:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:135 -#: ../../build/docs/basic/plpgsql_function.rst:267 -msgid "``ways_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:136 -#: ../../build/docs/basic/plpgsql_function.rst:268 -msgid "``vehicle_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:137 -#: ../../build/docs/basic/plpgsql_function.rst:269 -msgid "``taxi_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:138 -#: ../../build/docs/basic/plpgsql_function.rst:270 -msgid "``walk_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:142 -msgid "" -"Remember that the ``id`` has an OSM vertex identifier on the vertices " -"tables." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:143 -msgid "" -"Using the Postgis distance operator `<-> " -"`__ to order by " -"distance." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:144 -msgid "Get only the first row, to obtain the nearest identifier of the vertex." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:146 -#: ../../build/docs/basic/plpgsql_function.rst:274 -msgid "For ``ways_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:157 -msgid "For ``vehicle_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:159 -#: ../../build/docs/basic/plpgsql_function.rst:174 -#: ../../build/docs/basic/plpgsql_function.rst:182 -#: ../../build/docs/basic/plpgsql_function.rst:293 -#: ../../build/docs/basic/plpgsql_function.rst:306 -msgid "Modify the previous query." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:172 -#: ../../build/docs/basic/plpgsql_function.rst:304 -msgid "For ``taxi_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:180 -#: ../../build/docs/basic/plpgsql_function.rst:312 -msgid "For ``walk_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:190 -msgid "Exercise 4: Nearest vertex function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:194 -msgid "" -"When operations look similar for different tables, a function can be " -"created." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:196 -msgid "" -"Create a function that calculates the OSM identifier of the nearest " -"vertex to a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:197 -msgid "Function name: ``wrk_nearest``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:198 -msgid "Needs to work only for the **final application** views and table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:201 -msgid "The input parameters:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "vertex_table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "Table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:207 -msgid "lat" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:207 -msgid "The latitude of a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "lon" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "The longitude of a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:211 -msgid "The output:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:216 -msgid "BIGINT" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:216 -msgid "the OSM identifier that is nearest to (lat,lon)." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:221 -msgid "The function returns only one ``BIGINT`` value." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:222 -msgid "" -"Using `format `__ to build the query." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:226 -msgid "" -"The structure of the query is similar to `Exercise 3: Nearest Vertex`_ " -"solutions." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:228 -msgid "``%1$I`` for the table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:229 -msgid "``%2$s`` and ``%3$s`` for the latitude and longitude." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:231 -msgid "The point is formed with (lon/lat) ``(%3$s, %2$s)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:241 -msgid "Exercise 5: Test nearest vertex function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:243 -msgid "Nearest Vertex in vehicle network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:247 -msgid "Nearest Vertex in taxi network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:251 -msgid "Nearest Vertex in walk network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:257 -msgid "Test the ``wrk_Nearest`` function." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:259 -msgid "Use the following (lat,lon) values: ``(-1.455829, -48.446044)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:261 -msgid "The point is the same as in `Exercise 3: Nearest Vertex`_ problem." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:263 -msgid "Verify the results are the same." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:276 -msgid "Use the function with ``ways_vertices`` as the ``vertex_table`` parameter." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:277 -msgid "Pass the (lat,lon) values as second and third parameters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:278 -msgid "" -"Using the function on the original data does not return the OSM " -"identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:280 -msgid "The value stored in ``id`` column is not the OSM identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:291 -msgid "For ``vehicles_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:320 -msgid "wrk_fromAtoB function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:322 -msgid "" -"In this section, creation and testing the required function will be " -"tackled." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:326 -msgid "Exercise 6: Creating the main function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:330 -msgid "Create the function ``wrk_fromAtoB``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:331 -msgid "Follow the description given at `Requirements for routing from A to B`_." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:332 -msgid "Use specialized functions:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:334 -msgid "``wrk_NearestOSM`` created on `Exercise 4: Nearest vertex function`_." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:336 -msgid "It receives the point in natural language format." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:337 -msgid "Obtains the OSM identifier needed by ``wrk_dijkstra``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:339 -msgid "``wrk_dijkstra`` created in :doc:`sql_function`" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:343 -msgid "The function's signature:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:345 -msgid "The input parameters highlighted." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:346 -msgid "The output columns are not highlighted." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:347 -msgid "The function returns a set of values." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:357 -msgid "The function's body:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:359 -msgid "Call to the function ``wrk_dijkstra``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:361 -msgid "Using PostgreSQL ``format`` to make substitutions" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:363 -msgid "The first parameter is the string to be replaced" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:364 -msgid "The rest are the data parameters, are the strings use for replacement." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:366 -msgid "``wrk_dijkstra`` obtains the values for the output" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:367 -msgid "The ``edges_subset`` value will replace ``%1$I``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:368 -msgid "For the ``source`` and ``target``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:370 -msgid "``wrk_Nearest`` is used to find the identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:372 -msgid "The vertices table name is formed with ``%1$I_vertices``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:374 -msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:375 -msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:377 -msgid "To get the constructed query in form of a warning:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:379 -msgid "The ``WARNING`` will be issued only when ``do_debug`` is true." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:380 -msgid "No output will be generated." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:398 -msgid "Exercise 7: Using the main function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:400 -msgid "View of roads for taxis along with source and destination" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:406 -msgid "Use ``wrk_fromAtoB``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:408 -msgid "Departure point is: (lat,lon) = ``(-1.455829, -48.446044)``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:409 -msgid "Destination point is: (lat,lon) = ``(-1.453448, -48.447142)``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:412 -#: ../../build/docs/basic/plpgsql_function.rst:420 -msgid "Use with default value of ``do_debug``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:416 -msgid "Use with ``do_debug`` set to ``true``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:421 -msgid "Store results on a table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:422 -msgid "Show the table contents." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:425 -msgid "The function is not meant to be used with ``ways``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:431 -msgid "The first parameter is the table name." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:432 -msgid "" -"The next two parameters are the latitude and longitude of the departure " -"point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:433 -msgid "" -"The next two parameters are the latitude and longitude of the destination" -" point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:446 -msgid "Do a dry run by adding ``true`` to get the query that is executed." -msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/sql_function.po b/locale/en/LC_MESSAGES/basic/sql_function.po index d72b45775..99b6f5b07 100644 --- a/locale/en/LC_MESSAGES/basic/sql_function.po +++ b/locale/en/LC_MESSAGES/basic/sql_function.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 18:21+0000\n" +"POT-Creation-Date: 2025-10-07 14:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../build/docs/basic/sql_function.rst:12 msgid "SQL function" @@ -34,664 +34,520 @@ msgstr "" #: ../../build/docs/basic/sql_function.rst:22 msgid "" -"When developing for a `higher level` application, the requirements need " -"to be represented in the SQL queries. As these SQL queries get more " -"complex, it is desirable to store them in postgreSQL stored procedures or" -" functions. Stored procedures or functions are an effective way to wrap " -"application logic, in this case, related to routing logic and " -"requirements." +"When developing for a `higher level` application, the requirements need to " +"be represented in the SQL queries. As these SQL queries get more complex, it " +"is desirable to store them in postgreSQL stored procedures or functions. " +"Stored procedures or functions are an effective way to wrap application " +"logic, in this case, related to routing logic and requirements." msgstr "" #: ../../build/docs/basic/sql_function.rst:30 -msgid "The application requirements" +msgid "The function requirements" msgstr "" #: ../../build/docs/basic/sql_function.rst:32 -msgid "A front end needs the following routing information:" +msgid "The function will wrap ``pgr_dijkstra``." msgstr "" -#: ../../build/docs/basic/sql_function.rst:33 +#: ../../build/docs/basic/sql_function.rst:34 +msgid "The function needs to work on any of the networks designed:" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:36 +#: ../../build/docs/basic/sql_function.rst:341 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:37 +#: ../../build/docs/basic/sql_function.rst:342 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:39 +msgid "The function needs to return the following routing information:" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:41 msgid "``seq`` - A unique identifier of the rows" msgstr "" -#: ../../build/docs/basic/sql_function.rst:34 +#: ../../build/docs/basic/sql_function.rst:42 msgid "``id`` - The segment's identifier" msgstr "" -#: ../../build/docs/basic/sql_function.rst:35 +#: ../../build/docs/basic/sql_function.rst:43 msgid "``name`` - The segment's name" msgstr "" -#: ../../build/docs/basic/sql_function.rst:36 +#: ../../build/docs/basic/sql_function.rst:44 msgid "``length`` - The segment's length" msgstr "" -#: ../../build/docs/basic/sql_function.rst:37 +#: ../../build/docs/basic/sql_function.rst:45 msgid "``seconds`` - Number of seconds to traverse the segment" msgstr "" -#: ../../build/docs/basic/sql_function.rst:38 +#: ../../build/docs/basic/sql_function.rst:46 msgid "``azimuth`` - The azimuth of the segment" msgstr "" -#: ../../build/docs/basic/sql_function.rst:39 +#: ../../build/docs/basic/sql_function.rst:47 msgid "``route_geom`` - The routing geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:40 +#: ../../build/docs/basic/sql_function.rst:48 msgid "``route_readable`` - The geometry in human readable form." msgstr "" -#: ../../build/docs/basic/sql_function.rst:43 +#: ../../build/docs/basic/sql_function.rst:51 msgid "Design of the function" msgstr "" -#: ../../build/docs/basic/sql_function.rst:44 +#: ../../build/docs/basic/sql_function.rst:52 msgid "" "The function to be created ``wrk_dijkstra`` with the following input " "parameters and output columns:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:48 +#: ../../build/docs/basic/sql_function.rst:56 msgid "Input parameters" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 +#: ../../build/docs/basic/sql_function.rst:58 msgid "Parameter" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Type" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Description" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "``edges_subset``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "REGCLASS" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "The table/view that is going to be used for processing" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -msgid "``source_osm``" +#: ../../build/docs/basic/sql_function.rst:61 +msgid "``source``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -#: ../../build/docs/basic/sql_function.rst:54 -#: ../../build/docs/basic/sql_function.rst:63 +#: ../../build/docs/basic/sql_function.rst:61 +#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:71 msgid "BIGINT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -msgid "The OSM identifier of the `departure` location." +#: ../../build/docs/basic/sql_function.rst:61 +msgid "The identifier of the `departure` location." msgstr "" -#: ../../build/docs/basic/sql_function.rst:54 -msgid "``target_osm``" +#: ../../build/docs/basic/sql_function.rst:62 +msgid "``target``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:54 -msgid "The OSM identifier of the `destination` location." +#: ../../build/docs/basic/sql_function.rst:62 +msgid "The identifier of the `destination` location." msgstr "" -#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:66 msgid "output columns" msgstr "" -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Name" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 -#: ../../build/docs/basic/sql_function.rst:94 +#: ../../build/docs/basic/sql_function.rst:70 +#: ../../build/docs/basic/sql_function.rst:99 msgid "``seq``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:70 msgid "INTEGER" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:70 msgid "A unique number for each result row." msgstr "" -#: ../../build/docs/basic/sql_function.rst:63 -#: ../../build/docs/basic/sql_function.rst:95 +#: ../../build/docs/basic/sql_function.rst:71 +#: ../../build/docs/basic/sql_function.rst:100 msgid "``id``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:63 +#: ../../build/docs/basic/sql_function.rst:71 msgid "The edge identifier." msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 -#: ../../build/docs/basic/sql_function.rst:96 +#: ../../build/docs/basic/sql_function.rst:72 +#: ../../build/docs/basic/sql_function.rst:101 msgid "``name``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:72 +#: ../../build/docs/basic/sql_function.rst:76 msgid "TEXT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 +#: ../../build/docs/basic/sql_function.rst:72 msgid "The name of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 -#: ../../build/docs/basic/sql_function.rst:97 +#: ../../build/docs/basic/sql_function.rst:73 +#: ../../build/docs/basic/sql_function.rst:102 msgid "``seconds``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 -#: ../../build/docs/basic/sql_function.rst:66 -#: ../../build/docs/basic/sql_function.rst:67 +#: ../../build/docs/basic/sql_function.rst:73 +#: ../../build/docs/basic/sql_function.rst:74 +#: ../../build/docs/basic/sql_function.rst:75 msgid "FLOAT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 +#: ../../build/docs/basic/sql_function.rst:73 msgid "The number of seconds it takes to traverse the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:66 -msgid "``azimuth``" +#: ../../build/docs/basic/sql_function.rst:74 +#: ../../build/docs/basic/sql_function.rst:103 +msgid "``length``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:66 -msgid "The azimuth of the segment." +#: ../../build/docs/basic/sql_function.rst:74 +msgid "The length in meters of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:67 -#: ../../build/docs/basic/sql_function.rst:98 -msgid "``length``" +#: ../../build/docs/basic/sql_function.rst:75 +msgid "``azimuth``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:67 -msgid "The leng in meters of the segment." +#: ../../build/docs/basic/sql_function.rst:75 +msgid "The azimuth of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:76 msgid "``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:76 msgid "The geometry in human readable form." msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "``route_geom``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "The geometry of the segment in the correct direction." msgstr "" -#: ../../build/docs/basic/sql_function.rst:73 -msgid "" -"For the following exercises only ``vehicle_net`` will be used, but you " -"can test the queries with the other views." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:77 +#: ../../build/docs/basic/sql_function.rst:82 msgid "Additional information handling" msgstr "" -#: ../../build/docs/basic/sql_function.rst:79 +#: ../../build/docs/basic/sql_function.rst:84 msgid "" "When the application needs additional information, like the name of the " "street, ``JOIN`` the results with other tables." msgstr "" -#: ../../build/docs/basic/sql_function.rst:83 +#: ../../build/docs/basic/sql_function.rst:88 msgid "Exercise 1: Get additional information" msgstr "" -#: ../../build/docs/basic/sql_function.rst:85 +#: ../../build/docs/basic/sql_function.rst:90 msgid "Route showing names" msgstr "" -#: ../../build/docs/basic/sql_function.rst:90 -#: ../../build/docs/basic/sql_function.rst:137 -#: ../../build/docs/basic/sql_function.rst:188 -#: ../../build/docs/basic/sql_function.rst:244 -#: ../../build/docs/basic/sql_function.rst:308 -#: ../../build/docs/basic/sql_function.rst:352 -#: ../../build/docs/basic/sql_function.rst:403 +#: ../../build/docs/basic/sql_function.rst:95 +#: ../../build/docs/basic/sql_function.rst:147 +#: ../../build/docs/basic/sql_function.rst:186 +#: ../../build/docs/basic/sql_function.rst:239 +#: ../../build/docs/basic/sql_function.rst:303 msgid "Problem" msgstr "" -#: ../../build/docs/basic/sql_function.rst:91 -msgid "From |ch7_place_1| to |ch7_place_2|, using OSM identifiers." +#: ../../build/docs/basic/sql_function.rst:96 +#: ../../build/docs/basic/sql_function.rst:142 +#: ../../build/docs/basic/sql_function.rst:181 +#: ../../build/docs/basic/sql_function.rst:215 +msgid "From |ch7_place_1| to |ch7_place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:92 +#: ../../build/docs/basic/sql_function.rst:97 msgid "Get the following information:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:101 -#: ../../build/docs/basic/sql_function.rst:150 -#: ../../build/docs/basic/sql_function.rst:196 -#: ../../build/docs/basic/sql_function.rst:254 -#: ../../build/docs/basic/sql_function.rst:316 -#: ../../build/docs/basic/sql_function.rst:366 -#: ../../build/docs/basic/sql_function.rst:408 +#: ../../build/docs/basic/sql_function.rst:106 +#: ../../build/docs/basic/sql_function.rst:155 +#: ../../build/docs/basic/sql_function.rst:194 +#: ../../build/docs/basic/sql_function.rst:249 +#: ../../build/docs/basic/sql_function.rst:309 msgid "Solution" msgstr "" -#: ../../build/docs/basic/sql_function.rst:102 -msgid "The columns asked (line **2**)." +#: ../../build/docs/basic/sql_function.rst:107 +msgid "The function returns the columns asked. (line **4**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:103 +#: ../../build/docs/basic/sql_function.rst:108 msgid "" "Rename ``pgr_dijkstra`` results to application requirements names. (line " -"**4**)." +"**12**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:104 +#: ../../build/docs/basic/sql_function.rst:110 msgid "" "``LEFT JOIN`` the results with ``vehicle_net`` to get the additional " -"information. (line **9**)" +"information. (line **17**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:106 +#: ../../build/docs/basic/sql_function.rst:113 msgid "" -"``LEFT`` to include the row with ``id = -1`` because it does not exist on" -" ``vehicle_net``" +"``LEFT`` to include the row with ``id = -1`` because it does not exist on " +"``vehicle_net``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:122 +#: ../../build/docs/basic/sql_function.rst:116 +#: ../../build/docs/basic/sql_function.rst:160 +#: ../../build/docs/basic/sql_function.rst:197 +#: ../../build/docs/basic/sql_function.rst:314 +msgid "Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line)" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:132 msgid "Geometry handling" msgstr "" -#: ../../build/docs/basic/sql_function.rst:124 +#: ../../build/docs/basic/sql_function.rst:134 msgid "" "From pgRouting point of view, the geometry is part of the additional " -"information, needed on the results for an application. Therefore ``JOIN``" -" the results with other tables that contain the geometry and for further " +"information, needed on the results for an application. Therefore ``JOIN`` " +"the results with other tables that contain the geometry and for further " "processing with PostGIS functions." msgstr "" -#: ../../build/docs/basic/sql_function.rst:130 +#: ../../build/docs/basic/sql_function.rst:140 msgid "Exercise 2: Route geometry (human readable)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:132 -#: ../../build/docs/basic/sql_function.rst:218 -msgid "From |ch7_place_1| to |ch7_place_2|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:138 -#: ../../build/docs/basic/sql_function.rst:189 -#: ../../build/docs/basic/sql_function.rst:245 +#: ../../build/docs/basic/sql_function.rst:148 +#: ../../build/docs/basic/sql_function.rst:187 +#: ../../build/docs/basic/sql_function.rst:240 msgid "Route from the |ch7_place_1| to |ch7_place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:140 -#: ../../build/docs/basic/sql_function.rst:191 +#: ../../build/docs/basic/sql_function.rst:150 +#: ../../build/docs/basic/sql_function.rst:189 msgid "Additionally to the previous exercise, get the" msgstr "" -#: ../../build/docs/basic/sql_function.rst:142 -msgid "geometry ``geom`` in human readable form named as ``route_readable``" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:146 -msgid "" -"``WITH`` provides a way to write auxiliary statements in larger queries. " -"It can be thought of as defining temporary tables that exist just for one" -" query." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:151 -msgid "" -"The routing query named ``results`` in a WITH clause. (lines **2** to " -"**5**)" -msgstr "" - #: ../../build/docs/basic/sql_function.rst:152 -msgid "The results from the previous exercise. (lines **8** and **9**)" +msgid "geometry ``geom`` in human readable form named as ``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:154 -msgid "" -"For result reading purposes, the result columns from the previous are in " -"a comment. Uncomment to see the complete results for the problem." +#: ../../build/docs/basic/sql_function.rst:156 +msgid "The function returns ``route_readable``. (line **6**)" msgstr "" #: ../../build/docs/basic/sql_function.rst:157 -msgid "" -"The ``geom`` processed with ``ST_AsText`` to get the human readable form." -" (line **12**)" +msgid "The routing query named ``results`` in a WITH clause. (line **11**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:160 -msgid "Renaming the result to ``route_readable``" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:162 -msgid "The ``LEFT JOIN`` with ``vehicle_net``. (line **14**)" +#: ../../build/docs/basic/sql_function.rst:158 +msgid "" +"The ``geom`` processed with ``ST_AsText`` to get the human readable form. " +"(line **19**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:181 +#: ../../build/docs/basic/sql_function.rst:179 msgid "Exercise 3: Route geometry (binary format)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:183 -msgid "From |ch7_place_1| to |ch7_place_2| showing arrows." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:193 -#: ../../build/docs/basic/sql_function.rst:250 +#: ../../build/docs/basic/sql_function.rst:191 +#: ../../build/docs/basic/sql_function.rst:245 msgid "``geom`` in binary format with the name ``route_geom``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:197 -msgid "The query from the previous exercise is used" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:198 -msgid "The ``SELECT`` clause also contains:" +#: ../../build/docs/basic/sql_function.rst:195 +msgid "The function returns ``route_geom``. (line **7**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:200 -msgid "The ``geom`` including the renaming (line **9**)" +#: ../../build/docs/basic/sql_function.rst:196 +msgid "The geometry ``geom`` of the segments (line **21**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:216 +#: ../../build/docs/basic/sql_function.rst:213 msgid "Exercise 4: Route geometry directionality" msgstr "" -#: ../../build/docs/basic/sql_function.rst:222 +#: ../../build/docs/basic/sql_function.rst:219 msgid "" -"Visually, with the route displayed with arrows, it can be found that " -"there are arrows that do not match the directionality of the route." +"Visually, with the route displayed with arrows, it can be found that there " +"are arrows that do not match the directionality of the route." msgstr "" -#: ../../build/docs/basic/sql_function.rst:225 +#: ../../build/docs/basic/sql_function.rst:222 msgid "" -"To have correct directionality, the ending point of a geometry must match" -" the starting point of the next geometry" +"To have correct directionality, the ending point of a geometry must match " +"the starting point of the next geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:228 +#: ../../build/docs/basic/sql_function.rst:225 msgid "" -"Inspecting the detail of the results of `Exercise 2: Route geometry " -"(human readable)`_" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:231 -msgid "Rows **59** to **61** do not match that criteria" +"Inspecting the detail of the results of `Exercise 2: Route geometry (human " +"readable)`_" msgstr "" -#: ../../build/docs/basic/sql_function.rst:247 +#: ../../build/docs/basic/sql_function.rst:242 msgid "Fix the directionality of the geometries of the previous exercise" msgstr "" -#: ../../build/docs/basic/sql_function.rst:249 +#: ../../build/docs/basic/sql_function.rst:244 msgid "``geom`` in human readable form named as ``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:251 +#: ../../build/docs/basic/sql_function.rst:246 msgid "Both columns must have the geometry fixed for directionality." msgstr "" -#: ../../build/docs/basic/sql_function.rst:255 +#: ../../build/docs/basic/sql_function.rst:250 msgid "To get the correct direction some geometries need to be reversed:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:257 +#: ../../build/docs/basic/sql_function.rst:252 msgid "" "Reversing a geometry will depend on the ``node`` column of the query to " -"Dijkstra (line **2**)" +"Dijkstra." msgstr "" -#: ../../build/docs/basic/sql_function.rst:260 +#: ../../build/docs/basic/sql_function.rst:255 msgid "" -"A conditional ``CASE`` statement that returns the geometry in human " -"readable form:" +"A conditional ``CASE`` statement that returns the geometry in human readable " +"form:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:263 -msgid "Of the geometry when ``node`` is the ``source`` column. (line **11**)" +#: ../../build/docs/basic/sql_function.rst:258 +msgid "Of the geometry when ``node`` is the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:264 -msgid "" -"Of the reversed geometry when ``node`` is not the ``source`` column. " -"(line **12**)" +#: ../../build/docs/basic/sql_function.rst:259 +msgid "Of the reversed geometry when ``node`` is not the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:266 +#: ../../build/docs/basic/sql_function.rst:261 msgid "A conditional ``CASE`` statement that returns:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:268 -msgid "The geometry when ``node`` is the ``source`` column. (line **17**)" +#: ../../build/docs/basic/sql_function.rst:263 +msgid "The geometry when ``node`` is the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:269 -msgid "" -"The reversed geometry when ``node`` is not the ``source`` column. (line " -"**16**)" +#: ../../build/docs/basic/sql_function.rst:264 +msgid "The reversed geometry when ``node`` is not the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:282 -msgid "Inspecting some the problematic rows, the directionality has been fixed." +#: ../../build/docs/basic/sql_function.rst:277 +msgid "Inspecting the problematic rows, the directionality has been fixed." msgstr "" -#: ../../build/docs/basic/sql_function.rst:295 +#: ../../build/docs/basic/sql_function.rst:290 msgid "Exercise 5: Using the geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:297 +#: ../../build/docs/basic/sql_function.rst:292 msgid "From |ch7_place_1| to the |ch7_place_2| show azimuth" msgstr "" -#: ../../build/docs/basic/sql_function.rst:302 +#: ../../build/docs/basic/sql_function.rst:297 msgid "" -"There are many geometry functions in PostGIS, the workshop already " -"covered some of them like ``ST_AsText``, ``ST_Reverse``, ``ST_EndPoint``," -" etc. This exercise will make use an additional function ``ST_Azimuth``." +"There are many geometry functions in PostGIS, the workshop already covered " +"some of them like ``ST_AsText``, ``ST_Reverse``, ``ST_EndPoint``, etc. This " +"exercise will make use an additional function ``ST_Azimuth``." msgstr "" -#: ../../build/docs/basic/sql_function.rst:309 +#: ../../build/docs/basic/sql_function.rst:304 msgid "Modify the query from the previous exercise" msgstr "" -#: ../../build/docs/basic/sql_function.rst:311 -msgid "Additionally obtain the azimuth of the correct geometry." +#: ../../build/docs/basic/sql_function.rst:306 +msgid "Additionally obtain the azimuth in degrees of the corrected geometry." msgstr "" -#: ../../build/docs/basic/sql_function.rst:312 -msgid "" -"Because ``vehicle_net`` and the other 2 views are sub graphs of ``ways``," -" do the ``JOIN`` with ``ways``." +#: ../../build/docs/basic/sql_function.rst:310 +msgid "The function returns ``aximuth``. (line **8**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:317 -msgid "" -"Move the query that gets the additional information into the ``WITH`` " -"statement." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:319 -msgid "Name it ``additional``. (line **6**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:321 -msgid "The ``ways`` table geometry name is ``the_geom``." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:322 -msgid "Final ``SELECT`` statements gets:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:324 -msgid "Calculates the azimuth of ``route_geom``. (line **27**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:337 -msgid "Creating the Function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:339 -msgid "" -"The following function simplifies (and sets default values) when it calls" -" the shortest path Dijkstra function." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:343 -msgid "pgRouting uses heavely function overloading:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:345 -msgid "Avoid creating functions with a name of a pgRouting routing function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:346 -msgid "Avoid the name of a function to start with `pgr_`, `_pgr` or `ST_`" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:349 -msgid "Exercise 6: Function for an application" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:353 -msgid "Putting all together in a SQL function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:355 -msgid "function name ``wrk_dijkstra``" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:356 -msgid "Should work for any given view." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:358 -msgid "Allow a view as a parameter" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:359 -msgid "A table can be used if the columns have the correct names." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:361 -msgid "``source`` and ``target`` are in terms of ``osm_id``." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:362 +#: ../../build/docs/basic/sql_function.rst:311 msgid "" -"The result should meet the requirements indicated at the beginning of the" -" chapter" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:367 -msgid "The signature of the function:" +"The query from previous exercise is wrapped under additional subquery. (line " +"**18**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:369 -msgid "The input parameters are from line **4** to **6**." +#: ../../build/docs/basic/sql_function.rst:313 +msgid "The ``azimuth`` is processed in degrees. (line **35**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:370 -msgid "The output columns are from line **7** to **14** (not highlighted)." +#: ../../build/docs/basic/sql_function.rst:329 +msgid "Exercise 6: Using the function" msgstr "" -#: ../../build/docs/basic/sql_function.rst:371 -msgid "The function returns a set. (line **16**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:379 -msgid "The body of the function:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:381 -msgid "" -"Appending the view name on line **7** in the ``SELECT`` query to " -"``pgr_dijkstra``." +#: ../../build/docs/basic/sql_function.rst:331 +msgid "Try the function with a combination of the interesting places:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:382 -msgid "" -"Using the data to get the route from ``source`` to ``target``. (line " -"**8**)" +#: ../../build/docs/basic/sql_function.rst:333 +msgid "|id_1| |place_1|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:383 -msgid "" -"The ``JOIN`` with ``ways`` is necessary, as the views are subset of " -"``ways`` (line **25**)" +#: ../../build/docs/basic/sql_function.rst:334 +msgid "|id_2| |place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:400 -msgid "Exercise 7: Using the function" +#: ../../build/docs/basic/sql_function.rst:335 +msgid "|id_3| |place_3|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:404 -msgid "Test the function with the three views" +#: ../../build/docs/basic/sql_function.rst:336 +msgid "|id_4| |place_4|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:405 -msgid "From the |ch7_place_1| to the |ch7_place_2| using the OSM identifier" +#: ../../build/docs/basic/sql_function.rst:337 +msgid "|id_5| |place_5|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:409 -msgid "Use the function on the ``SELECT`` statement" +#: ../../build/docs/basic/sql_function.rst:339 +msgid "Using different networks:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:410 -msgid "The first parameter changes based on the view to be tested" +#: ../../build/docs/basic/sql_function.rst:343 +msgid "``walk_net``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:412 +#: ../../build/docs/basic/sql_function.rst:345 msgid "Names of the streets in the route" msgstr "" -#: ../../build/docs/basic/sql_function.rst:423 +#: ../../build/docs/basic/sql_function.rst:356 msgid "Total seconds spent in each street" msgstr "" -#: ../../build/docs/basic/sql_function.rst:434 -msgid "Get all the information of the route" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:445 -msgid "Try the function with a combination of the interesting places:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:447 -msgid "|osmid_1| |place_1|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:448 -msgid "|osmid_2| |place_2|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:449 -msgid "|osmid_3| |place_3|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:450 -msgid "|osmid_4| |place_4|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:451 -msgid "|osmid_5| |place_5|" +#: ../../build/docs/basic/sql_function.rst:367 +msgid "Why it does not fully work with ``walk_net``?" msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/vehicle.po b/locale/en/LC_MESSAGES/basic/vehicle.po index 6051e022e..ff775b16f 100644 --- a/locale/en/LC_MESSAGES/basic/vehicle.po +++ b/locale/en/LC_MESSAGES/basic/vehicle.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-10-04 19:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../build/docs/basic/vehicle.rst:12 msgid "Vehicle Routing" @@ -40,8 +40,7 @@ msgstr "" #: ../../build/docs/basic/vehicle.rst:26 msgid "" -"A query for vehicle routing generally differs from routing for " -"pedestrians:" +"A query for vehicle routing generally differs from routing for pedestrians:" msgstr "" #: ../../build/docs/basic/vehicle.rst:28 @@ -82,8 +81,7 @@ msgstr "" #: ../../build/docs/basic/vehicle.rst:39 msgid "" -"The ``reverse_cost`` attribute must be taken into account on two way " -"streets." +"The ``reverse_cost`` attribute must be taken into account on two way streets." msgstr "" #: ../../build/docs/basic/vehicle.rst:41 @@ -112,391 +110,301 @@ msgstr "" #: ../../build/docs/basic/vehicle.rst:51 msgid "" -"A **wrong way** is indicated with a **negative value** and is not " -"inserted in the graph for processing." +"A **wrong way** is indicated with a **negative value** and is not inserted " +"in the graph for processing." msgstr "" #: ../../build/docs/basic/vehicle.rst:54 msgid "" -"**Two way** roads - ``IF cost >= 0 AND reverse_cost >= 0`` and their " -"values can be different. For example, it is faster going down hill on a " -"sloped road. In general, ``cost`` and ``reverse_cost`` do not need to be " -"length; they can be almost anything, for example - time, slope, surface, " -"road type, etc., or they can be a combination of multiple parameters." +"**Two way** roads - ``IF cost >= 0 AND reverse_cost >= 0`` and their values " +"can be different. For example, it is faster going down hill on a sloped " +"road. In general, ``cost`` and ``reverse_cost`` do not need to be length; " +"they can be almost anything, for example - time, slope, surface, road type, " +"etc., or they can be a combination of multiple parameters." msgstr "" #: ../../build/docs/basic/vehicle.rst:61 msgid "" -"The following queries indicate the number of road segments, where a \"one" -" way\" rule applies:" +"The following queries indicate the number of road segments, where a \"one " +"way\" rule applies:" msgstr "" #: ../../build/docs/basic/vehicle.rst:62 msgid "Number of (``source, target``) segments with ``cost < 0`` (line **3**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:72 +#: ../../build/docs/basic/vehicle.rst:71 msgid "" "Number of (``target, source``) segments with ``reverse_cost < 0`` (line " "**3**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:84 +#: ../../build/docs/basic/vehicle.rst:83 msgid "Exercise 1: Vehicle routing - going" msgstr "" -#: ../../build/docs/basic/vehicle.rst:87 ../../build/docs/basic/vehicle.rst:115 -#: ../../build/docs/basic/vehicle.rst:145 -#: ../../build/docs/basic/vehicle.rst:246 -#: ../../build/docs/basic/vehicle.rst:310 -#: ../../build/docs/basic/vehicle.rst:352 +#: ../../build/docs/basic/vehicle.rst:86 ../../build/docs/basic/vehicle.rst:112 +#: ../../build/docs/basic/vehicle.rst:139 +#: ../../build/docs/basic/vehicle.rst:185 +#: ../../build/docs/basic/vehicle.rst:257 +#: ../../build/docs/basic/vehicle.rst:292 msgid "Problem:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:88 +#: ../../build/docs/basic/vehicle.rst:87 msgid "From the \"|place_1|\" to the \"|place_3|\" by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:90 +#: ../../build/docs/basic/vehicle.rst:89 msgid "From |place_1| to the |place_3| by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:95 ../../build/docs/basic/vehicle.rst:123 -#: ../../build/docs/basic/vehicle.rst:153 -#: ../../build/docs/basic/vehicle.rst:254 -#: ../../build/docs/basic/vehicle.rst:318 -#: ../../build/docs/basic/vehicle.rst:356 +#: ../../build/docs/basic/vehicle.rst:94 ../../build/docs/basic/vehicle.rst:120 +#: ../../build/docs/basic/vehicle.rst:147 +#: ../../build/docs/basic/vehicle.rst:193 +#: ../../build/docs/basic/vehicle.rst:265 +#: ../../build/docs/basic/vehicle.rst:296 msgid "Solution:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:96 -msgid "" -"Use ``cost`` (line **6**) and ``reverse_cost`` (line **7**) columns, " -"which are in unit ``degrees``." +#: ../../build/docs/basic/vehicle.rst:95 +msgid "``cost`` and ``reverse_cost`` columns, are in seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:97 -msgid "" -"The vehicle is going from vertex |id_1| (line **10**) to |id_3| (line " -"**11**)." +#: ../../build/docs/basic/vehicle.rst:96 +msgid "The vehicle is going from vertex |id_1| to |id_3|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:112 +#: ../../build/docs/basic/vehicle.rst:109 msgid "Exercise 2: Vehicle routing - returning" msgstr "" -#: ../../build/docs/basic/vehicle.rst:116 +#: ../../build/docs/basic/vehicle.rst:113 msgid "From \"|place_3|\" to the \"|place_1|\" by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:118 +#: ../../build/docs/basic/vehicle.rst:115 msgid "From |place_3| to the |place_1| by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:124 -msgid "" -"Use ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, " -"in units seconds." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:126 -#: ../../build/docs/basic/vehicle.rst:161 -msgid "" -"The vehicle is going from vertex |id_3| (line **10**) to |id_1| (line " -"**11**)." +#: ../../build/docs/basic/vehicle.rst:121 +#: ../../build/docs/basic/vehicle.rst:156 +msgid "The vehicle is going from vertex |id_3| to |id_1|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:138 +#: ../../build/docs/basic/vehicle.rst:132 msgid "" "On a directed graph, going and coming back routes, most of the time are " "different." msgstr "" -#: ../../build/docs/basic/vehicle.rst:142 +#: ../../build/docs/basic/vehicle.rst:136 msgid "Exercise 3: Vehicle routing when time is money" msgstr "" -#: ../../build/docs/basic/vehicle.rst:146 +#: ../../build/docs/basic/vehicle.rst:140 msgid "From \"|place_3|\" to the \"|place_1|\" by taxi." msgstr "" -#: ../../build/docs/basic/vehicle.rst:148 +#: ../../build/docs/basic/vehicle.rst:142 msgid "From |place_3| to |place_1| by taxi." msgstr "" -#: ../../build/docs/basic/vehicle.rst:154 +#: ../../build/docs/basic/vehicle.rst:148 +msgid "Use the ``taxi_net``." +msgstr "" + +#: ../../build/docs/basic/vehicle.rst:149 msgid "The cost is ``$100 per hour``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:156 -#: ../../build/docs/basic/vehicle.rst:319 -msgid "" -"Using ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) " -"columns, which are in unit ``seconds``." +#: ../../build/docs/basic/vehicle.rst:151 +msgid "Using ``cost`` and ``reverse_cost`` columns, which are in seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:158 -msgid "The duration in hours is ``cost_s / 3600``." +#: ../../build/docs/basic/vehicle.rst:153 +msgid "The duration in hours is ``cost / 3600``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:159 -msgid "The cost in ``dollars`` is ``cost_s / 3600 * 100``." +#: ../../build/docs/basic/vehicle.rst:154 +msgid "The cost in ``dollars`` is ``cost / 3600 * 100``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:174 +#: ../../build/docs/basic/vehicle.rst:168 msgid "Comparing with `Exercise 2: Vehicle routing - returning`_:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:176 +#: ../../build/docs/basic/vehicle.rst:170 msgid "The total number of records are identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:177 +#: ../../build/docs/basic/vehicle.rst:171 msgid "The node sequence is identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:178 +#: ../../build/docs/basic/vehicle.rst:172 msgid "The edge sequence is identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:179 +#: ../../build/docs/basic/vehicle.rst:173 msgid "The cost and agg_cost results are directly proportional." msgstr "" -#: ../../build/docs/basic/vehicle.rst:183 +#: ../../build/docs/basic/vehicle.rst:177 msgid "Cost manipulations" msgstr "" -#: ../../build/docs/basic/vehicle.rst:185 -msgid "" -"When dealing with data, being aware of what kind of data is being used " -"can improve results." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:187 -msgid "Vehicles can not circulate on pedestrian ways" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:195 -msgid "" -"Penalizing or removal of pedestrian ways will make the results closer to " -"reality." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:197 -msgid "" -"When converting data from OSM format using the `osm2pgrouting` tool, " -"there is an additional table: ``configuration``." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:201 -msgid "" -"The ``configuration`` table structure can be obtained with the following " -"command." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:210 -msgid "tag_id values" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:216 -msgid "In the image above there is a detail of the ``tag_id`` of the roads." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:219 -msgid "The ``OSM way`` types:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:227 -msgid "" -"Also, on the ``ways`` table there is a column that can be used to " -"``JOIN`` with the ``configuration`` table." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:230 -msgid "The ``ways`` types:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:239 +#: ../../build/docs/basic/vehicle.rst:179 msgid "" "In this workshop, costs are going to be manipulated using the " "``configuration`` table." msgstr "" -#: ../../build/docs/basic/vehicle.rst:243 +#: ../../build/docs/basic/vehicle.rst:182 msgid "Exercise 4: Vehicle routing without penalization" msgstr "" -#: ../../build/docs/basic/vehicle.rst:247 +#: ../../build/docs/basic/vehicle.rst:186 msgid "From the \"|place_3|\" to \"|place_1|\"" msgstr "" -#: ../../build/docs/basic/vehicle.rst:249 -#: ../../build/docs/basic/vehicle.rst:313 +#: ../../build/docs/basic/vehicle.rst:188 +#: ../../build/docs/basic/vehicle.rst:260 msgid "From |place_3| to |place_1|" msgstr "" -#: ../../build/docs/basic/vehicle.rst:256 +#: ../../build/docs/basic/vehicle.rst:194 msgid "Add a penalty column" msgstr "" -#: ../../build/docs/basic/vehicle.rst:257 -msgid "All roads have a ``penalty`` of ``1`` (line **3**)." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:260 -msgid "Query" +#: ../../build/docs/basic/vehicle.rst:196 +msgid "All roads have a ``penalty`` of ``1``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:261 +#: ../../build/docs/basic/vehicle.rst:202 msgid "The vehicle's cost in this case will be in penalized seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:263 -msgid "" -"Costs (in seconds) are to be multiplied by :code:`penalty` (lines **12** " -"and **13**)." +#: ../../build/docs/basic/vehicle.rst:204 +msgid "Costs are to be multiplied by :code:`penalty` (lines **5** and **6**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:264 -msgid "Costs wont change (times 1 leaves the value unchanged)." +#: ../../build/docs/basic/vehicle.rst:205 +msgid "Costs won't change (:math:`cost * 1 = cost`)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:266 +#: ../../build/docs/basic/vehicle.rst:207 msgid "" "The :code:`configuration` table is linked with the :code:`ways` table by " -"the :code:`tag_id` field using a ``JOIN`` (lines **14** and **15**)." +"the :code:`tag_id` field using a ``JOIN``" msgstr "" -#: ../../build/docs/basic/vehicle.rst:268 -msgid "" -"The vehicle is going from vertex |id_3| (line **17**) to vertex |id_1| " -"(line **18**)." +#: ../../build/docs/basic/vehicle.rst:209 +msgid "The vehicle is going from vertex |id_3| to vertex |id_1|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:282 +#: ../../build/docs/basic/vehicle.rst:224 msgid "Exercise 5: Vehicle routing with penalization" msgstr "" -#: ../../build/docs/basic/vehicle.rst:285 +#: ../../build/docs/basic/vehicle.rst:227 msgid "Concept:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:286 +#: ../../build/docs/basic/vehicle.rst:228 msgid "" -"Change the cost values for the :code:`configuration` table, in such a " -"way, that the" +"Change the cost values for the :code:`configuration` table, in such a way, " +"that the" msgstr "" -#: ../../build/docs/basic/vehicle.rst:288 -msgid "Pedestrian roads are not used." +#: ../../build/docs/basic/vehicle.rst:230 +msgid "Bicycle roads are not used." msgstr "" -#: ../../build/docs/basic/vehicle.rst:290 +#: ../../build/docs/basic/vehicle.rst:232 msgid "``penalty < 0`` makes the road not to be included in the graph." msgstr "" -#: ../../build/docs/basic/vehicle.rst:292 +#: ../../build/docs/basic/vehicle.rst:234 msgid "Using residential roads is not encouraged." msgstr "" -#: ../../build/docs/basic/vehicle.rst:294 +#: ../../build/docs/basic/vehicle.rst:236 msgid "``penalty > 1`` makes the road slower for the calculations." msgstr "" -#: ../../build/docs/basic/vehicle.rst:296 +#: ../../build/docs/basic/vehicle.rst:238 msgid "Using \"faster\" roads is highly encouraged." msgstr "" -#: ../../build/docs/basic/vehicle.rst:298 +#: ../../build/docs/basic/vehicle.rst:240 msgid "``penalty < 1`` makes the road faster for the calculations." msgstr "" -#: ../../build/docs/basic/vehicle.rst:300 -msgid "The ``penalty`` values can be changed with ``UPDATE`` queries." +#: ../../build/docs/basic/vehicle.rst:242 +msgid "All other roads are not penalized." msgstr "" -#: ../../build/docs/basic/vehicle.rst:302 -msgid "These values are an exaggeration." +#: ../../build/docs/basic/vehicle.rst:244 +msgid "``penalty = 1`` does not modify the road times." msgstr "" -#: ../../build/docs/basic/vehicle.rst:311 -msgid "From the \"|place_3|\" to \"|place_1|\" with penalization." +#: ../../build/docs/basic/vehicle.rst:246 +msgid "The ``penalty`` values can be changed with ``UPDATE`` queries." msgstr "" -#: ../../build/docs/basic/vehicle.rst:321 -msgid "Costs are to be multiplied by :code:`penalty` (lines **6** and **7**)." +#: ../../build/docs/basic/vehicle.rst:248 +msgid "These values are an exaggeration." msgstr "" -#: ../../build/docs/basic/vehicle.rst:323 -msgid "" -"The :code:`configuration` table is linked with the :code:`ways` table by " -"the :code:`tag_id` field using a ``JOIN`` (lines **8** and **9**)." +#: ../../build/docs/basic/vehicle.rst:258 +msgid "From the \"|place_3|\" to \"|place_1|\" with penalization." msgstr "" -#: ../../build/docs/basic/vehicle.rst:325 +#: ../../build/docs/basic/vehicle.rst:266 msgid "" -"The vehicle is going from vertex |id_3| (line **11**) to vertex |id_1| " -"(line **12**)." +"Using the same query from `Exercise 4: Vehicle routing without penalization`_" msgstr "" -#: ../../build/docs/basic/vehicle.rst:337 +#: ../../build/docs/basic/vehicle.rst:279 msgid "Comparing with `Exercise 3: Vehicle routing when time is money`_:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:339 +#: ../../build/docs/basic/vehicle.rst:281 msgid "The total number of records changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:341 +#: ../../build/docs/basic/vehicle.rst:283 msgid "The node sequence changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:342 +#: ../../build/docs/basic/vehicle.rst:284 msgid "The edge sequence changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:344 -msgid "The route is avoiding the residential roads that have ``tag_id = 110``." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:345 +#: ../../build/docs/basic/vehicle.rst:286 msgid "The costs do not change proportionally." msgstr "" -#: ../../build/docs/basic/vehicle.rst:348 -msgid "Exercise 6: Time in seconds of penalized route" +#: ../../build/docs/basic/vehicle.rst:289 +msgid "Exercise 6: Time in seconds of penalized route using a view" msgstr "" -#: ../../build/docs/basic/vehicle.rst:353 +#: ../../build/docs/basic/vehicle.rst:293 msgid "Get the times in seconds of a penalized route" msgstr "" -#: ../../build/docs/basic/vehicle.rst:357 -msgid "Use as inner query the penalized query joined with the ways table" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:359 -msgid "Keep the ``edge`` as ``gid`` (line **6**)" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:360 -msgid "Join using ``gid`` (line **18**)" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:373 -msgid "Comparing with `Exercise 5: Vehicle routing with penalization`_:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:375 -msgid "The total number of records is the same." +#: ../../build/docs/basic/vehicle.rst:297 +msgid "" +"Create a penalized view by joining the ``vehicle_net`` joined with the " +"``configuration`` table" msgstr "" -#: ../../build/docs/basic/vehicle.rst:376 -msgid "The route is the same" +#: ../../build/docs/basic/vehicle.rst:300 +msgid "" +"Use the inner query from `Exercise 5: Vehicle routing with penalization`_" msgstr "" -#: ../../build/docs/basic/vehicle.rst:377 -msgid "The ``cost`` column have the original vales from the ways table." +#: ../../build/docs/basic/vehicle.rst:308 +msgid "Get the route ``configuration`` table" msgstr "" - diff --git a/locale/en/LC_MESSAGES/basic/withPoints.po b/locale/en/LC_MESSAGES/basic/withPoints.po new file mode 100644 index 000000000..5ed5962ea --- /dev/null +++ b/locale/en/LC_MESSAGES/basic/withPoints.po @@ -0,0 +1,579 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2024 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G +# Belém package. +# FIRST AUTHOR , 2024. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-07 15:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: en\n" +"Language-Team: en \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.17.0\n" + +#: ../../build/docs/basic/withPoints.rst:11 +msgid "Routing using points" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:17 +msgid "" +"Other kind of functions are `pl/pgsql `__. As the applications requirements become more " +"complex, building queries and storing queries in a variable becomes necessary" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:22 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:24 +msgid "`pgr_findCloseEdges`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:25 +msgid "`pgr_withPoints`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:27 +msgid "Chapter contents" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:30 +msgid "Requirements for routing lat,lon points" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:33 +msgid "Chapter problem:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:34 +msgid "" +"Create a function ``wrk_withPoints`` that allows routing from two point " +"geometries and works for" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:37 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:38 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:39 +msgid "``walk_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:41 +msgid "The function takes as input parameters:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:43 +msgid "The edges table name" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:44 +msgid "Latitude/longitude of two point" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:46 +msgid "Returns" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:48 +msgid "the same information as in :doc:`sql_function` chapter problem." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:49 +msgid "or the query that it builds" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:52 +msgid "The detailed description:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:55 +msgid "Input parameters" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "Parameter" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "type" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Description" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "``edges_subset``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "REGCLASS" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "Edge table name identifier." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "``lat1``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +#: ../../build/docs/basic/withPoints.rst:61 +#: ../../build/docs/basic/withPoints.rst:62 +#: ../../build/docs/basic/withPoints.rst:63 +msgid "NUMERIC" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "The latitude of the `departure` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "``lon1``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "The longitude of the `departure` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "``lat2``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "The latitude of the `destination` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:63 +msgid "``lon2``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:63 +msgid "The longitude of the `destination` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "``do_debug``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "BOOLEAN" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "Flag to create a ``NOTICE`` with the query that is been executed" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:70 +msgid "Output columns" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Name" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Type" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "``seq``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "INTEGER" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "A unique number for each result row." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "``id``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "BIGINT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "The edge identifier." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +msgid "``name``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +#: ../../build/docs/basic/withPoints.rst:80 +msgid "TEXT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +msgid "The name of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +msgid "``seconds``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +#: ../../build/docs/basic/withPoints.rst:78 +#: ../../build/docs/basic/withPoints.rst:79 +msgid "FLOAT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +msgid "The number of seconds it takes to traverse the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:78 +msgid "``length``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:78 +msgid "The length in meters of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:79 +msgid "``azimuth``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:79 +msgid "The azimuth of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:80 +msgid "``route_readable``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:80 +msgid "The geometry in human readable form." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "``route_geom``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "geometry" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "The geometry of the segment in the correct direction." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:85 +msgid "For this chapter, the following points will be used for testing." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:87 +msgid "(lat,lon) = (-36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:88 +msgid "(lat,lon) = (-36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:91 +msgid "pgr_findCloseEdges" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:93 +msgid "Finds the close edges to a point geometry." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:96 +#: ../../build/docs/basic/withPoints.rst:143 +msgid "Signature Summary" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:108 +msgid "Exercise 1: Get the nearest edge" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:115 +#: ../../build/docs/basic/withPoints.rst:165 +#: ../../build/docs/basic/withPoints.rst:193 +#: ../../build/docs/basic/withPoints.rst:295 +msgid "Problem" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:116 +msgid "Get the nearest edge on the graph of the following points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:118 +msgid "(pid, lat, lon) = (1, -36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:119 +msgid "(pid, lat, lon) = (2, -36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:122 +#: ../../build/docs/basic/withPoints.rst:172 +#: ../../build/docs/basic/withPoints.rst:200 +#: ../../build/docs/basic/withPoints.rst:315 +msgid "Solution" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:123 +msgid "" +"Build the geometry of the points with the appropiate SRID. (lines **4** and " +"**10**)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:125 +msgid "Get the union of the individual queries" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:138 +msgid "pgr_withPoints" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:140 +msgid "" +"Returns the shortest path in a graph with additional temporary vertices." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:158 +msgid "Exercise 2: Point routing" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:166 +msgid "Route from point **1** to point **2** on the ``vehicle_net`` where:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:168 +msgid "point **1**: (lat, lon) = (1, -36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:169 +msgid "point **2**: (lat, lon) = (2, -36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:173 +msgid "" +"The query from `Exercise 1: Get the nearest edge`_ is used as the inner " +"query for points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:175 +msgid "" +"Using negative values to avoid conficts with vertices with the same value:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:177 +msgid "Routing from point **-1** to point **-2**" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:190 +msgid "Exercise 3: Creating the point routing function" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:194 +msgid "" +"Create the function ``wrk_withPoints`` to route from locations using " +"latitude and longitude values." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:197 +msgid "Analyze the function." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:201 +msgid "Creating a ``plpgsql`` function." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:210 +msgid "Analysis" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:211 +msgid "The function's signature:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:213 +msgid "" +"The input parameters instead of vertex identifiers, now it has the latitude " +"and longitude of a couple of points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:215 +msgid "" +"The function returns the same set of values calculated on the :doc:" +"`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:224 +msgid "Getting the closest query:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:226 +msgid "The query looks like the one on `Exercise 1: Get the nearest edge`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:227 +#: ../../build/docs/basic/withPoints.rst:244 +#: ../../build/docs/basic/withPoints.rst:262 +msgid "Using PostgreSQL ``format`` to make substitutions." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:229 +msgid "The first parameter is the string to be replaced" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:230 +msgid "The rest are the data parameters, are the strings use for replacement." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:231 +msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:232 +msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:241 +msgid "Getting the routing results:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:243 +msgid "The query looks like the one on `Exercise 2: Point routing`" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:246 +msgid "The ``edges_subset`` value will replace ``%1$I``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:247 +msgid "The ``closest_query`` value will replace ``%2$s``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:256 +msgid "Getting the additional information:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:258 +msgid "" +"The subquery looks like the one in the function created on :doc:" +"`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:260 +msgid "A joined table can not be a variable" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:263 +msgid "" +"To make it work on the ``walk_net``, the whole query needs to be in ``TEXT``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:265 +msgid "The ``edges_subset`` value will replace ``%1$I``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:274 +msgid "Building the complete query:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:276 +msgid "" +"The complete query looks like the one in the function created on :doc:" +"`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:278 +msgid "Concatenation of strings is used." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:288 +msgid "Exercise 4: Using wrk_withPoints" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:296 +msgid "Use ``wrk_withPoints``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:298 +msgid "Departure point is: (lat,lon) = ``(-36.850329, 174.763094)``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:299 +msgid "Destination point is: (lat,lon) = ``(-36.853675, 174.764448)``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:300 +#: ../../build/docs/basic/withPoints.rst:316 +msgid "For ``vehicle_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:302 +msgid "Get the names of the streets of the route." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:304 +#: ../../build/docs/basic/withPoints.rst:332 +msgid "For ``taxi_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:306 +msgid "Get the query that is been generated." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:308 +#: ../../build/docs/basic/withPoints.rst:345 +msgid "For ``walk_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:310 +#: ../../build/docs/basic/withPoints.rst:321 +msgid "Use with default value of ``do_debug``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:311 +msgid "Store results on a table." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:312 +msgid "Show the table contents." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:318 +msgid "The first parameter is the table name." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:319 +msgid "" +"The next two parameters are the latitude and longitude of the departure " +"point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:320 +msgid "" +"The next two parameters are the latitude and longitude of the destination " +"point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:334 +msgid "Do a dry run by adding ``true`` to get the query that is executed." +msgstr "" diff --git a/locale/en/LC_MESSAGES/general-intro/introduction.po b/locale/en/LC_MESSAGES/general-intro/introduction.po index 1385eac7a..209f98e49 100644 --- a/locale/en/LC_MESSAGES/general-intro/introduction.po +++ b/locale/en/LC_MESSAGES/general-intro/introduction.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-09-30 17:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../build/docs/general-intro/introduction.rst:11 msgid "Introduction" @@ -31,7 +31,7 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:15 msgid "" "Please see the :doc:`contents <../index>` for full content of FOSS4G " -"Belém workshop. This workshop covers two levels for using pgRouting: " +"Auckland workshop. This workshop covers two levels for using pgRouting: " "`Basic`_ and `Advanced`_." msgstr "" @@ -41,11 +41,10 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:22 msgid "" -"will demonstrate the routing functionality by providing examples using " -"|osm-web| road network data from Belém. Covering topics from how to " -"prepare the data, making routing queries, understanding the results, up " -"to writing a custom 'plpgsql' function that can be integrated with other " -"FOSS tools." +"will demonstrate the routing functionality by providing examples using |osm-" +"web| road network data from Auckland. Covering topics from how to prepare " +"the data, making routing queries, understanding the results, up to writing a " +"custom 'plpgsql' function that can be integrated with other FOSS tools." msgstr "" #: ../../build/docs/general-intro/introduction.rst:28 @@ -96,9 +95,9 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:44 msgid "" -"pgRouting is an extendible open-source library that provides a variety of" -" tools for graph algorithms, this is not limited to routing vehicles. The" -" advanced section covers several graph problems that can be solved using " +"pgRouting is an extendible open-source library that provides a variety of " +"tools for graph algorithms, this is not limited to routing vehicles. The " +"advanced section covers several graph problems that can be solved using " "pgRouting." msgstr "" @@ -124,7 +123,7 @@ msgid "Paragon Corporation" msgstr "" #: ../../build/docs/general-intro/introduction.rst:70 -msgid "Developers & presenters of FOSS4G Belém workshop:" +msgid "Developers & presenters of FOSS4G Auckland workshop:" msgstr "" #: ../../build/docs/general-intro/introduction.rst:71 @@ -145,8 +144,8 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:80 msgid "" -"Daniel Kastl, José Ríos, Ko Nagase, Stephen Woodbridge, Swapnil Joshi, " -"Rajat Shinde, Ramón Ríos, Rohith Reddy, Vicky Vergara" +"Daniel Kastl, José Ríos, Ko Nagase, Stephen Woodbridge, Swapnil Joshi, Rajat " +"Shinde, Ramón Ríos, Rohith Reddy, Vicky Vergara" msgstr "" #: ../../build/docs/general-intro/introduction.rst:91 @@ -163,8 +162,8 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:97 msgid "" -"This work is licensed under a `Creative Commons Attribution-Share Alike " -"3.0 License `_." +"This work is licensed under a `Creative Commons Attribution-Share Alike 3.0 " +"License `_." msgstr "" #: ../../build/docs/general-intro/introduction.rst:103 @@ -182,4 +181,3 @@ msgstr "" #: ../../build/docs/general-intro/introduction.rst:115 msgid "OSGeo Foundation" msgstr "" - diff --git a/locale/en/LC_MESSAGES/un_sdg/sdg11-cities.po b/locale/en/LC_MESSAGES/un_sdg/sdg11-cities.po index 3f01bb402..43486ded4 100644 --- a/locale/en/LC_MESSAGES/un_sdg/sdg11-cities.po +++ b/locale/en/LC_MESSAGES/un_sdg/sdg11-cities.po @@ -254,7 +254,7 @@ msgstr "" msgid "" "The pgRouting function ``pgr_connectedComponents`` is used to complete " "this task and its explaind with more detail in " -":doc:`../basic/graph_views`." +":doc:`../basic/graphs`." msgstr "" #: ../../build/docs/un_sdg/sdg11-cities.rst:244 diff --git a/locale/en/LC_MESSAGES/un_sdg/sdg3-health.po b/locale/en/LC_MESSAGES/un_sdg/sdg3-health.po index 7dc10b029..883ff6272 100644 --- a/locale/en/LC_MESSAGES/un_sdg/sdg3-health.po +++ b/locale/en/LC_MESSAGES/un_sdg/sdg3-health.po @@ -477,7 +477,7 @@ msgstr "" #: ../../build/docs/un_sdg/sdg3-health.rst:423 msgid "" "To remove the disconnected components on the road network, the following " -"pgRouting functions, discussed on :doc:`../basic/graph_views`, will be " +"pgRouting functions, discussed on :doc:`../basic/graphs`, will be " "used:" msgstr "" diff --git a/locale/en/LC_MESSAGES/un_sdg/sdg7-energy.po b/locale/en/LC_MESSAGES/un_sdg/sdg7-energy.po index 367346062..15fa510f3 100644 --- a/locale/en/LC_MESSAGES/un_sdg/sdg7-energy.po +++ b/locale/en/LC_MESSAGES/un_sdg/sdg7-energy.po @@ -139,7 +139,7 @@ msgstr "" #: ../../build/docs/un_sdg/sdg7-energy.rst:99 msgid "" "To remove the disconnected components on the road network, the following " -"pgRouting functions, discussed on :doc:`../basic/graph_views`, will be " +"pgRouting functions, discussed on :doc:`../basic/graphs`, will be " "used:" msgstr "" diff --git a/locale/es/LC_MESSAGES/basic/graph_views.po b/locale/es/LC_MESSAGES/basic/graphs.po similarity index 72% rename from locale/es/LC_MESSAGES/basic/graph_views.po rename to locale/es/LC_MESSAGES/basic/graphs.po index 902f51833..4bb9aafe7 100644 --- a/locale/es/LC_MESSAGES/basic/graph_views.po +++ b/locale/es/LC_MESSAGES/basic/graphs.po @@ -12,7 +12,7 @@ msgstr "" "PO-Revision-Date: 2024-12-16 19:42+0000\n" "Last-Translator: Celia Virginia Vergara Castillo \n" "Language-Team: Spanish \n" +"pgrouting-workshop/basic-graphs/es/>\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -21,15 +21,15 @@ msgstr "" "X-Generator: Weblate 5.4.3\n" "Generated-By: Babel 2.16.0\n" -#: ../../build/docs/basic/graph_views.rst:12 +#: ../../build/docs/basic/graphs.rst:12 msgid "Graph views" msgstr "Vistas de grafos" -#: ../../build/docs/basic/graph_views.rst:18 +#: ../../build/docs/basic/graphs.rst:18 msgid "Chapter Contents" msgstr "Contenido del Capítulo" -#: ../../build/docs/basic/graph_views.rst:20 +#: ../../build/docs/basic/graphs.rst:20 msgid "" "Different application require different graphs. This chapter covers how " "to discard disconnected segments and different approaches to create " @@ -39,11 +39,11 @@ msgstr "" "se explica cómo descartar segmentos desconectados y los distintos métodos" " para crear gráficos." -#: ../../build/docs/basic/graph_views.rst:24 +#: ../../build/docs/basic/graphs.rst:24 msgid "The graph requirements" msgstr "Requisitos del grafo" -#: ../../build/docs/basic/graph_views.rst:26 +#: ../../build/docs/basic/graphs.rst:26 msgid "" "In this chapter there are three graph requirements. It consists on three " "graphs based on a **fully connected** graph derived from ``ways``: two " @@ -56,70 +56,70 @@ msgstr "" "para distintos tipos de vehículos y uno para peatones. En todos ellos, el " "origen y el destino se basan en ``source_osm`` y el ``target_osm``." -#: ../../build/docs/basic/graph_views.rst:31 +#: ../../build/docs/basic/graphs.rst:31 msgid "The description of the graphs:" msgstr "La descripción de los grafos:" -#: ../../build/docs/basic/graph_views.rst:33 +#: ../../build/docs/basic/graphs.rst:33 msgid "Particular vehicle:" msgstr "Vehículo particular:" -#: ../../build/docs/basic/graph_views.rst:35 +#: ../../build/docs/basic/graphs.rst:35 msgid "Circulate on the whole Belém area." msgstr "Circular por toda la zona de Belém." -#: ../../build/docs/basic/graph_views.rst:37 -#: ../../build/docs/basic/graph_views.rst:46 +#: ../../build/docs/basic/graphs.rst:37 +#: ../../build/docs/basic/graphs.rst:46 msgid "Do not use `steps`, `footway`, `path`, `cycleway`." msgstr "No usar `steps`, `footway`, `path`, `cycleway`." -#: ../../build/docs/basic/graph_views.rst:39 +#: ../../build/docs/basic/graphs.rst:39 msgid "Speed is the default speed from OSM information." msgstr "La velocidad es la velocidad predeterminada de la información de OSM." -#: ../../build/docs/basic/graph_views.rst:41 +#: ../../build/docs/basic/graphs.rst:41 msgid "Taxi vehicle:" msgstr "Vehículo Taxi:" -#: ../../build/docs/basic/graph_views.rst:43 +#: ../../build/docs/basic/graphs.rst:43 msgid "Circulate on a smaller area:" msgstr "Circula en un área más pequeña:" -#: ../../build/docs/basic/graph_views.rst:45 +#: ../../build/docs/basic/graphs.rst:45 msgid "Bounding box: ``(-48.52,-1.46,-48.45,-1.41)``" msgstr "Caja delimitadora: ``(-48.52,-1.46,-48.45,-1.41)``" -#: ../../build/docs/basic/graph_views.rst:48 +#: ../../build/docs/basic/graphs.rst:48 #, python-format msgid "Speed is 10% slower than that of the particular vehicles." msgstr "La velocidad es 10% inferior a la de los vehículos particulares." -#: ../../build/docs/basic/graph_views.rst:50 +#: ../../build/docs/basic/graphs.rst:50 msgid "Pedestrians:" msgstr "Peatones:" -#: ../../build/docs/basic/graph_views.rst:52 +#: ../../build/docs/basic/graphs.rst:52 msgid "Walk on the whole Belém area." msgstr "Caminar por toda la zona de Belém." -#: ../../build/docs/basic/graph_views.rst:53 +#: ../../build/docs/basic/graphs.rst:53 msgid "Can not walk on exclusive vehicle ways" msgstr "No se puede caminar por vías exclusivas para vehículos" -#: ../../build/docs/basic/graph_views.rst:55 +#: ../../build/docs/basic/graphs.rst:55 msgid "`motorways` and on `primary` segments." msgstr "En segmentos `motorways` y `primary`." -#: ../../build/docs/basic/graph_views.rst:57 -#: ../../build/docs/basic/graph_views.rst:488 +#: ../../build/docs/basic/graphs.rst:57 +#: ../../build/docs/basic/graphs.rst:488 msgid "The speed is ``2 mts/sec``." msgstr "La velocidad es de ``2 mts/sec``." -#: ../../build/docs/basic/graph_views.rst:60 +#: ../../build/docs/basic/graphs.rst:60 msgid "pgr_extractVertices" msgstr "pgr_extractVertices" -#: ../../build/docs/basic/graph_views.rst:62 +#: ../../build/docs/basic/graphs.rst:62 msgid "" "``pgr_extractVertices`` compute the connected components of an undirected" " graph using a Depth First Search approach. A connected component of an " @@ -131,12 +131,12 @@ msgstr "" "conectado de un grafo no dirigido es un conjunto de vértices que son " "todos alcanzables entre sí." -#: ../../build/docs/basic/graph_views.rst:67 -#: ../../build/docs/basic/graph_views.rst:214 +#: ../../build/docs/basic/graphs.rst:67 +#: ../../build/docs/basic/graphs.rst:214 msgid "Signature summary" msgstr "Resumen de la firma" -#: ../../build/docs/basic/graph_views.rst:75 +#: ../../build/docs/basic/graphs.rst:75 msgid "" "Description of the function can be found in `pgr_extractVertices " "`__" @@ -144,47 +144,47 @@ msgstr "" "La descripción de la función se encuentra en `pgr_extractVertices " "`__" -#: ../../build/docs/basic/graph_views.rst:79 +#: ../../build/docs/basic/graphs.rst:79 msgid "Exercise 1: Create a vertices table" msgstr "Ejercicio 1: Crear una tabla de vértices" -#: ../../build/docs/basic/graph_views.rst:82 -#: ../../build/docs/basic/graph_views.rst:130 -#: ../../build/docs/basic/graph_views.rst:230 -#: ../../build/docs/basic/graph_views.rst:278 -#: ../../build/docs/basic/graph_views.rst:355 -#: ../../build/docs/basic/graph_views.rst:426 -#: ../../build/docs/basic/graph_views.rst:484 -#: ../../build/docs/basic/graph_views.rst:548 +#: ../../build/docs/basic/graphs.rst:82 +#: ../../build/docs/basic/graphs.rst:130 +#: ../../build/docs/basic/graphs.rst:230 +#: ../../build/docs/basic/graphs.rst:278 +#: ../../build/docs/basic/graphs.rst:355 +#: ../../build/docs/basic/graphs.rst:426 +#: ../../build/docs/basic/graphs.rst:484 +#: ../../build/docs/basic/graphs.rst:548 msgid "Problem" msgstr "Problema" -#: ../../build/docs/basic/graph_views.rst:83 +#: ../../build/docs/basic/graphs.rst:83 msgid "Create the vertices table corresponding to the edges in ``ways``." msgstr "Crea la tabla de vértices correspondiente a las aristas en ``ways``." -#: ../../build/docs/basic/graph_views.rst:86 -#: ../../build/docs/basic/graph_views.rst:134 -#: ../../build/docs/basic/graph_views.rst:234 -#: ../../build/docs/basic/graph_views.rst:287 -#: ../../build/docs/basic/graph_views.rst:369 -#: ../../build/docs/basic/graph_views.rst:435 -#: ../../build/docs/basic/graph_views.rst:499 -#: ../../build/docs/basic/graph_views.rst:567 +#: ../../build/docs/basic/graphs.rst:86 +#: ../../build/docs/basic/graphs.rst:134 +#: ../../build/docs/basic/graphs.rst:234 +#: ../../build/docs/basic/graphs.rst:287 +#: ../../build/docs/basic/graphs.rst:369 +#: ../../build/docs/basic/graphs.rst:435 +#: ../../build/docs/basic/graphs.rst:499 +#: ../../build/docs/basic/graphs.rst:567 msgid "Solution" msgstr "Solución" -#: ../../build/docs/basic/graph_views.rst:87 +#: ../../build/docs/basic/graphs.rst:87 msgid "A graph consists of a set of vertices and a set of edges." msgstr "" "Un grafo está formado por un conjunto de vértices y un conjunto de " "aristas." -#: ../../build/docs/basic/graph_views.rst:88 +#: ../../build/docs/basic/graphs.rst:88 msgid "In this case, the ``ways`` table is a set of edges." msgstr "En este caso, la tabla ``ways`` es un conjunto de aristas." -#: ../../build/docs/basic/graph_views.rst:89 +#: ../../build/docs/basic/graphs.rst:89 msgid "" "In order to make use of all the graph functions from pgRouting, it is " "required have the set of vertices defined." @@ -192,31 +192,31 @@ msgstr "" "Para poder hacer uso de todas las funciones sobre grafos de pgRouting, es" " necesario tener definido el conjunto de vértices." -#: ../../build/docs/basic/graph_views.rst:91 +#: ../../build/docs/basic/graphs.rst:91 msgid "From the requirements, the graph is going to be based on OSM identifiers." msgstr "Según los requisitos, el grafo se basará en identificadores OSM." -#: ../../build/docs/basic/graph_views.rst:104 +#: ../../build/docs/basic/graphs.rst:104 msgid "Reviewing the description of the vertices table" msgstr "Revisando de la descripción de la tabla de vértices" -#: ../../build/docs/basic/graph_views.rst:114 +#: ../../build/docs/basic/graphs.rst:114 msgid "Inspecting the information on the vertices table" msgstr "Inspeccionando la información de la tabla de vértices" -#: ../../build/docs/basic/graph_views.rst:127 +#: ../../build/docs/basic/graphs.rst:127 msgid "Exercise 2: Fill up other columns in the vertices table" msgstr "Ejercicio 2: Llenar las otras columnas de la tabla de vértices" -#: ../../build/docs/basic/graph_views.rst:131 +#: ../../build/docs/basic/graphs.rst:131 msgid "Fill up geometry information on the vertices table." msgstr "Llena la información de geometría en la tabla de vértices." -#: ../../build/docs/basic/graph_views.rst:135 +#: ../../build/docs/basic/graphs.rst:135 msgid "Count the number of rows that need to be filled up." msgstr "Contar el número de filas que hay que rellenar." -#: ../../build/docs/basic/graph_views.rst:145 +#: ../../build/docs/basic/graphs.rst:145 msgid "" "Update the ``geom`` columns based on the ``source_osm`` column from " "``ways`` table." @@ -224,11 +224,11 @@ msgstr "" "Actualizar la columna ``geom`` basándose en la columna ``source_osm`` de " "la tabla ``ways``." -#: ../../build/docs/basic/graph_views.rst:147 +#: ../../build/docs/basic/graphs.rst:147 msgid "Use the start point of the geometry." msgstr "Utilizar el punto inicial de la geometría." -#: ../../build/docs/basic/graph_views.rst:158 +#: ../../build/docs/basic/graphs.rst:158 msgid "" "Not expecting to be done due to the fact that some vertices are only dead" " ends." @@ -236,7 +236,7 @@ msgstr "" "No se espera haber terminado debido a que algunos vértices son sólo " "callejones sin salida." -#: ../../build/docs/basic/graph_views.rst:169 +#: ../../build/docs/basic/graphs.rst:169 msgid "" "Update the ``geom`` columns based on the ``target_osm`` column from " "``ways`` table." @@ -244,11 +244,11 @@ msgstr "" "Actualizar las columnas ``geom`` basándose en la columna ``target_osm`` " "de la tabla ``ways``." -#: ../../build/docs/basic/graph_views.rst:171 +#: ../../build/docs/basic/graphs.rst:171 msgid "Use the end point of the geometry." msgstr "Utilizar el punto final de la geometría." -#: ../../build/docs/basic/graph_views.rst:182 +#: ../../build/docs/basic/graphs.rst:182 msgid "" "Expecting to be done, that is the geometry column should not have a " "``NULL`` value." @@ -256,15 +256,15 @@ msgstr "" "Se espera haber terminado, es decir la columna geometría no debe tener un" " valor ``NULL``." -#: ../../build/docs/basic/graph_views.rst:194 +#: ../../build/docs/basic/graphs.rst:194 msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." msgstr "Actualizar las columnas ``x`` e ``y`` en función de la columna ``geom``." -#: ../../build/docs/basic/graph_views.rst:207 +#: ../../build/docs/basic/graphs.rst:207 msgid "pgr_connectedComponents" msgstr "pgr_connectedComponents" -#: ../../build/docs/basic/graph_views.rst:209 +#: ../../build/docs/basic/graphs.rst:209 msgid "" "``pgr_connectedComponents`` compute the connected components of an " "undirected graph using a Depth First Search approach. A connected " @@ -276,7 +276,7 @@ msgstr "" "componente conectado de un grafo no dirigido es un conjunto de vértices " "que son todos alcanzables entre sí." -#: ../../build/docs/basic/graph_views.rst:222 +#: ../../build/docs/basic/graphs.rst:222 msgid "" "Description of the function can be found in `pgr_connectedComponents " "`__" @@ -284,23 +284,23 @@ msgstr "" "La descripción de la función se encuentra en `pgr_connectedComponents " "`__" -#: ../../build/docs/basic/graph_views.rst:227 +#: ../../build/docs/basic/graphs.rst:227 msgid "Exercise 3: Set components on edges and vertices tables" msgstr "Ejercicio 3: Establecer componentes en tablas de aristas y vértices" -#: ../../build/docs/basic/graph_views.rst:231 +#: ../../build/docs/basic/graphs.rst:231 msgid "Get the information about the graph components." msgstr "Obtener la información sobre los componentes del grafo." -#: ../../build/docs/basic/graph_views.rst:235 +#: ../../build/docs/basic/graphs.rst:235 msgid "Create additional columns on the edges and vertices tables." msgstr "Crear columnas adicionales en las tablas de aristas y vértices." -#: ../../build/docs/basic/graph_views.rst:246 +#: ../../build/docs/basic/graphs.rst:246 msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." msgstr "Utilizar ``pgr_connectedComponents`` para llenar la tabla de vértices." -#: ../../build/docs/basic/graph_views.rst:248 +#: ../../build/docs/basic/graphs.rst:248 msgid "" "Use the results to store the component numbers on the vertices table. " "(**line 1**)" @@ -308,78 +308,78 @@ msgstr "" "Utilizar los resultados para almacenar los números de los componentes en " "la tabla de vértices. (**línea 1**)" -#: ../../build/docs/basic/graph_views.rst:250 +#: ../../build/docs/basic/graphs.rst:250 msgid "Use the OSM identifiers of the vertices. (**lines 4-5**)" msgstr "Utilizar los identificadores OSM de los vértices. (**líneas 4-5**)" -#: ../../build/docs/basic/graph_views.rst:262 +#: ../../build/docs/basic/graphs.rst:262 msgid "Update the edges table with based on the component number of the vertex" msgstr "" "Actualizar la tabla de aristas con en función del número de componente " "del vértice" -#: ../../build/docs/basic/graph_views.rst:275 +#: ../../build/docs/basic/graphs.rst:275 msgid "Exercise 4: Inspect the components" msgstr "Ejercicio 4: Inspeccionar los componentes" -#: ../../build/docs/basic/graph_views.rst:279 +#: ../../build/docs/basic/graphs.rst:279 msgid "Answer the following questions:" msgstr "Responder a las siguientes preguntas:" -#: ../../build/docs/basic/graph_views.rst:281 -#: ../../build/docs/basic/graph_views.rst:288 +#: ../../build/docs/basic/graphs.rst:281 +#: ../../build/docs/basic/graphs.rst:288 msgid "How many components are in the vertices table?" msgstr "¿Cuántos componentes hay en la tabla de vértices?" -#: ../../build/docs/basic/graph_views.rst:282 -#: ../../build/docs/basic/graph_views.rst:301 +#: ../../build/docs/basic/graphs.rst:282 +#: ../../build/docs/basic/graphs.rst:301 msgid "How many components are in the edges table?" msgstr "¿Cuántos componentes hay en la tabla de bordes?" -#: ../../build/docs/basic/graph_views.rst:283 -#: ../../build/docs/basic/graph_views.rst:314 +#: ../../build/docs/basic/graphs.rst:283 +#: ../../build/docs/basic/graphs.rst:314 msgid "List the 10 components with more edges." msgstr "Enumerar los 10 componentes con más aristas." -#: ../../build/docs/basic/graph_views.rst:284 -#: ../../build/docs/basic/graph_views.rst:328 +#: ../../build/docs/basic/graphs.rst:284 +#: ../../build/docs/basic/graphs.rst:328 msgid "Get the component with the maximum number of edges." msgstr "Obtiener el componente con el máximo número de aristas." -#: ../../build/docs/basic/graph_views.rst:290 -#: ../../build/docs/basic/graph_views.rst:303 +#: ../../build/docs/basic/graphs.rst:290 +#: ../../build/docs/basic/graphs.rst:303 msgid "Count the distinct components." msgstr "Contar los componentes distintos." -#: ../../build/docs/basic/graph_views.rst:316 +#: ../../build/docs/basic/graphs.rst:316 msgid "Count number of rows grouped by component. (**line 1**)" msgstr "Número de filas agrupadas por componente. (**línea 1**)" -#: ../../build/docs/basic/graph_views.rst:317 +#: ../../build/docs/basic/graphs.rst:317 msgid "Inverse order to display the top 10. (**line 2**)" msgstr "Orden inverso para mostrar los 10 primeros. (**línea 2**)" -#: ../../build/docs/basic/graph_views.rst:330 +#: ../../build/docs/basic/graphs.rst:330 msgid "Use the query from last question to get the maximum count" msgstr "Utilizar la consulta de la última pregunta para obtener el recuento máximo" -#: ../../build/docs/basic/graph_views.rst:331 +#: ../../build/docs/basic/graphs.rst:331 msgid "Get the component that matches the maximum value." msgstr "Obtiene el componente que coincide con el valor máximo." -#: ../../build/docs/basic/graph_views.rst:345 +#: ../../build/docs/basic/graphs.rst:345 msgid "Preparing the graphs" msgstr "Preparación de los grafos" -#: ../../build/docs/basic/graph_views.rst:348 +#: ../../build/docs/basic/graphs.rst:348 msgid "Exercise 5: Creating a view for routing" msgstr "Ejercicio 5: Creación de una vista para el ruteo" -#: ../../build/docs/basic/graph_views.rst:350 +#: ../../build/docs/basic/graphs.rst:350 msgid "View of roads for vehicles" msgstr "Vista de carreteras para vehículos" -#: ../../build/docs/basic/graph_views.rst:356 +#: ../../build/docs/basic/graphs.rst:356 msgid "" "Create a view with minimal amount of information for processing the " "particular vehicles." @@ -387,11 +387,11 @@ msgstr "" "Crear una vista con una cantidad mínima de información para procesar los " "vehículos particulares." -#: ../../build/docs/basic/graph_views.rst:357 +#: ../../build/docs/basic/graphs.rst:357 msgid "Use the OSM identifiers on the vertices." msgstr "Utilizar los identificadores OSM en los vértices." -#: ../../build/docs/basic/graph_views.rst:358 +#: ../../build/docs/basic/graphs.rst:358 msgid "" "Routing `cost` and `reverse_cost` in terms of seconds for routing " "calculations." @@ -399,39 +399,39 @@ msgstr "" "El `cost` y `reverse_cost` del ruteo en términos de segundos para los " "cálculos de ruteo." -#: ../../build/docs/basic/graph_views.rst:359 +#: ../../build/docs/basic/graphs.rst:359 msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." msgstr "Excluye los segmentos `steps`, `footway`, `path`, `cycleway`." -#: ../../build/docs/basic/graph_views.rst:360 -#: ../../build/docs/basic/graph_views.rst:491 +#: ../../build/docs/basic/graphs.rst:360 +#: ../../build/docs/basic/graphs.rst:491 msgid "Data needed in the view for further processing." msgstr "Datos necesarios en la vista para su posterior procesamiento." -#: ../../build/docs/basic/graph_views.rst:362 +#: ../../build/docs/basic/graphs.rst:362 msgid "`name` The name of the segment." msgstr "`name` El nombre del segmento." -#: ../../build/docs/basic/graph_views.rst:363 +#: ../../build/docs/basic/graphs.rst:363 msgid "`length_m` The length in meters rename to ``length``." msgstr "`length_m` La longitud en metros renombrar a ``length``." -#: ../../build/docs/basic/graph_views.rst:364 +#: ../../build/docs/basic/graphs.rst:364 msgid "`the_geom` The geometry rename to ``geom``." msgstr "`the_geom` El cambio de nombre de la geometría a ``geom``." -#: ../../build/docs/basic/graph_views.rst:366 -#: ../../build/docs/basic/graph_views.rst:496 +#: ../../build/docs/basic/graphs.rst:366 +#: ../../build/docs/basic/graphs.rst:496 msgid "Verify the number of edges was reduced." msgstr "Comprobar que se ha reducido el número de aristas." -#: ../../build/docs/basic/graph_views.rst:370 -#: ../../build/docs/basic/graph_views.rst:436 -#: ../../build/docs/basic/graph_views.rst:500 +#: ../../build/docs/basic/graphs.rst:370 +#: ../../build/docs/basic/graphs.rst:436 +#: ../../build/docs/basic/graphs.rst:500 msgid "Creating the view:" msgstr "Creación de la vista:" -#: ../../build/docs/basic/graph_views.rst:372 +#: ../../build/docs/basic/graphs.rst:372 msgid "" "If you need to reconstruct the view, first drop it using the command on " "**line 1**." @@ -439,11 +439,11 @@ msgstr "" "Si necesita reconstruir la vista, primero borrarla usando el comando en " "línea **1**." -#: ../../build/docs/basic/graph_views.rst:374 +#: ../../build/docs/basic/graphs.rst:374 msgid "Get the component with maximum number of edges (**lines 6-10**)" msgstr "Obtener el componente con el máximo número de aristas (**líneas 6-10**)" -#: ../../build/docs/basic/graph_views.rst:375 +#: ../../build/docs/basic/graphs.rst:375 msgid "" "The `source` and `target` requirements for the function are to be with " "OSM identifiers. (line **14**)" @@ -451,11 +451,11 @@ msgstr "" "Los requisitos `source` y `target` para la función deben ser con " "identificadores OSM. (línea **14**)" -#: ../../build/docs/basic/graph_views.rst:377 +#: ../../build/docs/basic/graphs.rst:377 msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" msgstr "El ``coste`` y el ``reverse_cost`` se expresan en segundos. (línea **15**)" -#: ../../build/docs/basic/graph_views.rst:378 +#: ../../build/docs/basic/graphs.rst:378 msgid "" "The additional parameters ``length_m`` and ``the_geom`` are renamed, " "``name`` is also included. (line **16**)" @@ -463,39 +463,39 @@ msgstr "" "Los parámetros adicionales ``length_m`` y ``the_geom`` se renombran, " "también se incluye ``name``. (línea **16**)" -#: ../../build/docs/basic/graph_views.rst:380 +#: ../../build/docs/basic/graphs.rst:380 msgid "``JOIN`` with the `configuration`:" msgstr "``JOIN`` con `configuration`:" -#: ../../build/docs/basic/graph_views.rst:382 +#: ../../build/docs/basic/graphs.rst:382 msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" msgstr "Excluir `steps`, `footway`, `path`, `cycleway`. (línea **18**)" -#: ../../build/docs/basic/graph_views.rst:395 +#: ../../build/docs/basic/graphs.rst:395 msgid "Verification:" msgstr "Verificación:" -#: ../../build/docs/basic/graph_views.rst:397 +#: ../../build/docs/basic/graphs.rst:397 msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." msgstr "Contar las filas en ``ways`` original y en ``vehicle_net``." -#: ../../build/docs/basic/graph_views.rst:407 +#: ../../build/docs/basic/graphs.rst:407 msgid "Get the description of the view" msgstr "Obtener la descripción de la vista" -#: ../../build/docs/basic/graph_views.rst:419 +#: ../../build/docs/basic/graphs.rst:419 msgid "Exercise 6: Limiting the road network within an area" msgstr "Ejercicio 6: Limitar la red de carreteras de una zona" -#: ../../build/docs/basic/graph_views.rst:421 +#: ../../build/docs/basic/graphs.rst:421 msgid "View of smaller set of roads for vehicles" msgstr "Vista de un conjunto más pequeño de carreteras para vehículos" -#: ../../build/docs/basic/graph_views.rst:427 +#: ../../build/docs/basic/graphs.rst:427 msgid "Create a view ``taxi_net`` for the `taxi`:" msgstr "Crar una vista ``taxi_net`` para el `taxi`:" -#: ../../build/docs/basic/graph_views.rst:429 +#: ../../build/docs/basic/graphs.rst:429 msgid "" "The taxi can only circulate inside this Bounding Box: " "``(-48.52,-1.46,-48.45,-1.41)``" @@ -503,16 +503,16 @@ msgstr "" "El taxi sólo puede circular dentro de este recuadro: " "``(-48.52,-1.46,-48.45,-1.41)``" -#: ../../build/docs/basic/graph_views.rst:430 +#: ../../build/docs/basic/graphs.rst:430 #, python-format msgid "The taxi speed is 10% slower than the particular vehicle." msgstr "La velocidad de taxi es 10% inferior a la del vehículo particular." -#: ../../build/docs/basic/graph_views.rst:432 +#: ../../build/docs/basic/graphs.rst:432 msgid "Verify the reduced number of road segments." msgstr "Verificar el número reducido de segmentos de carretera." -#: ../../build/docs/basic/graph_views.rst:438 +#: ../../build/docs/basic/graphs.rst:438 #, python-format msgid "" "Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of " @@ -521,7 +521,7 @@ msgstr "" "Ajustar el ``cost`` y el ``reverse_cost`` del taxi para que sean 10% más " "bajos que los del vehículo particular. (línea **7**)" -#: ../../build/docs/basic/graph_views.rst:440 +#: ../../build/docs/basic/graphs.rst:440 msgid "" "The graph for the taxi is a subset of the ``vehicle_net`` graph. (line " "**9**)" @@ -529,7 +529,7 @@ msgstr "" "El grafo del taxi es un subconjunto del grafo ``vehicle_net``. (línea " "**9**)" -#: ../../build/docs/basic/graph_views.rst:441 +#: ../../build/docs/basic/graphs.rst:441 msgid "" "Can only circulate inside the bounding box: " "``(-48.52,-1.46,-48.45,-1.41)``. (line **10**)" @@ -537,24 +537,24 @@ msgstr "" "Sólo puede circular dentro de la caja delimitadora: " "``(-48.52,-1.46,-48.45,-1.41)``. (línea **10**)" -#: ../../build/docs/basic/graph_views.rst:455 +#: ../../build/docs/basic/graphs.rst:455 msgid "Count the rows on ``taxi_net``." msgstr "Contar las filas en ``taxi_net``." -#: ../../build/docs/basic/graph_views.rst:466 -#: ../../build/docs/basic/graph_views.rst:529 +#: ../../build/docs/basic/graphs.rst:466 +#: ../../build/docs/basic/graphs.rst:529 msgid "Get the description." msgstr "Obtener la descripción." -#: ../../build/docs/basic/graph_views.rst:477 +#: ../../build/docs/basic/graphs.rst:477 msgid "Exercise 7: Creating a materialized view for routing pedestrians" msgstr "Ejercicio 7: Creación de una vista materializada para el ruteo de peatones" -#: ../../build/docs/basic/graph_views.rst:479 +#: ../../build/docs/basic/graphs.rst:479 msgid "View of roads for pedestrians" msgstr "Vista de las carreteras para peatones" -#: ../../build/docs/basic/graph_views.rst:485 +#: ../../build/docs/basic/graphs.rst:485 msgid "" "Create a materialized view with minimal amount of information for " "processing pedestrians." @@ -562,7 +562,7 @@ msgstr "" "Crear una vista materializada con una cantidad mínima de información para" " procesar peatones." -#: ../../build/docs/basic/graph_views.rst:486 +#: ../../build/docs/basic/graphs.rst:486 msgid "" "Routing `cost` and `reverse_cost` will be on seconds for routing " "calculations." @@ -570,23 +570,23 @@ msgstr "" "El costo de ruteo en `cost` y `reverse_cost` será en segundos para los " "cálculos de ruteo." -#: ../../build/docs/basic/graph_views.rst:490 +#: ../../build/docs/basic/graphs.rst:490 msgid "Exclude `motorway` , `primary` and `secondary` segments." msgstr "Excluir segmentos `motorway` , `primary` y `secondary`." -#: ../../build/docs/basic/graph_views.rst:493 +#: ../../build/docs/basic/graphs.rst:493 msgid "`length_m` The length in meters." msgstr "`length_m` La longitud en metros." -#: ../../build/docs/basic/graph_views.rst:494 +#: ../../build/docs/basic/graphs.rst:494 msgid "`the_geom` The geometry." msgstr "`the_geom` La geometría." -#: ../../build/docs/basic/graph_views.rst:502 +#: ../../build/docs/basic/graphs.rst:502 msgid "Similar to `Exercise 5: Creating a view for routing`_:" msgstr "Similar al `Ejercicio 5: Creación de una vista para el enrutamiento`_:" -#: ../../build/docs/basic/graph_views.rst:504 +#: ../../build/docs/basic/graphs.rst:504 msgid "" "The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of " "``2 mts/sec``. (line **7**)" @@ -594,52 +594,52 @@ msgstr "" "``cost`` y ``reverse_cost`` se expresan en términos de segundos con " "velocidad de ``2 mts/sec``. (línea **7**)" -#: ../../build/docs/basic/graph_views.rst:505 +#: ../../build/docs/basic/graphs.rst:505 msgid "Exclude `motorway`, `primary` and `secondary` . (line **11**)" msgstr "Excluir `motorway`, `primary` y `secondary`. (línea **11**)" -#: ../../build/docs/basic/graph_views.rst:518 +#: ../../build/docs/basic/graphs.rst:518 msgid "Count the rows on the view ``walk_net``." msgstr "Contar las filas de la vista ``walk_net``." -#: ../../build/docs/basic/graph_views.rst:541 +#: ../../build/docs/basic/graphs.rst:541 msgid "Exercise 8: Testing the views for routing" msgstr "Ejercicio 8: Comprobación de las vistas para el ruteo" -#: ../../build/docs/basic/graph_views.rst:543 +#: ../../build/docs/basic/graphs.rst:543 msgid "From the |ch7_place_1| to the |ch7_place_2|" msgstr "Desde |ch7_place_1| hacia |ch7_place_2|" -#: ../../build/docs/basic/graph_views.rst:549 +#: ../../build/docs/basic/graphs.rst:549 msgid "Test the created views" msgstr "Probar las vistas creadas" -#: ../../build/docs/basic/graph_views.rst:551 +#: ../../build/docs/basic/graphs.rst:551 msgid "In particular:" msgstr "En particular:" -#: ../../build/docs/basic/graph_views.rst:553 +#: ../../build/docs/basic/graphs.rst:553 msgid "From the |ch7_place_1| to the \"|ch7_place_2| using the OSM identifier" msgstr "" "Desde \"|ch7_place_1|\" hacia \"|ch7_place_2|\" usando el identificador OSM" -#: ../../build/docs/basic/graph_views.rst:554 +#: ../../build/docs/basic/graphs.rst:554 msgid "the views to be tested are:" msgstr "las vistas a probar son:" -#: ../../build/docs/basic/graph_views.rst:556 +#: ../../build/docs/basic/graphs.rst:556 msgid "``vehicle_net``" msgstr "``vehicle_net``" -#: ../../build/docs/basic/graph_views.rst:557 +#: ../../build/docs/basic/graphs.rst:557 msgid "``taxi_net``" msgstr "``taxi_net``" -#: ../../build/docs/basic/graph_views.rst:558 +#: ../../build/docs/basic/graphs.rst:558 msgid "``walk_net``" msgstr "``walk_net``" -#: ../../build/docs/basic/graph_views.rst:560 +#: ../../build/docs/basic/graphs.rst:560 msgid "" "Only show the following results, as the other columns are to be ignored " "on the function." @@ -647,55 +647,55 @@ msgstr "" "Mostrar únicamente los siguientes resultados, ya que las demás columnas " "deben omitirse en la función." -#: ../../build/docs/basic/graph_views.rst:562 +#: ../../build/docs/basic/graphs.rst:562 msgid "``seq``" msgstr "``seq``" -#: ../../build/docs/basic/graph_views.rst:563 +#: ../../build/docs/basic/graphs.rst:563 msgid "``edge`` with the name ``id``" msgstr "``edge`` con el nombre ``id``" -#: ../../build/docs/basic/graph_views.rst:564 +#: ../../build/docs/basic/graphs.rst:564 msgid "``cost`` with the name: ``seconds``" msgstr "``cost`` con el nombre: ``seconds``" -#: ../../build/docs/basic/graph_views.rst:568 +#: ../../build/docs/basic/graphs.rst:568 msgid "In general" msgstr "En general" -#: ../../build/docs/basic/graph_views.rst:570 +#: ../../build/docs/basic/graphs.rst:570 msgid "The departure is |ch7_place_1| with OSM identifier |ch7_osmid_1|." msgstr "" "El punto de partida es |ch7_place_1| con el identificador OSM " "|ch7_osmid_1|." -#: ../../build/docs/basic/graph_views.rst:571 +#: ../../build/docs/basic/graphs.rst:571 msgid "The destination is |ch7_place_2| with OSM identifier |ch7_osmid_2|." msgstr "El destino es |ch7_place_2| con el identificador OSM |ch7_osmid_2|." -#: ../../build/docs/basic/graph_views.rst:573 +#: ../../build/docs/basic/graphs.rst:573 msgid "For ``vehicle_net``:" msgstr "Para ``vehicle_net``:" -#: ../../build/docs/basic/graph_views.rst:575 +#: ../../build/docs/basic/graphs.rst:575 msgid "``vehicle_net`` is used." msgstr "Se utiliza ``vehicle_net``." -#: ../../build/docs/basic/graph_views.rst:576 +#: ../../build/docs/basic/graphs.rst:576 msgid "Selection of the columns with the corresponding names are on line **1**." msgstr "" "La selección de las columnas con los nombres correspondientes está en " "línea **1**." -#: ../../build/docs/basic/graph_views.rst:577 +#: ../../build/docs/basic/graphs.rst:577 msgid "The view is prepared with the column names that pgRouting use." msgstr "La vista se prepara con los nombres de columna que pgRouting utiliza." -#: ../../build/docs/basic/graph_views.rst:579 +#: ../../build/docs/basic/graphs.rst:579 msgid "There is no need to rename columns. (line **3**)" msgstr "No es necesario cambiar el nombre de las columnas. (línea **3**)" -#: ../../build/docs/basic/graph_views.rst:581 +#: ../../build/docs/basic/graphs.rst:581 msgid "" "The OSM identifiers of the departure and destination are used. (line " "**4**)" @@ -703,15 +703,15 @@ msgstr "" "Se utilizan los identificadores OSM del punto de partida y del destino. " "(línea **4**)" -#: ../../build/docs/basic/graph_views.rst:594 +#: ../../build/docs/basic/graphs.rst:594 msgid "For ``taxi_net``:" msgstr "Para ``taxi_net``:" -#: ../../build/docs/basic/graph_views.rst:596 +#: ../../build/docs/basic/graphs.rst:596 msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" msgstr "Similar al anterior pero con ``taxi_net`` (línea **3**)" -#: ../../build/docs/basic/graph_views.rst:597 +#: ../../build/docs/basic/graphs.rst:597 msgid "" "The results give the same route as with ``vehicle_net`` but ``cost`` is " "higher." @@ -719,14 +719,14 @@ msgstr "" "Los resultados dan la misma ruta que con ``vehicle_net`` pero ``cost`` es " "mayor." -#: ../../build/docs/basic/graph_views.rst:610 +#: ../../build/docs/basic/graphs.rst:610 msgid "For ``walk_net``:" msgstr "Para ``walk_net``:" -#: ../../build/docs/basic/graph_views.rst:612 +#: ../../build/docs/basic/graphs.rst:612 msgid "Similar as the previous one but with ``walk_net``. (line **3**)" msgstr "Similar al anterior pero con ``walk_net``. (línea **3**)" -#: ../../build/docs/basic/graph_views.rst:613 +#: ../../build/docs/basic/graphs.rst:613 msgid "The results give a different route than of the vehicles." msgstr "Los resultados dan una ruta diferente a la de los vehículos." diff --git a/locale/es/LC_MESSAGES/basic/pedestrian.po b/locale/es/LC_MESSAGES/basic/pedestrian.po index 428b24429..6a807be4d 100644 --- a/locale/es/LC_MESSAGES/basic/pedestrian.po +++ b/locale/es/LC_MESSAGES/basic/pedestrian.po @@ -392,23 +392,23 @@ msgstr "" msgid "Result adds the costs per destination." msgstr "El resultado suma los costes por destino." -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:1 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:1 msgid "Inspecting the results, looking for totals (edge = -1):" msgstr "Inspección de los resultados, buscando totales (`edge = -1`):" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:3 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:3 msgid "From 20297 to vertex 6548 takes 92.58 minutes (seq = 147)" msgstr "Desde 20297 al vértice 6548 toma 92.58 minutos (seq = 147)" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:5 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:5 msgid "From 20297 to vertex 12712 takes 83.18 minutes (seq = 267)" msgstr "Desde 20297 al vértice 12712 toma 83.18 minutos (seq = 267)" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:7 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:7 msgid "From 23872 to vertex 6548 takes 76.26 minutes (seq = 385)" msgstr "Desde 23872 al vértice 6548 toma 76.26 minutos (seq = 385)" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:9 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:9 msgid "From 23872 to vertex 12712 takes 67.76 minutes (seq = 495)" msgstr "Desde 23872 al vértice 12712 toma 67.76 minutos (seq = 495)" @@ -522,7 +522,7 @@ msgstr "" "El costo a ser en minutos, con una velocidad de caminata s = 1.3 m/s y t " "= d/s (línea **6**)." -#: ../../build/docs/scripts/basic/chapter_5/note_2.txt:1 +#: ../../build/docs/scripts/basic/pedestrian/note_2.txt:1 msgid "" "An interpretation of the result can be: In general, it is faster to " "depart from \"Instituto Federal do Pará, Campus Belém\" than from " diff --git a/locale/es/LC_MESSAGES/basic/sql_function.po b/locale/es/LC_MESSAGES/basic/sql_function.po index 66dc0b406..37cccc93e 100644 --- a/locale/es/LC_MESSAGES/basic/sql_function.po +++ b/locale/es/LC_MESSAGES/basic/sql_function.po @@ -231,7 +231,7 @@ msgid "``length``" msgstr "``length``" #: ../../build/docs/basic/sql_function.rst:67 -msgid "The leng in meters of the segment." +msgid "The length in meters of the segment." msgstr "Longitud en metros del segmento." #: ../../build/docs/basic/sql_function.rst:68 diff --git a/locale/es/LC_MESSAGES/basic/plpgsql_function.po b/locale/es/LC_MESSAGES/basic/withPoints.po similarity index 62% rename from locale/es/LC_MESSAGES/basic/plpgsql_function.po rename to locale/es/LC_MESSAGES/basic/withPoints.po index 51d78d793..a0631089d 100644 --- a/locale/es/LC_MESSAGES/basic/plpgsql_function.po +++ b/locale/es/LC_MESSAGES/basic/withPoints.po @@ -16,7 +16,7 @@ msgstr "" "PO-Revision-Date: 2024-12-16 19:42+0000\n" "Last-Translator: Celia Virginia Vergara Castillo \n" "Language-Team: Spanish \n" +"pgrouting-workshop/basic-withPoints/es/>\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -25,11 +25,11 @@ msgstr "" "X-Generator: Weblate 5.4.3\n" "Generated-By: Babel 2.16.0\n" -#: ../../build/docs/basic/plpgsql_function.rst:11 +#: ../../build/docs/basic/withPoints.rst:11 msgid "pl/pgsql function" msgstr "Función pl/pgsql" -#: ../../build/docs/basic/plpgsql_function.rst:17 +#: ../../build/docs/basic/withPoints.rst:17 msgid "" "Other kind of functions are `pl/pgsql " "`__. As the " @@ -42,27 +42,27 @@ msgstr "" "envoltorios de funciones previamente definidas se hacen necesarios para " "mayor claridad." -#: ../../build/docs/basic/plpgsql_function.rst:22 +#: ../../build/docs/basic/withPoints.rst:22 msgid "Chapter contents" msgstr "Contenido del capítulo" -#: ../../build/docs/basic/plpgsql_function.rst:25 +#: ../../build/docs/basic/withPoints.rst:25 msgid "Requirements for routing from A to B" msgstr "Requisitos para el ruteo de A a B" -#: ../../build/docs/basic/plpgsql_function.rst:28 +#: ../../build/docs/basic/withPoints.rst:28 msgid "Chapter problem:" msgstr "Problema del capítulo:" -#: ../../build/docs/basic/plpgsql_function.rst:29 +#: ../../build/docs/basic/withPoints.rst:29 msgid "Create a function ``wrk_fromAtoB`` that allows routing from 2 geometries." msgstr "Cree una función ``wrk_fromAtoB`` que permita el ruteo desde 2 geometrías." -#: ../../build/docs/basic/plpgsql_function.rst:30 +#: ../../build/docs/basic/withPoints.rst:30 msgid "The function takes latitude/longitude points as input parameters." msgstr "La función toma los puntos de latitud/longitud como parámetros de entrada." -#: ../../build/docs/basic/plpgsql_function.rst:31 +#: ../../build/docs/basic/withPoints.rst:31 msgid "" "Returns a route that includes a geometry so that if can be displayed, for" " example, in QGIS." @@ -70,123 +70,123 @@ msgstr "" "Devuelve una ruta que incluye una geometría para que si se puede " "desplegar, por ejemplo, en QGIS." -#: ../../build/docs/basic/plpgsql_function.rst:32 +#: ../../build/docs/basic/withPoints.rst:32 msgid "Will also return some other attributes." msgstr "También devolverá algunos otros atributos." -#: ../../build/docs/basic/plpgsql_function.rst:34 +#: ../../build/docs/basic/withPoints.rst:34 msgid "The detailed description:" msgstr "La descripción detallada:" -#: ../../build/docs/basic/plpgsql_function.rst:37 +#: ../../build/docs/basic/withPoints.rst:37 msgid "Input parameters" msgstr "Parámetros de entrada" -#: ../../build/docs/basic/plpgsql_function.rst:39 +#: ../../build/docs/basic/withPoints.rst:39 msgid "Parameter" msgstr "Parámetro" -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 +#: ../../build/docs/basic/withPoints.rst:39 +#: ../../build/docs/basic/withPoints.rst:204 +#: ../../build/docs/basic/withPoints.rst:214 msgid "type" msgstr "tipo" -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 +#: ../../build/docs/basic/withPoints.rst:39 +#: ../../build/docs/basic/withPoints.rst:54 +#: ../../build/docs/basic/withPoints.rst:204 +#: ../../build/docs/basic/withPoints.rst:214 msgid "Description" msgstr "Descripción" -#: ../../build/docs/basic/plpgsql_function.rst:41 +#: ../../build/docs/basic/withPoints.rst:41 msgid "``edges_subset``" msgstr "``edges_subset``" -#: ../../build/docs/basic/plpgsql_function.rst:41 -#: ../../build/docs/basic/plpgsql_function.rst:206 +#: ../../build/docs/basic/withPoints.rst:41 +#: ../../build/docs/basic/withPoints.rst:206 msgid "REGCLASS" msgstr "REGCLASS" -#: ../../build/docs/basic/plpgsql_function.rst:41 +#: ../../build/docs/basic/withPoints.rst:41 msgid "Edge table name identifier." msgstr "Identificador de nombre de tabla perimetral." -#: ../../build/docs/basic/plpgsql_function.rst:42 +#: ../../build/docs/basic/withPoints.rst:42 msgid "``lat1``" msgstr "``lat1``" -#: ../../build/docs/basic/plpgsql_function.rst:42 -#: ../../build/docs/basic/plpgsql_function.rst:43 -#: ../../build/docs/basic/plpgsql_function.rst:44 -#: ../../build/docs/basic/plpgsql_function.rst:45 -#: ../../build/docs/basic/plpgsql_function.rst:207 -#: ../../build/docs/basic/plpgsql_function.rst:208 +#: ../../build/docs/basic/withPoints.rst:42 +#: ../../build/docs/basic/withPoints.rst:43 +#: ../../build/docs/basic/withPoints.rst:44 +#: ../../build/docs/basic/withPoints.rst:45 +#: ../../build/docs/basic/withPoints.rst:207 +#: ../../build/docs/basic/withPoints.rst:208 msgid "NUMERIC" msgstr "NUMERIC" -#: ../../build/docs/basic/plpgsql_function.rst:42 +#: ../../build/docs/basic/withPoints.rst:42 msgid "The latitude of the `departure` point." msgstr "La latitud del punto de `partida`." -#: ../../build/docs/basic/plpgsql_function.rst:43 +#: ../../build/docs/basic/withPoints.rst:43 msgid "``lon1``" msgstr "``lon1``" -#: ../../build/docs/basic/plpgsql_function.rst:43 +#: ../../build/docs/basic/withPoints.rst:43 msgid "The longitude of the `departure` point." msgstr "La longitud del punto de `partida`." -#: ../../build/docs/basic/plpgsql_function.rst:44 +#: ../../build/docs/basic/withPoints.rst:44 msgid "``lat2``" msgstr "``lat2``" -#: ../../build/docs/basic/plpgsql_function.rst:44 +#: ../../build/docs/basic/withPoints.rst:44 msgid "The latitude of the `destination` point." msgstr "La latitud del punto de `destino`." -#: ../../build/docs/basic/plpgsql_function.rst:45 +#: ../../build/docs/basic/withPoints.rst:45 msgid "``lon2``" msgstr "``lon2``" -#: ../../build/docs/basic/plpgsql_function.rst:45 +#: ../../build/docs/basic/withPoints.rst:45 msgid "The longitude of the `destination` point." msgstr "La longitud del punto de `destino`." -#: ../../build/docs/basic/plpgsql_function.rst:46 +#: ../../build/docs/basic/withPoints.rst:46 msgid "``do_debug``" msgstr "``do_debug``" -#: ../../build/docs/basic/plpgsql_function.rst:46 +#: ../../build/docs/basic/withPoints.rst:46 msgid "BOOLEAN" msgstr "BOOLEAN" -#: ../../build/docs/basic/plpgsql_function.rst:46 +#: ../../build/docs/basic/withPoints.rst:46 msgid "Flag to create a ``WARNING`` with the query that is been executed" msgstr "Marcar para crear una ``ADVERTENCIA`` con la consulta que se ha ejecutado" -#: ../../build/docs/basic/plpgsql_function.rst:52 +#: ../../build/docs/basic/withPoints.rst:52 msgid "Output columns" msgstr "Columnas de resultados" -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 +#: ../../build/docs/basic/withPoints.rst:54 +#: ../../build/docs/basic/withPoints.rst:204 msgid "Column" msgstr "Columna" -#: ../../build/docs/basic/plpgsql_function.rst:56 +#: ../../build/docs/basic/withPoints.rst:56 msgid "``seq``" msgstr "``seq``" -#: ../../build/docs/basic/plpgsql_function.rst:56 +#: ../../build/docs/basic/withPoints.rst:56 msgid "For ordering purposes." msgstr "Para fines ordenamiento." -#: ../../build/docs/basic/plpgsql_function.rst:57 +#: ../../build/docs/basic/withPoints.rst:57 msgid "``gid``" msgstr "``gid``" -#: ../../build/docs/basic/plpgsql_function.rst:57 +#: ../../build/docs/basic/withPoints.rst:57 msgid "" "The edge identifier that can be used to JOIN the results to the ``ways`` " "table." @@ -194,63 +194,63 @@ msgstr "" "Identificador de bordes que se puede utilizar para unir los resultados a " "la tabla ``ways``." -#: ../../build/docs/basic/plpgsql_function.rst:58 +#: ../../build/docs/basic/withPoints.rst:58 msgid "``name``" msgstr "``name``" -#: ../../build/docs/basic/plpgsql_function.rst:58 +#: ../../build/docs/basic/withPoints.rst:58 msgid "The street name." msgstr "El nombre de la calle." -#: ../../build/docs/basic/plpgsql_function.rst:59 +#: ../../build/docs/basic/withPoints.rst:59 msgid "``azimuth``" msgstr "``azimuth``" -#: ../../build/docs/basic/plpgsql_function.rst:59 +#: ../../build/docs/basic/withPoints.rst:59 msgid "Between start and end node of an edge." msgstr "Entre el nodo inicial y final de una arista." -#: ../../build/docs/basic/plpgsql_function.rst:60 +#: ../../build/docs/basic/withPoints.rst:60 msgid "``length``" msgstr "``length``" -#: ../../build/docs/basic/plpgsql_function.rst:60 +#: ../../build/docs/basic/withPoints.rst:60 msgid "In meters." msgstr "En metros." -#: ../../build/docs/basic/plpgsql_function.rst:61 +#: ../../build/docs/basic/withPoints.rst:61 msgid "``minutes``" msgstr "``minutes``" -#: ../../build/docs/basic/plpgsql_function.rst:61 +#: ../../build/docs/basic/withPoints.rst:61 msgid "Minutes taken to traverse the segment." msgstr "Minutos tomados para atravesar el segmento." -#: ../../build/docs/basic/plpgsql_function.rst:62 +#: ../../build/docs/basic/withPoints.rst:62 msgid "``route_geom``" msgstr "``route_geom``" -#: ../../build/docs/basic/plpgsql_function.rst:62 +#: ../../build/docs/basic/withPoints.rst:62 msgid "The road geometry with corrected directionality." msgstr "La geometría de la carretera con direccionalidad corregida." -#: ../../build/docs/basic/plpgsql_function.rst:66 +#: ../../build/docs/basic/withPoints.rst:66 msgid "For this chapter, the following points will be used for testing." msgstr "Para este capítulo, se utilizarán los siguientes puntos para las pruebas." -#: ../../build/docs/basic/plpgsql_function.rst:68 +#: ../../build/docs/basic/withPoints.rst:68 msgid "(lat,lon) = (-1.455829, -48.446044)" msgstr "(lat,lon) = (-1.455829, -48.446044)" -#: ../../build/docs/basic/plpgsql_function.rst:69 +#: ../../build/docs/basic/withPoints.rst:69 msgid "(lat,lon) = (-1.453448, -48.447142)" msgstr "(lat,lon) = (-1.453448, -48.447142)" -#: ../../build/docs/basic/plpgsql_function.rst:72 +#: ../../build/docs/basic/withPoints.rst:72 msgid "The Vertices Table" msgstr "La Tabla de Vértices" -#: ../../build/docs/basic/plpgsql_function.rst:74 +#: ../../build/docs/basic/withPoints.rst:74 msgid "" "Graphs have a `set of edges` and a `set of vertices` associated to it. " "The views need their vertices table." @@ -258,104 +258,104 @@ msgstr "" "Los grafos tienen un `conjunto de aristas` y un `conjunto de vértices` " "asociados a él. Las vistas necesitan su tabla de vértices." -#: ../../build/docs/basic/plpgsql_function.rst:78 +#: ../../build/docs/basic/withPoints.rst:78 msgid "Exercise 1: Create vertices table" msgstr "Ejercicio 1: Crear la tabla de vértices" -#: ../../build/docs/basic/plpgsql_function.rst:81 -#: ../../build/docs/basic/plpgsql_function.rst:128 -#: ../../build/docs/basic/plpgsql_function.rst:193 -#: ../../build/docs/basic/plpgsql_function.rst:256 -#: ../../build/docs/basic/plpgsql_function.rst:329 -#: ../../build/docs/basic/plpgsql_function.rst:405 +#: ../../build/docs/basic/withPoints.rst:81 +#: ../../build/docs/basic/withPoints.rst:128 +#: ../../build/docs/basic/withPoints.rst:193 +#: ../../build/docs/basic/withPoints.rst:256 +#: ../../build/docs/basic/withPoints.rst:329 +#: ../../build/docs/basic/withPoints.rst:405 msgid "Problem" msgstr "Problema" -#: ../../build/docs/basic/plpgsql_function.rst:82 +#: ../../build/docs/basic/withPoints.rst:82 msgid "Create a vertices table for the views:" msgstr "Crear una tabla de vértices:" -#: ../../build/docs/basic/plpgsql_function.rst:84 +#: ../../build/docs/basic/withPoints.rst:84 msgid "``vehicle_net``" msgstr "``vehicle_net``" -#: ../../build/docs/basic/plpgsql_function.rst:85 +#: ../../build/docs/basic/withPoints.rst:85 msgid "``taxi_net``" msgstr "``taxi_net``" -#: ../../build/docs/basic/plpgsql_function.rst:86 +#: ../../build/docs/basic/withPoints.rst:86 msgid "``walk_net``" msgstr "``walk_net``" -#: ../../build/docs/basic/plpgsql_function.rst:90 -#: ../../build/docs/basic/plpgsql_function.rst:141 -#: ../../build/docs/basic/plpgsql_function.rst:220 -#: ../../build/docs/basic/plpgsql_function.rst:273 -#: ../../build/docs/basic/plpgsql_function.rst:342 -#: ../../build/docs/basic/plpgsql_function.rst:428 +#: ../../build/docs/basic/withPoints.rst:90 +#: ../../build/docs/basic/withPoints.rst:141 +#: ../../build/docs/basic/withPoints.rst:220 +#: ../../build/docs/basic/withPoints.rst:273 +#: ../../build/docs/basic/withPoints.rst:342 +#: ../../build/docs/basic/withPoints.rst:428 msgid "Solution" msgstr "Solución" -#: ../../build/docs/basic/plpgsql_function.rst:91 +#: ../../build/docs/basic/withPoints.rst:91 msgid "" -"Use ``pgr_extractVertices`` (explained in :doc:`graph_views`) to create " +"Use ``pgr_extractVertices`` (explained in :doc:`graphs`) to create " "the vertices table" msgstr "" -"Utilizar ``pgr_extractVertices`` (explicado en :doc:`graph_views`) para " +"Utilizar ``pgr_extractVertices`` (explicado en :doc:`graphs`) para " "crear la tabla de vértices" -#: ../../build/docs/basic/plpgsql_function.rst:93 +#: ../../build/docs/basic/withPoints.rst:93 msgid "" "``JOIN`` the vertices table with ``ways_vertices`` (created in " -":doc:`graph_views`) to get the ``x``, ``y``, ``geom`` information." +":doc:`graphs`) to get the ``x``, ``y``, ``geom`` information." msgstr "" "``JOIN`` la tabla de vértices con ``ways_vertices`` (creada en " -":doc:`graph_views`) para obtener la información de ``x``, ``y``, " +":doc:`graphs`) para obtener la información de ``x``, ``y``, " "``geom``." -#: ../../build/docs/basic/plpgsql_function.rst:96 -#: ../../build/docs/basic/plpgsql_function.rst:410 -#: ../../build/docs/basic/plpgsql_function.rst:429 +#: ../../build/docs/basic/withPoints.rst:96 +#: ../../build/docs/basic/withPoints.rst:410 +#: ../../build/docs/basic/withPoints.rst:429 msgid "For ``vehicle_net``:" msgstr "Para ``vehicle_net``:" -#: ../../build/docs/basic/plpgsql_function.rst:104 -#: ../../build/docs/basic/plpgsql_function.rst:414 -#: ../../build/docs/basic/plpgsql_function.rst:444 +#: ../../build/docs/basic/withPoints.rst:104 +#: ../../build/docs/basic/withPoints.rst:414 +#: ../../build/docs/basic/withPoints.rst:444 msgid "For ``taxi_net``:" msgstr "Para ``taxi_net``:" -#: ../../build/docs/basic/plpgsql_function.rst:110 -#: ../../build/docs/basic/plpgsql_function.rst:418 -#: ../../build/docs/basic/plpgsql_function.rst:457 +#: ../../build/docs/basic/withPoints.rst:110 +#: ../../build/docs/basic/withPoints.rst:418 +#: ../../build/docs/basic/withPoints.rst:457 msgid "For ``walk_net``:" msgstr "Para ``walk_net``:" -#: ../../build/docs/basic/plpgsql_function.rst:112 +#: ../../build/docs/basic/withPoints.rst:112 msgid "Modify the above queries to create the ``walk_net_vertices`` table." msgstr "" "Modificar las consultas anteriores para crear la tabla " "``walk_net_vertices``." -#: ../../build/docs/basic/plpgsql_function.rst:120 +#: ../../build/docs/basic/withPoints.rst:120 msgid "It is left to the reader to remove disconected components on the views." msgstr "" "Se deja al lector la tarea de eliminar los componentes desconectados en " "las vistas." -#: ../../build/docs/basic/plpgsql_function.rst:122 -msgid "See :doc:`graph_views`" -msgstr "Ver :doc:`graph_views`" +#: ../../build/docs/basic/withPoints.rst:122 +msgid "See :doc:`graphs`" +msgstr "Ver :doc:`graphs`" -#: ../../build/docs/basic/plpgsql_function.rst:125 +#: ../../build/docs/basic/withPoints.rst:125 msgid "Exercise 3: Nearest Vertex" msgstr "Ejercicio 3: Vértice más cercano" -#: ../../build/docs/basic/plpgsql_function.rst:129 +#: ../../build/docs/basic/withPoints.rst:129 msgid "Calculate the (OSM) identifier of the nearest vertex to a point." msgstr "Calculer el identificador( OSM) del vértice más cercano a un punto." -#: ../../build/docs/basic/plpgsql_function.rst:131 +#: ../../build/docs/basic/withPoints.rst:131 msgid "" "In particular use the following (lat, lon) value: ``(-1.455829, " "-48.446044)``." @@ -363,32 +363,32 @@ msgstr "" "En particular, utilizar el siguiente valor (lat,lon): ``(-1.455829, " "-48.446044)``." -#: ../../build/docs/basic/plpgsql_function.rst:133 -#: ../../build/docs/basic/plpgsql_function.rst:265 +#: ../../build/docs/basic/withPoints.rst:133 +#: ../../build/docs/basic/withPoints.rst:265 msgid "calculate the nearest OSM identifier of the vertex to:" msgstr "calcular el identificador OSM más cercano del vértice a:" -#: ../../build/docs/basic/plpgsql_function.rst:135 -#: ../../build/docs/basic/plpgsql_function.rst:267 +#: ../../build/docs/basic/withPoints.rst:135 +#: ../../build/docs/basic/withPoints.rst:267 msgid "``ways_vertices``" msgstr "``ways_vertices``" -#: ../../build/docs/basic/plpgsql_function.rst:136 -#: ../../build/docs/basic/plpgsql_function.rst:268 +#: ../../build/docs/basic/withPoints.rst:136 +#: ../../build/docs/basic/withPoints.rst:268 msgid "``vehicle_net_vertices``" msgstr "``vehicle_net_vertices``" -#: ../../build/docs/basic/plpgsql_function.rst:137 -#: ../../build/docs/basic/plpgsql_function.rst:269 +#: ../../build/docs/basic/withPoints.rst:137 +#: ../../build/docs/basic/withPoints.rst:269 msgid "``taxi_net_vertices``" msgstr "``taxi_net_vertices``" -#: ../../build/docs/basic/plpgsql_function.rst:138 -#: ../../build/docs/basic/plpgsql_function.rst:270 +#: ../../build/docs/basic/withPoints.rst:138 +#: ../../build/docs/basic/withPoints.rst:270 msgid "``walk_net_vertices``" msgstr "``walk_net_vertices``" -#: ../../build/docs/basic/plpgsql_function.rst:142 +#: ../../build/docs/basic/withPoints.rst:142 msgid "" "Remember that the ``id`` has an OSM vertex identifier on the vertices " "tables." @@ -396,7 +396,7 @@ msgstr "" "Recordar que el ``id`` tiene un identificador de vértice OSM en las " "tablas de vértices." -#: ../../build/docs/basic/plpgsql_function.rst:143 +#: ../../build/docs/basic/withPoints.rst:143 msgid "" "Using the Postgis distance operator `<-> " "`__ to order by " @@ -406,44 +406,44 @@ msgstr "" "`__ para ordenar por" " distancia." -#: ../../build/docs/basic/plpgsql_function.rst:144 +#: ../../build/docs/basic/withPoints.rst:144 msgid "Get only the first row, to obtain the nearest identifier of the vertex." msgstr "" "Obtenga solo la primera fila para obtener el identificador más cercano " "del vértice." -#: ../../build/docs/basic/plpgsql_function.rst:146 -#: ../../build/docs/basic/plpgsql_function.rst:274 +#: ../../build/docs/basic/withPoints.rst:146 +#: ../../build/docs/basic/withPoints.rst:274 msgid "For ``ways_vertices``:" msgstr "Para ``ways_vertices``:" -#: ../../build/docs/basic/plpgsql_function.rst:157 +#: ../../build/docs/basic/withPoints.rst:157 msgid "For ``vehicle_net_vertices``:" msgstr "Para``vehicle_net_vertices``:" -#: ../../build/docs/basic/plpgsql_function.rst:159 -#: ../../build/docs/basic/plpgsql_function.rst:174 -#: ../../build/docs/basic/plpgsql_function.rst:182 -#: ../../build/docs/basic/plpgsql_function.rst:293 -#: ../../build/docs/basic/plpgsql_function.rst:306 +#: ../../build/docs/basic/withPoints.rst:159 +#: ../../build/docs/basic/withPoints.rst:174 +#: ../../build/docs/basic/withPoints.rst:182 +#: ../../build/docs/basic/withPoints.rst:293 +#: ../../build/docs/basic/withPoints.rst:306 msgid "Modify the previous query." msgstr "Modificar la consulta anterior." -#: ../../build/docs/basic/plpgsql_function.rst:172 -#: ../../build/docs/basic/plpgsql_function.rst:304 +#: ../../build/docs/basic/withPoints.rst:172 +#: ../../build/docs/basic/withPoints.rst:304 msgid "For ``taxi_net_vertices``:" msgstr "Para ``taxi_net_vertices``:" -#: ../../build/docs/basic/plpgsql_function.rst:180 -#: ../../build/docs/basic/plpgsql_function.rst:312 +#: ../../build/docs/basic/withPoints.rst:180 +#: ../../build/docs/basic/withPoints.rst:312 msgid "For ``walk_net_vertices``:" msgstr "Para ``walk_net_vertices``:" -#: ../../build/docs/basic/plpgsql_function.rst:190 +#: ../../build/docs/basic/withPoints.rst:190 msgid "Exercise 4: Nearest vertex function" msgstr "Ejercicio 4: Función de vértice más cercano" -#: ../../build/docs/basic/plpgsql_function.rst:194 +#: ../../build/docs/basic/withPoints.rst:194 msgid "" "When operations look similar for different tables, a function can be " "created." @@ -451,7 +451,7 @@ msgstr "" "Cuando las operaciones se ven similares para diferentes tablas, se puede " "crear una función." -#: ../../build/docs/basic/plpgsql_function.rst:196 +#: ../../build/docs/basic/withPoints.rst:196 msgid "" "Create a function that calculates the OSM identifier of the nearest " "vertex to a point." @@ -459,59 +459,59 @@ msgstr "" "Cree una función que calcule el identificador OSM del vértice más cercano" " a un punto." -#: ../../build/docs/basic/plpgsql_function.rst:197 +#: ../../build/docs/basic/withPoints.rst:197 msgid "Function name: ``wrk_nearest``." msgstr "Nombre de la función: ``wrk_Nearest``." -#: ../../build/docs/basic/plpgsql_function.rst:198 +#: ../../build/docs/basic/withPoints.rst:198 msgid "Needs to work only for the **final application** views and table." msgstr "Solo tiene que funcionar para las vistas y la tabla **aplicación final**." -#: ../../build/docs/basic/plpgsql_function.rst:201 +#: ../../build/docs/basic/withPoints.rst:201 msgid "The input parameters:" msgstr "Los parámetros de entrada:" -#: ../../build/docs/basic/plpgsql_function.rst:206 +#: ../../build/docs/basic/withPoints.rst:206 msgid "vertex_table" msgstr "vertex_table" -#: ../../build/docs/basic/plpgsql_function.rst:206 +#: ../../build/docs/basic/withPoints.rst:206 msgid "Table name identifier." msgstr "Identificador de nombre de tabla." -#: ../../build/docs/basic/plpgsql_function.rst:207 +#: ../../build/docs/basic/withPoints.rst:207 msgid "lat" msgstr "lat" -#: ../../build/docs/basic/plpgsql_function.rst:207 +#: ../../build/docs/basic/withPoints.rst:207 msgid "The latitude of a point." msgstr "La latitud de un punto." -#: ../../build/docs/basic/plpgsql_function.rst:208 +#: ../../build/docs/basic/withPoints.rst:208 msgid "lon" msgstr "lon" -#: ../../build/docs/basic/plpgsql_function.rst:208 +#: ../../build/docs/basic/withPoints.rst:208 msgid "The longitude of a point." msgstr "La longitud de un punto." -#: ../../build/docs/basic/plpgsql_function.rst:211 +#: ../../build/docs/basic/withPoints.rst:211 msgid "The output:" msgstr "La salida:" -#: ../../build/docs/basic/plpgsql_function.rst:216 +#: ../../build/docs/basic/withPoints.rst:216 msgid "BIGINT" msgstr "BIGINT" -#: ../../build/docs/basic/plpgsql_function.rst:216 +#: ../../build/docs/basic/withPoints.rst:216 msgid "the OSM identifier that is nearest to (lat,lon)." msgstr "el identificador OSM más cercano a (lat,lon)." -#: ../../build/docs/basic/plpgsql_function.rst:221 +#: ../../build/docs/basic/withPoints.rst:221 msgid "The function returns only one ``BIGINT`` value." msgstr "La función devuelve sólo un valor ``BIGINT``." -#: ../../build/docs/basic/plpgsql_function.rst:222 +#: ../../build/docs/basic/withPoints.rst:222 msgid "" "Using `format `__ to build the query." @@ -519,7 +519,7 @@ msgstr "" "Usando `format `__ para construir la consulta." -#: ../../build/docs/basic/plpgsql_function.rst:226 +#: ../../build/docs/basic/withPoints.rst:226 msgid "" "The structure of the query is similar to `Exercise 3: Nearest Vertex`_ " "solutions." @@ -527,61 +527,61 @@ msgstr "" "La estructura de la consulta es similar a las soluciones `Ejercicio 3: " "Vértice más cercano`_." -#: ../../build/docs/basic/plpgsql_function.rst:228 +#: ../../build/docs/basic/withPoints.rst:228 msgid "``%1$I`` for the table name identifier." msgstr "``%1$I`` para el identificador de nombre de tabla." -#: ../../build/docs/basic/plpgsql_function.rst:229 +#: ../../build/docs/basic/withPoints.rst:229 msgid "``%2$s`` and ``%3$s`` for the latitude and longitude." msgstr "``%2$s`` y ``%3$s`` para la latitud y longitud." -#: ../../build/docs/basic/plpgsql_function.rst:231 +#: ../../build/docs/basic/withPoints.rst:231 msgid "The point is formed with (lon/lat) ``(%3$s, %2$s)``." msgstr "El punto se forma con (lon/lat) ``(%3$s, %2$s)``." -#: ../../build/docs/basic/plpgsql_function.rst:241 +#: ../../build/docs/basic/withPoints.rst:241 msgid "Exercise 5: Test nearest vertex function" msgstr "Ejercicio 5: Prueba de la función vértice más cercano" -#: ../../build/docs/basic/plpgsql_function.rst:243 +#: ../../build/docs/basic/withPoints.rst:243 msgid "Nearest Vertex in vehicle network" msgstr "Nodo más cercano en la red vehicular" -#: ../../build/docs/basic/plpgsql_function.rst:247 +#: ../../build/docs/basic/withPoints.rst:247 msgid "Nearest Vertex in taxi network" msgstr "Vértice más cercano en la red de taxis" -#: ../../build/docs/basic/plpgsql_function.rst:251 +#: ../../build/docs/basic/withPoints.rst:251 msgid "Nearest Vertex in walk network" msgstr "Nodo más cercano en la red peatonal" -#: ../../build/docs/basic/plpgsql_function.rst:257 +#: ../../build/docs/basic/withPoints.rst:257 msgid "Test the ``wrk_Nearest`` function." msgstr "Probar la función ``wrk_Nearest``." -#: ../../build/docs/basic/plpgsql_function.rst:259 +#: ../../build/docs/basic/withPoints.rst:259 msgid "Use the following (lat,lon) values: ``(-1.455829, -48.446044)``." msgstr "Usar los siguientes valores (lat,lon): ``(-1.455829, -48.446044)``." -#: ../../build/docs/basic/plpgsql_function.rst:261 +#: ../../build/docs/basic/withPoints.rst:261 msgid "The point is the same as in `Exercise 3: Nearest Vertex`_ problem." msgstr "El punto es el mismo que en `Ejercicio 3: Vértice más cercano`_." -#: ../../build/docs/basic/plpgsql_function.rst:263 +#: ../../build/docs/basic/withPoints.rst:263 msgid "Verify the results are the same." msgstr "Compruebe que los resultados son los mismos." -#: ../../build/docs/basic/plpgsql_function.rst:276 +#: ../../build/docs/basic/withPoints.rst:276 msgid "Use the function with ``ways_vertices`` as the ``vertex_table`` parameter." msgstr "" "Utilizar la función con ``ways_vertices`` como parámetro de " "``vertex_table``." -#: ../../build/docs/basic/plpgsql_function.rst:277 +#: ../../build/docs/basic/withPoints.rst:277 msgid "Pass the (lat,lon) values as second and third parameters." msgstr "Pasar los valores (lat,lon) como segundo y tercer parámetro." -#: ../../build/docs/basic/plpgsql_function.rst:278 +#: ../../build/docs/basic/withPoints.rst:278 msgid "" "Using the function on the original data does not return the OSM " "identifier." @@ -589,184 +589,184 @@ msgstr "" "El uso de la función en los datos originales no devuelve el identificador" " de OSM." -#: ../../build/docs/basic/plpgsql_function.rst:280 +#: ../../build/docs/basic/withPoints.rst:280 msgid "The value stored in ``id`` column is not the OSM identifier." msgstr "El valor almacenado en la columna ``id`` no es el identificador de OSM." -#: ../../build/docs/basic/plpgsql_function.rst:291 +#: ../../build/docs/basic/withPoints.rst:291 msgid "For ``vehicles_net_vertices``:" msgstr "Para ``vehicles_net_vertices``:" -#: ../../build/docs/basic/plpgsql_function.rst:320 +#: ../../build/docs/basic/withPoints.rst:320 msgid "wrk_fromAtoB function" msgstr "función wrk_fromAtoB" -#: ../../build/docs/basic/plpgsql_function.rst:322 +#: ../../build/docs/basic/withPoints.rst:322 msgid "" "In this section, creation and testing the required function will be " "tackled." msgstr "En esta sección, se abordará la creación y prueba de la función requerida." -#: ../../build/docs/basic/plpgsql_function.rst:326 +#: ../../build/docs/basic/withPoints.rst:326 msgid "Exercise 6: Creating the main function" msgstr "Ejercicio 6: Creación de la función principal" -#: ../../build/docs/basic/plpgsql_function.rst:330 +#: ../../build/docs/basic/withPoints.rst:330 msgid "Create the function ``wrk_fromAtoB``." msgstr "Crear la función ``wrk_fromAtoB``." -#: ../../build/docs/basic/plpgsql_function.rst:331 +#: ../../build/docs/basic/withPoints.rst:331 msgid "Follow the description given at `Requirements for routing from A to B`_." msgstr "Siga la descripción dada en `Requisitos para el ruteo de A a B`_." -#: ../../build/docs/basic/plpgsql_function.rst:332 +#: ../../build/docs/basic/withPoints.rst:332 msgid "Use specialized functions:" msgstr "Utilizar funciones especializadas:" -#: ../../build/docs/basic/plpgsql_function.rst:334 +#: ../../build/docs/basic/withPoints.rst:334 msgid "``wrk_NearestOSM`` created on `Exercise 4: Nearest vertex function`_." msgstr "" "``wrk_NearestOSM`` creado en `Ejercicio 4: Función de vértice más " "cercano`_." -#: ../../build/docs/basic/plpgsql_function.rst:336 +#: ../../build/docs/basic/withPoints.rst:336 msgid "It receives the point in natural language format." msgstr "Recibe el punto en formato de lenguaje natural." -#: ../../build/docs/basic/plpgsql_function.rst:337 +#: ../../build/docs/basic/withPoints.rst:337 msgid "Obtains the OSM identifier needed by ``wrk_dijkstra``." msgstr "Obtiene el identificador OSM necesario por ``wrk_dijkstra``." -#: ../../build/docs/basic/plpgsql_function.rst:339 +#: ../../build/docs/basic/withPoints.rst:339 msgid "``wrk_dijkstra`` created in :doc:`sql_function`" msgstr "``wrk_dijkstra`` creado en :doc:`sql_function`" -#: ../../build/docs/basic/plpgsql_function.rst:343 +#: ../../build/docs/basic/withPoints.rst:343 msgid "The function's signature:" msgstr "Firma de la función:" -#: ../../build/docs/basic/plpgsql_function.rst:345 +#: ../../build/docs/basic/withPoints.rst:345 msgid "The input parameters highlighted." msgstr "Los parámetros de entrada están resaltados." -#: ../../build/docs/basic/plpgsql_function.rst:346 +#: ../../build/docs/basic/withPoints.rst:346 msgid "The output columns are not highlighted." msgstr "Las columnas de salida no están resaltadas." -#: ../../build/docs/basic/plpgsql_function.rst:347 +#: ../../build/docs/basic/withPoints.rst:347 msgid "The function returns a set of values." msgstr "La función devuelve un conjunto de valores." -#: ../../build/docs/basic/plpgsql_function.rst:357 +#: ../../build/docs/basic/withPoints.rst:357 msgid "The function's body:" msgstr "Cuerpo de la función:" -#: ../../build/docs/basic/plpgsql_function.rst:359 +#: ../../build/docs/basic/withPoints.rst:359 msgid "Call to the function ``wrk_dijkstra``" msgstr "Llamada a la función ``wrk_dijkstra``" -#: ../../build/docs/basic/plpgsql_function.rst:361 +#: ../../build/docs/basic/withPoints.rst:361 msgid "Using PostgreSQL ``format`` to make substitutions" msgstr "Usando ``format`` de PostgreSQL para realizar sustituciones" -#: ../../build/docs/basic/plpgsql_function.rst:363 +#: ../../build/docs/basic/withPoints.rst:363 msgid "The first parameter is the string to be replaced" msgstr "El primer parámetro es la cadena que debe ser sustituida" -#: ../../build/docs/basic/plpgsql_function.rst:364 +#: ../../build/docs/basic/withPoints.rst:364 msgid "The rest are the data parameters, are the strings use for replacement." msgstr "El resto son los parámetros de datos, son las cadenas para la sustitución." -#: ../../build/docs/basic/plpgsql_function.rst:366 +#: ../../build/docs/basic/withPoints.rst:366 msgid "``wrk_dijkstra`` obtains the values for the output" msgstr "``wrk_dijkstra`` obtiene los valores para la salida" -#: ../../build/docs/basic/plpgsql_function.rst:367 +#: ../../build/docs/basic/withPoints.rst:367 msgid "The ``edges_subset`` value will replace ``%1$I``:" msgstr "El valor de ``edges_subset`` sustituirá a ``%1$I``:" -#: ../../build/docs/basic/plpgsql_function.rst:368 +#: ../../build/docs/basic/withPoints.rst:368 msgid "For the ``source`` and ``target``:" msgstr "Para el ``source`` y ``target``:" -#: ../../build/docs/basic/plpgsql_function.rst:370 +#: ../../build/docs/basic/withPoints.rst:370 msgid "``wrk_Nearest`` is used to find the identifier." msgstr "``wrk_Nearest`` se utiliza para encontrar el identificador." -#: ../../build/docs/basic/plpgsql_function.rst:372 +#: ../../build/docs/basic/withPoints.rst:372 msgid "The vertices table name is formed with ``%1$I_vertices``." msgstr "El nombre de la tabla de vértices se forma con ``%1$I_vertices``." -#: ../../build/docs/basic/plpgsql_function.rst:374 +#: ../../build/docs/basic/withPoints.rst:374 msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." msgstr "" "Los valores ``lat1``, ``lon1`` sustituirán a ``%2$s, %3$s`` " "respectivamente." -#: ../../build/docs/basic/plpgsql_function.rst:375 +#: ../../build/docs/basic/withPoints.rst:375 msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." msgstr "" "Los valores ``lat2``, ``lon2`` sustituirán a ``%4$s, %5$s`` " "respectivamente." -#: ../../build/docs/basic/plpgsql_function.rst:377 +#: ../../build/docs/basic/withPoints.rst:377 msgid "To get the constructed query in form of a warning:" msgstr "Para obtener la consulta construida en forma de advertencia:" -#: ../../build/docs/basic/plpgsql_function.rst:379 +#: ../../build/docs/basic/withPoints.rst:379 msgid "The ``WARNING`` will be issued only when ``do_debug`` is true." msgstr "El ``WARNING`` se emitirá sólo cuando ``do_debug`` sea cierto." -#: ../../build/docs/basic/plpgsql_function.rst:380 +#: ../../build/docs/basic/withPoints.rst:380 msgid "No output will be generated." msgstr "No se generará ninguna salida." -#: ../../build/docs/basic/plpgsql_function.rst:398 +#: ../../build/docs/basic/withPoints.rst:398 msgid "Exercise 7: Using the main function" msgstr "Ejercicio 7: Uso de la función principal" -#: ../../build/docs/basic/plpgsql_function.rst:400 +#: ../../build/docs/basic/withPoints.rst:400 msgid "View of roads for taxis along with source and destination" msgstr "Vista de las calles para taxis junto con el origen y el destino" -#: ../../build/docs/basic/plpgsql_function.rst:406 +#: ../../build/docs/basic/withPoints.rst:406 msgid "Use ``wrk_fromAtoB``" msgstr "Usar ``wrk_fromAtoB``" -#: ../../build/docs/basic/plpgsql_function.rst:408 +#: ../../build/docs/basic/withPoints.rst:408 msgid "Departure point is: (lat,lon) = ``(-1.455829, -48.446044)``" msgstr "El punto de partida es: (lat,lon) = ``(-1.455829, -48.446044)``" -#: ../../build/docs/basic/plpgsql_function.rst:409 +#: ../../build/docs/basic/withPoints.rst:409 msgid "Destination point is: (lat,lon) = ``(-1.453448, -48.447142)``" msgstr "El punto de destino es: (lat,lon) = ``(-1.453448, -48.447142)``" -#: ../../build/docs/basic/plpgsql_function.rst:412 -#: ../../build/docs/basic/plpgsql_function.rst:420 +#: ../../build/docs/basic/withPoints.rst:412 +#: ../../build/docs/basic/withPoints.rst:420 msgid "Use with default value of ``do_debug``." msgstr "Utilizar con el valor predeterminado de ``do_debug``." -#: ../../build/docs/basic/plpgsql_function.rst:416 +#: ../../build/docs/basic/withPoints.rst:416 msgid "Use with ``do_debug`` set to ``true``." msgstr "Utilizar con ``do_debug`` establecido en ``true``." -#: ../../build/docs/basic/plpgsql_function.rst:421 +#: ../../build/docs/basic/withPoints.rst:421 msgid "Store results on a table." msgstr "Almacene los resultados en una tabla." -#: ../../build/docs/basic/plpgsql_function.rst:422 +#: ../../build/docs/basic/withPoints.rst:422 msgid "Show the table contents." msgstr "Mostrar el contenido de la tabla." -#: ../../build/docs/basic/plpgsql_function.rst:425 +#: ../../build/docs/basic/withPoints.rst:425 msgid "The function is not meant to be used with ``ways``" msgstr "La función no está destinada a ser utilizada con ``formas``" -#: ../../build/docs/basic/plpgsql_function.rst:431 +#: ../../build/docs/basic/withPoints.rst:431 msgid "The first parameter is the table name." msgstr "El primer parámetro es el nombre de la tabla." -#: ../../build/docs/basic/plpgsql_function.rst:432 +#: ../../build/docs/basic/withPoints.rst:432 msgid "" "The next two parameters are the latitude and longitude of the departure " "point." @@ -774,7 +774,7 @@ msgstr "" "Los dos siguientes dos parámetros son la latitud y longitud del punto de " "partida." -#: ../../build/docs/basic/plpgsql_function.rst:433 +#: ../../build/docs/basic/withPoints.rst:433 msgid "" "The next two parameters are the latitude and longitude of the destination" " point." @@ -782,6 +782,6 @@ msgstr "" "Los dos siguientes dos parámetros son la latitud y longitud del punto de " "destino." -#: ../../build/docs/basic/plpgsql_function.rst:446 +#: ../../build/docs/basic/withPoints.rst:446 msgid "Do a dry run by adding ``true`` to get the query that is executed." msgstr "Agregar ``true`` para obtener la consulta que es ejecutuda." diff --git a/locale/es/LC_MESSAGES/index.po b/locale/es/LC_MESSAGES/index.po index 990786071..315951505 100644 --- a/locale/es/LC_MESSAGES/index.po +++ b/locale/es/LC_MESSAGES/index.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-03-03 11:07-0600\n" -"PO-Revision-Date: 2024-11-10 15:48+0000\n" +"PO-Revision-Date: 2025-10-07 15:52+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Spanish \n" diff --git a/locale/es/LC_MESSAGES/un_sdg/sdg11-cities.po b/locale/es/LC_MESSAGES/un_sdg/sdg11-cities.po index 51fdf1864..0295aced2 100644 --- a/locale/es/LC_MESSAGES/un_sdg/sdg11-cities.po +++ b/locale/es/LC_MESSAGES/un_sdg/sdg11-cities.po @@ -314,7 +314,7 @@ msgstr "" msgid "" "The pgRouting function ``pgr_connectedComponents`` is used to complete " "this task and its explaind with more detail in " -":doc:`../basic/graph_views`." +":doc:`../basic/graphs`." msgstr "" #: ../../build/docs/un_sdg/sdg11-cities.rst:244 diff --git a/locale/es/LC_MESSAGES/un_sdg/sdg3-health.po b/locale/es/LC_MESSAGES/un_sdg/sdg3-health.po index 1ad566bbf..ac9c9a27c 100644 --- a/locale/es/LC_MESSAGES/un_sdg/sdg3-health.po +++ b/locale/es/LC_MESSAGES/un_sdg/sdg3-health.po @@ -588,12 +588,12 @@ msgstr "pgr_connectedComponents" #: ../../build/docs/un_sdg/sdg3-health.rst:423 msgid "" "To remove the disconnected components on the road network, the following " -"pgRouting functions, discussed on :doc:`../basic/graph_views`, will be " +"pgRouting functions, discussed on :doc:`../basic/graphs`, will be " "used:" msgstr "" "Para eliminar los componentes desconectados en la red de carreteras, se " "utilizarán las siguientes funciones de pgRouting, discutidas en " -":doc:`../basic/graph_views`:" +":doc:`../basic/graphs`:" #: ../../build/docs/un_sdg/sdg3-health.rst:426 msgid "``pgr_extractVertices``" diff --git a/locale/es/LC_MESSAGES/un_sdg/sdg7-energy.po b/locale/es/LC_MESSAGES/un_sdg/sdg7-energy.po index 9112f2bec..60ccd5301 100644 --- a/locale/es/LC_MESSAGES/un_sdg/sdg7-energy.po +++ b/locale/es/LC_MESSAGES/un_sdg/sdg7-energy.po @@ -181,12 +181,12 @@ msgstr "Extraer componentes conectados de carreteras" #: ../../build/docs/un_sdg/sdg7-energy.rst:99 msgid "" "To remove the disconnected components on the road network, the following " -"pgRouting functions, discussed on :doc:`../basic/graph_views`, will be " +"pgRouting functions, discussed on :doc:`../basic/graphs`, will be " "used:" msgstr "" "Para eliminar los componentes desconectados en la red de carreteras, se " "utilizarán las siguientes funciones de pgRouting, discutidas en " -":doc:`../basic/graph_views`:" +":doc:`../basic/graphs`:" #: ../../build/docs/un_sdg/sdg7-energy.rst:102 msgid "``pgr_extractVertices``" diff --git a/locale/ja/LC_MESSAGES/index.po b/locale/ja/LC_MESSAGES/index.po index ac7a3c2bc..cb069e588 100644 --- a/locale/ja/LC_MESSAGES/index.po +++ b/locale/ja/LC_MESSAGES/index.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-07-14 13:45-0500\n" -"PO-Revision-Date: 2024-11-10 15:48+0000\n" +"PO-Revision-Date: 2025-10-07 15:52+0000\n" "Last-Translator: Anonymous \n" "Language-Team: Japanese \n" diff --git a/locale/pot/basic/data.pot b/locale/pot/basic/data.pot index e4e9ce03b..752aa7e1d 100644 --- a/locale/pot/basic/data.pot +++ b/locale/pot/basic/data.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-11-28 19:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -73,7 +73,7 @@ msgid "Get the Workshop Data" msgstr "" #: ../../build/docs/basic/data.rst:58 -msgid "The pgRouting workshop will make use of OpenStreetMap data, which is already available on `OSGeoLive `_. This workshop will use the ``Belém`` city data and is a snapshot of Sep 2024." +msgid "The pgRouting workshop will make use of OpenStreetMap data, which is already available on `OSGeoLive `_. This workshop will use the ``Auckland`` city data and is a snapshot of Jun 2025." msgstr "" #: ../../build/docs/basic/data.rst:63 @@ -85,7 +85,7 @@ msgid "Option 1) When using OSGeoLive" msgstr "" #: ../../build/docs/basic/data.rst:68 -msgid "OSGeoLive comes with OSM data from the city of Belém." +msgid "OSGeoLive comes with OSM data from the city of Auckland." msgstr "" #: ../../build/docs/basic/data.rst:76 @@ -101,7 +101,7 @@ msgid "Option 3) Download using Overpass XAPI" msgstr "" #: ../../build/docs/basic/data.rst:88 -msgid "The following downloads the latest OSM data on using the same area. Using this data in the workshop can generate variations in the results, due to changes since Sep 2024." +msgid "The following downloads the latest OSM data on using the same area. Using this data in the workshop can generate variations in the results, due to changes since Jun 2025." msgstr "" #: ../../build/docs/basic/data.rst:98 @@ -129,7 +129,7 @@ msgid "the osm2pgrouting default ``mapconfig.xml`` configuration file is used" msgstr "" #: ../../build/docs/basic/data.rst:115 -msgid "and the ``~/Desktop/workshop/BELEM_BR.osm`` data" +msgid "and the ``~/Desktop/workshop/AUCKLAND_NZ.osm`` data" msgstr "" #: ../../build/docs/basic/data.rst:116 diff --git a/locale/pot/basic/graph_views.pot b/locale/pot/basic/graph_views.pot deleted file mode 100644 index e9d731e1f..000000000 --- a/locale/pot/basic/graph_views.pot +++ /dev/null @@ -1,592 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../build/docs/basic/graph_views.rst:12 -msgid "Graph views" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:18 -msgid "Chapter Contents" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:20 -msgid "Different application require different graphs. This chapter covers how to discard disconnected segments and different approaches to create graphs." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:24 -msgid "The graph requirements" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:26 -msgid "In this chapter there are three graph requirements. It consists on three graphs based on a **fully connected** graph derived from ``ways``: two for different types of vehicles and one for pedestrian, the source and the target in all of them are based on the ``source_osm`` and ``target_osm``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:31 -msgid "The description of the graphs:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:33 -msgid "Particular vehicle:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:35 -msgid "Circulate on the whole Belém area." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:37 -#: ../../build/docs/basic/graph_views.rst:46 -msgid "Do not use `steps`, `footway`, `path`, `cycleway`." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:39 -msgid "Speed is the default speed from OSM information." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:41 -msgid "Taxi vehicle:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:43 -msgid "Circulate on a smaller area:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:45 -msgid "Bounding box: ``(-48.52,-1.46,-48.45,-1.41)``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:48 -msgid "Speed is 10% slower than that of the particular vehicles." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:50 -msgid "Pedestrians:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:52 -msgid "Walk on the whole Belém area." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:53 -msgid "Can not walk on exclusive vehicle ways" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:55 -msgid "`motorways` and on `primary` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:57 -#: ../../build/docs/basic/graph_views.rst:488 -msgid "The speed is ``2 mts/sec``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:60 -msgid "pgr_extractVertices" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:62 -msgid "``pgr_extractVertices`` compute the connected components of an undirected graph using a Depth First Search approach. A connected component of an undirected graph is a set of vertices that are all reachable from each other." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:67 -#: ../../build/docs/basic/graph_views.rst:214 -msgid "Signature summary" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:75 -msgid "Description of the function can be found in `pgr_extractVertices `__" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:79 -msgid "Exercise 1: Create a vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:82 -#: ../../build/docs/basic/graph_views.rst:130 -#: ../../build/docs/basic/graph_views.rst:230 -#: ../../build/docs/basic/graph_views.rst:278 -#: ../../build/docs/basic/graph_views.rst:355 -#: ../../build/docs/basic/graph_views.rst:426 -#: ../../build/docs/basic/graph_views.rst:484 -#: ../../build/docs/basic/graph_views.rst:548 -msgid "Problem" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:83 -msgid "Create the vertices table corresponding to the edges in ``ways``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:86 -#: ../../build/docs/basic/graph_views.rst:134 -#: ../../build/docs/basic/graph_views.rst:234 -#: ../../build/docs/basic/graph_views.rst:287 -#: ../../build/docs/basic/graph_views.rst:369 -#: ../../build/docs/basic/graph_views.rst:435 -#: ../../build/docs/basic/graph_views.rst:499 -#: ../../build/docs/basic/graph_views.rst:567 -msgid "Solution" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:87 -msgid "A graph consists of a set of vertices and a set of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:88 -msgid "In this case, the ``ways`` table is a set of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:89 -msgid "In order to make use of all the graph functions from pgRouting, it is required have the set of vertices defined." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:91 -msgid "From the requirements, the graph is going to be based on OSM identifiers." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:104 -msgid "Reviewing the description of the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:114 -msgid "Inspecting the information on the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:127 -msgid "Exercise 2: Fill up other columns in the vertices table" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:131 -msgid "Fill up geometry information on the vertices table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:135 -msgid "Count the number of rows that need to be filled up." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:145 -msgid "Update the ``geom`` columns based on the ``source_osm`` column from ``ways`` table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:147 -msgid "Use the start point of the geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:158 -msgid "Not expecting to be done due to the fact that some vertices are only dead ends." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:169 -msgid "Update the ``geom`` columns based on the ``target_osm`` column from ``ways`` table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:171 -msgid "Use the end point of the geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:182 -msgid "Expecting to be done, that is the geometry column should not have a ``NULL`` value." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:194 -msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:207 -msgid "pgr_connectedComponents" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:209 -msgid "``pgr_connectedComponents`` compute the connected components of an undirected graph using a Depth First Search approach. A connected component of an undirected graph is a set of vertices that are all reachable from each other." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:222 -msgid "Description of the function can be found in `pgr_connectedComponents `__" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:227 -msgid "Exercise 3: Set components on edges and vertices tables" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:231 -msgid "Get the information about the graph components." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:235 -msgid "Create additional columns on the edges and vertices tables." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:246 -msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:248 -msgid "Use the results to store the component numbers on the vertices table. (**line 1**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:250 -msgid "Use the OSM identifiers of the vertices. (**lines 4-5**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:262 -msgid "Update the edges table with based on the component number of the vertex" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:275 -msgid "Exercise 4: Inspect the components" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:279 -msgid "Answer the following questions:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:281 -#: ../../build/docs/basic/graph_views.rst:288 -msgid "How many components are in the vertices table?" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:282 -#: ../../build/docs/basic/graph_views.rst:301 -msgid "How many components are in the edges table?" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:283 -#: ../../build/docs/basic/graph_views.rst:314 -msgid "List the 10 components with more edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:284 -#: ../../build/docs/basic/graph_views.rst:328 -msgid "Get the component with the maximum number of edges." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:290 -#: ../../build/docs/basic/graph_views.rst:303 -msgid "Count the distinct components." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:316 -msgid "Count number of rows grouped by component. (**line 1**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:317 -msgid "Inverse order to display the top 10. (**line 2**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:330 -msgid "Use the query from last question to get the maximum count" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:331 -msgid "Get the component that matches the maximum value." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:345 -msgid "Preparing the graphs" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:348 -msgid "Exercise 5: Creating a view for routing" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:350 -msgid "View of roads for vehicles" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:356 -msgid "Create a view with minimal amount of information for processing the particular vehicles." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:357 -msgid "Use the OSM identifiers on the vertices." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:358 -msgid "Routing `cost` and `reverse_cost` in terms of seconds for routing calculations." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:359 -msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:360 -#: ../../build/docs/basic/graph_views.rst:491 -msgid "Data needed in the view for further processing." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:362 -msgid "`name` The name of the segment." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:363 -msgid "`length_m` The length in meters rename to ``length``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:364 -msgid "`the_geom` The geometry rename to ``geom``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:366 -#: ../../build/docs/basic/graph_views.rst:496 -msgid "Verify the number of edges was reduced." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:370 -#: ../../build/docs/basic/graph_views.rst:436 -#: ../../build/docs/basic/graph_views.rst:500 -msgid "Creating the view:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:372 -msgid "If you need to reconstruct the view, first drop it using the command on **line 1**." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:374 -msgid "Get the component with maximum number of edges (**lines 6-10**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:375 -msgid "The `source` and `target` requirements for the function are to be with OSM identifiers. (line **14**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:377 -msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:378 -msgid "The additional parameters ``length_m`` and ``the_geom`` are renamed, ``name`` is also included. (line **16**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:380 -msgid "``JOIN`` with the `configuration`:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:382 -msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:395 -msgid "Verification:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:397 -msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:407 -msgid "Get the description of the view" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:419 -msgid "Exercise 6: Limiting the road network within an area" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:421 -msgid "View of smaller set of roads for vehicles" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:427 -msgid "Create a view ``taxi_net`` for the `taxi`:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:429 -msgid "The taxi can only circulate inside this Bounding Box: ``(-48.52,-1.46,-48.45,-1.41)``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:430 -msgid "The taxi speed is 10% slower than the particular vehicle." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:432 -msgid "Verify the reduced number of road segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:438 -msgid "Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of the particular vehicle. (line **7**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:440 -msgid "The graph for the taxi is a subset of the ``vehicle_net`` graph. (line **9**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:441 -msgid "Can only circulate inside the bounding box: ``(-48.52,-1.46,-48.45,-1.41)``. (line **10**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:455 -msgid "Count the rows on ``taxi_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:466 -#: ../../build/docs/basic/graph_views.rst:529 -msgid "Get the description." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:477 -msgid "Exercise 7: Creating a materialized view for routing pedestrians" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:479 -msgid "View of roads for pedestrians" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:485 -msgid "Create a materialized view with minimal amount of information for processing pedestrians." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:486 -msgid "Routing `cost` and `reverse_cost` will be on seconds for routing calculations." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:490 -msgid "Exclude `motorway` , `primary` and `secondary` segments." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:493 -msgid "`length_m` The length in meters." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:494 -msgid "`the_geom` The geometry." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:502 -msgid "Similar to `Exercise 5: Creating a view for routing`_:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:504 -msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 mts/sec``. (line **7**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:505 -msgid "Exclude `motorway`, `primary` and `secondary` . (line **11**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:518 -msgid "Count the rows on the view ``walk_net``." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:541 -msgid "Exercise 8: Testing the views for routing" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:543 -msgid "From the |ch7_place_1| to the |ch7_place_2|" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:549 -msgid "Test the created views" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:551 -msgid "In particular:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:553 -msgid "From the |ch7_place_1| to the \"|ch7_place_2| using the OSM identifier" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:554 -msgid "the views to be tested are:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:556 -msgid "``vehicle_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:557 -msgid "``taxi_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:558 -msgid "``walk_net``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:560 -msgid "Only show the following results, as the other columns are to be ignored on the function." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:562 -msgid "``seq``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:563 -msgid "``edge`` with the name ``id``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:564 -msgid "``cost`` with the name: ``seconds``" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:568 -msgid "In general" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:570 -msgid "The departure is |ch7_place_1| with OSM identifier |ch7_osmid_1|." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:571 -msgid "The destination is |ch7_place_2| with OSM identifier |ch7_osmid_2|." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:573 -msgid "For ``vehicle_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:575 -msgid "``vehicle_net`` is used." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:576 -msgid "Selection of the columns with the corresponding names are on line **1**." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:577 -msgid "The view is prepared with the column names that pgRouting use." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:579 -msgid "There is no need to rename columns. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:581 -msgid "The OSM identifiers of the departure and destination are used. (line **4**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:594 -msgid "For ``taxi_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:596 -msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:597 -msgid "The results give the same route as with ``vehicle_net`` but ``cost`` is higher." -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:610 -msgid "For ``walk_net``:" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:612 -msgid "Similar as the previous one but with ``walk_net``. (line **3**)" -msgstr "" - -#: ../../build/docs/basic/graph_views.rst:613 -msgid "The results give a different route than of the vehicles." -msgstr "" diff --git a/locale/pot/basic/graphs.pot b/locale/pot/basic/graphs.pot new file mode 100644 index 000000000..5f1f68d9c --- /dev/null +++ b/locale/pot/basic/graphs.pot @@ -0,0 +1,679 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-03 17:35+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../build/docs/basic/graphs.rst:12 +msgid "Graphs" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:18 +msgid "Chapter Contents" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:20 +msgid "Different application require different graphs. This chapter covers how to discard disconnected segments and different approaches to create graphs." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:23 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:25 +msgid "`pgr_extractVertices`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:26 +msgid "`pgr_connectedComponents`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:27 +msgid "`pgr_dijkstraCostMatrix`_" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:30 +msgid "The graph requirements" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:32 +msgid "In this chapter there are three graph requirements. It consists on three graphs based on a **fully connected** graph derived from ``ways``: two for different types of vehicles and one for pedestrian, the source and the target in all of them are based on the ``source`` and ``target``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:37 +msgid "The description of the graphs:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:39 +msgid "Particular vehicle:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:41 +msgid "Circulate on the whole Auckland area." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:43 +#: ../../build/docs/basic/graphs.rst:52 +msgid "Do not use `pedestrian`, `steps`, `footway`, `path`, `cycleway`" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:45 +msgid "Speed is the default speed from OSM information." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:47 +msgid "Taxi vehicle:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:49 +msgid "Circulate on a smaller area:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:51 +msgid "Bounding box: ``(174.775,-36.855,174.76,-36.84)``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:54 +msgid "Speed is 10% slower than that of the particular vehicles." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:56 +msgid "Pedestrians:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:58 +msgid "Walk on the whole Auckland area." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:59 +msgid "Can only use pedestrian only ways:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:61 +msgid "`pedestrian`, `steps`, `footway`, `path`, `cycleway`" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:63 +msgid "The walking speed is ``2 mts/sec``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:66 +msgid "Configuration from osm2pgrouting" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:68 +msgid "When dealing with data, being aware of what kind of data is being used can improve results." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:71 +msgid "Vehicles can not circulate on pedestrian ways" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:78 +msgid "Penalizing or removal of pedestrian ways will make the results closer to reality." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:80 +msgid "When converting data from OSM format using the `osm2pgrouting` tool, there is an additional table: ``configuration``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:84 +msgid "The ``configuration`` table structure can be obtained with the following command." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:93 +msgid "tag_id values" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:99 +msgid "In the image above there is a detail of the ``tag_id`` of the roads." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:103 +msgid "The `OSM highway `__ types:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:113 +msgid "Also, on the ``ways`` table there is a column that can be used to ``JOIN`` with the ``configuration`` table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:116 +msgid "The configuration types in the Auckland data" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:126 +msgid "pgr_extractVertices" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:128 +msgid "``pgr_extractVertices`` extracting the vertex information of the set of edges of a graph." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:132 +#: ../../build/docs/basic/graphs.rst:296 +#: ../../build/docs/basic/graphs.rst:626 +msgid "Signature summary" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:140 +msgid "Description of the function can be found in `pgr_extractVertices `__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:144 +msgid "Exercise 1: Create a vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:147 +#: ../../build/docs/basic/graphs.rst:196 +#: ../../build/docs/basic/graphs.rst:312 +#: ../../build/docs/basic/graphs.rst:358 +#: ../../build/docs/basic/graphs.rst:433 +#: ../../build/docs/basic/graphs.rst:504 +#: ../../build/docs/basic/graphs.rst:562 +#: ../../build/docs/basic/graphs.rst:644 +msgid "Problem" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:148 +msgid "Create the vertices table corresponding to the edges in ``ways``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:151 +#: ../../build/docs/basic/graphs.rst:200 +#: ../../build/docs/basic/graphs.rst:316 +#: ../../build/docs/basic/graphs.rst:367 +#: ../../build/docs/basic/graphs.rst:447 +#: ../../build/docs/basic/graphs.rst:513 +#: ../../build/docs/basic/graphs.rst:579 +#: ../../build/docs/basic/graphs.rst:657 +msgid "Solution" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:152 +msgid "A graph consists of a set of vertices and a set of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:153 +msgid "In this case, the ``ways`` table is a set of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:154 +msgid "In order to make use of all the graph functions from pgRouting, it is required have the set of vertices defined." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:156 +msgid "From the requirements, a fully connected graph is needed, therefore adding a ``component`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:170 +msgid "Reviewing the description of the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:180 +msgid "Inspecting the information on the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:193 +msgid "Exercise 2: Fill up other columns in the vertices table" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:197 +msgid "Fill up geometry information on the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:201 +msgid "Count the number of rows that need to be filled up." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:212 +msgid "Update the ``geom`` and ``osm_id`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:213 +msgid "The update based on the ``source`` column from ``ways`` table and the ``id`` column of the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:215 +msgid "To update ``geom`` column, use the start point of the geometry on the ``ways`` table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:217 +msgid "Use the ``source_osm`` value to fill up ``osm_id`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:225 +#: ../../build/docs/basic/graphs.rst:255 +#: ../../build/docs/basic/graphs.rst:282 +#: ../../build/docs/basic/graphs.rst:474 +msgid "Verification" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:230 +msgid "Not expecting to be done due to the fact that some vertices are dead ends." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:242 +msgid "Continue update the ``geom`` and ``osm_id`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:243 +msgid "The update based on the ``target`` column from ``ways`` table and the ``id`` column of the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:245 +msgid "To update ``geom`` column, use the end point of the geometry on the ``ways`` table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:247 +msgid "Use the ``target_osm`` value to fill up ``osm_id`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:260 +msgid "Expecting to be done, that is the geometry column should not have a ``NULL`` value." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:273 +msgid "Update the ``x`` and ``y`` columns" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:274 +msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:289 +msgid "pgr_connectedComponents" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:291 +msgid "``pgr_connectedComponents`` compute the connected components of an undirected graph using a Depth First Search approach. A connected component of an undirected graph is a set of vertices that are all reachable from each other." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:304 +msgid "Description of the function can be found in `pgr_connectedComponents `__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:309 +msgid "Exercise 3: Set components on edges and vertices tables" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:313 +msgid "Get the information about the graph components." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:317 +msgid "Create additional columns on the edges tables." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:329 +msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:330 +msgid "Use the results to store the component numbers on the vertices table." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:343 +msgid "Update the edges table with based on the component number of the vertex" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:355 +msgid "Exercise 4: Inspect the components" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:359 +msgid "Answer the following questions:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:361 +msgid "How many components are in the vertices table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:362 +msgid "How many components are in the edges table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:363 +msgid "List the 10 components with more edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:364 +msgid "Get the component with the maximum number of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:369 +msgid "1. How many components are in the vertices table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:370 +#: ../../build/docs/basic/graphs.rst:383 +msgid "Count the distinct components." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:382 +msgid "2. How many components are in the edges table?" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:395 +msgid "3. List the 10 components with more edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:396 +msgid "Count number of rows grouped by component. (**line 1**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:397 +msgid "Inverse order to display the top 10. (**line 2**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:409 +msgid "4. Get the component with the maximum number of edges." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:410 +msgid "Use the query from last question to get the maximum count" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:411 +msgid "Get the component that matches the maximum value." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:423 +msgid "Preparing the graphs" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:426 +msgid "Exercise 5: Creating a view for routing" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:428 +msgid "View of roads for vehicles" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:434 +msgid "Create a view with minimal amount of information for processing the particular vehicles." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:435 +msgid "Routing `cost` and `reverse_cost` in terms of seconds for routing calculations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:436 +msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:437 +#: ../../build/docs/basic/graphs.rst:571 +msgid "Data needed in the view for further processing." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:439 +msgid "``name`` The name of the segment." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:440 +msgid "``length_m`` The length in meters rename to ``length``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:441 +msgid "``the_geom`` The geometry rename to ``geom``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:442 +msgid "``tag_id`` Keep as is." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:444 +#: ../../build/docs/basic/graphs.rst:576 +msgid "Verify the number of edges was reduced." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:448 +#: ../../build/docs/basic/graphs.rst:514 +#: ../../build/docs/basic/graphs.rst:580 +msgid "Creating the view:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:450 +msgid "If you need to reconstruct the view, first drop it using the command on **line 1**." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:452 +msgid "Get the component with maximum number of edges (**lines 6-10**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:453 +msgid "The `source` and `target` requirements for the function are to be with OSM identifiers. (line **14**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:455 +msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:456 +msgid "The additional parameters ``length_m`` and ``the_geom`` are renamed, ``name`` is also included. (line **16**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:458 +msgid "``JOIN`` with the `configuration`:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:460 +msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:475 +msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:485 +msgid "Get the description of the view" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:497 +msgid "Exercise 6: Limiting the road network within an area" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:499 +msgid "View of smaller set of roads for vehicles" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:505 +msgid "Create a view ``taxi_net`` for the `taxi`:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:507 +msgid "The taxi can only circulate inside this Bounding Box: ``(174.775,-36.855,174.76,-36.84)``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:508 +msgid "The taxi speed is 10% slower than the particular vehicle." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:510 +msgid "Verify the reduced number of road segments." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:516 +msgid "Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of the particular vehicle. (line **7**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:518 +msgid "The graph for the taxi is a subset of the ``vehicle_net`` graph. (line **9**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:519 +msgid "Can only circulate inside the bounding box: ``(174.775,-36.855,174.76,-36.84)``. (line **10**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:533 +msgid "Count the rows on ``taxi_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:544 +#: ../../build/docs/basic/graphs.rst:610 +msgid "Get the description." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:555 +msgid "Exercise 7: Creating a materialized view for routing pedestrians" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:557 +msgid "View of roads for pedestrians" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:563 +msgid "Create a materialized view with minimal amount of information for processing pedestrians." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:565 +msgid "Routing `cost` and `reverse_cost` will be on seconds for routing calculations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:567 +msgid "The speed is ``2 mts/sec``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:569 +msgid "Only include the pedestrian only roads: ``pedestrian``, ``steps``, ``footway``, ``path``, ``cycleway``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:573 +msgid "``length_m`` The length in meters." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:574 +msgid "``the_geom`` The geometry." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:582 +msgid "Similar to `Exercise 5: Creating a view for routing`_:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:584 +msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 mts/sec``. (line **7**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:586 +msgid "Exclude ``motorway``, ``primary`` and ``secondary`` . (line **11**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:599 +msgid "Count the rows on the view ``walk_net``." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:621 +msgid "pgr_dijkstraCostMatrix" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:623 +msgid "``pgr_dijkstraCostMatrix`` Calculates a cost matrix using Dijkstra algorithm." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:634 +msgid "Description of the function can be found in `pgr_dijkstraCostMatrix `__" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:638 +msgid "Exercise 8: Testing the views" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:645 +msgid "Test the created views" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:647 +msgid "In particular:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:649 +msgid "Get a traveling cost matrix in seconds from all locations to all locations." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:650 +msgid "the views to be tested are:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:652 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:653 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:654 +msgid "``walk_net``" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:658 +msgid "The locations are:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:660 +msgid "|id_1|, |id_2|, |id_3|, |id_4| and |id_5|." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:661 +msgid "Passed as an array to the function." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:663 +msgid "For ``vehicle_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:665 +msgid "``vehicle_net`` is used." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:666 +msgid "Selection of the columns with the corresponding names are on line **1**." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:667 +msgid "The view is prepared with the column names that pgRouting use." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:669 +msgid "There is no need to rename columns. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:671 +msgid "The OSM identifiers of the departure and destination are used. (line **4**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:684 +msgid "For ``taxi_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:686 +msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:687 +msgid "The results give the same route as with ``vehicle_net`` but ``cost`` is higher." +msgstr "" + +#: ../../build/docs/basic/graphs.rst:700 +msgid "For ``walk_net``:" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:702 +msgid "Similar as the previous one but with ``walk_net``. (line **3**)" +msgstr "" + +#: ../../build/docs/basic/graphs.rst:703 +msgid "The results give a different route than of the vehicles." +msgstr "" diff --git a/locale/pot/basic/pedestrian.pot b/locale/pot/basic/pedestrian.pot index 36b7ac5f6..92d56079c 100644 --- a/locale/pot/basic/pedestrian.pot +++ b/locale/pot/basic/pedestrian.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" +"POT-Creation-Date: 2025-11-28 19:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -24,367 +24,340 @@ msgstr "" msgid "**pgRouting** was first called *pgDijkstra*, because it implemented only shortest path search with *Dijkstra* algorithm. Later other functions were added and the library was renamed to pgRouting." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:22 +#: ../../build/docs/basic/pedestrian.rst:21 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:23 +msgid "`pgr_dijkstra`_" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:24 +msgid "`pgr_dijkstraCost`_" +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:26 msgid "Chapter Contents" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:25 +#: ../../build/docs/basic/pedestrian.rst:29 msgid "pgr_dijkstra" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:27 +#: ../../build/docs/basic/pedestrian.rst:31 msgid "Dijkstra algorithm was the first algorithm implemented in pgRouting. It doesn't require other attributes than the identifiers ``id``, ``source`` and ``target`` and the weights ``cost`` and ``reverse_cost``." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:31 +#: ../../build/docs/basic/pedestrian.rst:35 msgid "You can specify when to consider the graph as `directed `__ or undirected." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:35 -#: ../../build/docs/basic/pedestrian.rst:282 +#: ../../build/docs/basic/pedestrian.rst:39 +#: ../../build/docs/basic/pedestrian.rst:285 msgid "Signature Summary" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:47 +#: ../../build/docs/basic/pedestrian.rst:51 msgid "Description of the function can be found in `pgr_dijkstra `__." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:51 +#: ../../build/docs/basic/pedestrian.rst:55 msgid "Many pgRouting functions have ``sql::text`` as one of their arguments. While this may look confusing at first, it makes the functions very flexible as the user can pass a ``SELECT`` statement as function argument as long as the returned result contains the required number of attributes and the correct attribute names." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:56 +#: ../../build/docs/basic/pedestrian.rst:60 msgid "Most of pgRouting implemented algorithms do not require the **geometry**." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:57 +#: ../../build/docs/basic/pedestrian.rst:61 msgid "The pgRouting functions **do not** return a geometry, but only an ordered list of nodes or edges." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:61 +#: ../../build/docs/basic/pedestrian.rst:65 msgid "Identifiers for the Queries" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:62 -msgid "The assignment of the vertices identifiers on the source and target columns may be different, the following exercises will use the results of this query. For the workshop, some locations near of the FOSS4G event are going to be used. These locations are within this area https://www.openstreetmap.org/#map=14/-1.44228/-48.46069" +#: ../../build/docs/basic/pedestrian.rst:66 +msgid "The assignment of the vertices identifiers on the source and target columns may be different, the following exercises will use the results of this query. For the workshop, some locations near of the FOSS4G event are going to be used. These locations are within this area https://www.openstreetmap.org/#map=16/-36.8520950/174.7631803" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:67 +#: ../../build/docs/basic/pedestrian.rst:71 msgid "|osmid_1| |place_1|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:68 +#: ../../build/docs/basic/pedestrian.rst:72 msgid "|osmid_2| |place_2|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:69 +#: ../../build/docs/basic/pedestrian.rst:73 msgid "|osmid_3| |place_3|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:70 +#: ../../build/docs/basic/pedestrian.rst:74 msgid "|osmid_4| |place_4|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:71 +#: ../../build/docs/basic/pedestrian.rst:75 msgid "|osmid_5| |place_5|" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:74 +#: ../../build/docs/basic/pedestrian.rst:78 msgid "Connect to the database, if not connected:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:80 +#: ../../build/docs/basic/pedestrian.rst:84 msgid "Get the vertex identifiers" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:91 +#: ../../build/docs/basic/pedestrian.rst:95 msgid "|osmid_1| |place_1| (|id_1|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:92 +#: ../../build/docs/basic/pedestrian.rst:96 msgid "|osmid_2| |place_2| (|id_2|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:93 +#: ../../build/docs/basic/pedestrian.rst:97 msgid "|osmid_3| |place_3| (|id_3|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:94 +#: ../../build/docs/basic/pedestrian.rst:98 msgid "|osmid_4| |place_4| (|id_4|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:95 +#: ../../build/docs/basic/pedestrian.rst:99 msgid "|osmid_5| |place_5| (|id_5|)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:98 -msgid "The corresponding :code:`id` are shown in the following image, and a sample route from \"|place_3|\" to \"|place_5|\"." +#: ../../build/docs/basic/pedestrian.rst:102 +msgid "The corresponding :code:`id` are shown in the following image, and a sample route from \"|place_3|\" to \"|place_1|\"." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:105 +#: ../../build/docs/basic/pedestrian.rst:109 msgid "Exercise 1: Single pedestrian routing" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:108 -#: ../../build/docs/basic/pedestrian.rst:150 -#: ../../build/docs/basic/pedestrian.rst:182 -#: ../../build/docs/basic/pedestrian.rst:214 -#: ../../build/docs/basic/pedestrian.rst:248 -#: ../../build/docs/basic/pedestrian.rst:302 -#: ../../build/docs/basic/pedestrian.rst:338 +#: ../../build/docs/basic/pedestrian.rst:112 +#: ../../build/docs/basic/pedestrian.rst:152 +#: ../../build/docs/basic/pedestrian.rst:183 +#: ../../build/docs/basic/pedestrian.rst:218 +#: ../../build/docs/basic/pedestrian.rst:251 +#: ../../build/docs/basic/pedestrian.rst:305 msgid "Problem:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:109 -#: ../../build/docs/basic/pedestrian.rst:151 -#: ../../build/docs/basic/pedestrian.rst:183 -#: ../../build/docs/basic/pedestrian.rst:215 -#: ../../build/docs/basic/pedestrian.rst:249 -#: ../../build/docs/basic/pedestrian.rst:303 -#: ../../build/docs/basic/pedestrian.rst:339 +#: ../../build/docs/basic/pedestrian.rst:113 +#: ../../build/docs/basic/pedestrian.rst:153 +#: ../../build/docs/basic/pedestrian.rst:184 +#: ../../build/docs/basic/pedestrian.rst:219 +#: ../../build/docs/basic/pedestrian.rst:252 +#: ../../build/docs/basic/pedestrian.rst:306 msgid "Walking" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:111 +#: ../../build/docs/basic/pedestrian.rst:115 msgid "from \"|place_1|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:112 +#: ../../build/docs/basic/pedestrian.rst:116 msgid "to \"|place_3|\"." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:114 -msgid "Calculate routes with costs in *osm2pgRouting* ``length`` default units." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:116 -msgid "From the |place_1| to the |place_3|" +#: ../../build/docs/basic/pedestrian.rst:118 +msgid "Calculate routes with costs in ``length`` in meters." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:121 -#: ../../build/docs/basic/pedestrian.rst:163 -#: ../../build/docs/basic/pedestrian.rst:194 -#: ../../build/docs/basic/pedestrian.rst:226 -#: ../../build/docs/basic/pedestrian.rst:260 -#: ../../build/docs/basic/pedestrian.rst:315 -#: ../../build/docs/basic/pedestrian.rst:347 +#: ../../build/docs/basic/pedestrian.rst:124 +#: ../../build/docs/basic/pedestrian.rst:164 +#: ../../build/docs/basic/pedestrian.rst:198 +#: ../../build/docs/basic/pedestrian.rst:230 +#: ../../build/docs/basic/pedestrian.rst:263 +#: ../../build/docs/basic/pedestrian.rst:317 msgid "Solution:" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:122 -msgid "The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines **9** and **10**)." +#: ../../build/docs/basic/pedestrian.rst:125 +msgid "The pedestrian wants to go from vertex |id_1| to vertex |id_3| (lines **5** and **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:123 -msgid "The pedestrian's cost is in terms of length. In this case ``length`` (line **6**), which was calculated by osm2pgrouting, is in unit ``degrees``." +#: ../../build/docs/basic/pedestrian.rst:126 +msgid "The pedestrian's cost is in terms of length. In this case ``length`` (line **3**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:125 -msgid "From a pedestrian perspective the graph is ``undirected`` (line **11**), that is, the pedestrian can move in both directions on all segments." +#: ../../build/docs/basic/pedestrian.rst:127 +msgid "From a pedestrian perspective the graph is ``undirected`` (line **7**), that is, the pedestrian can move in both directions on all segments." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:139 -msgid "The returned cost attribute represents the cost specified in the inner SQL query (``edges_sql::text`` argument). In this example cost is ``length`` in unit \"degrees\". Cost may be time, distance or any combination of both or any other attributes or a custom formula." +#: ../../build/docs/basic/pedestrian.rst:141 +msgid "The returned cost attribute represents the cost specified in the inner SQL query (``edges_sql::text`` argument). In this example cost is ``length`` in unit \"meters\". Cost may be time, distance or any combination of both or any other attributes or a custom formula." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:143 +#: ../../build/docs/basic/pedestrian.rst:145 msgid "``node`` and ``edge`` results may vary depending on the assignment of the identifiers to the vertices given by osm2pgrouting." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:147 +#: ../../build/docs/basic/pedestrian.rst:149 msgid "Exercise 2: Many Pedestrians going to the same destination" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:153 -#: ../../build/docs/basic/pedestrian.rst:217 +#: ../../build/docs/basic/pedestrian.rst:155 +#: ../../build/docs/basic/pedestrian.rst:221 msgid "from \"|place_1|\" and \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:154 -msgid "to the \"|place_3|\"." -msgstr "" - #: ../../build/docs/basic/pedestrian.rst:156 -msgid "Calculate routes with costs in *osm2pgRouting* ``length_m`` which is in meters." +msgid "to the \"|place_3|\"." msgstr "" #: ../../build/docs/basic/pedestrian.rst:158 -msgid "From |place_1| and |place_2| to |place_3|" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:164 -msgid "The pedestrians are departing at vertices |id_1| and |id_2| (line **9**)." +msgid "Calculate routes with costs in ``length`` in kilometers." msgstr "" #: ../../build/docs/basic/pedestrian.rst:165 -msgid "All pedestrians want to go to vertex |id_3| (line **10**)." +msgid "The pedestrians are departing at vertices |id_1| and |id_2| (line **5**)." msgstr "" #: ../../build/docs/basic/pedestrian.rst:166 -msgid "The cost to be in meters using attribute ``length_m`` (line **6**)." +msgid "All pedestrians want to go to vertex |id_3| (line **6**)." +msgstr "" + +#: ../../build/docs/basic/pedestrian.rst:167 +msgid "The cost to be in kilometers using attribute ``length`` (line **3**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:179 +#: ../../build/docs/basic/pedestrian.rst:180 msgid "Exercise 3: Many Pedestrians departing from the same location" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:185 +#: ../../build/docs/basic/pedestrian.rst:186 msgid "from \"|place_3|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:186 +#: ../../build/docs/basic/pedestrian.rst:187 msgid "to \"|place_1|\" and \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:188 -msgid "Calculate routes with costs in seconds." +#: ../../build/docs/basic/pedestrian.rst:189 +msgid "Calculate routes using the ``cost`` which is in seconds for a walking speed of ``2 mts/sec``." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:195 -msgid "All pedestrians are departing from vertex |id_3| (line **9**)." +#: ../../build/docs/basic/pedestrian.rst:192 +msgid "See :doc:`graphs` for the costs setup." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:196 -msgid "Pedestrians want to go to locations |id_1| and |id_2| (line **10**)." +#: ../../build/docs/basic/pedestrian.rst:199 +msgid "All pedestrians are departing from vertex |id_3| (line **5**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:197 -msgid "The cost to be in seconds, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` (line **6**)." +#: ../../build/docs/basic/pedestrian.rst:200 +msgid "Pedestrians want to go to locations |id_1| and |id_2| (line **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:211 -msgid "Exercise 4: Many Pedestrians going to different destinations" +#: ../../build/docs/basic/pedestrian.rst:201 +msgid "The ``cost`` column on ``walk_net`` is in seconds. (line **3**)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:218 -msgid "to \"|place_4|\" and \"|place_5|\"" +#: ../../build/docs/basic/pedestrian.rst:215 +msgid "Exercise 4: Many Pedestrians going to different destinations" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:220 -#: ../../build/docs/basic/pedestrian.rst:254 -msgid "Calculate routes with costs in minutes." +#: ../../build/docs/basic/pedestrian.rst:222 +msgid "to \"|place_4|\" and \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:227 -#: ../../build/docs/basic/pedestrian.rst:316 -#: ../../build/docs/basic/pedestrian.rst:348 -msgid "The pedestrians depart from |id_1| and |id_2| (line **9**)." +#: ../../build/docs/basic/pedestrian.rst:224 +#: ../../build/docs/basic/pedestrian.rst:257 +msgid "Calculate routes with costs in minutes at walking speed ``s = 1.3 m/s``." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:228 -#: ../../build/docs/basic/pedestrian.rst:317 -#: ../../build/docs/basic/pedestrian.rst:349 -msgid "The pedestrians want to go to destinations |id_4| and |id_5| (line **10**)." +#: ../../build/docs/basic/pedestrian.rst:231 +#: ../../build/docs/basic/pedestrian.rst:318 +msgid "The pedestrians depart from |id_1| and |id_2| (line **5**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:229 -#: ../../build/docs/basic/pedestrian.rst:318 -msgid "The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s`` (line **6**)." +#: ../../build/docs/basic/pedestrian.rst:232 +#: ../../build/docs/basic/pedestrian.rst:319 +msgid "The pedestrians want to go to destinations |id_4| and |id_5| (line **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:230 -#: ../../build/docs/basic/pedestrian.rst:351 -msgid "Result adds the costs per destination." +#: ../../build/docs/basic/pedestrian.rst:233 +#: ../../build/docs/basic/pedestrian.rst:266 +#: ../../build/docs/basic/pedestrian.rst:320 +msgid "The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s``." msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:1 +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:1 msgid "Inspecting the results, looking for totals (edge = -1):" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:3 -msgid "From 20297 to vertex 6548 takes 92.58 minutes (seq = 147)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:3 +msgid "From 10832 to vertex 11046 takes 9.82 minutes (seq = 134)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:5 -msgid "From 20297 to vertex 12712 takes 83.18 minutes (seq = 267)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:5 +msgid "From 10832 to vertex 14824 takes 10.85 minutes (seq = 185)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:7 -msgid "From 23872 to vertex 6548 takes 76.26 minutes (seq = 385)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:7 +msgid "From 593 to vertex 11046 takes 9.07 minutes (seq = 50)" msgstr "" -#: ../../build/docs/scripts/basic/chapter_5/note_1.txt:9 -msgid "From 23872 to vertex 12712 takes 67.76 minutes (seq = 495)" +#: ../../build/docs/scripts/basic/pedestrian/note_1.txt:9 +msgid "From 593 to vertex 14824 takes 9.04 minutes (seq = 85)" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:245 +#: ../../build/docs/basic/pedestrian.rst:248 msgid "Exercise 5: Combination of routes" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:251 +#: ../../build/docs/basic/pedestrian.rst:254 msgid "First pedestrian goes from \"|place_1|\" to \"|place_4|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:252 +#: ../../build/docs/basic/pedestrian.rst:255 msgid "Second pedestrian goes from \"|place_2|\" to \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:261 -msgid "First pedestrian departs from |id_1| and the destination is |id_4| (line **11**)." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:262 -msgid "Second pedestrian departs from |id_2| and the destination is |id_5| (line **12**)." +#: ../../build/docs/basic/pedestrian.rst:264 +msgid "First pedestrian departs from |id_1| and the destination is |id_4| (line **6**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:263 -msgid "The cost to be in minutes, with a walking speed ``s = 1.3 m/s`` and ``t = d/s``" +#: ../../build/docs/basic/pedestrian.rst:265 +msgid "Second pedestrian departs from |id_2| and the destination is |id_5| (line **7**)." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:276 +#: ../../build/docs/basic/pedestrian.rst:279 msgid "pgr_dijkstraCost" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:278 +#: ../../build/docs/basic/pedestrian.rst:281 msgid "When the main goal is to calculate the total cost, without \"inspecting\" the `pgr_dijkstra` results, using ``pgr_dijkstraCost`` returns a more compact result." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:294 +#: ../../build/docs/basic/pedestrian.rst:297 msgid "Description of the parameters can be found in `pgr_dijkstraCost `__" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:299 +#: ../../build/docs/basic/pedestrian.rst:302 msgid "Exercise 6: Time for many Pedestrians going to different destinations" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:305 -#: ../../build/docs/basic/pedestrian.rst:341 +#: ../../build/docs/basic/pedestrian.rst:308 msgid "from \"|place_1|\" or \"|place_2|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:306 -#: ../../build/docs/basic/pedestrian.rst:342 +#: ../../build/docs/basic/pedestrian.rst:309 msgid "to \"|place_4|\" or \"|place_5|\"" msgstr "" -#: ../../build/docs/basic/pedestrian.rst:308 +#: ../../build/docs/basic/pedestrian.rst:311 msgid "Get only the cost in minutes." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:310 -msgid "From the hotels to the |place_4| and |place_5|" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:319 +#: ../../build/docs/basic/pedestrian.rst:321 msgid "Result as aggregated costs." msgstr "" -#: ../../build/docs/basic/pedestrian.rst:331 +#: ../../build/docs/basic/pedestrian.rst:333 msgid "Compare with `Exercise 4: Many Pedestrians going to different destinations`_ 's note." msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:335 -msgid "Exercise 7: Many Pedestrians going to different destinations summarizing the total costs per departure" -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:344 -msgid "Summarize cost in minutes." -msgstr "" - -#: ../../build/docs/basic/pedestrian.rst:350 -msgid "The cost to be in minutes, with a walking speed s = 1.3 m/s and t = d/s (line **6**)." -msgstr "" - -#: ../../build/docs/scripts/basic/chapter_5/note_2.txt:1 -msgid "An interpretation of the result can be: In general, it is faster to depart from \"Instituto Federal do Pará, Campus Belém\" than from \"Hangar Convention Center\"" -msgstr "" diff --git a/locale/pot/basic/plpgsql_function.pot b/locale/pot/basic/plpgsql_function.pot deleted file mode 100644 index 2d0f13b4a..000000000 --- a/locale/pot/basic/plpgsql_function.pot +++ /dev/null @@ -1,690 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../../build/docs/basic/plpgsql_function.rst:11 -msgid "pl/pgsql function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:17 -msgid "Other kind of functions are `pl/pgsql `__. As the applications requirements become more complex, using wrappers of previously defined functions becomes necessary for clarity." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:22 -msgid "Chapter contents" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:25 -msgid "Requirements for routing from A to B" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:28 -msgid "Chapter problem:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:29 -msgid "Create a function ``wrk_fromAtoB`` that allows routing from 2 geometries." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:30 -msgid "The function takes latitude/longitude points as input parameters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:31 -msgid "Returns a route that includes a geometry so that if can be displayed, for example, in QGIS." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:32 -msgid "Will also return some other attributes." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:34 -msgid "The detailed description:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:37 -msgid "Input parameters" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -msgid "Parameter" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 -msgid "type" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:39 -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 -#: ../../build/docs/basic/plpgsql_function.rst:214 -msgid "Description" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -msgid "``edges_subset``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "REGCLASS" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:41 -msgid "Edge table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -msgid "``lat1``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -#: ../../build/docs/basic/plpgsql_function.rst:43 -#: ../../build/docs/basic/plpgsql_function.rst:44 -#: ../../build/docs/basic/plpgsql_function.rst:45 -#: ../../build/docs/basic/plpgsql_function.rst:207 -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "NUMERIC" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:42 -msgid "The latitude of the `departure` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:43 -msgid "``lon1``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:43 -msgid "The longitude of the `departure` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:44 -msgid "``lat2``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:44 -msgid "The latitude of the `destination` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:45 -msgid "``lon2``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:45 -msgid "The longitude of the `destination` point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "``do_debug``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "BOOLEAN" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:46 -msgid "Flag to create a ``WARNING`` with the query that is been executed" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:52 -msgid "Output columns" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:54 -#: ../../build/docs/basic/plpgsql_function.rst:204 -msgid "Column" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:56 -msgid "``seq``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:56 -msgid "For ordering purposes." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:57 -msgid "``gid``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:57 -msgid "The edge identifier that can be used to JOIN the results to the ``ways`` table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:58 -msgid "``name``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:58 -msgid "The street name." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:59 -msgid "``azimuth``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:59 -msgid "Between start and end node of an edge." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:60 -msgid "``length``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:60 -msgid "In meters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:61 -msgid "``minutes``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:61 -msgid "Minutes taken to traverse the segment." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:62 -msgid "``route_geom``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:62 -msgid "The road geometry with corrected directionality." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:66 -msgid "For this chapter, the following points will be used for testing." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:68 -msgid "(lat,lon) = (-1.455829, -48.446044)" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:69 -msgid "(lat,lon) = (-1.453448, -48.447142)" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:72 -msgid "The Vertices Table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:74 -msgid "Graphs have a `set of edges` and a `set of vertices` associated to it. The views need their vertices table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:78 -msgid "Exercise 1: Create vertices table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:81 -#: ../../build/docs/basic/plpgsql_function.rst:128 -#: ../../build/docs/basic/plpgsql_function.rst:193 -#: ../../build/docs/basic/plpgsql_function.rst:256 -#: ../../build/docs/basic/plpgsql_function.rst:329 -#: ../../build/docs/basic/plpgsql_function.rst:405 -msgid "Problem" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:82 -msgid "Create a vertices table for the views:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:84 -msgid "``vehicle_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:85 -msgid "``taxi_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:86 -msgid "``walk_net``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:90 -#: ../../build/docs/basic/plpgsql_function.rst:141 -#: ../../build/docs/basic/plpgsql_function.rst:220 -#: ../../build/docs/basic/plpgsql_function.rst:273 -#: ../../build/docs/basic/plpgsql_function.rst:342 -#: ../../build/docs/basic/plpgsql_function.rst:428 -msgid "Solution" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:91 -msgid "Use ``pgr_extractVertices`` (explained in :doc:`graph_views`) to create the vertices table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:93 -msgid "``JOIN`` the vertices table with ``ways_vertices`` (created in :doc:`graph_views`) to get the ``x``, ``y``, ``geom`` information." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:96 -#: ../../build/docs/basic/plpgsql_function.rst:410 -#: ../../build/docs/basic/plpgsql_function.rst:429 -msgid "For ``vehicle_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:104 -#: ../../build/docs/basic/plpgsql_function.rst:414 -#: ../../build/docs/basic/plpgsql_function.rst:444 -msgid "For ``taxi_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:110 -#: ../../build/docs/basic/plpgsql_function.rst:418 -#: ../../build/docs/basic/plpgsql_function.rst:457 -msgid "For ``walk_net``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:112 -msgid "Modify the above queries to create the ``walk_net_vertices`` table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:120 -msgid "It is left to the reader to remove disconected components on the views." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:122 -msgid "See :doc:`graph_views`" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:125 -msgid "Exercise 3: Nearest Vertex" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:129 -msgid "Calculate the (OSM) identifier of the nearest vertex to a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:131 -msgid "In particular use the following (lat, lon) value: ``(-1.455829, -48.446044)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:133 -#: ../../build/docs/basic/plpgsql_function.rst:265 -msgid "calculate the nearest OSM identifier of the vertex to:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:135 -#: ../../build/docs/basic/plpgsql_function.rst:267 -msgid "``ways_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:136 -#: ../../build/docs/basic/plpgsql_function.rst:268 -msgid "``vehicle_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:137 -#: ../../build/docs/basic/plpgsql_function.rst:269 -msgid "``taxi_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:138 -#: ../../build/docs/basic/plpgsql_function.rst:270 -msgid "``walk_net_vertices``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:142 -msgid "Remember that the ``id`` has an OSM vertex identifier on the vertices tables." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:143 -msgid "Using the Postgis distance operator `<-> `__ to order by distance." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:144 -msgid "Get only the first row, to obtain the nearest identifier of the vertex." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:146 -#: ../../build/docs/basic/plpgsql_function.rst:274 -msgid "For ``ways_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:157 -msgid "For ``vehicle_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:159 -#: ../../build/docs/basic/plpgsql_function.rst:174 -#: ../../build/docs/basic/plpgsql_function.rst:182 -#: ../../build/docs/basic/plpgsql_function.rst:293 -#: ../../build/docs/basic/plpgsql_function.rst:306 -msgid "Modify the previous query." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:172 -#: ../../build/docs/basic/plpgsql_function.rst:304 -msgid "For ``taxi_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:180 -#: ../../build/docs/basic/plpgsql_function.rst:312 -msgid "For ``walk_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:190 -msgid "Exercise 4: Nearest vertex function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:194 -msgid "When operations look similar for different tables, a function can be created." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:196 -msgid "Create a function that calculates the OSM identifier of the nearest vertex to a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:197 -msgid "Function name: ``wrk_nearest``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:198 -msgid "Needs to work only for the **final application** views and table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:201 -msgid "The input parameters:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "vertex_table" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:206 -msgid "Table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:207 -msgid "lat" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:207 -msgid "The latitude of a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "lon" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:208 -msgid "The longitude of a point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:211 -msgid "The output:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:216 -msgid "BIGINT" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:216 -msgid "the OSM identifier that is nearest to (lat,lon)." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:221 -msgid "The function returns only one ``BIGINT`` value." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:222 -msgid "Using `format `__ to build the query." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:226 -msgid "The structure of the query is similar to `Exercise 3: Nearest Vertex`_ solutions." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:228 -msgid "``%1$I`` for the table name identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:229 -msgid "``%2$s`` and ``%3$s`` for the latitude and longitude." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:231 -msgid "The point is formed with (lon/lat) ``(%3$s, %2$s)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:241 -msgid "Exercise 5: Test nearest vertex function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:243 -msgid "Nearest Vertex in vehicle network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:247 -msgid "Nearest Vertex in taxi network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:251 -msgid "Nearest Vertex in walk network" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:257 -msgid "Test the ``wrk_Nearest`` function." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:259 -msgid "Use the following (lat,lon) values: ``(-1.455829, -48.446044)``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:261 -msgid "The point is the same as in `Exercise 3: Nearest Vertex`_ problem." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:263 -msgid "Verify the results are the same." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:276 -msgid "Use the function with ``ways_vertices`` as the ``vertex_table`` parameter." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:277 -msgid "Pass the (lat,lon) values as second and third parameters." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:278 -msgid "Using the function on the original data does not return the OSM identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:280 -msgid "The value stored in ``id`` column is not the OSM identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:291 -msgid "For ``vehicles_net_vertices``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:320 -msgid "wrk_fromAtoB function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:322 -msgid "In this section, creation and testing the required function will be tackled." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:326 -msgid "Exercise 6: Creating the main function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:330 -msgid "Create the function ``wrk_fromAtoB``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:331 -msgid "Follow the description given at `Requirements for routing from A to B`_." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:332 -msgid "Use specialized functions:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:334 -msgid "``wrk_NearestOSM`` created on `Exercise 4: Nearest vertex function`_." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:336 -msgid "It receives the point in natural language format." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:337 -msgid "Obtains the OSM identifier needed by ``wrk_dijkstra``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:339 -msgid "``wrk_dijkstra`` created in :doc:`sql_function`" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:343 -msgid "The function's signature:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:345 -msgid "The input parameters highlighted." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:346 -msgid "The output columns are not highlighted." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:347 -msgid "The function returns a set of values." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:357 -msgid "The function's body:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:359 -msgid "Call to the function ``wrk_dijkstra``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:361 -msgid "Using PostgreSQL ``format`` to make substitutions" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:363 -msgid "The first parameter is the string to be replaced" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:364 -msgid "The rest are the data parameters, are the strings use for replacement." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:366 -msgid "``wrk_dijkstra`` obtains the values for the output" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:367 -msgid "The ``edges_subset`` value will replace ``%1$I``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:368 -msgid "For the ``source`` and ``target``:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:370 -msgid "``wrk_Nearest`` is used to find the identifier." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:372 -msgid "The vertices table name is formed with ``%1$I_vertices``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:374 -msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:375 -msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:377 -msgid "To get the constructed query in form of a warning:" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:379 -msgid "The ``WARNING`` will be issued only when ``do_debug`` is true." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:380 -msgid "No output will be generated." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:398 -msgid "Exercise 7: Using the main function" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:400 -msgid "View of roads for taxis along with source and destination" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:406 -msgid "Use ``wrk_fromAtoB``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:408 -msgid "Departure point is: (lat,lon) = ``(-1.455829, -48.446044)``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:409 -msgid "Destination point is: (lat,lon) = ``(-1.453448, -48.447142)``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:412 -#: ../../build/docs/basic/plpgsql_function.rst:420 -msgid "Use with default value of ``do_debug``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:416 -msgid "Use with ``do_debug`` set to ``true``." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:421 -msgid "Store results on a table." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:422 -msgid "Show the table contents." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:425 -msgid "The function is not meant to be used with ``ways``" -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:431 -msgid "The first parameter is the table name." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:432 -msgid "The next two parameters are the latitude and longitude of the departure point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:433 -msgid "The next two parameters are the latitude and longitude of the destination point." -msgstr "" - -#: ../../build/docs/basic/plpgsql_function.rst:446 -msgid "Do a dry run by adding ``true`` to get the query that is executed." -msgstr "" diff --git a/locale/pot/basic/sql_function.pot b/locale/pot/basic/sql_function.pot index 234cbb8f9..b65cf773c 100644 --- a/locale/pot/basic/sql_function.pot +++ b/locale/pot/basic/sql_function.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 18:21+0000\n" +"POT-Creation-Date: 2025-10-07 14:41+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,598 +33,481 @@ msgid "When developing for a `higher level` application, the requirements need t msgstr "" #: ../../build/docs/basic/sql_function.rst:30 -msgid "The application requirements" +msgid "The function requirements" msgstr "" #: ../../build/docs/basic/sql_function.rst:32 -msgid "A front end needs the following routing information:" +msgid "The function will wrap ``pgr_dijkstra``." msgstr "" -#: ../../build/docs/basic/sql_function.rst:33 +#: ../../build/docs/basic/sql_function.rst:34 +msgid "The function needs to work on any of the networks designed:" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:36 +#: ../../build/docs/basic/sql_function.rst:341 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:37 +#: ../../build/docs/basic/sql_function.rst:342 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:39 +msgid "The function needs to return the following routing information:" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:41 msgid "``seq`` - A unique identifier of the rows" msgstr "" -#: ../../build/docs/basic/sql_function.rst:34 +#: ../../build/docs/basic/sql_function.rst:42 msgid "``id`` - The segment's identifier" msgstr "" -#: ../../build/docs/basic/sql_function.rst:35 +#: ../../build/docs/basic/sql_function.rst:43 msgid "``name`` - The segment's name" msgstr "" -#: ../../build/docs/basic/sql_function.rst:36 +#: ../../build/docs/basic/sql_function.rst:44 msgid "``length`` - The segment's length" msgstr "" -#: ../../build/docs/basic/sql_function.rst:37 +#: ../../build/docs/basic/sql_function.rst:45 msgid "``seconds`` - Number of seconds to traverse the segment" msgstr "" -#: ../../build/docs/basic/sql_function.rst:38 +#: ../../build/docs/basic/sql_function.rst:46 msgid "``azimuth`` - The azimuth of the segment" msgstr "" -#: ../../build/docs/basic/sql_function.rst:39 +#: ../../build/docs/basic/sql_function.rst:47 msgid "``route_geom`` - The routing geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:40 +#: ../../build/docs/basic/sql_function.rst:48 msgid "``route_readable`` - The geometry in human readable form." msgstr "" -#: ../../build/docs/basic/sql_function.rst:43 +#: ../../build/docs/basic/sql_function.rst:51 msgid "Design of the function" msgstr "" -#: ../../build/docs/basic/sql_function.rst:44 +#: ../../build/docs/basic/sql_function.rst:52 msgid "The function to be created ``wrk_dijkstra`` with the following input parameters and output columns:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:48 +#: ../../build/docs/basic/sql_function.rst:56 msgid "Input parameters" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 +#: ../../build/docs/basic/sql_function.rst:58 msgid "Parameter" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Type" msgstr "" -#: ../../build/docs/basic/sql_function.rst:50 -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Description" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "``edges_subset``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "REGCLASS" msgstr "" -#: ../../build/docs/basic/sql_function.rst:52 +#: ../../build/docs/basic/sql_function.rst:60 msgid "The table/view that is going to be used for processing" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -msgid "``source_osm``" +#: ../../build/docs/basic/sql_function.rst:61 +msgid "``source``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -#: ../../build/docs/basic/sql_function.rst:54 -#: ../../build/docs/basic/sql_function.rst:63 +#: ../../build/docs/basic/sql_function.rst:61 +#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:71 msgid "BIGINT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:53 -msgid "The OSM identifier of the `departure` location." +#: ../../build/docs/basic/sql_function.rst:61 +msgid "The identifier of the `departure` location." msgstr "" -#: ../../build/docs/basic/sql_function.rst:54 -msgid "``target_osm``" +#: ../../build/docs/basic/sql_function.rst:62 +msgid "``target``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:54 -msgid "The OSM identifier of the `destination` location." +#: ../../build/docs/basic/sql_function.rst:62 +msgid "The identifier of the `destination` location." msgstr "" -#: ../../build/docs/basic/sql_function.rst:58 +#: ../../build/docs/basic/sql_function.rst:66 msgid "output columns" msgstr "" -#: ../../build/docs/basic/sql_function.rst:60 +#: ../../build/docs/basic/sql_function.rst:68 msgid "Name" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 -#: ../../build/docs/basic/sql_function.rst:94 +#: ../../build/docs/basic/sql_function.rst:70 +#: ../../build/docs/basic/sql_function.rst:99 msgid "``seq``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:70 msgid "INTEGER" msgstr "" -#: ../../build/docs/basic/sql_function.rst:62 +#: ../../build/docs/basic/sql_function.rst:70 msgid "A unique number for each result row." msgstr "" -#: ../../build/docs/basic/sql_function.rst:63 -#: ../../build/docs/basic/sql_function.rst:95 +#: ../../build/docs/basic/sql_function.rst:71 +#: ../../build/docs/basic/sql_function.rst:100 msgid "``id``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:63 +#: ../../build/docs/basic/sql_function.rst:71 msgid "The edge identifier." msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 -#: ../../build/docs/basic/sql_function.rst:96 +#: ../../build/docs/basic/sql_function.rst:72 +#: ../../build/docs/basic/sql_function.rst:101 msgid "``name``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:72 +#: ../../build/docs/basic/sql_function.rst:76 msgid "TEXT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:64 +#: ../../build/docs/basic/sql_function.rst:72 msgid "The name of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 -#: ../../build/docs/basic/sql_function.rst:97 +#: ../../build/docs/basic/sql_function.rst:73 +#: ../../build/docs/basic/sql_function.rst:102 msgid "``seconds``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 -#: ../../build/docs/basic/sql_function.rst:66 -#: ../../build/docs/basic/sql_function.rst:67 +#: ../../build/docs/basic/sql_function.rst:73 +#: ../../build/docs/basic/sql_function.rst:74 +#: ../../build/docs/basic/sql_function.rst:75 msgid "FLOAT" msgstr "" -#: ../../build/docs/basic/sql_function.rst:65 +#: ../../build/docs/basic/sql_function.rst:73 msgid "The number of seconds it takes to traverse the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:66 -msgid "``azimuth``" +#: ../../build/docs/basic/sql_function.rst:74 +#: ../../build/docs/basic/sql_function.rst:103 +msgid "``length``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:66 -msgid "The azimuth of the segment." +#: ../../build/docs/basic/sql_function.rst:74 +msgid "The length in meters of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:67 -#: ../../build/docs/basic/sql_function.rst:98 -msgid "``length``" +#: ../../build/docs/basic/sql_function.rst:75 +msgid "``azimuth``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:67 -msgid "The leng in meters of the segment." +#: ../../build/docs/basic/sql_function.rst:75 +msgid "The azimuth of the segment." msgstr "" -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:76 msgid "``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:68 +#: ../../build/docs/basic/sql_function.rst:76 msgid "The geometry in human readable form." msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "``route_geom``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:69 +#: ../../build/docs/basic/sql_function.rst:77 msgid "The geometry of the segment in the correct direction." msgstr "" -#: ../../build/docs/basic/sql_function.rst:73 -msgid "For the following exercises only ``vehicle_net`` will be used, but you can test the queries with the other views." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:77 +#: ../../build/docs/basic/sql_function.rst:82 msgid "Additional information handling" msgstr "" -#: ../../build/docs/basic/sql_function.rst:79 +#: ../../build/docs/basic/sql_function.rst:84 msgid "When the application needs additional information, like the name of the street, ``JOIN`` the results with other tables." msgstr "" -#: ../../build/docs/basic/sql_function.rst:83 +#: ../../build/docs/basic/sql_function.rst:88 msgid "Exercise 1: Get additional information" msgstr "" -#: ../../build/docs/basic/sql_function.rst:85 +#: ../../build/docs/basic/sql_function.rst:90 msgid "Route showing names" msgstr "" -#: ../../build/docs/basic/sql_function.rst:90 -#: ../../build/docs/basic/sql_function.rst:137 -#: ../../build/docs/basic/sql_function.rst:188 -#: ../../build/docs/basic/sql_function.rst:244 -#: ../../build/docs/basic/sql_function.rst:308 -#: ../../build/docs/basic/sql_function.rst:352 -#: ../../build/docs/basic/sql_function.rst:403 +#: ../../build/docs/basic/sql_function.rst:95 +#: ../../build/docs/basic/sql_function.rst:147 +#: ../../build/docs/basic/sql_function.rst:186 +#: ../../build/docs/basic/sql_function.rst:239 +#: ../../build/docs/basic/sql_function.rst:303 msgid "Problem" msgstr "" -#: ../../build/docs/basic/sql_function.rst:91 -msgid "From |ch7_place_1| to |ch7_place_2|, using OSM identifiers." +#: ../../build/docs/basic/sql_function.rst:96 +#: ../../build/docs/basic/sql_function.rst:142 +#: ../../build/docs/basic/sql_function.rst:181 +#: ../../build/docs/basic/sql_function.rst:215 +msgid "From |ch7_place_1| to |ch7_place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:92 +#: ../../build/docs/basic/sql_function.rst:97 msgid "Get the following information:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:101 -#: ../../build/docs/basic/sql_function.rst:150 -#: ../../build/docs/basic/sql_function.rst:196 -#: ../../build/docs/basic/sql_function.rst:254 -#: ../../build/docs/basic/sql_function.rst:316 -#: ../../build/docs/basic/sql_function.rst:366 -#: ../../build/docs/basic/sql_function.rst:408 +#: ../../build/docs/basic/sql_function.rst:106 +#: ../../build/docs/basic/sql_function.rst:155 +#: ../../build/docs/basic/sql_function.rst:194 +#: ../../build/docs/basic/sql_function.rst:249 +#: ../../build/docs/basic/sql_function.rst:309 msgid "Solution" msgstr "" -#: ../../build/docs/basic/sql_function.rst:102 -msgid "The columns asked (line **2**)." +#: ../../build/docs/basic/sql_function.rst:107 +msgid "The function returns the columns asked. (line **4**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:103 -msgid "Rename ``pgr_dijkstra`` results to application requirements names. (line **4**)." +#: ../../build/docs/basic/sql_function.rst:108 +msgid "Rename ``pgr_dijkstra`` results to application requirements names. (line **12**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:104 -msgid "``LEFT JOIN`` the results with ``vehicle_net`` to get the additional information. (line **9**)" +#: ../../build/docs/basic/sql_function.rst:110 +msgid "``LEFT JOIN`` the results with ``vehicle_net`` to get the additional information. (line **17**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:106 +#: ../../build/docs/basic/sql_function.rst:113 msgid "``LEFT`` to include the row with ``id = -1`` because it does not exist on ``vehicle_net``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:122 +#: ../../build/docs/basic/sql_function.rst:116 +#: ../../build/docs/basic/sql_function.rst:160 +#: ../../build/docs/basic/sql_function.rst:197 +#: ../../build/docs/basic/sql_function.rst:314 +msgid "Test from |ch7_id_1| to |ch7_id_2| on ``vehicle_net``. (Last line)" +msgstr "" + +#: ../../build/docs/basic/sql_function.rst:132 msgid "Geometry handling" msgstr "" -#: ../../build/docs/basic/sql_function.rst:124 +#: ../../build/docs/basic/sql_function.rst:134 msgid "From pgRouting point of view, the geometry is part of the additional information, needed on the results for an application. Therefore ``JOIN`` the results with other tables that contain the geometry and for further processing with PostGIS functions." msgstr "" -#: ../../build/docs/basic/sql_function.rst:130 +#: ../../build/docs/basic/sql_function.rst:140 msgid "Exercise 2: Route geometry (human readable)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:132 -#: ../../build/docs/basic/sql_function.rst:218 -msgid "From |ch7_place_1| to |ch7_place_2|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:138 -#: ../../build/docs/basic/sql_function.rst:189 -#: ../../build/docs/basic/sql_function.rst:245 +#: ../../build/docs/basic/sql_function.rst:148 +#: ../../build/docs/basic/sql_function.rst:187 +#: ../../build/docs/basic/sql_function.rst:240 msgid "Route from the |ch7_place_1| to |ch7_place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:140 -#: ../../build/docs/basic/sql_function.rst:191 +#: ../../build/docs/basic/sql_function.rst:150 +#: ../../build/docs/basic/sql_function.rst:189 msgid "Additionally to the previous exercise, get the" msgstr "" -#: ../../build/docs/basic/sql_function.rst:142 -msgid "geometry ``geom`` in human readable form named as ``route_readable``" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:146 -msgid "``WITH`` provides a way to write auxiliary statements in larger queries. It can be thought of as defining temporary tables that exist just for one query." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:151 -msgid "The routing query named ``results`` in a WITH clause. (lines **2** to **5**)" -msgstr "" - #: ../../build/docs/basic/sql_function.rst:152 -msgid "The results from the previous exercise. (lines **8** and **9**)" +msgid "geometry ``geom`` in human readable form named as ``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:154 -msgid "For result reading purposes, the result columns from the previous are in a comment. Uncomment to see the complete results for the problem." +#: ../../build/docs/basic/sql_function.rst:156 +msgid "The function returns ``route_readable``. (line **6**)" msgstr "" #: ../../build/docs/basic/sql_function.rst:157 -msgid "The ``geom`` processed with ``ST_AsText`` to get the human readable form. (line **12**)" +msgid "The routing query named ``results`` in a WITH clause. (line **11**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:160 -msgid "Renaming the result to ``route_readable``" +#: ../../build/docs/basic/sql_function.rst:158 +msgid "The ``geom`` processed with ``ST_AsText`` to get the human readable form. (line **19**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:162 -msgid "The ``LEFT JOIN`` with ``vehicle_net``. (line **14**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:181 +#: ../../build/docs/basic/sql_function.rst:179 msgid "Exercise 3: Route geometry (binary format)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:183 -msgid "From |ch7_place_1| to |ch7_place_2| showing arrows." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:193 -#: ../../build/docs/basic/sql_function.rst:250 +#: ../../build/docs/basic/sql_function.rst:191 +#: ../../build/docs/basic/sql_function.rst:245 msgid "``geom`` in binary format with the name ``route_geom``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:197 -msgid "The query from the previous exercise is used" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:198 -msgid "The ``SELECT`` clause also contains:" +#: ../../build/docs/basic/sql_function.rst:195 +msgid "The function returns ``route_geom``. (line **7**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:200 -msgid "The ``geom`` including the renaming (line **9**)" +#: ../../build/docs/basic/sql_function.rst:196 +msgid "The geometry ``geom`` of the segments (line **21**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:216 +#: ../../build/docs/basic/sql_function.rst:213 msgid "Exercise 4: Route geometry directionality" msgstr "" -#: ../../build/docs/basic/sql_function.rst:222 +#: ../../build/docs/basic/sql_function.rst:219 msgid "Visually, with the route displayed with arrows, it can be found that there are arrows that do not match the directionality of the route." msgstr "" -#: ../../build/docs/basic/sql_function.rst:225 +#: ../../build/docs/basic/sql_function.rst:222 msgid "To have correct directionality, the ending point of a geometry must match the starting point of the next geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:228 +#: ../../build/docs/basic/sql_function.rst:225 msgid "Inspecting the detail of the results of `Exercise 2: Route geometry (human readable)`_" msgstr "" -#: ../../build/docs/basic/sql_function.rst:231 -msgid "Rows **59** to **61** do not match that criteria" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:247 +#: ../../build/docs/basic/sql_function.rst:242 msgid "Fix the directionality of the geometries of the previous exercise" msgstr "" -#: ../../build/docs/basic/sql_function.rst:249 +#: ../../build/docs/basic/sql_function.rst:244 msgid "``geom`` in human readable form named as ``route_readable``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:251 +#: ../../build/docs/basic/sql_function.rst:246 msgid "Both columns must have the geometry fixed for directionality." msgstr "" -#: ../../build/docs/basic/sql_function.rst:255 +#: ../../build/docs/basic/sql_function.rst:250 msgid "To get the correct direction some geometries need to be reversed:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:257 -msgid "Reversing a geometry will depend on the ``node`` column of the query to Dijkstra (line **2**)" +#: ../../build/docs/basic/sql_function.rst:252 +msgid "Reversing a geometry will depend on the ``node`` column of the query to Dijkstra." msgstr "" -#: ../../build/docs/basic/sql_function.rst:260 +#: ../../build/docs/basic/sql_function.rst:255 msgid "A conditional ``CASE`` statement that returns the geometry in human readable form:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:263 -msgid "Of the geometry when ``node`` is the ``source`` column. (line **11**)" +#: ../../build/docs/basic/sql_function.rst:258 +msgid "Of the geometry when ``node`` is the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:264 -msgid "Of the reversed geometry when ``node`` is not the ``source`` column. (line **12**)" +#: ../../build/docs/basic/sql_function.rst:259 +msgid "Of the reversed geometry when ``node`` is not the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:266 +#: ../../build/docs/basic/sql_function.rst:261 msgid "A conditional ``CASE`` statement that returns:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:268 -msgid "The geometry when ``node`` is the ``source`` column. (line **17**)" +#: ../../build/docs/basic/sql_function.rst:263 +msgid "The geometry when ``node`` is the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:269 -msgid "The reversed geometry when ``node`` is not the ``source`` column. (line **16**)" +#: ../../build/docs/basic/sql_function.rst:264 +msgid "The reversed geometry when ``node`` is not the ``source`` column." msgstr "" -#: ../../build/docs/basic/sql_function.rst:282 -msgid "Inspecting some the problematic rows, the directionality has been fixed." +#: ../../build/docs/basic/sql_function.rst:277 +msgid "Inspecting the problematic rows, the directionality has been fixed." msgstr "" -#: ../../build/docs/basic/sql_function.rst:295 +#: ../../build/docs/basic/sql_function.rst:290 msgid "Exercise 5: Using the geometry" msgstr "" -#: ../../build/docs/basic/sql_function.rst:297 +#: ../../build/docs/basic/sql_function.rst:292 msgid "From |ch7_place_1| to the |ch7_place_2| show azimuth" msgstr "" -#: ../../build/docs/basic/sql_function.rst:302 +#: ../../build/docs/basic/sql_function.rst:297 msgid "There are many geometry functions in PostGIS, the workshop already covered some of them like ``ST_AsText``, ``ST_Reverse``, ``ST_EndPoint``, etc. This exercise will make use an additional function ``ST_Azimuth``." msgstr "" -#: ../../build/docs/basic/sql_function.rst:309 +#: ../../build/docs/basic/sql_function.rst:304 msgid "Modify the query from the previous exercise" msgstr "" -#: ../../build/docs/basic/sql_function.rst:311 -msgid "Additionally obtain the azimuth of the correct geometry." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:312 -msgid "Because ``vehicle_net`` and the other 2 views are sub graphs of ``ways``, do the ``JOIN`` with ``ways``." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:317 -msgid "Move the query that gets the additional information into the ``WITH`` statement." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:319 -msgid "Name it ``additional``. (line **6**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:321 -msgid "The ``ways`` table geometry name is ``the_geom``." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:322 -msgid "Final ``SELECT`` statements gets:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:324 -msgid "Calculates the azimuth of ``route_geom``. (line **27**)" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:337 -msgid "Creating the Function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:339 -msgid "The following function simplifies (and sets default values) when it calls the shortest path Dijkstra function." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:343 -msgid "pgRouting uses heavely function overloading:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:345 -msgid "Avoid creating functions with a name of a pgRouting routing function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:346 -msgid "Avoid the name of a function to start with `pgr_`, `_pgr` or `ST_`" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:349 -msgid "Exercise 6: Function for an application" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:353 -msgid "Putting all together in a SQL function" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:355 -msgid "function name ``wrk_dijkstra``" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:356 -msgid "Should work for any given view." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:358 -msgid "Allow a view as a parameter" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:359 -msgid "A table can be used if the columns have the correct names." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:361 -msgid "``source`` and ``target`` are in terms of ``osm_id``." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:362 -msgid "The result should meet the requirements indicated at the beginning of the chapter" +#: ../../build/docs/basic/sql_function.rst:306 +msgid "Additionally obtain the azimuth in degrees of the corrected geometry." msgstr "" -#: ../../build/docs/basic/sql_function.rst:367 -msgid "The signature of the function:" +#: ../../build/docs/basic/sql_function.rst:310 +msgid "The function returns ``aximuth``. (line **8**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:369 -msgid "The input parameters are from line **4** to **6**." -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:370 -msgid "The output columns are from line **7** to **14** (not highlighted)." +#: ../../build/docs/basic/sql_function.rst:311 +msgid "The query from previous exercise is wrapped under additional subquery. (line **18**)" msgstr "" -#: ../../build/docs/basic/sql_function.rst:371 -msgid "The function returns a set. (line **16**)" +#: ../../build/docs/basic/sql_function.rst:313 +msgid "The ``azimuth`` is processed in degrees. (line **35**)." msgstr "" -#: ../../build/docs/basic/sql_function.rst:379 -msgid "The body of the function:" +#: ../../build/docs/basic/sql_function.rst:329 +msgid "Exercise 6: Using the function" msgstr "" -#: ../../build/docs/basic/sql_function.rst:381 -msgid "Appending the view name on line **7** in the ``SELECT`` query to ``pgr_dijkstra``." +#: ../../build/docs/basic/sql_function.rst:331 +msgid "Try the function with a combination of the interesting places:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:382 -msgid "Using the data to get the route from ``source`` to ``target``. (line **8**)" +#: ../../build/docs/basic/sql_function.rst:333 +msgid "|id_1| |place_1|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:383 -msgid "The ``JOIN`` with ``ways`` is necessary, as the views are subset of ``ways`` (line **25**)" +#: ../../build/docs/basic/sql_function.rst:334 +msgid "|id_2| |place_2|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:400 -msgid "Exercise 7: Using the function" +#: ../../build/docs/basic/sql_function.rst:335 +msgid "|id_3| |place_3|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:404 -msgid "Test the function with the three views" +#: ../../build/docs/basic/sql_function.rst:336 +msgid "|id_4| |place_4|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:405 -msgid "From the |ch7_place_1| to the |ch7_place_2| using the OSM identifier" +#: ../../build/docs/basic/sql_function.rst:337 +msgid "|id_5| |place_5|" msgstr "" -#: ../../build/docs/basic/sql_function.rst:409 -msgid "Use the function on the ``SELECT`` statement" +#: ../../build/docs/basic/sql_function.rst:339 +msgid "Using different networks:" msgstr "" -#: ../../build/docs/basic/sql_function.rst:410 -msgid "The first parameter changes based on the view to be tested" +#: ../../build/docs/basic/sql_function.rst:343 +msgid "``walk_net``" msgstr "" -#: ../../build/docs/basic/sql_function.rst:412 +#: ../../build/docs/basic/sql_function.rst:345 msgid "Names of the streets in the route" msgstr "" -#: ../../build/docs/basic/sql_function.rst:423 +#: ../../build/docs/basic/sql_function.rst:356 msgid "Total seconds spent in each street" msgstr "" -#: ../../build/docs/basic/sql_function.rst:434 -msgid "Get all the information of the route" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:445 -msgid "Try the function with a combination of the interesting places:" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:447 -msgid "|osmid_1| |place_1|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:448 -msgid "|osmid_2| |place_2|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:449 -msgid "|osmid_3| |place_3|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:450 -msgid "|osmid_4| |place_4|" -msgstr "" - -#: ../../build/docs/basic/sql_function.rst:451 -msgid "|osmid_5| |place_5|" +#: ../../build/docs/basic/sql_function.rst:367 +msgid "Why it does not fully work with ``walk_net``?" msgstr "" diff --git a/locale/pot/basic/vehicle.pot b/locale/pot/basic/vehicle.pot index 61c489911..d942f69f9 100644 --- a/locale/pot/basic/vehicle.pot +++ b/locale/pot/basic/vehicle.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-10-04 19:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -116,331 +116,266 @@ msgstr "" msgid "Number of (``source, target``) segments with ``cost < 0`` (line **3**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:72 +#: ../../build/docs/basic/vehicle.rst:71 msgid "Number of (``target, source``) segments with ``reverse_cost < 0`` (line **3**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:84 +#: ../../build/docs/basic/vehicle.rst:83 msgid "Exercise 1: Vehicle routing - going" msgstr "" -#: ../../build/docs/basic/vehicle.rst:87 -#: ../../build/docs/basic/vehicle.rst:115 -#: ../../build/docs/basic/vehicle.rst:145 -#: ../../build/docs/basic/vehicle.rst:246 -#: ../../build/docs/basic/vehicle.rst:310 -#: ../../build/docs/basic/vehicle.rst:352 +#: ../../build/docs/basic/vehicle.rst:86 +#: ../../build/docs/basic/vehicle.rst:112 +#: ../../build/docs/basic/vehicle.rst:139 +#: ../../build/docs/basic/vehicle.rst:185 +#: ../../build/docs/basic/vehicle.rst:257 +#: ../../build/docs/basic/vehicle.rst:292 msgid "Problem:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:88 +#: ../../build/docs/basic/vehicle.rst:87 msgid "From the \"|place_1|\" to the \"|place_3|\" by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:90 +#: ../../build/docs/basic/vehicle.rst:89 msgid "From |place_1| to the |place_3| by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:95 -#: ../../build/docs/basic/vehicle.rst:123 -#: ../../build/docs/basic/vehicle.rst:153 -#: ../../build/docs/basic/vehicle.rst:254 -#: ../../build/docs/basic/vehicle.rst:318 -#: ../../build/docs/basic/vehicle.rst:356 +#: ../../build/docs/basic/vehicle.rst:94 +#: ../../build/docs/basic/vehicle.rst:120 +#: ../../build/docs/basic/vehicle.rst:147 +#: ../../build/docs/basic/vehicle.rst:193 +#: ../../build/docs/basic/vehicle.rst:265 +#: ../../build/docs/basic/vehicle.rst:296 msgid "Solution:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:96 -msgid "Use ``cost`` (line **6**) and ``reverse_cost`` (line **7**) columns, which are in unit ``degrees``." +#: ../../build/docs/basic/vehicle.rst:95 +msgid "``cost`` and ``reverse_cost`` columns, are in seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:97 -msgid "The vehicle is going from vertex |id_1| (line **10**) to |id_3| (line **11**)." +#: ../../build/docs/basic/vehicle.rst:96 +msgid "The vehicle is going from vertex |id_1| to |id_3|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:112 +#: ../../build/docs/basic/vehicle.rst:109 msgid "Exercise 2: Vehicle routing - returning" msgstr "" -#: ../../build/docs/basic/vehicle.rst:116 +#: ../../build/docs/basic/vehicle.rst:113 msgid "From \"|place_3|\" to the \"|place_1|\" by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:118 +#: ../../build/docs/basic/vehicle.rst:115 msgid "From |place_3| to the |place_1| by car." msgstr "" -#: ../../build/docs/basic/vehicle.rst:124 -msgid "Use ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, in units seconds." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:126 -#: ../../build/docs/basic/vehicle.rst:161 -msgid "The vehicle is going from vertex |id_3| (line **10**) to |id_1| (line **11**)." +#: ../../build/docs/basic/vehicle.rst:121 +#: ../../build/docs/basic/vehicle.rst:156 +msgid "The vehicle is going from vertex |id_3| to |id_1|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:138 +#: ../../build/docs/basic/vehicle.rst:132 msgid "On a directed graph, going and coming back routes, most of the time are different." msgstr "" -#: ../../build/docs/basic/vehicle.rst:142 +#: ../../build/docs/basic/vehicle.rst:136 msgid "Exercise 3: Vehicle routing when time is money" msgstr "" -#: ../../build/docs/basic/vehicle.rst:146 +#: ../../build/docs/basic/vehicle.rst:140 msgid "From \"|place_3|\" to the \"|place_1|\" by taxi." msgstr "" -#: ../../build/docs/basic/vehicle.rst:148 +#: ../../build/docs/basic/vehicle.rst:142 msgid "From |place_3| to |place_1| by taxi." msgstr "" -#: ../../build/docs/basic/vehicle.rst:154 +#: ../../build/docs/basic/vehicle.rst:148 +msgid "Use the ``taxi_net``." +msgstr "" + +#: ../../build/docs/basic/vehicle.rst:149 msgid "The cost is ``$100 per hour``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:156 -#: ../../build/docs/basic/vehicle.rst:319 -msgid "Using ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, which are in unit ``seconds``." +#: ../../build/docs/basic/vehicle.rst:151 +msgid "Using ``cost`` and ``reverse_cost`` columns, which are in seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:158 -msgid "The duration in hours is ``cost_s / 3600``." +#: ../../build/docs/basic/vehicle.rst:153 +msgid "The duration in hours is ``cost / 3600``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:159 -msgid "The cost in ``dollars`` is ``cost_s / 3600 * 100``." +#: ../../build/docs/basic/vehicle.rst:154 +msgid "The cost in ``dollars`` is ``cost / 3600 * 100``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:174 +#: ../../build/docs/basic/vehicle.rst:168 msgid "Comparing with `Exercise 2: Vehicle routing - returning`_:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:176 +#: ../../build/docs/basic/vehicle.rst:170 msgid "The total number of records are identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:177 +#: ../../build/docs/basic/vehicle.rst:171 msgid "The node sequence is identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:178 +#: ../../build/docs/basic/vehicle.rst:172 msgid "The edge sequence is identical." msgstr "" -#: ../../build/docs/basic/vehicle.rst:179 +#: ../../build/docs/basic/vehicle.rst:173 msgid "The cost and agg_cost results are directly proportional." msgstr "" -#: ../../build/docs/basic/vehicle.rst:183 +#: ../../build/docs/basic/vehicle.rst:177 msgid "Cost manipulations" msgstr "" -#: ../../build/docs/basic/vehicle.rst:185 -msgid "When dealing with data, being aware of what kind of data is being used can improve results." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:187 -msgid "Vehicles can not circulate on pedestrian ways" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:195 -msgid "Penalizing or removal of pedestrian ways will make the results closer to reality." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:197 -msgid "When converting data from OSM format using the `osm2pgrouting` tool, there is an additional table: ``configuration``." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:201 -msgid "The ``configuration`` table structure can be obtained with the following command." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:210 -msgid "tag_id values" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:216 -msgid "In the image above there is a detail of the ``tag_id`` of the roads." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:219 -msgid "The ``OSM way`` types:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:227 -msgid "Also, on the ``ways`` table there is a column that can be used to ``JOIN`` with the ``configuration`` table." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:230 -msgid "The ``ways`` types:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:239 +#: ../../build/docs/basic/vehicle.rst:179 msgid "In this workshop, costs are going to be manipulated using the ``configuration`` table." msgstr "" -#: ../../build/docs/basic/vehicle.rst:243 +#: ../../build/docs/basic/vehicle.rst:182 msgid "Exercise 4: Vehicle routing without penalization" msgstr "" -#: ../../build/docs/basic/vehicle.rst:247 +#: ../../build/docs/basic/vehicle.rst:186 msgid "From the \"|place_3|\" to \"|place_1|\"" msgstr "" -#: ../../build/docs/basic/vehicle.rst:249 -#: ../../build/docs/basic/vehicle.rst:313 +#: ../../build/docs/basic/vehicle.rst:188 +#: ../../build/docs/basic/vehicle.rst:260 msgid "From |place_3| to |place_1|" msgstr "" -#: ../../build/docs/basic/vehicle.rst:256 +#: ../../build/docs/basic/vehicle.rst:194 msgid "Add a penalty column" msgstr "" -#: ../../build/docs/basic/vehicle.rst:257 -msgid "All roads have a ``penalty`` of ``1`` (line **3**)." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:260 -msgid "Query" +#: ../../build/docs/basic/vehicle.rst:196 +msgid "All roads have a ``penalty`` of ``1``." msgstr "" -#: ../../build/docs/basic/vehicle.rst:261 +#: ../../build/docs/basic/vehicle.rst:202 msgid "The vehicle's cost in this case will be in penalized seconds." msgstr "" -#: ../../build/docs/basic/vehicle.rst:263 -msgid "Costs (in seconds) are to be multiplied by :code:`penalty` (lines **12** and **13**)." +#: ../../build/docs/basic/vehicle.rst:204 +msgid "Costs are to be multiplied by :code:`penalty` (lines **5** and **6**)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:264 -msgid "Costs wont change (times 1 leaves the value unchanged)." +#: ../../build/docs/basic/vehicle.rst:205 +msgid "Costs won't change (:math:`cost * 1 = cost`)." msgstr "" -#: ../../build/docs/basic/vehicle.rst:266 -msgid "The :code:`configuration` table is linked with the :code:`ways` table by the :code:`tag_id` field using a ``JOIN`` (lines **14** and **15**)." +#: ../../build/docs/basic/vehicle.rst:207 +msgid "The :code:`configuration` table is linked with the :code:`ways` table by the :code:`tag_id` field using a ``JOIN``" msgstr "" -#: ../../build/docs/basic/vehicle.rst:268 -msgid "The vehicle is going from vertex |id_3| (line **17**) to vertex |id_1| (line **18**)." +#: ../../build/docs/basic/vehicle.rst:209 +msgid "The vehicle is going from vertex |id_3| to vertex |id_1|." msgstr "" -#: ../../build/docs/basic/vehicle.rst:282 +#: ../../build/docs/basic/vehicle.rst:224 msgid "Exercise 5: Vehicle routing with penalization" msgstr "" -#: ../../build/docs/basic/vehicle.rst:285 +#: ../../build/docs/basic/vehicle.rst:227 msgid "Concept:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:286 +#: ../../build/docs/basic/vehicle.rst:228 msgid "Change the cost values for the :code:`configuration` table, in such a way, that the" msgstr "" -#: ../../build/docs/basic/vehicle.rst:288 -msgid "Pedestrian roads are not used." +#: ../../build/docs/basic/vehicle.rst:230 +msgid "Bicycle roads are not used." msgstr "" -#: ../../build/docs/basic/vehicle.rst:290 +#: ../../build/docs/basic/vehicle.rst:232 msgid "``penalty < 0`` makes the road not to be included in the graph." msgstr "" -#: ../../build/docs/basic/vehicle.rst:292 +#: ../../build/docs/basic/vehicle.rst:234 msgid "Using residential roads is not encouraged." msgstr "" -#: ../../build/docs/basic/vehicle.rst:294 +#: ../../build/docs/basic/vehicle.rst:236 msgid "``penalty > 1`` makes the road slower for the calculations." msgstr "" -#: ../../build/docs/basic/vehicle.rst:296 +#: ../../build/docs/basic/vehicle.rst:238 msgid "Using \"faster\" roads is highly encouraged." msgstr "" -#: ../../build/docs/basic/vehicle.rst:298 +#: ../../build/docs/basic/vehicle.rst:240 msgid "``penalty < 1`` makes the road faster for the calculations." msgstr "" -#: ../../build/docs/basic/vehicle.rst:300 -msgid "The ``penalty`` values can be changed with ``UPDATE`` queries." +#: ../../build/docs/basic/vehicle.rst:242 +msgid "All other roads are not penalized." msgstr "" -#: ../../build/docs/basic/vehicle.rst:302 -msgid "These values are an exaggeration." +#: ../../build/docs/basic/vehicle.rst:244 +msgid "``penalty = 1`` does not modify the road times." msgstr "" -#: ../../build/docs/basic/vehicle.rst:311 -msgid "From the \"|place_3|\" to \"|place_1|\" with penalization." +#: ../../build/docs/basic/vehicle.rst:246 +msgid "The ``penalty`` values can be changed with ``UPDATE`` queries." msgstr "" -#: ../../build/docs/basic/vehicle.rst:321 -msgid "Costs are to be multiplied by :code:`penalty` (lines **6** and **7**)." +#: ../../build/docs/basic/vehicle.rst:248 +msgid "These values are an exaggeration." msgstr "" -#: ../../build/docs/basic/vehicle.rst:323 -msgid "The :code:`configuration` table is linked with the :code:`ways` table by the :code:`tag_id` field using a ``JOIN`` (lines **8** and **9**)." +#: ../../build/docs/basic/vehicle.rst:258 +msgid "From the \"|place_3|\" to \"|place_1|\" with penalization." msgstr "" -#: ../../build/docs/basic/vehicle.rst:325 -msgid "The vehicle is going from vertex |id_3| (line **11**) to vertex |id_1| (line **12**)." +#: ../../build/docs/basic/vehicle.rst:266 +msgid "Using the same query from `Exercise 4: Vehicle routing without penalization`_" msgstr "" -#: ../../build/docs/basic/vehicle.rst:337 +#: ../../build/docs/basic/vehicle.rst:279 msgid "Comparing with `Exercise 3: Vehicle routing when time is money`_:" msgstr "" -#: ../../build/docs/basic/vehicle.rst:339 +#: ../../build/docs/basic/vehicle.rst:281 msgid "The total number of records changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:341 +#: ../../build/docs/basic/vehicle.rst:283 msgid "The node sequence changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:342 +#: ../../build/docs/basic/vehicle.rst:284 msgid "The edge sequence changed." msgstr "" -#: ../../build/docs/basic/vehicle.rst:344 -msgid "The route is avoiding the residential roads that have ``tag_id = 110``." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:345 +#: ../../build/docs/basic/vehicle.rst:286 msgid "The costs do not change proportionally." msgstr "" -#: ../../build/docs/basic/vehicle.rst:348 -msgid "Exercise 6: Time in seconds of penalized route" +#: ../../build/docs/basic/vehicle.rst:289 +msgid "Exercise 6: Time in seconds of penalized route using a view" msgstr "" -#: ../../build/docs/basic/vehicle.rst:353 +#: ../../build/docs/basic/vehicle.rst:293 msgid "Get the times in seconds of a penalized route" msgstr "" -#: ../../build/docs/basic/vehicle.rst:357 -msgid "Use as inner query the penalized query joined with the ways table" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:359 -msgid "Keep the ``edge`` as ``gid`` (line **6**)" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:360 -msgid "Join using ``gid`` (line **18**)" +#: ../../build/docs/basic/vehicle.rst:297 +msgid "Create a penalized view by joining the ``vehicle_net`` joined with the ``configuration`` table" msgstr "" -#: ../../build/docs/basic/vehicle.rst:373 -msgid "Comparing with `Exercise 5: Vehicle routing with penalization`_:" -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:375 -msgid "The total number of records is the same." -msgstr "" - -#: ../../build/docs/basic/vehicle.rst:376 -msgid "The route is the same" +#: ../../build/docs/basic/vehicle.rst:300 +msgid "Use the inner query from `Exercise 5: Vehicle routing with penalization`_" msgstr "" -#: ../../build/docs/basic/vehicle.rst:377 -msgid "The ``cost`` column have the original vales from the ways table." +#: ../../build/docs/basic/vehicle.rst:308 +msgid "Get the route ``configuration`` table" msgstr "" diff --git a/locale/pot/basic/withPoints.pot b/locale/pot/basic/withPoints.pot new file mode 100644 index 000000000..78e23e087 --- /dev/null +++ b/locale/pot/basic/withPoints.pot @@ -0,0 +1,549 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-10-07 15:22+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../../build/docs/basic/withPoints.rst:11 +msgid "Routing using points" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:17 +msgid "Other kind of functions are `pl/pgsql `__. As the applications requirements become more complex, building queries and storing queries in a variable becomes necessary" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:22 +msgid "pgRouting functions in this chapter" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:24 +msgid "`pgr_findCloseEdges`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:25 +msgid "`pgr_withPoints`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:27 +msgid "Chapter contents" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:30 +msgid "Requirements for routing lat,lon points" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:33 +msgid "Chapter problem:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:34 +msgid "Create a function ``wrk_withPoints`` that allows routing from two point geometries and works for" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:37 +msgid "``vehicle_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:38 +msgid "``taxi_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:39 +msgid "``walk_net``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:41 +msgid "The function takes as input parameters:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:43 +msgid "The edges table name" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:44 +msgid "Latitude/longitude of two point" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:46 +msgid "Returns" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:48 +msgid "the same information as in :doc:`sql_function` chapter problem." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:49 +msgid "or the query that it builds" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:52 +msgid "The detailed description:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:55 +msgid "Input parameters" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "Parameter" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "type" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:57 +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Description" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "``edges_subset``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "REGCLASS" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "Edge table name identifier." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "``lat1``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +#: ../../build/docs/basic/withPoints.rst:61 +#: ../../build/docs/basic/withPoints.rst:62 +#: ../../build/docs/basic/withPoints.rst:63 +msgid "NUMERIC" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "The latitude of the `departure` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "``lon1``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "The longitude of the `departure` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "``lat2``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "The latitude of the `destination` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:63 +msgid "``lon2``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:63 +msgid "The longitude of the `destination` point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "``do_debug``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "BOOLEAN" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:64 +msgid "Flag to create a ``NOTICE`` with the query that is been executed" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:70 +msgid "Output columns" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Name" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:72 +msgid "Type" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "``seq``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "INTEGER" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "A unique number for each result row." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "``id``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "BIGINT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:75 +msgid "The edge identifier." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +msgid "``name``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +#: ../../build/docs/basic/withPoints.rst:80 +msgid "TEXT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:76 +msgid "The name of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +msgid "``seconds``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +#: ../../build/docs/basic/withPoints.rst:78 +#: ../../build/docs/basic/withPoints.rst:79 +msgid "FLOAT" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:77 +msgid "The number of seconds it takes to traverse the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:78 +msgid "``length``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:78 +msgid "The length in meters of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:79 +msgid "``azimuth``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:79 +msgid "The azimuth of the segment." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:80 +msgid "``route_readable``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:80 +msgid "The geometry in human readable form." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "``route_geom``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "geometry" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:81 +msgid "The geometry of the segment in the correct direction." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:85 +msgid "For this chapter, the following points will be used for testing." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:87 +msgid "(lat,lon) = (-36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:88 +msgid "(lat,lon) = (-36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:91 +msgid "pgr_findCloseEdges" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:93 +msgid "Finds the close edges to a point geometry." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:96 +#: ../../build/docs/basic/withPoints.rst:143 +msgid "Signature Summary" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:108 +msgid "Exercise 1: Get the nearest edge" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:115 +#: ../../build/docs/basic/withPoints.rst:165 +#: ../../build/docs/basic/withPoints.rst:193 +#: ../../build/docs/basic/withPoints.rst:295 +msgid "Problem" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:116 +msgid "Get the nearest edge on the graph of the following points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:118 +msgid "(pid, lat, lon) = (1, -36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:119 +msgid "(pid, lat, lon) = (2, -36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:122 +#: ../../build/docs/basic/withPoints.rst:172 +#: ../../build/docs/basic/withPoints.rst:200 +#: ../../build/docs/basic/withPoints.rst:315 +msgid "Solution" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:123 +msgid "Build the geometry of the points with the appropiate SRID. (lines **4** and **10**)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:125 +msgid "Get the union of the individual queries" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:138 +msgid "pgr_withPoints" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:140 +msgid "Returns the shortest path in a graph with additional temporary vertices." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:158 +msgid "Exercise 2: Point routing" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:166 +msgid "Route from point **1** to point **2** on the ``vehicle_net`` where:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:168 +msgid "point **1**: (lat, lon) = (1, -36.850329, 174.763094)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:169 +msgid "point **2**: (lat, lon) = (2, -36.853675, 174.764448)" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:173 +msgid "The query from `Exercise 1: Get the nearest edge`_ is used as the inner query for points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:175 +msgid "Using negative values to avoid conficts with vertices with the same value:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:177 +msgid "Routing from point **-1** to point **-2**" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:190 +msgid "Exercise 3: Creating the point routing function" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:194 +msgid "Create the function ``wrk_withPoints`` to route from locations using latitude and longitude values." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:197 +msgid "Analyze the function." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:201 +msgid "Creating a ``plpgsql`` function." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:210 +msgid "Analysis" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:211 +msgid "The function's signature:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:213 +msgid "The input parameters instead of vertex identifiers, now it has the latitude and longitude of a couple of points." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:215 +msgid "The function returns the same set of values calculated on the :doc:`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:224 +msgid "Getting the closest query:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:226 +msgid "The query looks like the one on `Exercise 1: Get the nearest edge`_" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:227 +#: ../../build/docs/basic/withPoints.rst:244 +#: ../../build/docs/basic/withPoints.rst:262 +msgid "Using PostgreSQL ``format`` to make substitutions." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:229 +msgid "The first parameter is the string to be replaced" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:230 +msgid "The rest are the data parameters, are the strings use for replacement." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:231 +msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:232 +msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:241 +msgid "Getting the routing results:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:243 +msgid "The query looks like the one on `Exercise 2: Point routing`" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:246 +msgid "The ``edges_subset`` value will replace ``%1$I``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:247 +msgid "The ``closest_query`` value will replace ``%2$s``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:256 +msgid "Getting the additional information:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:258 +msgid "The subquery looks like the one in the function created on :doc:`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:260 +msgid "A joined table can not be a variable" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:263 +msgid "To make it work on the ``walk_net``, the whole query needs to be in ``TEXT``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:265 +msgid "The ``edges_subset`` value will replace ``%1$I``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:274 +msgid "Building the complete query:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:276 +msgid "The complete query looks like the one in the function created on :doc:`sql_function`." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:278 +msgid "Concatenation of strings is used." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:288 +msgid "Exercise 4: Using wrk_withPoints" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:296 +msgid "Use ``wrk_withPoints``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:298 +msgid "Departure point is: (lat,lon) = ``(-36.850329, 174.763094)``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:299 +msgid "Destination point is: (lat,lon) = ``(-36.853675, 174.764448)``" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:300 +#: ../../build/docs/basic/withPoints.rst:316 +msgid "For ``vehicle_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:302 +msgid "Get the names of the streets of the route." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:304 +#: ../../build/docs/basic/withPoints.rst:332 +msgid "For ``taxi_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:306 +msgid "Get the query that is been generated." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:308 +#: ../../build/docs/basic/withPoints.rst:345 +msgid "For ``walk_net``:" +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:310 +#: ../../build/docs/basic/withPoints.rst:321 +msgid "Use with default value of ``do_debug``." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:311 +msgid "Store results on a table." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:312 +msgid "Show the table contents." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:318 +msgid "The first parameter is the table name." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:319 +msgid "The next two parameters are the latitude and longitude of the departure point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:320 +msgid "The next two parameters are the latitude and longitude of the destination point." +msgstr "" + +#: ../../build/docs/basic/withPoints.rst:334 +msgid "Do a dry run by adding ``true`` to get the query that is executed." +msgstr "" diff --git a/locale/pot/general-intro/introduction.pot b/locale/pot/general-intro/introduction.pot index 39381d785..088fad6f9 100644 --- a/locale/pot/general-intro/introduction.pot +++ b/locale/pot/general-intro/introduction.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) 2010-2024 pgRouting Developers -# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# Copyright (C) 2010-2025 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Auckland package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Project-Id-Version: Workshop FOSS4G Auckland 3.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-16 17:44+0000\n" +"POT-Creation-Date: 2025-09-30 17:36+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -25,7 +25,7 @@ msgid "|pgrouting-web| adds routing functionality to |postgis-web|." msgstr "" #: ../../build/docs/general-intro/introduction.rst:15 -msgid "Please see the :doc:`contents <../index>` for full content of FOSS4G Belém workshop. This workshop covers two levels for using pgRouting: `Basic`_ and `Advanced`_." +msgid "Please see the :doc:`contents <../index>` for full content of FOSS4G Auckland workshop. This workshop covers two levels for using pgRouting: `Basic`_ and `Advanced`_." msgstr "" #: ../../build/docs/general-intro/introduction.rst:20 @@ -33,7 +33,7 @@ msgid "Basic" msgstr "" #: ../../build/docs/general-intro/introduction.rst:22 -msgid "will demonstrate the routing functionality by providing examples using |osm-web| road network data from Belém. Covering topics from how to prepare the data, making routing queries, understanding the results, up to writing a custom 'plpgsql' function that can be integrated with other FOSS tools." +msgid "will demonstrate the routing functionality by providing examples using |osm-web| road network data from Auckland. Covering topics from how to prepare the data, making routing queries, understanding the results, up to writing a custom 'plpgsql' function that can be integrated with other FOSS tools." msgstr "" #: ../../build/docs/general-intro/introduction.rst:28 @@ -108,7 +108,7 @@ msgid "Paragon Corporation" msgstr "" #: ../../build/docs/general-intro/introduction.rst:70 -msgid "Developers & presenters of FOSS4G Belém workshop:" +msgid "Developers & presenters of FOSS4G Auckland workshop:" msgstr "" #: ../../build/docs/general-intro/introduction.rst:71 diff --git a/locale/pot/un_sdg/sdg11-cities.pot b/locale/pot/un_sdg/sdg11-cities.pot index b562aa85c..c655f8b67 100644 --- a/locale/pot/un_sdg/sdg11-cities.pot +++ b/locale/pot/un_sdg/sdg11-cities.pot @@ -202,7 +202,7 @@ msgid "As the rivers in the data are not having single edge, i.e, multiple edges msgstr "" #: ../../build/docs/un_sdg/sdg11-cities.rst:241 -msgid "The pgRouting function ``pgr_connectedComponents`` is used to complete this task and its explaind with more detail in :doc:`../basic/graph_views`." +msgid "The pgRouting function ``pgr_connectedComponents`` is used to complete this task and its explaind with more detail in :doc:`../basic/graphs`." msgstr "" #: ../../build/docs/un_sdg/sdg11-cities.rst:244 diff --git a/locale/pot/un_sdg/sdg3-health.pot b/locale/pot/un_sdg/sdg3-health.pot index c2e1d84fc..f8dde3ab1 100644 --- a/locale/pot/un_sdg/sdg3-health.pot +++ b/locale/pot/un_sdg/sdg3-health.pot @@ -388,7 +388,7 @@ msgid "Exercise 12: Remove disconnected components" msgstr "" #: ../../build/docs/un_sdg/sdg3-health.rst:423 -msgid "To remove the disconnected components on the road network, the following pgRouting functions, discussed on :doc:`../basic/graph_views`, will be used:" +msgid "To remove the disconnected components on the road network, the following pgRouting functions, discussed on :doc:`../basic/graphs`, will be used:" msgstr "" #: ../../build/docs/un_sdg/sdg3-health.rst:426 diff --git a/locale/pot/un_sdg/sdg7-energy.pot b/locale/pot/un_sdg/sdg7-energy.pot index 09085db79..365d8c677 100644 --- a/locale/pot/un_sdg/sdg7-energy.pot +++ b/locale/pot/un_sdg/sdg7-energy.pot @@ -105,7 +105,7 @@ msgid "Exercise 2: Remove disconnected components" msgstr "" #: ../../build/docs/un_sdg/sdg7-energy.rst:99 -msgid "To remove the disconnected components on the road network, the following pgRouting functions, discussed on :doc:`../basic/graph_views`, will be used:" +msgid "To remove the disconnected components on the road network, the following pgRouting functions, discussed on :doc:`../basic/graphs`, will be used:" msgstr "" #: ../../build/docs/un_sdg/sdg7-energy.rst:102 diff --git a/locale/sv/LC_MESSAGES/advanced/chapter-12.po b/locale/sv/LC_MESSAGES/advanced/chapter-12.po index ce1ff3e02..3f435d55d 100644 --- a/locale/sv/LC_MESSAGES/advanced/chapter-12.po +++ b/locale/sv/LC_MESSAGES/advanced/chapter-12.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 17:44+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -42,8 +42,8 @@ msgstr "Men vad ska man göra då?" msgid "In this chapter you will learn how to create a basic `Routing Network Topology` from a network data that does not have a routing Topology create the minimum attributes needed the `Routing Network Topology`." msgstr "" "I det här kapitlet lär du dig att skapa en grundläggande `Routing Network " -"Topology` från nätverksdata som inte har någon routing Topology skapa de " -"minimiattribut som behövs för `Routing Network Topology`." +"Topology` från en nätverksdata som inte har en routingtopologi för att skapa " +"de minimiattribut som behövs för `Routing Network Topology`." #: ../../build/docs/advanced/chapter-12.rst:31 msgid "Chapter contents" @@ -149,7 +149,8 @@ msgstr "Denna funktion:" #: ../../build/docs/advanced/chapter-12.rst:99 msgid "Assigns a ``source`` and a ``target`` identifiers to each road link" -msgstr "Tilldelar en ``käll`` och en ``mål`` identifiering till varje väglänk" +msgstr "" +"Tilldelar en ``source`` och en ``target`` identifierare till varje väglänk" #: ../../build/docs/advanced/chapter-12.rst:100 msgid "It can logically \"snap\" nearby vertices within a certain tolerance by assigning the same identifier." diff --git a/locale/sv/LC_MESSAGES/appendix/appendix-2.po b/locale/sv/LC_MESSAGES/appendix/appendix-2.po index 89e31fc35..668072a08 100644 --- a/locale/sv/LC_MESSAGES/appendix/appendix-2.po +++ b/locale/sv/LC_MESSAGES/appendix/appendix-2.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 17:44+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -86,7 +86,7 @@ msgid "To avoid permission denied errors for local users you can set connection msgstr "" "För att undvika fel med nekad behörighet för lokala användare kan du ställa " "in anslutningsmetod till ``trust`` i ``/etc/postgresql//main/pg_hba." -"conf`` och starta om PostgreSQL-servern med ```sudo service postgresql " +"conf`` och starta om PostgreSQL-servern med ``sudo service postgresql " "restart``." #: ../../build/docs/appendix/appendix-2.rst:58 diff --git a/locale/sv/LC_MESSAGES/basic/graph_views.po b/locale/sv/LC_MESSAGES/basic/graph_views.po index ad2e194c1..e0f683c80 100644 --- a/locale/sv/LC_MESSAGES/basic/graph_views.po +++ b/locale/sv/LC_MESSAGES/basic/graph_views.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -43,7 +43,7 @@ msgstr "" "I det här kapitlet finns det tre grafkrav. Det består av tre grafer baserade " "på en **fullständigt sammanhängande** graf som härrör från ``vägar``: två " "för olika typer av fordon och en för fotgängare, källan och målet i dem alla " -"är baserade på ``källans_osm`` och ``målets_osm``." +"är baserade på ``source_osm`` och ``target_osm``." #: ../../build/docs/basic/graph_views.rst:31 msgid "The description of the graphs:" @@ -196,7 +196,7 @@ msgstr "Räkna antalet rader som måste fyllas på." #: ../../build/docs/basic/graph_views.rst:145 msgid "Update the ``geom`` columns based on the ``source_osm`` column from ``ways`` table." msgstr "" -"Uppdatera kolumnerna ``geom`` baserat på kolumnen ``ource_osm`` från " +"Uppdatera kolumnerna ``geom`` baserat på kolumnen ``source_osm`` från " "tabellen ``ways``." #: ../../build/docs/basic/graph_views.rst:147 @@ -516,7 +516,7 @@ msgstr "`the_geom` Geometrin." #: ../../build/docs/basic/graph_views.rst:502 msgid "Similar to `Exercise 5: Creating a view for routing`_:" -msgstr "Liknar `Övning 5: Skapa en vy för routing`_:" +msgstr "Liknar \"Övning 5: Skapa en vy för routing\":" #: ../../build/docs/basic/graph_views.rst:504 msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 mts/sec``. (line **7**)" diff --git a/locale/sv/LC_MESSAGES/basic/graphs.po b/locale/sv/LC_MESSAGES/basic/graphs.po new file mode 100644 index 000000000..e1fc3484a --- /dev/null +++ b/locale/sv/LC_MESSAGES/basic/graphs.po @@ -0,0 +1,649 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2024 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-10 17:09+0000\n" +"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.4.3\n" + +#: ../../build/docs/basic/graphs.rst:12 +msgid "Graph views" +msgstr "Diagramvyer" + +#: ../../build/docs/basic/graphs.rst:18 +msgid "Chapter Contents" +msgstr "Kapitelinnehåll" + +#: ../../build/docs/basic/graphs.rst:20 +msgid "Different application require different graphs. This chapter covers how to discard disconnected segments and different approaches to create graphs." +msgstr "" +"Olika applikationer kräver olika grafer. I det här kapitlet beskrivs hur man " +"tar bort segment som inte är sammankopplade och olika sätt att skapa grafer." + +#: ../../build/docs/basic/graphs.rst:24 +msgid "The graph requirements" +msgstr "Kraven för grafen" + +#: ../../build/docs/basic/graphs.rst:26 +msgid "In this chapter there are three graph requirements. It consists on three graphs based on a **fully connected** graph derived from ``ways``: two for different types of vehicles and one for pedestrian, the source and the target in all of them are based on the ``source_osm`` and ``target_osm``." +msgstr "" +"I det här kapitlet finns det tre grafkrav. Det består av tre grafer baserade " +"på en **fullständigt sammanhängande** graf som härrör från ``vägar``: två " +"för olika typer av fordon och en för fotgängare, källan och målet i dem alla " +"är baserade på ``källans_osm`` och ``målets_osm``." + +#: ../../build/docs/basic/graphs.rst:31 +msgid "The description of the graphs:" +msgstr "Beskrivning av graferna:" + +#: ../../build/docs/basic/graphs.rst:33 +msgid "Particular vehicle:" +msgstr "Särskilt fordon:" + +#: ../../build/docs/basic/graphs.rst:35 +msgid "Circulate on the whole Belém area." +msgstr "Cirkulera i hela Belém-området." + +#: ../../build/docs/basic/graphs.rst:37 +#: ../../build/docs/basic/graphs.rst:46 +msgid "Do not use `steps`, `footway`, `path`, `cycleway`." +msgstr "Använd inte `steps`, `footway`, `path`, `cycleway`." + +#: ../../build/docs/basic/graphs.rst:39 +msgid "Speed is the default speed from OSM information." +msgstr "Speed är standardhastigheten från OSM-informationen." + +#: ../../build/docs/basic/graphs.rst:41 +msgid "Taxi vehicle:" +msgstr "Taxifordon:" + +#: ../../build/docs/basic/graphs.rst:43 +msgid "Circulate on a smaller area:" +msgstr "Cirkulera på en mindre yta:" + +#: ../../build/docs/basic/graphs.rst:45 +msgid "Bounding box: ``(-48.52,-1.46,-48.45,-1.41)``" +msgstr "Avgränsningsruta: ``(-48.52,-1.46,-48.45,-1.41)``" + +#: ../../build/docs/basic/graphs.rst:48 +msgid "Speed is 10% slower than that of the particular vehicles." +msgstr "Hastigheten är 10% långsammare än för de aktuella fordonen." + +#: ../../build/docs/basic/graphs.rst:50 +msgid "Pedestrians:" +msgstr "Fotgängare:" + +#: ../../build/docs/basic/graphs.rst:52 +msgid "Walk on the whole Belém area." +msgstr "Promenad i hela Belém-området." + +#: ../../build/docs/basic/graphs.rst:53 +msgid "Can not walk on exclusive vehicle ways" +msgstr "Kan inte gå på exklusiva fordonsvägar" + +#: ../../build/docs/basic/graphs.rst:55 +msgid "`motorways` and on `primary` segments." +msgstr "\"motorways\" och på \"primary\" segment." + +#: ../../build/docs/basic/graphs.rst:57 +#: ../../build/docs/basic/graphs.rst:488 +msgid "The speed is ``2 mts/sec``." +msgstr "Hastigheten är ``2 mts/sek``." + +#: ../../build/docs/basic/graphs.rst:60 +msgid "pgr_extractVertices" +msgstr "pgr_extractVertices" + +#: ../../build/docs/basic/graphs.rst:62 +msgid "``pgr_extractVertices`` compute the connected components of an undirected graph using a Depth First Search approach. A connected component of an undirected graph is a set of vertices that are all reachable from each other." +msgstr "" +"``pgr_extractVertices`` beräknar de anslutna komponenterna i en odelad graf " +"med hjälp av en djup första sökning. En ansluten komponent i en odelad graf " +"är en uppsättning hörn som alla är nåbara från varandra." + +#: ../../build/docs/basic/graphs.rst:67 +#: ../../build/docs/basic/graphs.rst:214 +msgid "Signature summary" +msgstr "Sammanfattning av signatur" + +#: ../../build/docs/basic/graphs.rst:75 +msgid "Description of the function can be found in `pgr_extractVertices `__" +msgstr "" +"Beskrivning av funktionen finns i `pgr_extractVertices `__" + +#: ../../build/docs/basic/graphs.rst:79 +msgid "Exercise 1: Create a vertices table" +msgstr "Övning 1: Skapa en vertices-tabell" + +#: ../../build/docs/basic/graphs.rst:82 +#: ../../build/docs/basic/graphs.rst:130 +#: ../../build/docs/basic/graphs.rst:230 +#: ../../build/docs/basic/graphs.rst:278 +#: ../../build/docs/basic/graphs.rst:355 +#: ../../build/docs/basic/graphs.rst:426 +#: ../../build/docs/basic/graphs.rst:484 +#: ../../build/docs/basic/graphs.rst:548 +msgid "Problem" +msgstr "Problem" + +#: ../../build/docs/basic/graphs.rst:83 +msgid "Create the vertices table corresponding to the edges in ``ways``." +msgstr "Skapa en tabell med toppar som motsvarar kanterna i ``ways``." + +#: ../../build/docs/basic/graphs.rst:86 +#: ../../build/docs/basic/graphs.rst:134 +#: ../../build/docs/basic/graphs.rst:234 +#: ../../build/docs/basic/graphs.rst:287 +#: ../../build/docs/basic/graphs.rst:369 +#: ../../build/docs/basic/graphs.rst:435 +#: ../../build/docs/basic/graphs.rst:499 +#: ../../build/docs/basic/graphs.rst:567 +msgid "Solution" +msgstr "Lösning" + +#: ../../build/docs/basic/graphs.rst:87 +msgid "A graph consists of a set of vertices and a set of edges." +msgstr "En graf består av en uppsättning hörn och en uppsättning kanter." + +#: ../../build/docs/basic/graphs.rst:88 +msgid "In this case, the ``ways`` table is a set of edges." +msgstr "I detta fall är tabellen ``ways`` en uppsättning kanter." + +#: ../../build/docs/basic/graphs.rst:89 +msgid "In order to make use of all the graph functions from pgRouting, it is required have the set of vertices defined." +msgstr "" +"För att kunna använda alla graffunktioner i pgRouting krävs det att " +"uppsättningen av hörnpunkter är definierad." + +#: ../../build/docs/basic/graphs.rst:91 +msgid "From the requirements, the graph is going to be based on OSM identifiers." +msgstr "Enligt kraven kommer grafen att baseras på OSM-identifierare." + +#: ../../build/docs/basic/graphs.rst:104 +msgid "Reviewing the description of the vertices table" +msgstr "Granskning av beskrivningen av vertices-tabellen" + +#: ../../build/docs/basic/graphs.rst:114 +msgid "Inspecting the information on the vertices table" +msgstr "Inspektera informationen i tabellen vertices" + +#: ../../build/docs/basic/graphs.rst:127 +msgid "Exercise 2: Fill up other columns in the vertices table" +msgstr "Övning 2: Fyll i andra kolumner i vertikaltabellen" + +#: ../../build/docs/basic/graphs.rst:131 +msgid "Fill up geometry information on the vertices table." +msgstr "Fyll i geometriinformation i tabellen Vertices." + +#: ../../build/docs/basic/graphs.rst:135 +msgid "Count the number of rows that need to be filled up." +msgstr "Räkna antalet rader som måste fyllas på." + +#: ../../build/docs/basic/graphs.rst:145 +msgid "Update the ``geom`` columns based on the ``source_osm`` column from ``ways`` table." +msgstr "" +"Uppdatera kolumnerna ``geom`` baserat på kolumnen ``ource_osm`` från " +"tabellen ``ways``." + +#: ../../build/docs/basic/graphs.rst:147 +msgid "Use the start point of the geometry." +msgstr "Använd geometrins startpunkt." + +#: ../../build/docs/basic/graphs.rst:158 +msgid "Not expecting to be done due to the fact that some vertices are only dead ends." +msgstr "" +"Förväntas inte bli gjort på grund av att vissa hörn bara är återvändsgränder." + +#: ../../build/docs/basic/graphs.rst:169 +msgid "Update the ``geom`` columns based on the ``target_osm`` column from ``ways`` table." +msgstr "" +"Uppdatera kolumnerna ``geom`` baserat på kolumnen ``target_osm`` från " +"tabellen ``ways``." + +#: ../../build/docs/basic/graphs.rst:171 +msgid "Use the end point of the geometry." +msgstr "Använd geometrins slutpunkt." + +#: ../../build/docs/basic/graphs.rst:182 +msgid "Expecting to be done, that is the geometry column should not have a ``NULL`` value." +msgstr "" +"Förväntar sig att det ska göras, det vill säga att geometrikolumnen inte ska " +"ha ett ``NULL``-värde." + +#: ../../build/docs/basic/graphs.rst:194 +msgid "Update the ``x`` and ``y`` columns based on the ``geom`` column." +msgstr "Uppdatera kolumnerna ``x`` och ``y`` baserat på kolumnen ``geom``." + +#: ../../build/docs/basic/graphs.rst:207 +msgid "pgr_connectedComponents" +msgstr "pgr_connectedComponents" + +#: ../../build/docs/basic/graphs.rst:209 +msgid "``pgr_connectedComponents`` compute the connected components of an undirected graph using a Depth First Search approach. A connected component of an undirected graph is a set of vertices that are all reachable from each other." +msgstr "" +"``pgr_connectedComponents`` beräknar de anslutna komponenterna i en odelad " +"graf med hjälp av Depth First Search. En ansluten komponent i en odelad graf " +"är en uppsättning hörn som alla är nåbara från varandra." + +#: ../../build/docs/basic/graphs.rst:222 +msgid "Description of the function can be found in `pgr_connectedComponents `__" +msgstr "" +"Beskrivning av funktionen finns i `pgr_connectedComponents `__" + +#: ../../build/docs/basic/graphs.rst:227 +msgid "Exercise 3: Set components on edges and vertices tables" +msgstr "Övning 3: Setkomponenter på kanter och hörntabeller" + +#: ../../build/docs/basic/graphs.rst:231 +msgid "Get the information about the graph components." +msgstr "Hämta information om grafens komponenter." + +#: ../../build/docs/basic/graphs.rst:235 +msgid "Create additional columns on the edges and vertices tables." +msgstr "Skapa ytterligare kolumner i tabellerna för kanter och hörn." + +#: ../../build/docs/basic/graphs.rst:246 +msgid "Use the ``pgr_connectedComponents`` to fill up the vertices table." +msgstr "" +"Använd ``pgr_connectedComponents`` för att fylla i tabellen med hörnpunkter." + +#: ../../build/docs/basic/graphs.rst:248 +msgid "Use the results to store the component numbers on the vertices table. (**line 1**)" +msgstr "" +"Använd resultatet för att lagra komponentnumren i vertikaltabellen. (**rad " +"1**)" + +#: ../../build/docs/basic/graphs.rst:250 +msgid "Use the OSM identifiers of the vertices. (**lines 4-5**)" +msgstr "Använd OSM-identifierarna för topparna. (**rader 4-5**)" + +#: ../../build/docs/basic/graphs.rst:262 +msgid "Update the edges table with based on the component number of the vertex" +msgstr "Uppdatera tabellen med kanter baserat på toppunktens komponentnummer" + +#: ../../build/docs/basic/graphs.rst:275 +msgid "Exercise 4: Inspect the components" +msgstr "Övning 4: Inspektera komponenterna" + +#: ../../build/docs/basic/graphs.rst:279 +msgid "Answer the following questions:" +msgstr "Svara på följande frågor:" + +#: ../../build/docs/basic/graphs.rst:281 +#: ../../build/docs/basic/graphs.rst:288 +msgid "How many components are in the vertices table?" +msgstr "Hur många komponenter finns det i vertices-tabellen?" + +#: ../../build/docs/basic/graphs.rst:282 +#: ../../build/docs/basic/graphs.rst:301 +msgid "How many components are in the edges table?" +msgstr "Hur många komponenter finns det i kantbordet?" + +#: ../../build/docs/basic/graphs.rst:283 +#: ../../build/docs/basic/graphs.rst:314 +msgid "List the 10 components with more edges." +msgstr "Lista de 10 komponenter som har flest kanter." + +#: ../../build/docs/basic/graphs.rst:284 +#: ../../build/docs/basic/graphs.rst:328 +msgid "Get the component with the maximum number of edges." +msgstr "Hämta komponenten med det maximala antalet kanter." + +#: ../../build/docs/basic/graphs.rst:290 +#: ../../build/docs/basic/graphs.rst:303 +msgid "Count the distinct components." +msgstr "Räkna de olika komponenterna." + +#: ../../build/docs/basic/graphs.rst:316 +msgid "Count number of rows grouped by component. (**line 1**)" +msgstr "Räkna antal rader grupperade efter komponent. (**rad 1**)" + +#: ../../build/docs/basic/graphs.rst:317 +msgid "Inverse order to display the top 10. (**line 2**)" +msgstr "Omvänd ordning för att visa topp 10. (**rad 2**)" + +#: ../../build/docs/basic/graphs.rst:330 +msgid "Use the query from last question to get the maximum count" +msgstr "Använd frågan från förra frågan för att få det maximala antalet" + +#: ../../build/docs/basic/graphs.rst:331 +msgid "Get the component that matches the maximum value." +msgstr "Hämta den komponent som matchar det högsta värdet." + +#: ../../build/docs/basic/graphs.rst:345 +msgid "Preparing the graphs" +msgstr "Förberedelse av graferna" + +#: ../../build/docs/basic/graphs.rst:348 +msgid "Exercise 5: Creating a view for routing" +msgstr "Övning 5: Skapa en vy för routing" + +#: ../../build/docs/basic/graphs.rst:350 +msgid "View of roads for vehicles" +msgstr "Utsikt över vägar för fordon" + +#: ../../build/docs/basic/graphs.rst:356 +msgid "Create a view with minimal amount of information for processing the particular vehicles." +msgstr "" +"Skapa en vy med minimal mängd information för att bearbeta de specifika " +"fordonen." + +#: ../../build/docs/basic/graphs.rst:357 +msgid "Use the OSM identifiers on the vertices." +msgstr "Använd OSM-identifierarna på topparna." + +#: ../../build/docs/basic/graphs.rst:358 +msgid "Routing `cost` and `reverse_cost` in terms of seconds for routing calculations." +msgstr "" +"Routing `cost` och `reverse_cost` i sekunder för beräkningar av routing." + +#: ../../build/docs/basic/graphs.rst:359 +msgid "Exclude `steps`, `footway`, `path`, `cycleway` segments." +msgstr "Utesluta segmenten `steps`, `footway`, `path`, `cycleway`." + +#: ../../build/docs/basic/graphs.rst:360 +#: ../../build/docs/basic/graphs.rst:491 +msgid "Data needed in the view for further processing." +msgstr "Data som behövs i vyn för vidare bearbetning." + +#: ../../build/docs/basic/graphs.rst:362 +msgid "`name` The name of the segment." +msgstr "`name` Namnet på segmentet." + +#: ../../build/docs/basic/graphs.rst:363 +msgid "`length_m` The length in meters rename to ``length``." +msgstr "`length_m` Längden i meter byter namn till ``length``." + +#: ../../build/docs/basic/graphs.rst:364 +msgid "`the_geom` The geometry rename to ``geom``." +msgstr "`the_geom` Geometrin byter namn till ``geom``." + +#: ../../build/docs/basic/graphs.rst:366 +#: ../../build/docs/basic/graphs.rst:496 +msgid "Verify the number of edges was reduced." +msgstr "Kontrollera att antalet kanter har minskats." + +#: ../../build/docs/basic/graphs.rst:370 +#: ../../build/docs/basic/graphs.rst:436 +#: ../../build/docs/basic/graphs.rst:500 +msgid "Creating the view:" +msgstr "Skapa en vy:" + +#: ../../build/docs/basic/graphs.rst:372 +msgid "If you need to reconstruct the view, first drop it using the command on **line 1**." +msgstr "" +"Om du behöver rekonstruera vyn, släpp den först med hjälp av kommandot på **" +"rad 1**." + +#: ../../build/docs/basic/graphs.rst:374 +msgid "Get the component with maximum number of edges (**lines 6-10**)" +msgstr "Hämta komponenten med maximalt antal kanter (**raderna 6-10**)" + +#: ../../build/docs/basic/graphs.rst:375 +msgid "The `source` and `target` requirements for the function are to be with OSM identifiers. (line **14**)" +msgstr "" +"Kraven på `source` och `target` för funktionen ska vara med OSM-" +"identifierare. (rad **14**)" + +#: ../../build/docs/basic/graphs.rst:377 +msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds. (line **15**)" +msgstr "Kostnaden och den omvända kostnaden anges i sekunder. (rad **15**)" + +#: ../../build/docs/basic/graphs.rst:378 +msgid "The additional parameters ``length_m`` and ``the_geom`` are renamed, ``name`` is also included. (line **16**)" +msgstr "" +"De ytterligare parametrarna ``length_m`` och ``the_geom`` har bytt namn, " +"``name`` ingår också. (rad **16**)" + +#: ../../build/docs/basic/graphs.rst:380 +msgid "``JOIN`` with the `configuration`:" +msgstr "``JOIN`` med `konfigurationen`:" + +#: ../../build/docs/basic/graphs.rst:382 +msgid "Exclude `steps`, `footway`, `path`, `cycleway`. (line **18**)" +msgstr "Exkludera `steps`, `footway`, `path`, `cycleway`. (rad **18**)" + +#: ../../build/docs/basic/graphs.rst:395 +msgid "Verification:" +msgstr "Verifiering:" + +#: ../../build/docs/basic/graphs.rst:397 +msgid "Count the rows on the original ``ways`` and on ``vehicle_net``." +msgstr "Räkna raderna på de ursprungliga ``ways`` och på ``vehicle_net``." + +#: ../../build/docs/basic/graphs.rst:407 +msgid "Get the description of the view" +msgstr "Hämta beskrivningen av vyn" + +#: ../../build/docs/basic/graphs.rst:419 +msgid "Exercise 6: Limiting the road network within an area" +msgstr "Övning 6: Begränsa vägnätet inom ett område" + +#: ../../build/docs/basic/graphs.rst:421 +msgid "View of smaller set of roads for vehicles" +msgstr "Vy över mindre uppsättning vägar för fordon" + +#: ../../build/docs/basic/graphs.rst:427 +msgid "Create a view ``taxi_net`` for the `taxi`:" +msgstr "Skapa en vy ``taxi_net`` för `taxi`:" + +#: ../../build/docs/basic/graphs.rst:429 +msgid "The taxi can only circulate inside this Bounding Box: ``(-48.52,-1.46,-48.45,-1.41)``" +msgstr "" +"Taxin kan bara cirkulera inom denna avgränsningsruta: ``(-48.52,-1.46,-48." +"45,-1.41)``" + +#: ../../build/docs/basic/graphs.rst:430 +msgid "The taxi speed is 10% slower than the particular vehicle." +msgstr "Taxihastigheten är 10% slägre än för det aktuella fordonet." + +#: ../../build/docs/basic/graphs.rst:432 +msgid "Verify the reduced number of road segments." +msgstr "Verifiera det minskade antalet vägsegment." + +#: ../../build/docs/basic/graphs.rst:438 +msgid "Adjust the taxi's ``cost`` and ``reverse_cost`` to be 10% slower than of the particular vehicle. (line **7**)" +msgstr "" +"Justera taxins ``cost`` och ``reverse_cost`` så att de är 10% långsammare än " +"för det aktuella fordonet. (rad **7**)" + +#: ../../build/docs/basic/graphs.rst:440 +msgid "The graph for the taxi is a subset of the ``vehicle_net`` graph. (line **9**)" +msgstr "" +"Grafen för taxin är en delmängd av grafen för ``vehicle_net``. (rad **9**)" + +#: ../../build/docs/basic/graphs.rst:441 +msgid "Can only circulate inside the bounding box: ``(-48.52,-1.46,-48.45,-1.41)``. (line **10**)" +msgstr "" +"Kan bara cirkulera inom den avgränsande rutan: ``(-48.52,-1.46,-48.45,-1." +"41)``. (rad **10**)" + +#: ../../build/docs/basic/graphs.rst:455 +msgid "Count the rows on ``taxi_net``." +msgstr "Räkna raderna på ``taxi_net``." + +#: ../../build/docs/basic/graphs.rst:466 +#: ../../build/docs/basic/graphs.rst:529 +msgid "Get the description." +msgstr "Hämta beskrivningen." + +#: ../../build/docs/basic/graphs.rst:477 +msgid "Exercise 7: Creating a materialized view for routing pedestrians" +msgstr "Övning 7: Skapa en materialiserad vy för att dirigera fotgängare" + +#: ../../build/docs/basic/graphs.rst:479 +msgid "View of roads for pedestrians" +msgstr "Vy över vägar för fotgängare" + +#: ../../build/docs/basic/graphs.rst:485 +msgid "Create a materialized view with minimal amount of information for processing pedestrians." +msgstr "" +"Skapa en materialiserad vy med minimal mängd information för bearbetning av " +"fotgängare." + +#: ../../build/docs/basic/graphs.rst:486 +msgid "Routing `cost` and `reverse_cost` will be on seconds for routing calculations." +msgstr "" +"Routing `cost` och `reverse_cost` kommer att vara på sekunder för " +"routingsberäkningar." + +#: ../../build/docs/basic/graphs.rst:490 +msgid "Exclude `motorway` , `primary` and `secondary` segments." +msgstr "Exkludera segmenten `motorway`, `primary` och `secondary`." + +#: ../../build/docs/basic/graphs.rst:493 +msgid "`length_m` The length in meters." +msgstr "`length_m` Längden i meter." + +#: ../../build/docs/basic/graphs.rst:494 +msgid "`the_geom` The geometry." +msgstr "`the_geom` Geometrin." + +#: ../../build/docs/basic/graphs.rst:502 +msgid "Similar to `Exercise 5: Creating a view for routing`_:" +msgstr "Liknar `Övning 5: Skapa en vy för routing`_:" + +#: ../../build/docs/basic/graphs.rst:504 +msgid "The ``cost`` and ``reverse_cost`` are in terms of seconds with speed of ``2 mts/sec``. (line **7**)" +msgstr "" +"Kostnaden och den omvända kostnaden anges i sekunder med en hastighet av 2 " +"mts/sek. (rad **7**)" + +#: ../../build/docs/basic/graphs.rst:505 +msgid "Exclude `motorway`, `primary` and `secondary` . (line **11**)" +msgstr "Uteslut \"motorway\", \"primary\" och \"secondary\" (rad **11**)" + +#: ../../build/docs/basic/graphs.rst:518 +msgid "Count the rows on the view ``walk_net``." +msgstr "Räkna raderna på vyn ``walk_net``." + +#: ../../build/docs/basic/graphs.rst:541 +msgid "Exercise 8: Testing the views for routing" +msgstr "Övning 8: Testa vyerna för routing" + +#: ../../build/docs/basic/graphs.rst:543 +msgid "From the |ch7_place_1| to the |ch7_place_2|" +msgstr "Från |ch7_place_1| till |ch7_place_2|" + +#: ../../build/docs/basic/graphs.rst:549 +msgid "Test the created views" +msgstr "Testa de skapade vyerna" + +#: ../../build/docs/basic/graphs.rst:551 +msgid "In particular:" +msgstr "I synnerhet:" + +#: ../../build/docs/basic/graphs.rst:553 +msgid "From the |ch7_place_1| to the \"|ch7_place_2| using the OSM identifier" +msgstr "" +"Från \"|ch7_place_1|\" till \"|ch7_place_2|\" med hjälp av OSM-identifieraren" + +#: ../../build/docs/basic/graphs.rst:554 +msgid "the views to be tested are:" +msgstr "de åsikter som ska testas är:" + +#: ../../build/docs/basic/graphs.rst:556 +msgid "``vehicle_net``" +msgstr "``vehicle_net``" + +#: ../../build/docs/basic/graphs.rst:557 +msgid "``taxi_net``" +msgstr "``taxi_net``" + +#: ../../build/docs/basic/graphs.rst:558 +msgid "``walk_net``" +msgstr "``walk_net``" + +#: ../../build/docs/basic/graphs.rst:560 +msgid "Only show the following results, as the other columns are to be ignored on the function." +msgstr "" +"Visa endast följande resultat, eftersom de andra kolumnerna ska ignoreras i " +"funktionen." + +#: ../../build/docs/basic/graphs.rst:562 +msgid "``seq``" +msgstr "``seq``" + +#: ../../build/docs/basic/graphs.rst:563 +msgid "``edge`` with the name ``id``" +msgstr "``edge`` med namnet ``id``" + +#: ../../build/docs/basic/graphs.rst:564 +msgid "``cost`` with the name: ``seconds``" +msgstr "``cost`` med namnet: ``seconds``" + +#: ../../build/docs/basic/graphs.rst:568 +msgid "In general" +msgstr "I allmänhet" + +#: ../../build/docs/basic/graphs.rst:570 +msgid "The departure is |ch7_place_1| with OSM identifier |ch7_osmid_1|." +msgstr "Avgången är |ch7_place_1| med OSM-identifierare |ch7_osmid_1|." + +#: ../../build/docs/basic/graphs.rst:571 +msgid "The destination is |ch7_place_2| with OSM identifier |ch7_osmid_2|." +msgstr "Destinationen är |ch7_place_2| med OSM-identifieraren |ch7_osmid_2|." + +#: ../../build/docs/basic/graphs.rst:573 +msgid "For ``vehicle_net``:" +msgstr "För ``vehicle_net``:" + +#: ../../build/docs/basic/graphs.rst:575 +msgid "``vehicle_net`` is used." +msgstr "``vehicle_net`` används." + +#: ../../build/docs/basic/graphs.rst:576 +msgid "Selection of the columns with the corresponding names are on line **1**." +msgstr "Val av kolumner med motsvarande namn finns på rad **1**." + +#: ../../build/docs/basic/graphs.rst:577 +msgid "The view is prepared with the column names that pgRouting use." +msgstr "Vyn är förberedd med de kolumnnamn som pgRouting använder." + +#: ../../build/docs/basic/graphs.rst:579 +msgid "There is no need to rename columns. (line **3**)" +msgstr "Det finns inget behov av att byta namn på kolumner. (rad **3**)" + +#: ../../build/docs/basic/graphs.rst:581 +msgid "The OSM identifiers of the departure and destination are used. (line **4**)" +msgstr "OSM-identifierarna för avgång och destination används. (rad **4**)" + +#: ../../build/docs/basic/graphs.rst:594 +msgid "For ``taxi_net``:" +msgstr "För ``taxi_net``:" + +#: ../../build/docs/basic/graphs.rst:596 +msgid "Similar as the previous one but with ``taxi_net``. (line **3**)" +msgstr "Liknande som den föregående men med ``taxi_net``. (rad **3**)" + +#: ../../build/docs/basic/graphs.rst:597 +msgid "The results give the same route as with ``vehicle_net`` but ``cost`` is higher." +msgstr "" +"Resultatet ger samma rutt som med ``vehicle_net`` men ``cost`` är högre." + +#: ../../build/docs/basic/graphs.rst:610 +msgid "For ``walk_net``:" +msgstr "För ``walk_net``:" + +#: ../../build/docs/basic/graphs.rst:612 +msgid "Similar as the previous one but with ``walk_net``. (line **3**)" +msgstr "Liknande som den föregående men med ``walk_net``. (rad **3**)" + +#: ../../build/docs/basic/graphs.rst:613 +msgid "The results give a different route than of the vehicles." +msgstr "Resultaten ger en annan rutt än fordonens." diff --git a/locale/sv/LC_MESSAGES/basic/pedestrian.po b/locale/sv/LC_MESSAGES/basic/pedestrian.po index fc6b79de8..e67289c6c 100644 --- a/locale/sv/LC_MESSAGES/basic/pedestrian.po +++ b/locale/sv/LC_MESSAGES/basic/pedestrian.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -48,8 +48,8 @@ msgstr "" #: ../../build/docs/basic/pedestrian.rst:31 msgid "You can specify when to consider the graph as `directed `__ or undirected." msgstr "" -"Du kan ange när grafen ska betraktas som \"riktad\" `__ eller \"oriktad\"." +"Du kan ange när grafen ska betraktas som `riktad `__ eller oriktad." #: ../../build/docs/basic/pedestrian.rst:35 #: ../../build/docs/basic/pedestrian.rst:282 @@ -147,7 +147,7 @@ msgstr "|osmid_5| |place_5| (|id_5|)" msgid "The corresponding :code:`id` are shown in the following image, and a sample route from \"|place_3|\" to \"|place_5|\"." msgstr "" "Motsvarande :code:`id` visas i följande bild, och ett exempel på en rutt " -"från \"|place_3|\" till \"|place_5|\"." +"från \"|plats_3|\" till \"|plats_5|\"." #: ../../build/docs/basic/pedestrian.rst:105 msgid "Exercise 1: Single pedestrian routing" @@ -361,7 +361,7 @@ msgstr "Övning 5: Kombination av rutter" #: ../../build/docs/basic/pedestrian.rst:251 msgid "First pedestrian goes from \"|place_1|\" to \"|place_4|\"" -msgstr "Den första fotgängaren går från \"|place_1|\" till \"|place_4|\"" +msgstr "Den första fotgängaren går från \"|plats_1|\" till \"|plats_4|\"" #: ../../build/docs/basic/pedestrian.rst:252 msgid "Second pedestrian goes from \"|place_2|\" to \"|place_5|\"" @@ -387,7 +387,7 @@ msgstr "" #: ../../build/docs/basic/pedestrian.rst:276 msgid "pgr_dijkstraCost" -msgstr "pgr_dijkstraKostnad" +msgstr "pgr_dijkstraCost" #: ../../build/docs/basic/pedestrian.rst:278 msgid "When the main goal is to calculate the total cost, without \"inspecting\" the `pgr_dijkstra` results, using ``pgr_dijkstraCost`` returns a more compact result." @@ -431,7 +431,7 @@ msgstr "Resultat som aggregerade kostnader." msgid "Compare with `Exercise 4: Many Pedestrians going to different destinations`_ 's note." msgstr "" "Jämför med `Exercise 4: Many Pedestrians going to different " -"destinations`_-anteckning." +"destinations`-anteckning." #: ../../build/docs/basic/pedestrian.rst:335 msgid "Exercise 7: Many Pedestrians going to different destinations summarizing the total costs per departure" diff --git a/locale/sv/LC_MESSAGES/basic/plpgsql_function.po b/locale/sv/LC_MESSAGES/basic/plpgsql_function.po index ef9bd4eb8..2807207b5 100644 --- a/locale/sv/LC_MESSAGES/basic/plpgsql_function.po +++ b/locale/sv/LC_MESSAGES/basic/plpgsql_function.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-10 17:09+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -369,8 +369,8 @@ msgstr "" #: ../../build/docs/basic/plpgsql_function.rst:143 msgid "Using the Postgis distance operator `<-> `__ to order by distance." msgstr "" -"Använd Postgis distansoperator `<-> `__ för att beställa efter avstånd." +"Använd Postgis distansoperator `<-> <https://postgis.net/docs/" +"geometry_distance_knn.html>`__ för att beställa efter avstånd." #: ../../build/docs/basic/plpgsql_function.rst:144 msgid "Get only the first row, to obtain the nearest identifier of the vertex." @@ -426,7 +426,7 @@ msgstr "Funktionsnamn: ``wrk_nearest``." #: ../../build/docs/basic/plpgsql_function.rst:198 msgid "Needs to work only for the **final application** views and table." -msgstr "Behöver bara fungera för **slutgiltig ansökan** vyer och tabell." +msgstr "Behöver bara fungera för **slutgiltig applikation** vyer och tabell." #: ../../build/docs/basic/plpgsql_function.rst:201 msgid "The input parameters:" @@ -567,7 +567,7 @@ msgstr "Skapa funktionen ``wrk_fromAtoB``." #: ../../build/docs/basic/plpgsql_function.rst:331 msgid "Follow the description given at `Requirements for routing from A to B`_." -msgstr "Följ beskrivningen i avsnittet `Krav på rutten från A till B`_." +msgstr "Följ beskrivningen i avsnittet \"Krav på rutten från A till B\"." #: ../../build/docs/basic/plpgsql_function.rst:332 msgid "Use specialized functions:" diff --git a/locale/sv/LC_MESSAGES/basic/sql_function.po b/locale/sv/LC_MESSAGES/basic/sql_function.po index b0e979181..ac60dd800 100644 --- a/locale/sv/LC_MESSAGES/basic/sql_function.po +++ b/locale/sv/LC_MESSAGES/basic/sql_function.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 18:21+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -42,7 +42,7 @@ msgstr "" #: ../../build/docs/basic/sql_function.rst:30 msgid "The application requirements" -msgstr "Kraven för ansökan" +msgstr "Kraven för applikation" #: ../../build/docs/basic/sql_function.rst:32 msgid "A front end needs the following routing information:" diff --git a/locale/sv/LC_MESSAGES/basic/vehicle.po b/locale/sv/LC_MESSAGES/basic/vehicle.po index 690546079..6a998c6a9 100644 --- a/locale/sv/LC_MESSAGES/basic/vehicle.po +++ b/locale/sv/LC_MESSAGES/basic/vehicle.po @@ -325,7 +325,7 @@ msgstr "Från \"|place_3|\" till \"|place_1|\"" #: ../../build/docs/basic/vehicle.rst:249 #: ../../build/docs/basic/vehicle.rst:313 msgid "From |place_3| to |place_1|" -msgstr "Från |place_3| till |place_1|" +msgstr "Från |place_3 till |place_1" #: ../../build/docs/basic/vehicle.rst:256 msgid "Add a penalty column" diff --git a/locale/sv/LC_MESSAGES/basic/withPoints.po b/locale/sv/LC_MESSAGES/basic/withPoints.po new file mode 100644 index 000000000..d1a6b664e --- /dev/null +++ b/locale/sv/LC_MESSAGES/basic/withPoints.po @@ -0,0 +1,730 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2010-2024 pgRouting Developers +# This file is distributed under the same license as the Workshop FOSS4G Belém package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: Workshop FOSS4G Belém 3.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-10 17:09+0000\n" +"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.4.3\n" + +#: ../../build/docs/basic/withPoints.rst:11 +msgid "pl/pgsql function" +msgstr "pl/pgsql-funktion" + +#: ../../build/docs/basic/withPoints.rst:17 +msgid "Other kind of functions are `pl/pgsql `__. As the applications requirements become more complex, using wrappers of previously defined functions becomes necessary for clarity." +msgstr "" +"Andra typer av funktioner är `pl/pgsql `__. När applikationskraven blir mer komplexa blir det " +"nödvändigt att använda omslag för tidigare definierade funktioner för " +"tydlighetens skull." + +#: ../../build/docs/basic/withPoints.rst:22 +msgid "Chapter contents" +msgstr "Kapitelinnehåll" + +#: ../../build/docs/basic/withPoints.rst:25 +msgid "Requirements for routing from A to B" +msgstr "Krav för routing från A till B" + +#: ../../build/docs/basic/withPoints.rst:28 +msgid "Chapter problem:" +msgstr "Kapitelproblem:" + +#: ../../build/docs/basic/withPoints.rst:29 +msgid "Create a function ``wrk_fromAtoB`` that allows routing from 2 geometries." +msgstr "" +"Skapa en funktion ``wrk_fromAtoB`` som tillåter routing från 2 geometrier." + +#: ../../build/docs/basic/withPoints.rst:30 +msgid "The function takes latitude/longitude points as input parameters." +msgstr "Funktionen tar latitud/longitudpunkter som inparametrar." + +#: ../../build/docs/basic/withPoints.rst:31 +msgid "Returns a route that includes a geometry so that if can be displayed, for example, in QGIS." +msgstr "" +"Returnerar en rutt som innehåller en geometri så att den kan visas i t.ex. " +"QGIS." + +#: ../../build/docs/basic/withPoints.rst:32 +msgid "Will also return some other attributes." +msgstr "Kommer också att returnera några andra attribut." + +#: ../../build/docs/basic/withPoints.rst:34 +msgid "The detailed description:" +msgstr "Den detaljerade beskrivningen:" + +#: ../../build/docs/basic/withPoints.rst:37 +msgid "Input parameters" +msgstr "Parametrar för inmatning" + +#: ../../build/docs/basic/withPoints.rst:39 +msgid "Parameter" +msgstr "Parameter" + +#: ../../build/docs/basic/withPoints.rst:39 +#: ../../build/docs/basic/withPoints.rst:204 +#: ../../build/docs/basic/withPoints.rst:214 +msgid "type" +msgstr "typ" + +#: ../../build/docs/basic/withPoints.rst:39 +#: ../../build/docs/basic/withPoints.rst:54 +#: ../../build/docs/basic/withPoints.rst:204 +#: ../../build/docs/basic/withPoints.rst:214 +msgid "Description" +msgstr "Beskrivning" + +#: ../../build/docs/basic/withPoints.rst:41 +msgid "``edges_subset``" +msgstr "``edges_subset``" + +#: ../../build/docs/basic/withPoints.rst:41 +#: ../../build/docs/basic/withPoints.rst:206 +msgid "REGCLASS" +msgstr "REGCLASS" + +#: ../../build/docs/basic/withPoints.rst:41 +msgid "Edge table name identifier." +msgstr "Identifierare för namn på kanttabell." + +#: ../../build/docs/basic/withPoints.rst:42 +msgid "``lat1``" +msgstr "``lat1``" + +#: ../../build/docs/basic/withPoints.rst:42 +#: ../../build/docs/basic/withPoints.rst:43 +#: ../../build/docs/basic/withPoints.rst:44 +#: ../../build/docs/basic/withPoints.rst:45 +#: ../../build/docs/basic/withPoints.rst:207 +#: ../../build/docs/basic/withPoints.rst:208 +msgid "NUMERIC" +msgstr "NUMERISK" + +#: ../../build/docs/basic/withPoints.rst:42 +msgid "The latitude of the `departure` point." +msgstr "Latitud för avgångspunkten." + +#: ../../build/docs/basic/withPoints.rst:43 +msgid "``lon1``" +msgstr "``lon1``" + +#: ../../build/docs/basic/withPoints.rst:43 +msgid "The longitude of the `departure` point." +msgstr "Longitud för avgångspunkten." + +#: ../../build/docs/basic/withPoints.rst:44 +msgid "``lat2``" +msgstr "``lat2``" + +#: ../../build/docs/basic/withPoints.rst:44 +msgid "The latitude of the `destination` point." +msgstr "Latitud för den punkt som är `destination`." + +#: ../../build/docs/basic/withPoints.rst:45 +msgid "``lon2``" +msgstr "``lon2``" + +#: ../../build/docs/basic/withPoints.rst:45 +msgid "The longitude of the `destination` point." +msgstr "Longituden för den punkt som är `destination`." + +#: ../../build/docs/basic/withPoints.rst:46 +msgid "``do_debug``" +msgstr "``do_debug``" + +#: ../../build/docs/basic/withPoints.rst:46 +msgid "BOOLEAN" +msgstr "BOOLEAN" + +#: ../../build/docs/basic/withPoints.rst:46 +msgid "Flag to create a ``WARNING`` with the query that is been executed" +msgstr "Flagga för att skapa en ``WARNING`` med den fråga som körs" + +#: ../../build/docs/basic/withPoints.rst:52 +msgid "Output columns" +msgstr "Utgångskolumner" + +#: ../../build/docs/basic/withPoints.rst:54 +#: ../../build/docs/basic/withPoints.rst:204 +msgid "Column" +msgstr "Kolumn" + +#: ../../build/docs/basic/withPoints.rst:56 +msgid "``seq``" +msgstr "``seq``" + +#: ../../build/docs/basic/withPoints.rst:56 +msgid "For ordering purposes." +msgstr "För beställningsändamål." + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "``gid``" +msgstr "``gid``" + +#: ../../build/docs/basic/withPoints.rst:57 +msgid "The edge identifier that can be used to JOIN the results to the ``ways`` table." +msgstr "" +"Den edge-identifierare som kan användas för att JOINNA resultaten till " +"tabellen ``ways``." + +#: ../../build/docs/basic/withPoints.rst:58 +msgid "``name``" +msgstr "``name``" + +#: ../../build/docs/basic/withPoints.rst:58 +msgid "The street name." +msgstr "Gatunamnet." + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "``azimuth``" +msgstr "``azimuth``" + +#: ../../build/docs/basic/withPoints.rst:59 +msgid "Between start and end node of an edge." +msgstr "Mellan start- och slutnod för en kant." + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "``length``" +msgstr "``length``" + +#: ../../build/docs/basic/withPoints.rst:60 +msgid "In meters." +msgstr "I meter." + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "``minutes``" +msgstr "``minutes``" + +#: ../../build/docs/basic/withPoints.rst:61 +msgid "Minutes taken to traverse the segment." +msgstr "Minuter det tar att korsa segmentet." + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "``route_geom``" +msgstr "``route_geom``" + +#: ../../build/docs/basic/withPoints.rst:62 +msgid "The road geometry with corrected directionality." +msgstr "Väggeometri med korrigerad riktningsverkan." + +#: ../../build/docs/basic/withPoints.rst:66 +msgid "For this chapter, the following points will be used for testing." +msgstr "För detta kapitel kommer följande punkter att användas för testning." + +#: ../../build/docs/basic/withPoints.rst:68 +msgid "(lat,lon) = (-1.455829, -48.446044)" +msgstr "(lat,lon) = (-1,455829, -48,446044)" + +#: ../../build/docs/basic/withPoints.rst:69 +msgid "(lat,lon) = (-1.453448, -48.447142)" +msgstr "(lat,lon) = (-1,453448, -48,447142)" + +#: ../../build/docs/basic/withPoints.rst:72 +msgid "The Vertices Table" +msgstr "Tabellen Vertices" + +#: ../../build/docs/basic/withPoints.rst:74 +msgid "Graphs have a `set of edges` and a `set of vertices` associated to it. The views need their vertices table." +msgstr "" +"Grafer har en \"uppsättning kanter\" och en \"uppsättning hörn\" associerade " +"till sig. Vyerna behöver sin vertices-tabell." + +#: ../../build/docs/basic/withPoints.rst:78 +msgid "Exercise 1: Create vertices table" +msgstr "Övning 1: Skapa en tabell med hörnpunkter" + +#: ../../build/docs/basic/withPoints.rst:81 +#: ../../build/docs/basic/withPoints.rst:128 +#: ../../build/docs/basic/withPoints.rst:193 +#: ../../build/docs/basic/withPoints.rst:256 +#: ../../build/docs/basic/withPoints.rst:329 +#: ../../build/docs/basic/withPoints.rst:405 +msgid "Problem" +msgstr "Problem" + +#: ../../build/docs/basic/withPoints.rst:82 +msgid "Create a vertices table for the views:" +msgstr "Skapa en vertices-tabell för vyerna:" + +#: ../../build/docs/basic/withPoints.rst:84 +msgid "``vehicle_net``" +msgstr "``vehicle_net``" + +#: ../../build/docs/basic/withPoints.rst:85 +msgid "``taxi_net``" +msgstr "``taxi_net``" + +#: ../../build/docs/basic/withPoints.rst:86 +msgid "``walk_net``" +msgstr "``walk_net``" + +#: ../../build/docs/basic/withPoints.rst:90 +#: ../../build/docs/basic/withPoints.rst:141 +#: ../../build/docs/basic/withPoints.rst:220 +#: ../../build/docs/basic/withPoints.rst:273 +#: ../../build/docs/basic/withPoints.rst:342 +#: ../../build/docs/basic/withPoints.rst:428 +msgid "Solution" +msgstr "Lösning" + +#: ../../build/docs/basic/withPoints.rst:91 +msgid "Use ``pgr_extractVertices`` (explained in :doc:`graphs`) to create the vertices table" +msgstr "" +"Använd ``pgr_extractVertices`` (förklaras i :doc:`graphs`) för att " +"skapa tabellen med hörnpunkter" + +#: ../../build/docs/basic/withPoints.rst:93 +msgid "``JOIN`` the vertices table with ``ways_vertices`` (created in :doc:`graphs`) to get the ``x``, ``y``, ``geom`` information." +msgstr "" +"``JOIN`` vertices tabellen med ``ways_vertices`` (skapad i " +":doc:`graphs`) för att få ``x``, ``y``, ``geom`` information." + +#: ../../build/docs/basic/withPoints.rst:96 +#: ../../build/docs/basic/withPoints.rst:410 +#: ../../build/docs/basic/withPoints.rst:429 +msgid "For ``vehicle_net``:" +msgstr "För ``vehicle_net``:" + +#: ../../build/docs/basic/withPoints.rst:104 +#: ../../build/docs/basic/withPoints.rst:414 +#: ../../build/docs/basic/withPoints.rst:444 +msgid "For ``taxi_net``:" +msgstr "För ``taxi_net``:" + +#: ../../build/docs/basic/withPoints.rst:110 +#: ../../build/docs/basic/withPoints.rst:418 +#: ../../build/docs/basic/withPoints.rst:457 +msgid "For ``walk_net``:" +msgstr "För ``walk_net``:" + +#: ../../build/docs/basic/withPoints.rst:112 +msgid "Modify the above queries to create the ``walk_net_vertices`` table." +msgstr "" +"Modifiera ovanstående frågor för att skapa tabellen ``walk_net_vertices``." + +#: ../../build/docs/basic/withPoints.rst:120 +msgid "It is left to the reader to remove disconected components on the views." +msgstr "Det är upp till läsaren att ta bort borttagna komponenter på vyerna." + +#: ../../build/docs/basic/withPoints.rst:122 +msgid "See :doc:`graphs`" +msgstr "Se :doc:`graphs`" + +#: ../../build/docs/basic/withPoints.rst:125 +msgid "Exercise 3: Nearest Vertex" +msgstr "Övning 3: Närmaste toppunkt" + +#: ../../build/docs/basic/withPoints.rst:129 +msgid "Calculate the (OSM) identifier of the nearest vertex to a point." +msgstr "Beräkna (OSM)-identifieraren för det närmaste toppunktet till en punkt." + +#: ../../build/docs/basic/withPoints.rst:131 +msgid "In particular use the following (lat, lon) value: ``(-1.455829, -48.446044)``." +msgstr "" +"Använd i synnerhet följande (lat, lon)-värde: ``(-1,455829, -48,446044)``." + +#: ../../build/docs/basic/withPoints.rst:133 +#: ../../build/docs/basic/withPoints.rst:265 +msgid "calculate the nearest OSM identifier of the vertex to:" +msgstr "beräkna den närmaste OSM-identifieraren för vertexen till:" + +#: ../../build/docs/basic/withPoints.rst:135 +#: ../../build/docs/basic/withPoints.rst:267 +msgid "``ways_vertices``" +msgstr "``ways_vertices``" + +#: ../../build/docs/basic/withPoints.rst:136 +#: ../../build/docs/basic/withPoints.rst:268 +msgid "``vehicle_net_vertices``" +msgstr "``vehicle_net_vertices``" + +#: ../../build/docs/basic/withPoints.rst:137 +#: ../../build/docs/basic/withPoints.rst:269 +msgid "``taxi_net_vertices``" +msgstr "``taxi_net_vertices``" + +#: ../../build/docs/basic/withPoints.rst:138 +#: ../../build/docs/basic/withPoints.rst:270 +msgid "``walk_net_vertices``" +msgstr "``walk_net_vertices``" + +#: ../../build/docs/basic/withPoints.rst:142 +msgid "Remember that the ``id`` has an OSM vertex identifier on the vertices tables." +msgstr "" +"Kom ihåg att ``id`` har en OSM-vertexidentifierare på vertices-tabellerna." + +#: ../../build/docs/basic/withPoints.rst:143 +msgid "Using the Postgis distance operator `<-> `__ to order by distance." +msgstr "" +"Använd Postgis distansoperator `<-> `__ för att beställa efter avstånd." + +#: ../../build/docs/basic/withPoints.rst:144 +msgid "Get only the first row, to obtain the nearest identifier of the vertex." +msgstr "" +"Hämta bara den första raden för att få den närmaste identifieraren för " +"toppunktet." + +#: ../../build/docs/basic/withPoints.rst:146 +#: ../../build/docs/basic/withPoints.rst:274 +msgid "For ``ways_vertices``:" +msgstr "För ``ways_vertices``:" + +#: ../../build/docs/basic/withPoints.rst:157 +msgid "For ``vehicle_net_vertices``:" +msgstr "För ``vehicle_net_vertices``:" + +#: ../../build/docs/basic/withPoints.rst:159 +#: ../../build/docs/basic/withPoints.rst:174 +#: ../../build/docs/basic/withPoints.rst:182 +#: ../../build/docs/basic/withPoints.rst:293 +#: ../../build/docs/basic/withPoints.rst:306 +msgid "Modify the previous query." +msgstr "Ändra den tidigare förfrågan." + +#: ../../build/docs/basic/withPoints.rst:172 +#: ../../build/docs/basic/withPoints.rst:304 +msgid "For ``taxi_net_vertices``:" +msgstr "För ``taxi_net_vertices``:" + +#: ../../build/docs/basic/withPoints.rst:180 +#: ../../build/docs/basic/withPoints.rst:312 +msgid "For ``walk_net_vertices``:" +msgstr "För ``walk_net_vertices``:" + +#: ../../build/docs/basic/withPoints.rst:190 +msgid "Exercise 4: Nearest vertex function" +msgstr "Övning 4: Funktion för närmaste toppunkt" + +#: ../../build/docs/basic/withPoints.rst:194 +msgid "When operations look similar for different tables, a function can be created." +msgstr "" +"När operationer ser likadana ut för olika tabeller kan en funktion skapas." + +#: ../../build/docs/basic/withPoints.rst:196 +msgid "Create a function that calculates the OSM identifier of the nearest vertex to a point." +msgstr "" +"Skapa en funktion som beräknar OSM-identifieraren för det närmaste " +"toppunktet till en punkt." + +#: ../../build/docs/basic/withPoints.rst:197 +msgid "Function name: ``wrk_nearest``." +msgstr "Funktionsnamn: ``wrk_nearest``." + +#: ../../build/docs/basic/withPoints.rst:198 +msgid "Needs to work only for the **final application** views and table." +msgstr "Behöver bara fungera för **slutgiltig ansökan** vyer och tabell." + +#: ../../build/docs/basic/withPoints.rst:201 +msgid "The input parameters:" +msgstr "Inmatningsparametrarna:" + +#: ../../build/docs/basic/withPoints.rst:206 +msgid "vertex_table" +msgstr "vertex_table" + +#: ../../build/docs/basic/withPoints.rst:206 +msgid "Table name identifier." +msgstr "Identifierare för tabellnamn." + +#: ../../build/docs/basic/withPoints.rst:207 +msgid "lat" +msgstr "lat" + +#: ../../build/docs/basic/withPoints.rst:207 +msgid "The latitude of a point." +msgstr "Latitud för en punkt." + +#: ../../build/docs/basic/withPoints.rst:208 +msgid "lon" +msgstr "lon" + +#: ../../build/docs/basic/withPoints.rst:208 +msgid "The longitude of a point." +msgstr "Longituden för en punkt." + +#: ../../build/docs/basic/withPoints.rst:211 +msgid "The output:" +msgstr "Utdata:" + +#: ../../build/docs/basic/withPoints.rst:216 +msgid "BIGINT" +msgstr "BIGINT" + +#: ../../build/docs/basic/withPoints.rst:216 +msgid "the OSM identifier that is nearest to (lat,lon)." +msgstr "den OSM-identifierare som ligger närmast (lat,lon)." + +#: ../../build/docs/basic/withPoints.rst:221 +msgid "The function returns only one ``BIGINT`` value." +msgstr "Funktionen returnerar endast ett ``BIGINT``-värde." + +#: ../../build/docs/basic/withPoints.rst:222 +msgid "Using `format `__ to build the query." +msgstr "" +"Använda `format `__ för att bygga upp frågan." + +#: ../../build/docs/basic/withPoints.rst:226 +msgid "The structure of the query is similar to `Exercise 3: Nearest Vertex`_ solutions." +msgstr "Frågans struktur liknar `Exercise 3: Nearest Vertex`_ lösningar." + +#: ../../build/docs/basic/withPoints.rst:228 +msgid "``%1$I`` for the table name identifier." +msgstr "``%1$I`` för identifieraren av tabellnamnet." + +#: ../../build/docs/basic/withPoints.rst:229 +msgid "``%2$s`` and ``%3$s`` for the latitude and longitude." +msgstr "``%2$s`` och ``%3$s`` för latitud och longitud." + +#: ../../build/docs/basic/withPoints.rst:231 +msgid "The point is formed with (lon/lat) ``(%3$s, %2$s)``." +msgstr "Punkten bildas med (lon/lat) ``(%3$s, %2$s)``." + +#: ../../build/docs/basic/withPoints.rst:241 +msgid "Exercise 5: Test nearest vertex function" +msgstr "Övning 5: Testa funktionen för närmaste toppunkt" + +#: ../../build/docs/basic/withPoints.rst:243 +msgid "Nearest Vertex in vehicle network" +msgstr "Närmaste vertex i fordonsnätverket" + +#: ../../build/docs/basic/withPoints.rst:247 +msgid "Nearest Vertex in taxi network" +msgstr "Närmaste toppunkt i taxinätverket" + +#: ../../build/docs/basic/withPoints.rst:251 +msgid "Nearest Vertex in walk network" +msgstr "Närmaste vertex i promenadnätverk" + +#: ../../build/docs/basic/withPoints.rst:257 +msgid "Test the ``wrk_Nearest`` function." +msgstr "Testa funktionen ``wrk_Nearest``." + +#: ../../build/docs/basic/withPoints.rst:259 +msgid "Use the following (lat,lon) values: ``(-1.455829, -48.446044)``." +msgstr "Använd följande (lat,lon)-värden: ``(-1.455829, -48.446044)``." + +#: ../../build/docs/basic/withPoints.rst:261 +msgid "The point is the same as in `Exercise 3: Nearest Vertex`_ problem." +msgstr "Poängen är densamma som i `Övning 3: Närmaste vertex`_ problem." + +#: ../../build/docs/basic/withPoints.rst:263 +msgid "Verify the results are the same." +msgstr "Kontrollera att resultatet blir detsamma." + +#: ../../build/docs/basic/withPoints.rst:276 +msgid "Use the function with ``ways_vertices`` as the ``vertex_table`` parameter." +msgstr "" +"Använd funktionen med ``ways_vertices`` som parameter för ``vertex_table``." + +#: ../../build/docs/basic/withPoints.rst:277 +msgid "Pass the (lat,lon) values as second and third parameters." +msgstr "Skicka (lat,lon)-värdena som andra och tredje parameter." + +#: ../../build/docs/basic/withPoints.rst:278 +msgid "Using the function on the original data does not return the OSM identifier." +msgstr "" +"Om du använder funktionen på originaldata returneras inte OSM-identifieraren." + +#: ../../build/docs/basic/withPoints.rst:280 +msgid "The value stored in ``id`` column is not the OSM identifier." +msgstr "Värdet som lagras i kolumnen ``id`` är inte OSM-identifieraren." + +#: ../../build/docs/basic/withPoints.rst:291 +msgid "For ``vehicles_net_vertices``:" +msgstr "För ``vehicles_net_vertices``:" + +#: ../../build/docs/basic/withPoints.rst:320 +msgid "wrk_fromAtoB function" +msgstr "wrk_fromAtoB funktion" + +#: ../../build/docs/basic/withPoints.rst:322 +msgid "In this section, creation and testing the required function will be tackled." +msgstr "" +"I detta avsnitt behandlas skapande och testning av den funktion som krävs." + +#: ../../build/docs/basic/withPoints.rst:326 +msgid "Exercise 6: Creating the main function" +msgstr "Övning 6: Skapa huvudfunktionen" + +#: ../../build/docs/basic/withPoints.rst:330 +msgid "Create the function ``wrk_fromAtoB``." +msgstr "Skapa funktionen ``wrk_fromAtoB``." + +#: ../../build/docs/basic/withPoints.rst:331 +msgid "Follow the description given at `Requirements for routing from A to B`_." +msgstr "Följ beskrivningen i avsnittet `Krav på rutten från A till B`_." + +#: ../../build/docs/basic/withPoints.rst:332 +msgid "Use specialized functions:" +msgstr "Använd specialiserade funktioner:" + +#: ../../build/docs/basic/withPoints.rst:334 +msgid "``wrk_NearestOSM`` created on `Exercise 4: Nearest vertex function`_." +msgstr "``wrk_NearestOSM`` skapad på `Övning 4: Närmaste vertexfunktion`_." + +#: ../../build/docs/basic/withPoints.rst:336 +msgid "It receives the point in natural language format." +msgstr "Den tar emot punkten i naturligt språkformat." + +#: ../../build/docs/basic/withPoints.rst:337 +msgid "Obtains the OSM identifier needed by ``wrk_dijkstra``." +msgstr "Erhåller den OSM-identifierare som behövs av ``wrk_dijkstra``." + +#: ../../build/docs/basic/withPoints.rst:339 +msgid "``wrk_dijkstra`` created in :doc:`sql_function`" +msgstr "``wrk_dijkstra`` skapad i :doc:`sql_function`" + +#: ../../build/docs/basic/withPoints.rst:343 +msgid "The function's signature:" +msgstr "Funktionens signatur:" + +#: ../../build/docs/basic/withPoints.rst:345 +msgid "The input parameters highlighted." +msgstr "Inmatningsparametrarna markeras." + +#: ../../build/docs/basic/withPoints.rst:346 +msgid "The output columns are not highlighted." +msgstr "Utdatakolumnerna är inte markerade." + +#: ../../build/docs/basic/withPoints.rst:347 +msgid "The function returns a set of values." +msgstr "Funktionen returnerar en uppsättning värden." + +#: ../../build/docs/basic/withPoints.rst:357 +msgid "The function's body:" +msgstr "Funktionens kropp:" + +#: ../../build/docs/basic/withPoints.rst:359 +msgid "Call to the function ``wrk_dijkstra``" +msgstr "Anrop till funktionen ``wrk_dijkstra``" + +#: ../../build/docs/basic/withPoints.rst:361 +msgid "Using PostgreSQL ``format`` to make substitutions" +msgstr "Använda PostgreSQL ``format`` för att göra utbyten" + +#: ../../build/docs/basic/withPoints.rst:363 +msgid "The first parameter is the string to be replaced" +msgstr "Den första parametern är den sträng som ska ersättas" + +#: ../../build/docs/basic/withPoints.rst:364 +msgid "The rest are the data parameters, are the strings use for replacement." +msgstr "" +"Resten är dataparametrarna, det är strängarna som används för ersättning." + +#: ../../build/docs/basic/withPoints.rst:366 +msgid "``wrk_dijkstra`` obtains the values for the output" +msgstr "``wrk_dijkstra`` erhåller värdena för utdata" + +#: ../../build/docs/basic/withPoints.rst:367 +msgid "The ``edges_subset`` value will replace ``%1$I``:" +msgstr "Värdet ``edges_subset`` kommer att ersätta ``%1$I``:" + +#: ../../build/docs/basic/withPoints.rst:368 +msgid "For the ``source`` and ``target``:" +msgstr "För ``source`` och ``target``:" + +#: ../../build/docs/basic/withPoints.rst:370 +msgid "``wrk_Nearest`` is used to find the identifier." +msgstr "``wrk_Nearest`` används för att hitta identifieraren." + +#: ../../build/docs/basic/withPoints.rst:372 +msgid "The vertices table name is formed with ``%1$I_vertices``." +msgstr "Tabellnamnet för vertices bildas med ``%1$I_vertices``." + +#: ../../build/docs/basic/withPoints.rst:374 +msgid "``lat1``, ``lon1`` values will replace ``%2$s, %3$s`` respectively." +msgstr "" +"värdena ``lat1``, ``lon1`` kommer att ersätta ``%2$s, %3$s`` respektive." + +#: ../../build/docs/basic/withPoints.rst:375 +msgid "``lat2``, ``lon2`` values will replace ``%4$s, %5$s`` respectively." +msgstr "" +"värdena ``lat2``, ``lon2`` kommer att ersätta ``%4$s, %5$s`` respektive." + +#: ../../build/docs/basic/withPoints.rst:377 +msgid "To get the constructed query in form of a warning:" +msgstr "Att få den konstruerade frågan i form av en varning:" + +#: ../../build/docs/basic/withPoints.rst:379 +msgid "The ``WARNING`` will be issued only when ``do_debug`` is true." +msgstr "``WARNING`` kommer endast att utfärdas när ``do_debug`` är sant." + +#: ../../build/docs/basic/withPoints.rst:380 +msgid "No output will be generated." +msgstr "Ingen utdata kommer att genereras." + +#: ../../build/docs/basic/withPoints.rst:398 +msgid "Exercise 7: Using the main function" +msgstr "Övning 7: Använda huvudfunktionen" + +#: ../../build/docs/basic/withPoints.rst:400 +msgid "View of roads for taxis along with source and destination" +msgstr "Visning av vägar för taxibilar tillsammans med källa och destination" + +#: ../../build/docs/basic/withPoints.rst:406 +msgid "Use ``wrk_fromAtoB``" +msgstr "Använd ``wrk_fromAtoB``" + +#: ../../build/docs/basic/withPoints.rst:408 +msgid "Departure point is: (lat,lon) = ``(-1.455829, -48.446044)``" +msgstr "Avgångspunkten är: (lat,lon) = ``(-1.455829, -48.446044)``" + +#: ../../build/docs/basic/withPoints.rst:409 +msgid "Destination point is: (lat,lon) = ``(-1.453448, -48.447142)``" +msgstr "Destinationspunkten är: (lat,lon) = ``(-1,453448, -48,447142)``" + +#: ../../build/docs/basic/withPoints.rst:412 +#: ../../build/docs/basic/withPoints.rst:420 +msgid "Use with default value of ``do_debug``." +msgstr "Används med standardvärdet för ``do_debug``." + +#: ../../build/docs/basic/withPoints.rst:416 +msgid "Use with ``do_debug`` set to ``true``." +msgstr "Använd med ``do_debug`` satt till ``true``." + +#: ../../build/docs/basic/withPoints.rst:421 +msgid "Store results on a table." +msgstr "Spara resultaten i en tabell." + +#: ../../build/docs/basic/withPoints.rst:422 +msgid "Show the table contents." +msgstr "Visa innehållsförteckningen." + +#: ../../build/docs/basic/withPoints.rst:425 +msgid "The function is not meant to be used with ``ways``" +msgstr "Funktionen är inte avsedd att användas med ``ways``" + +#: ../../build/docs/basic/withPoints.rst:431 +msgid "The first parameter is the table name." +msgstr "Den första parametern är tabellnamnet." + +#: ../../build/docs/basic/withPoints.rst:432 +msgid "The next two parameters are the latitude and longitude of the departure point." +msgstr "" +"De två följande parametrarna är latitud och longitud för avgångspunkten." + +#: ../../build/docs/basic/withPoints.rst:433 +msgid "The next two parameters are the latitude and longitude of the destination point." +msgstr "" +"De två följande parametrarna är latitud och longitud för destinationspunkten." + +#: ../../build/docs/basic/withPoints.rst:446 +msgid "Do a dry run by adding ``true`` to get the query that is executed." +msgstr "" +"Gör en testkörning genom att lägga till ``true`` för att få den fråga som " +"körs." diff --git a/locale/sv/LC_MESSAGES/index.po b/locale/sv/LC_MESSAGES/index.po index 4f7f2d09a..1cada18b2 100644 --- a/locale/sv/LC_MESSAGES/index.po +++ b/locale/sv/LC_MESSAGES/index.po @@ -1,24 +1,15 @@ - msgid "" msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-11-09 11:14-0600\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2025-10-07 15:52+0000\n" +"Last-Translator: Anonymous \n" +"Language-Team: Swedish \n" +"Language: sv\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.17.0\n" - -#: ../../build/docs/index.rst:11 -msgid "pgRouting Workshop" -msgstr "" - -#: ../../build/docs/index.rst:13 -msgid "*\"FOSS4G routing with pgRouting\"*." -msgstr "" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.4.3\n" #: ../../build/docs/index.rst:16 msgid "Workshop introduction" @@ -32,15 +23,22 @@ msgstr "" msgid "United Nations Sustainable Development Goals" msgstr "" -#: ../../build/docs/index.rst:54 -msgid "Interaction with other software" -msgstr "" - -#: ../../build/docs/index.rst:66 +#: ../../build/docs/index.rst:67 msgid "Examples from the Internet" msgstr "" -#: ../../build/docs/index.rst:77 +#: ../../build/docs/index.rst:78 msgid "Appendices" msgstr "" +#: ../../build/docs/index.rst:13 +msgid "*\"FOSS4G routing with pgRouting\"*." +msgstr "" + +#: ../../build/docs/index.rst:11 +msgid "pgRouting Workshop" +msgstr "" + +#: ../../build/docs/index.rst:55 +msgid "Interaction with other software" +msgstr "" diff --git a/locale/sv/LC_MESSAGES/interactions/chapter-9.po b/locale/sv/LC_MESSAGES/interactions/chapter-9.po index 60da02e58..8d0d94065 100644 --- a/locale/sv/LC_MESSAGES/interactions/chapter-9.po +++ b/locale/sv/LC_MESSAGES/interactions/chapter-9.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 17:44+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -179,8 +179,8 @@ msgstr "Kopiera/klistra in format" #: ../../build/docs/interactions/chapter-9.rst:123 msgid "Choose a formmated layer and :menuselection:`Right click --> Styles --> Copy Styles`" msgstr "" -"Välj ett förminskat lager och :menuselection:`Högerklicka --> Stilar --> Kopiera " -"stilar`" +"Välj ett förminskat lager och :menuselection:`Högerklicka --> Stilar --> " +"Kopiera stilar`" #: ../../build/docs/interactions/chapter-9.rst:128 msgid "Choose another layer and :menuselection:`Right click --> Styles --> Paste Styles`" diff --git a/locale/sv/LC_MESSAGES/un_sdg/data.po b/locale/sv/LC_MESSAGES/un_sdg/data.po index 1fb15348e..7b2712de4 100644 --- a/locale/sv/LC_MESSAGES/un_sdg/data.po +++ b/locale/sv/LC_MESSAGES/un_sdg/data.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 17:44+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -67,7 +67,7 @@ msgstr "" msgid "If you don't have pgRouting installed. You can find the installation procedure at this `link `__" msgstr "" "Om du inte har pgRouting installerat. Du kan hitta installationsproceduren " -"på den här länken `__" #: ../../build/docs/un_sdg/data.rst:49 diff --git a/locale/sv/LC_MESSAGES/un_sdg/introduction.po b/locale/sv/LC_MESSAGES/un_sdg/introduction.po index 6080671ee..2cf3666ef 100644 --- a/locale/sv/LC_MESSAGES/un_sdg/introduction.po +++ b/locale/sv/LC_MESSAGES/un_sdg/introduction.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Workshop FOSS4G Belém 3.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-12-16 17:44+0000\n" -"PO-Revision-Date: 2025-07-03 07:34+0000\n" +"PO-Revision-Date: 2025-07-07 23:37+0000\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -368,8 +368,8 @@ msgstr "" #: ../../build/docs/un_sdg/introduction.rst:148 msgid "More on Sustainable Development Goals can be found at this `link `__." msgstr "" -"Mer om målen för hållbar utveckling finns på denna länk `__." +"Mer om målen för hållbar utveckling finns på denna `länk `__." #: ../../build/docs/un_sdg/introduction.rst:150 msgid "Currently this workshop addresses three of the seventeen Sustainable Development Goals and covers the following:"