r2gg 2.2.3__tar.gz → 2.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {r2gg-2.2.3 → r2gg-2.2.4}/PKG-INFO +1 -1
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/__about__.py +1 -1
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_pivot_to_pgr.py +32 -2
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/PKG-INFO +1 -1
- {r2gg-2.2.3 → r2gg-2.2.4}/LICENSE +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/README.md +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/__init__.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_configure.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_file_copier.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_lua_builder.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_main.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_osm_building.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_osm_to_pbf.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_output_costs_from_costs_config.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_path_converter.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_pivot_to_osm.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_read_config.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_sql_building.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_subprocess_execution.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/_valhalla_lua_builder.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg/cli.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/SOURCES.txt +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/dependency_links.txt +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/entry_points.txt +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/requires.txt +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/r2gg.egg-info/top_level.txt +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/setup.cfg +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/setup.py +0 -0
- {r2gg-2.2.3 → r2gg-2.2.4}/tests/test_cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: r2gg
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Route Graph Generator (r2gg) est un script Python qui permet la génération de graphes pour des moteurs de calcul d'itinéraire
|
|
5
5
|
Home-page: https://github.com/IGNF/route-graph-generator/
|
|
6
6
|
Author: IGNF
|
|
@@ -34,7 +34,7 @@ __uri_repository__ = "https://github.com/IGNF/route-graph-generator/"
|
|
|
34
34
|
__uri_tracker__ = f"{__uri_repository__}issues/"
|
|
35
35
|
__uri__ = __uri_repository__
|
|
36
36
|
|
|
37
|
-
__version__ = "2.2.
|
|
37
|
+
__version__ = "2.2.4"
|
|
38
38
|
__version_info__ = tuple(
|
|
39
39
|
[
|
|
40
40
|
int(num) if num.isdigit() else num
|
|
@@ -395,13 +395,43 @@ def pivot_to_pgr(source, cost_calculation_file_path, connection_work, connection
|
|
|
395
395
|
|
|
396
396
|
for profile_name in profile_names:
|
|
397
397
|
logger.info("Cleaning isolated edges for profile {}...".format(profile_name))
|
|
398
|
-
clean_graph_query = "
|
|
398
|
+
clean_graph_query = """
|
|
399
|
+
WITH connected_components AS (
|
|
400
|
+
SELECT * FROM pgr_connectedComponents(
|
|
401
|
+
'SELECT id, source, target, cost_s_{1} as cost, reverse_cost_s_{1} as reverse_cost FROM {0}.ways'
|
|
402
|
+
)
|
|
403
|
+
),
|
|
404
|
+
remove_nodes AS (
|
|
405
|
+
SELECT node
|
|
406
|
+
FROM
|
|
407
|
+
connected_components
|
|
408
|
+
WHERE
|
|
409
|
+
component = ANY(
|
|
410
|
+
SELECT DISTINCT component
|
|
411
|
+
FROM
|
|
412
|
+
(
|
|
413
|
+
SELECT component, count(*) AS nb
|
|
414
|
+
FROM
|
|
415
|
+
connected_components
|
|
416
|
+
GROUP BY component
|
|
417
|
+
)
|
|
418
|
+
AS components
|
|
419
|
+
WHERE nb <= 10
|
|
420
|
+
)
|
|
421
|
+
)
|
|
422
|
+
UPDATE {0}.ways
|
|
423
|
+
SET cost_s_{1} = -1,
|
|
424
|
+
reverse_cost_s_{1} = -1,
|
|
425
|
+
cost_m_{1} = -1,
|
|
426
|
+
reverse_cost_m_{1} = -1
|
|
427
|
+
WHERE {0}.ways.target = ANY(SELECT * from remove_nodes) OR {0}.ways.source = ANY(SELECT * from remove_nodes);
|
|
428
|
+
""".format(schema, profile_name)
|
|
399
429
|
logger.info("SQL: {}".format(clean_graph_query))
|
|
400
430
|
cursor_isolated.execute(clean_graph_query)
|
|
431
|
+
connection_out.commit()
|
|
401
432
|
|
|
402
433
|
et_execute = time.time()
|
|
403
434
|
logger.info("Execution ended. Elapsed time : %s seconds." %(et_execute - st_execute))
|
|
404
|
-
connection_out.commit()
|
|
405
435
|
cursor_isolated.close()
|
|
406
436
|
|
|
407
437
|
end_time = time.time()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: r2gg
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Route Graph Generator (r2gg) est un script Python qui permet la génération de graphes pour des moteurs de calcul d'itinéraire
|
|
5
5
|
Home-page: https://github.com/IGNF/route-graph-generator/
|
|
6
6
|
Author: IGNF
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|