Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mv develop to main #225

Merged
merged 30 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ba74abc
Update translation files
weblate May 14, 2022
5a0dc56
[admin] pump up version to 2.9.0
cvvergara Mar 13, 2023
c718a80
[admin] pump up version to 2.9.0
cvvergara Mar 13, 2023
ffd0eaf
Saving tentative values
cvvergara Apr 17, 2023
5a8ef08
fixing filename
cvvergara Apr 18, 2023
e0d18f7
Refining chapter1- introduction
cvvergara Apr 27, 2023
bf5a3c4
reorganizing chapter1 - introduction
cvvergara Apr 27, 2023
f1c56f7
updating OSGeoLive chapter
cvvergara Apr 27, 2023
b0fde67
Refining data chapter
cvvergara Apr 28, 2023
21b8b96
working out the images for pedestrian
cvvergara Apr 28, 2023
54b3109
[pedestrian] refining pedestrian chapter
cvvergara May 2, 2023
b4a846a
[pedestrian] refining pedestrian chapter
cvvergara May 2, 2023
b5bebd7
[pedestrian] refining pedestrian chapter
cvvergara May 2, 2023
55139f4
[vehicles] regining and creating views for images
cvvergara May 3, 2023
605b5e4
[sqlfn] refining build and creating fn for images
cvvergara May 3, 2023
d3a3753
udating images
cvvergara May 4, 2023
fb50fcd
refining sql chapter & adding images
cvvergara May 4, 2023
e361e96
refining chapter 8
cvvergara May 4, 2023
9656d75
[CI] updating actions
cvvergara May 4, 2023
7686e7e
Update locale: commit 9656d75f
github-actions[bot] May 8, 2023
0664523
adjustments & images to general-intro
cvvergara May 20, 2023
62b4b87
[Locale] updating the locale files
cvvergara May 20, 2023
d02cdde
[locale] updating the locale
cvvergara May 23, 2023
51125b2
[ja] adding Japanese locale
cvvergara May 23, 2023
2a5f81b
fixing typos
cvvergara May 29, 2023
3df37ce
fixing link
cvvergara May 29, 2023
d7d2eb6
Update locale: commit 3df37ce8
github-actions[bot] May 29, 2023
948bc95
(CI) fixing postgres version
cvvergara Mar 18, 2024
0c7b161
(CI) fixing postgres version
cvvergara Mar 18, 2024
422acdf
Workshop folder is 2.9 and not dev anymore
cvvergara Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/locale-and-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get postgres version
run: |
sudo service postgresql start
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()')
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
echo "PGVER=${pgver}" >> $GITHUB_ENV
echo "PGIS=3" >> $GITHUB_ENV

Expand All @@ -44,7 +44,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
if [[ "${{ env.BRANCH }}" == "develop" ]]; then
FOLDER_NAME="dev"
elif [[ "${{ env.BRANCH }}" == "main" ]]; then
FOLDER_NAME="2.8"
FOLDER_NAME="2.9"
fi
git checkout -f origin/gh-pages
git checkout -b gh-pages
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get postgres version
run: |
sudo service postgresql start
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d \()')
pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()')
echo "PGVER=${pgver}" >> $GITHUB_ENV
echo "PGIS=3" >> $GITHUB_ENV

Expand All @@ -28,7 +28,7 @@ jobs:
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

- name: Install python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand Down Expand Up @@ -59,7 +59,8 @@ jobs:
mkdir -p ~/Desktop/workshop-2019
mkdir build
cd build
cmake -DLINKCHECK=ON -DPGR_WORKSHOP_DEBUG=ON ..
cmake -DPGR_WORKSHOP_DEBUG=ON ..
psql -l
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
Expand All @@ -70,4 +71,4 @@ jobs:
- name: Build
run: |
cd build
make -j 4
make html
71 changes: 43 additions & 28 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
cmake_minimum_required(VERSION 2.8...3.22)
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR} )
message(FATAL_ERROR "In-source builds not allowed.
Please make a new directory (called a build directory) and run CMake from there.
Expand All @@ -20,18 +20,18 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#---------------------------------------------
# Setting the version number
#---------------------------------------------
set(WORKSHOP_AREA "FOSS4G Firenze")
set(COPYRIGHT "2010-2022 Daniel Kastl, Vicky Vergara, Rajat Shinde")
set(WORKSHOP_AREA "FOSS4G Prizren")
set(COPYRIGHT "2010-2023 pgRouting Developers")
set(PGR_WORKSHOP_VERSION_MAJOR "2")
set(PGR_WORKSHOP_VERSION_MINOR "8")
set(PGR_WORKSHOP_VERSION_MINOR "9")
set(PGR_WORKSHOP_VERSION_PATCH "0")
set(PGR_WORKSHOP_VERSION_DEV "dev")
set(PGR_WORKSHOP_VERSION_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")
set(PGR_HTML_TITLE "Workshop - FOSS4G 2022 Firenze - Routing with pgRouting")
set(PGR_HTML_SHORT_TITLE "Workshop - Firenze")
set(OSGeoLive_VERSION "15.0")
set(PGR_HTML_TITLE "Workshop - FOSS4G 2023 Prizren - Routing with pgRouting")
set(PGR_HTML_SHORT_TITLE "Workshop - Prizren")
set(OSGeoLive_VERSION "16.0")


#---------------------------------------------
Expand All @@ -49,31 +49,46 @@ option(PGR_WORKSHOP_VERBOSE_DEBUG
#---------------------------------------------
# CONFIGURATION
#---------------------------------------------
set(PGR_WORKSHOP_CITY "Firenze")
set(PGR_WORKSHOP_CITY_FILE "Firenze_IT")
set(PGR_WORKSHOP_CITY_BBOX "11.20,43.76,11.27,43.79")
set(PGR_WORKSHOP_LITTLE_NET_BBOX "11.24,43.77,11.27,43.79")
set(PGR_WORKSHOP_DOWNLOAD_DIR "workshop-2022")
set(DATE_OF_DATA "July 2021")
set(PGR_WORKSHOP_CITY "Prizren")
set(PGR_WORKSHOP_CITY_FILE "Prizren_XK")

set(OSMID_1 "266939565")
set(OSMID_2 "2531656518")
set(OSMID_3 "5020458299")
set(OSMID_4 "6483155124")
set(OSMID_5 "1798374718")
# https://github.com/OSGeo/OSGeoLive/blob/master/bin/install_osm.sh
# around line 117
set(PGR_WORKSHOP_CITY_BBOX "21.1922265,42.0816364,20.2206175,42.6653875")

# Make it smaller
set(PGR_WORKSHOP_LITTLE_NET_BBOX "20.73,42.20891,20.76,42.23")

set(PLACE_1 "Mercato Centrale")
set(PLACE_2 "Stazione di Santa Maria Novella")
set(PLACE_3 "Palazzo dei Congressi")
set(PLACE_4 "Hotel Albani")
set(PLACE_5 "Cattedrale di Santa Maria del Fiore")
# Use git blame to get the date when the line was changed
set(PGR_WORKSHOP_DOWNLOAD_DIR "workshop-2023")
set(DATE_OF_DATA "March 2023")

set(OSMID_1 "2385630446")
set(OSMID_2 "1838481592")
set(OSMID_3 "1840522495")
set(OSMID_4 "6917727056")
set(OSMID_5 "2385655026")
# osm_id IN (6917727056, 2385655026, 1838481592, 1840522495, 2385630446)

set(POINT1_LON "11.2384")
set(POINT1_LAT "43.784")
set(POINT2_LON "11.2492")
set(POINT2_LAT "43.778")

# 3->1: routes for vehicles with penalty & no penalty must be different
set(PLACE_1 "Nadir Xhemali Danijolli")
set(PLACE_2 "Qendra Sprotive")
set(PLACE_3 "Kalaja e Prizrenit")
set(PLACE_4 "Inovation and Training Park")
set(PLACE_5 "Lidhja Shqiptare e Prizrenit")


set(POINT1_LON "20.729354")
set(POINT1_LAT "42.2151")
set(POINT2_LON "20.7312")
set(POINT2_LAT "42.2147")

# by chapters
set(CH7_PLACE_1 ${PLACE_5})
set(CH7_PLACE_2 ${PLACE_1})
set(CH7_OSMID_1 ${OSMID_5})
set(CH7_OSMID_2 ${OSMID_1})

#---------------------------------------------
# minimum versions
Expand Down
8 changes: 5 additions & 3 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ footer {
}

p.admonition-title {
font-weight: bold;
font-weight: bold;
background-color: #D1D0CE;
border: #000000;
}
}


.alert-info {
Expand Down Expand Up @@ -59,4 +59,6 @@ footer {
margin-bottom: 10px;
}


blockquote {
font-size: 14px;
}
2 changes: 1 addition & 1 deletion docs/basic/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Solutions to :doc:`pedestrian`
**Exercise**: 5 (**Chapter:** Pedestrian)
...............................................................................

:ref:`basic/pedestrian:Exercise 5: Many Pedestrians going to different destinations returning aggregate costs`
:ref:`basic/pedestrian:Exercise 5: Time for many Pedestrians going to different destinations`

.. literalinclude:: ../scripts/basic/chapter_5/exercise_5_5.txt

Expand Down
15 changes: 7 additions & 8 deletions docs/basic/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ Prepare the database

pgRouting is installed as extension. This requires:

* Supported PostgreSQL version
* Supported PostGIS version
* PostgreSQL
* PostGIS

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.
Information about installing OSGeoLive can be found on :doc:`../general-intro/chapter-3`.
Information about installing OSGeoLive can be found on :doc:`../general-intro/osgeolive`.

.. note:: If OSGeoLive is not being used, please refer to the chapter's appendix to set up the user "user".

.. foo*


Create a pgRouting compatible database
-------------------------------------------------------------------------------

Expand All @@ -46,6 +43,8 @@ Create a pgRouting compatible database
:language: bash
:linenos:

.. Note:: To exit the database use ``\q``

Get the Workshop Data
===============================================================================

Expand Down Expand Up @@ -73,7 +72,7 @@ Option 2) Download data form OSGeoLive website

The exact same data can be found on the OSGeoLive download page.

.. literalinclude:: ../scripts/get_data/get_osgeolive_data.sh
.. literalinclude:: ../scripts/get_data/get_all_data.sh
:start-after: 4.2.2 from-here
:end-before: 4.2.2 to-here
:language: bash
Expand All @@ -90,7 +89,7 @@ due to changes since @DATE_OF_DATA@.

CITY="@PGR_WORKSHOP_CITY_FILE@"
BBOX="@PGR_WORKSHOP_CITY_BBOX@"
wget --progress=dot:mega -O "$CITY.osm" "http://www.overpass-api.de/api/xapi?*[bbox=${BBOX}][@meta]"
wget --progress=dot:mega -O "$CITY.osm" "http://www.overpass-api.de/api/xapi?*[bbox=\$\{BBOX\}][@meta]"

More information about how to download OpenStreetMap data can be found in
https://wiki.openstreetmap.org/wiki/Downloading_data
Expand Down
Binary file modified docs/basic/images/chapter5/pedestrian-route1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter5/pedestrian-route2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter5/pedestrian-route4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter5/pedestrian-route5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter5/route.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter6/ad11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter6/ad7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter6/ad8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter6/detailofroute9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter6/pedestrian-only-roads.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/ch7-e8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/basic/images/chapter7/walk-net.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/basic/images/chapter8/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
set(PGR_WORKSHOP_IMG_FILES
closest_vertex.png
ch8-e7.png
ch8-taxinet.png
ch8-vehiclenet.png
ch8-walknet.png
)


Expand Down
Binary file modified docs/basic/images/chapter8/ch8-e7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/basic/images/chapter8/ch8-taxinet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/basic/images/chapter8/ch8-vehiclenet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/basic/images/chapter8/ch8-walknet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 41 additions & 22 deletions docs/basic/pedestrian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ Exercise 1: Single pedestrian routing

.. rubric:: Problem:

* Walking from "|place_1|" to the "|place_3|".
* Walking

* from "|place_1|"
* to "|place_3|".

* Calculate routes with costs in *osm2pgRouting* `length` default units.

.. image:: images/chapter5/pedestrian-route1.png
:scale: 25%
Expand Down Expand Up @@ -146,7 +151,12 @@ Exercise 2: Many Pedestrians going to the same destination

.. rubric:: Problem:

* Walking from the "|place_1|" and "|place_2|" to the "|place_3|".
* Walking

* from "|place_1|" and "|place_2|"
* to the "|place_3|".

* Calculate routes with costs in *osm2pgRouting* ``length_m`` which is in meters.

.. image:: images/chapter5/pedestrian-route2.png
:scale: 25%
Expand Down Expand Up @@ -175,7 +185,12 @@ Exercise 3: Many Pedestrians departing from the same location

.. rubric:: Problem:

* Walking from the "|place_3|" to the "|place_1|" and "|place_2|" (in seconds).
* Walking

* from "|place_3|"
* to "|place_1|" and "|place_2|"

* Calculate routes with costs in seconds.

.. image:: images/chapter5/pedestrian-route2.png
:scale: 25%
Expand All @@ -201,7 +216,12 @@ Exercise 4: Many Pedestrians going to different destinations

.. rubric:: Problem:

* Walking from |place_1| and |place_2| to the "|place_4|" and "|place_5|" (in minutes).
* Walking

* from "|place_1|" and "|place_2|"
* to "|place_4|" and "|place_5|"

* Calculate routes with costs in minutes.

.. image:: images/chapter5/pedestrian-route4.png
:scale: 25%
Expand All @@ -224,20 +244,7 @@ Exercise 4: Many Pedestrians going to different destinations

:ref:`basic/appendix:**Exercise**: 4 (**Chapter:** Pedestrian)`


.. note::
Inspecting the results, looking for totals (`edge = -1`):

* Going to vertex |id_4|:

- from |id_1| takes 8.84.. minutes (seq = 35)
- from |id_2| takes 5.84.. minutes (seq = 74)

* Going to vertex |id_5|:

- from |id_1| takes 7.44.. minutes (seq = 7)
- from |id_2| takes 12.06.. minutes (seq = 55)

.. note:: .. include:: ../scripts/basic/chapter_5/note_1.txt

pgr_dijkstraCost
-------------------------------------------------------------------------------
Expand All @@ -262,12 +269,17 @@ Description of the parameters can be found in `pgr_dijkstraCost
<https://docs.pgrouting.org/latest/en/pgr_dijkstraCost.html#description-of-the-signatures>`__


Exercise 5: Many Pedestrians going to different destinations returning aggregate costs
Exercise 5: Time for many Pedestrians going to different destinations
...................................................................................................

.. rubric:: Problem:

* Walking from the hotels to the "|place_4|" or "|place_5|" (get only the cost in minutes).
* Walking

* from "|place_1|" or "|place_2|"
* to "|place_4|" or "|place_5|"

* Get only the cost in minutes.

.. image:: images/chapter5/pedestrian-route5.png
:scale: 25%
Expand Down Expand Up @@ -299,7 +311,12 @@ Exercise 6: Many Pedestrians going to different destinations summarizing the tot

.. rubric:: Problem:

* Walking from the hotels to the "|place_4|" or "|place_5|" (summarize cost in minutes).
* Walking

* from "|place_1|" or "|place_2|"
* to "|place_4|" or "|place_5|"

* Summarize cost in minutes.

.. rubric:: Solution:

Expand All @@ -311,12 +328,14 @@ Exercise 6: Many Pedestrians going to different destinations summarizing the tot
.. literalinclude:: ../scripts/basic/chapter_5/all_exercises_5.sql
:language: sql
:start-after: exercise_5_6.txt
:end-before: note_1.txt
:linenos:
:emphasize-lines: 13-14

|

:ref:`basic/appendix:**Exercise**: 6 (**Chapter:** Pedestrian)`

.. note:: .. include:: ../scripts/basic/chapter_5/note_2.txt


.. note:: An interpretation of the result can be: In general, it is faster to depart from the "|place_2|" than from the "|place_1|".
Loading
Loading