Skip to content

Port deprecate pgr create vertices table #2831

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ milestone for 3.8.0
pgr_analyzeOneWay
* [#2753](https://github.com/pgRouting/pgrouting/issues/2753):
pgr_analyzeGraph
* [#2826](https://github.com/pgRouting/pgrouting/issues/2826):
pgr_createVerticesTable

**Official functions changes**

Expand Down
2 changes: 1 addition & 1 deletion doc/_static/page_history.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ var filesArr = [
]),
new createInfo('pgr_createVerticesTable', '2.0', [
{ v: '2.1', n: 'src/common/doc/functions/create_vert_table'},
{ v: '2.3', n: 'src/topology/doc/pgr_createVerticesTable'},
{ v: '2.3', n: 'src/topology/doc/pgr_createVerticesTable'}, 3.8
]),
new createInfo('pgr_createTopology', '2.0', [
{ v: '2.1', n: 'src/common/doc/functions/create_topology'},
Expand Down
20 changes: 20 additions & 0 deletions doc/src/migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ Results can be different because of the changes.
.. contents:: Contents
:depth: 2

.. migrate_pgr_createVerticesTable_start

Migration of ``pgr_createVerticesTable``
-------------------------------------------------------------------------------

Starting from `v3.8.0 <https://docs.pgrouting.org/3.8/en/migration.html>`__

**Before Deprecation:** The following was calculated:

* A table with `<edges>_vertices_pgr` was created.

**After Deprecation:** The user is responsible to create the vertices table,
indexes, etc. They may use :doc:`pgr_extractVertices` for that purpose.

.. literalinclude:: sampledata.queries
:start-after: -- q1
:end-before: -- q1-1

.. migrate_pgr_createVerticesTable_end

.. migrate_pgr_analyzeOneWay_start

Migration of ``pgr_analyzeOneWay``
Expand Down
2 changes: 2 additions & 0 deletions doc/src/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ milestone for 3.8.0
pgr_analyzeOneWay
* `#2753 <https://github.com/pgRouting/pgrouting/issues/2753>`__:
pgr_analyzeGraph
* `#2826 <https://github.com/pgRouting/pgrouting/issues/2826>`__:
pgr_createVerticesTable

.. rubric:: Official functions changes

Expand Down
6 changes: 2 additions & 4 deletions doc/topology/pgr_analyzeGraph.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ The edge table to be analyzed must contain a source column and a target column
filled with id's of the vertices of the segments and the corresponding vertices
table <edge_table>_vertices_pgr that stores the vertices information.

- Use :doc:`pgr_createVerticesTable` to create the vertices table.
- Use :doc:`pgr_createTopology` to create the topology and the vertices table.

Parameters
Expand Down Expand Up @@ -96,8 +95,8 @@ The function returns:

.. rubric:: The Vertices Table

The vertices table can be created with :doc:`pgr_createVerticesTable
<pgr_createVerticesTable>` or :doc:`pgr_createTopology <pgr_createTopology>`
The vertices table can be created with
:doc:`pgr_createTopology <pgr_createTopology>`

The structure of the vertices table is:

Expand Down Expand Up @@ -291,7 +290,6 @@ See Also
* :doc:`sampledata`
* :doc:`topology-functions`
* :doc:`pgr_analyzeOneWay`
* :doc:`pgr_createVerticesTable`
* :doc:`pgr_nodeNetwork` to create nodes to a not noded edge table.

.. rubric:: Indices and tables
Expand Down
6 changes: 2 additions & 4 deletions doc/topology/pgr_analyzeOneWay.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ The edge table to be analyzed must contain a source column and a target column
filled with id's of the vertices of the segments and the corresponding vertices
table <edge_table>_vertices_pgr that stores the vertices information.

- Use :doc:`pgr_createVerticesTable` to create the vertices table.
- Use :doc:`pgr_createTopology` to create the topology and the vertices table.

|Boost| Boost Graph Inside
Expand Down Expand Up @@ -99,7 +98,7 @@ Parameters

.. note::
It is strongly recommended to use the named notation. See
:doc:`pgr_createVerticesTable` or :doc:`pgr_createTopology` for examples.
:doc:`pgr_createTopology` for examples.

The function returns:

Expand All @@ -121,7 +120,7 @@ condition.

.. rubric:: The Vertices Table

The vertices table can be created with :doc:`pgr_createVerticesTable` or
The vertices table can be created with
:doc:`pgr_createTopology`

The structure of the vertices table is:
Expand All @@ -148,7 +147,6 @@ See Also
-------------------------------------------------------------------------------

* :doc:`topology-functions`
* :doc:`pgr_createVerticesTable`
* :doc:`sampledata`

.. rubric:: Indices and tables
Expand Down
1 change: 0 additions & 1 deletion doc/topology/pgr_createTopology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ See Also

* :doc:`sampledata`
* :doc:`topology-functions`
* :doc:`pgr_createVerticesTable`

.. rubric:: Indices and tables

Expand Down
14 changes: 11 additions & 3 deletions doc/topology/pgr_createVerticesTable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,32 @@
****************************************************************************

.. index::
single: Topology Family ; pgr_createVerticesTable
single: createVerticesTable
single: Topology Family ; pgr_createVerticesTable - Deprecated since 3.8.0
single: createVerticesTable - Deprecated since 3.8.0

|

``pgr_createVerticesTable``
``pgr_createVerticesTable`` - Deprecated since 3.8.0
===============================================================================

``pgr_createVerticesTable`` — Reconstructs the vertices table based on the
source and target information.

.. rubric:: Availability

* Version 3.8.0

* Deprecated function.

* Version 2.0.0

* Official function.
* Renamed from version 1.x

.. include:: migration.rst
:start-after: migrate_pgr_createVerticesTable_start
:end-before: migrate_pgr_createVerticesTable_end

Description
-------------------------------------------------------------------------------

Expand Down
1 change: 0 additions & 1 deletion doc/topology/pgr_extractVertices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ See Also
-------------------------------------------------------------------------------

* :doc:`topology-functions`
* :doc:`pgr_createVerticesTable`

.. rubric:: Indices and tables

Expand Down
18 changes: 18 additions & 0 deletions docqueries/topology/createVertTab-any.result
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SELECT AddGeometryColumn ('public','edges','the_geom',0,'LINESTRING',2);
UPDATE edges SET the_geom = geom;
UPDATE 18
SELECT pgr_createVerticesTable('edges');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -27,6 +28,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges','the_geom','source','target');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -43,6 +45,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges',the_geom:='the_geom',source:='source',target:='target');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -59,6 +62,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges',source:='source',target:='target',the_geom:='the_geom');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -75,6 +79,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges',source:='source');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -91,6 +96,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges',rows_where:='id < 10');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','id < 10')
NOTICE: Performing checks, please wait .....
Expand All @@ -107,6 +113,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','the_geom && (select st_buffer(the_geom,0.5) FROM edge_table WHERE id=5)')
NOTICE: Performing checks, please wait .....
Expand All @@ -121,6 +128,7 @@ NOTICE: select * from public.edges WHERE true AND (the_geom && (select st_buffe
CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom) ;
SELECT 1
SELECT pgr_createVerticesTable('edges',rows_where:='the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','the_geom && (select st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
NOTICE: Performing checks, please wait .....
Expand All @@ -139,6 +147,7 @@ NOTICE: ----------------------------------------------
CREATE TABLE mytable AS (SELECT id AS gid, the_geom AS mygeom,source AS src ,target AS tgt FROM edges) ;
SELECT 18
SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -155,6 +164,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('mytable',the_geom:='mygeom',source:='src',target:='tgt');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -171,6 +181,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','true')
NOTICE: Performing checks, please wait .....
Expand All @@ -187,6 +198,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt',rows_where:='gid < 10');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
NOTICE: Performing checks, please wait .....
Expand All @@ -203,6 +215,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',rows_where:='gid < 10');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','gid < 10')
NOTICE: Performing checks, please wait .....
Expand All @@ -220,6 +233,7 @@ NOTICE: ----------------------------------------------

SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt',
rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
NOTICE: Performing checks, please wait .....
Expand All @@ -237,6 +251,7 @@ NOTICE: ----------------------------------------------

SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
rows_where:='mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(mygeom,0.5) FROM mytable WHERE gid=5)')
NOTICE: Performing checks, please wait .....
Expand All @@ -258,6 +273,7 @@ CREATE TABLE otherTable AS (SELECT 100 AS gid, st_point(2.5,2.5) AS other_geom)
SELECT 1
SELECT pgr_createVerticesTable('mytable','mygeom','src','tgt',
rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
NOTICE: Performing checks, please wait .....
Expand All @@ -275,6 +291,7 @@ NOTICE: ----------------------------------------------

SELECT pgr_createVerticesTable('mytable',source:='src',target:='tgt',the_geom:='mygeom',
rows_where:='mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('mytable','mygeom','src','tgt','mygeom && (SELECT st_buffer(other_geom,0.5) FROM otherTable WHERE gid=100)')
NOTICE: Performing checks, please wait .....
Expand All @@ -291,6 +308,7 @@ NOTICE: ----------------------------------------------
(1 row)

SELECT pgr_createVerticesTable('edges');
WARNING: pgr_createverticestable(text,text,text,text,text) deprecated function on v3.8.0
NOTICE: PROCESSING:
NOTICE: pgr_createVerticesTable('edges','the_geom','source','target','true')
NOTICE: Performing checks, please wait .....
Expand Down
Loading