Skip to content

Commit 371c5d8

Browse files
committed
Minor fixes on problems detected while translating
1 parent 002251e commit 371c5d8

File tree

7 files changed

+54
-52
lines changed

7 files changed

+54
-52
lines changed

docs/basic/graph_views.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The graph requirements
2424
===============================================================================
2525

2626
In this chapter there are three graph requirements. It consists on three graphs
27-
based on a **fully connected** graph derived from ways: two for different types
27+
based on a **fully connected** graph derived from ``ways``: two for different types
2828
of vehicles and one for pedestrian, the source and the target in all of them are
2929
based on the ``source_osm`` and ``target_osm``.
3030

@@ -542,15 +542,15 @@ Exercise 8: Testing the views for routing
542542

543543
.. image:: images/chapter7/ch7-e3.png
544544
:scale: 25%
545-
:alt: From the "|ch7_place_1|" to the "|ch7_place_2|"
545+
:alt: From the |ch7_place_1| to the |ch7_place_2|
546546

547547
.. rubric:: Problem
548548

549549
* Test the created views
550550

551551
In particular:
552552

553-
* From the "|ch7_place_1|" to the "|ch7_place_2|" using the OSM identifier
553+
* From the |ch7_place_1| to the "|ch7_place_2| using the OSM identifier
554554
* the views to be tested are:
555555

556556
* ``vehicle_net``
@@ -594,7 +594,8 @@ For ``vehicle_net``:
594594
For ``taxi_net``:
595595

596596
* Similar as the previous one but with ``taxi_net``. (line **3**)
597-
* The results give the same route as with ``vehicle_net`` but ``cost`` is higher
597+
* The results give the same route as with ``vehicle_net`` but ``cost`` is
598+
higher.
598599

599600
.. literalinclude:: ../scripts/basic/chapter_7/all_sections.sql
600601
:language: sql

docs/basic/pedestrian.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Exercise 1: Single pedestrian routing
111111
* from "|place_1|"
112112
* to "|place_3|".
113113

114-
* Calculate routes with costs in *osm2pgRouting* `length` default units.
114+
* Calculate routes with costs in *osm2pgRouting* ``length`` default units.
115115

116116
.. image:: images/chapter5/pedestrian_route1.png
117117
:scale: 25%

docs/basic/plpgsql_function.rst

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,32 @@ The detailed description:
3535

3636
.. rubric:: Input parameters
3737

38-
============ ========== ===
39-
Column type Description
40-
============ ========== ===
41-
edges_subset REGCLASS Edge table name identifier.
42-
lat1 NUMERIC The latitude of the `departure` point.
43-
lon1 NUMERIC The longitude of the `departure` point.
44-
lat2 NUMERIC The latitude of the `destination` point.
45-
lon2 NUMERIC The longitude of the `destination` point.
46-
do_debug BOOLEAN Flag to create a ``WARNING`` with the query that is been executed
47-
============ ========== ===
38+
================ ========== ================================================
39+
Parameter type Description
40+
================ ========== ================================================
41+
``edges_subset`` REGCLASS Edge table name identifier.
42+
``lat1`` NUMERIC The latitude of the `departure` point.
43+
``lon1`` NUMERIC The longitude of the `departure` point.
44+
``lat2`` NUMERIC The latitude of the `destination` point.
45+
``lon2`` NUMERIC The longitude of the `destination` point.
46+
``do_debug`` BOOLEAN Flag to create a ``WARNING`` with the query that
47+
is been executed
48+
================ ========== ================================================
4849

4950

5051
.. rubric:: Output columns
5152

52-
============= =================================================
53-
Column Description
54-
============= =================================================
55-
seq For ordering purposes.
56-
gid The edge identifier that can be used to JOIN the results to the ``ways`` table.
57-
name The street name.
58-
azimuth Between start and end node of an edge.
59-
length In meters.
60-
minutes Minutes taken to traverse the segment.
61-
route_geom The road geometry with corrected directionality.
62-
============= =================================================
53+
================= =================================================
54+
Column Description
55+
================= =================================================
56+
``seq`` For ordering purposes.
57+
``gid`` The edge identifier that can be used to JOIN the results to the ``ways`` table.
58+
``name`` The street name.
59+
``azimuth`` Between start and end node of an edge.
60+
``length`` In meters.
61+
``minutes`` Minutes taken to traverse the segment.
62+
``route_geom`` The road geometry with corrected directionality.
63+
================= =================================================
6364

6465

6566
For this chapter, the following points will be used for testing.
@@ -142,7 +143,7 @@ In particular use the following (lat, lon) value: ``(@POINT1_LAT@, @POINT1_LON@)
142143
* Using the Postgis distance operator `<-> <https://postgis.net/docs/geometry_distance_knn.html>`__ to order by distance.
143144
* Get only the first row, to obtain the nearest identifier of the vertex.
144145

145-
For ways_vertices:
146+
For ``ways_vertices``:
146147

147148
.. literalinclude:: ../scripts/basic/chapter_8/all-sections-8.sql
148149
:language: sql

docs/basic/sql_function.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ output columns:
4747
.. rubric:: Input parameters
4848

4949
================= ========= =================
50-
Name Type Description
50+
Paramete Type Description
5151
================= ========= =================
5252
``edges_subset`` REGCLASS The table/view that is going to be used for processing
5353
``source_osm`` BIGINT The OSM identifier of the `departure` location.
@@ -402,7 +402,7 @@ Exercise 7: Using the function
402402
.. rubric:: Problem
403403

404404
* Test the function with the three views
405-
* From the "|ch7_place_1|" to the |ch7_place_2| using the OSM identifier
405+
* From the |ch7_place_1| to the |ch7_place_2| using the OSM identifier
406406

407407
.. rubric:: Solution
408408

docs/basic/vehicle.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Exercise 2: Vehicle routing - returning
122122
.. rubric:: Solution:
123123

124124
* Use ``cost_s`` (line **6**) and ``reverse_cost_s`` (line **7**) columns, in
125-
units ``seconds``.
125+
units seconds.
126126
* The vehicle is going from vertex |id_3| (line **10**) to |id_1| (line **11**).
127127

128128
.. literalinclude:: ../scripts/basic/chapter_6/all_exercises.sql

docs/un_sdg/sdg11-cities.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Data obtained in :doc:`data`.
124124
This section will cover the status of the database in order to get the same
125125
results when processing the queries.
126126

127-
Exercise 1: Set the search path
127+
Exercise 2: Set the search path
128128
--------------------------------------------------------------------------------
129129

130130
First step in pre processing is to set the search path for ``Waterways``
@@ -141,7 +141,7 @@ particular table is to be imported.
141141
.. literalinclude:: ../scripts/un_sdg/sdg11/set_path.txt
142142

143143

144-
Exercise 2: Verify database configuration
144+
Exercise 3: Verify database configuration
145145
--------------------------------------------------------------------------------
146146

147147
As part of the every project tasks: inspect the database structure.
@@ -166,14 +166,13 @@ As part of the every project tasks: inspect the database structure.
166166

167167
.. literalinclude:: ../scripts/un_sdg/sdg11/get_tables.txt
168168

169-
Exercise 6: Count the number of Waterways
169+
Exercise 4: Count the number of Waterways
170170
................................................................................
171171

172172
The importance of counting the information on this workshop is to make sure that
173-
the same data is used and consequently the results are same. Also, some of the
174-
rows can be seen to understand the structure of the table and how the data is
175-
stored in it.
176-
173+
the same data is used and consequently the results are same.
174+
Also, some of the rows can be seen to understand the structure of the table and
175+
how the data is stored in it.
177176

178177
.. literalinclude:: ../scripts/un_sdg/sdg11/all_exercises_sdg11.sql
179178
:start-after: exercise_6.txt
@@ -192,7 +191,7 @@ building the graph, the data has to be inspected to determine if there is any
192191
invalid data. This is a very important step to make sure that the data is of
193192
required quality. pgRouting can also be used to do some Data Adjustments.
194193

195-
Exercise 7: Remove waterways not for the problem
194+
Exercise 5: Remove waterways not for the problem
196195
--------------------------------------------------------------------------------
197196

198197
.. image:: images/sdg11/remove_waterways.png
@@ -230,7 +229,7 @@ altitude of the city, are to be removed from the ``waterways_ways`` table.
230229

231230
.. note:: A better approach might be to fix the original data in OSM website.
232231

233-
Exercise 8: Get the Connected Components of Waterways
232+
Exercise 6: Get the Connected Components of Waterways
234233
================================================================================
235234

236235
As the rivers in the data are not having single edge, i.e, multiple edges make up
@@ -299,7 +298,7 @@ Next query uses this output and stores the component id in the waterways_ways
299298
:end-before: exercise_10.txt
300299
:language: sql
301300

302-
Exercise 10: Creating a function that gets the city buffer
301+
Exercise 7: Creating a function that gets the city buffer
303302
--------------------------------------------------------------------------------
304303

305304
A function can be created for the same task. This will be help when the table
@@ -316,7 +315,7 @@ has more than one city.
316315
.. literalinclude:: ../scripts/un_sdg/sdg11/exercise_10.txt
317316

318317

319-
Exercise 11: Finding the components intersecting the buffer
318+
Exercise 8: Finding the components intersecting the buffer
320319
================================================================================
321320

322321
Next step is to find the components of waterways which lie in the buffer zone of
@@ -338,7 +337,7 @@ Output shows the distinct component numbers which lie in the buffer zone of the
338337
That is, the rivers that lie within the city.
339338

340339

341-
Exercise 12: Get the rain zones
340+
Exercise 9: Get the rain zones
342341
================================================================================
343342

344343
In this excercise the area , where if it rains, the
@@ -377,7 +376,7 @@ Create a Buffer around the river components.
377376

378377
This will give us the requires area, where if it rains, the city will be affected.
379378

380-
Exercise 13: Create a union of rain zones
379+
Exercise 10: Create a union of rain zones
381380
================================================================================
382381
Multiple polygons that are obtained can also be merged using ``ST_Union``. This
383382
will give a single polygon as the output.

docs/un_sdg/sdg3-health.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ this path.
105105
Exercise 3: Fixing the search path
106106
...............................................................................
107107

108-
In this case, search path of roads table is search path to ``roads`` and
109-
``buildings`` schemas. Following query is used to adjust the search path.
108+
In this case, the search path needs to include ``roads`` and
109+
``buildings`` schemas. The following query is used to adjust the search path.
110110

111111
.. literalinclude:: ../scripts/un_sdg/sdg3/all_exercises_sdg3.sql
112112
:start-after: set_path.txt
@@ -143,7 +143,7 @@ With ``\dt`` the tables are listed showing the schema and the owner
143143
Preparing roads and buildings data
144144
================================================================================
145145

146-
First step is to prepare the data obtained from :ref:`un_sdg/data:Data for Sustainable Development Goals`.
146+
First step is to prepare the data obtained from :doc:`data`.
147147

148148
This section will work the graph and data that is going to be used for processing.
149149
While building the graph, the data has to be inspected to determine if there is any
@@ -155,9 +155,9 @@ pgRouting can also be used to do some Data Adjustments.
155155
Exercise 5: Counting the number of roads and buildings
156156
--------------------------------------------------------------------------------
157157

158-
The importance of counting the information on this workshop is to make
159-
sure that the same data is used and consequently the results are same.
160-
Also, some of the rows can be seen to understand the structure of the table and
158+
The importance of counting the information on this workshop is to make sure that
159+
the same data is used and consequently the results are same.
160+
Also, some of the rows can be seen to understand the structure of the table and
161161
how the data is stored in it.
162162

163163
.. literalinclude:: ../scripts/un_sdg/sdg3/all_exercises_sdg3.sql
@@ -615,7 +615,7 @@ For the following query,
615615
- As ``time`` = ``distance/speed``, ``length_m`` / ``1 m/s`` / ``60`` gives
616616
the time in minutes.
617617

618-
- ``tag_id = '318'`` as 318 is the value for hospital in the configuration
618+
- ``tag_id = '318'`` as 318 is the value for hospital in the configuration
619619
table of the buildings.
620620

621621
- ``10`` for 10 minutes, which is a threshold for ``agg_cost``
@@ -630,7 +630,7 @@ For the following query,
630630
.. literalinclude:: ../scripts/un_sdg/sdg3/exercise_15.txt
631631

632632
Following figure shows the visualised output of the above query. The lines
633-
highlighted by ``red`` colour show the area from where the hospital can be reached
633+
highlighted by red colour show the area from where the hospital can be reached
634634
within 10 minutes of walking at the speed of ``1 m/s``.
635635

636636
It is noticable from the output figure that some of the roads which are near to
@@ -770,7 +770,8 @@ Follow the steps given below to complete this task.
770770
Exercise 18: Find total population served by the hospital
771771
--------------------------------------------------------------------------------
772772

773-
Final step is to find the total population served by the hospital based on travel-time.
773+
Final step is to find the total population served by the hospital based on
774+
travel time.
774775

775776
.. literalinclude:: ../scripts/un_sdg/sdg3/all_exercises_sdg3.sql
776777
:start-after: exercise_20.txt

0 commit comments

Comments
 (0)