IGNF / route-graph-generator

Script collection used to generate routing data for Road2 (https://github.com/IGNF/road2)
https://ignf.github.io/route-graph-generator/
GNU General Public License v3.0
7 stars 3 forks source link

Generating graph data from BD TOPO to use for a Chinese Postman problem #55

Open mapperfr opened 1 year ago

mapperfr commented 1 year ago

(Version française en fin de ticket!)


I am trying to create a route that passes through the lanes contained within a polygon (IRIS), to create a map that will support a field survey (a pedestrian team survey route).

This corresponds to the problem of the Chinese postman: https://fr.wikipedia.org/wiki/Probl%C3%A8me_du_postier_chinois

pgRouting seems to be able to calculate these routes: https://docs.pgrouting.org/latest/en/chinesePostmanProblem-family.html. The data I want to work with is the troncon_de_route layer of the BD TOPO. If I'm not mistaken, I'll have to use route-graph-generator to generate the graphs.

I followed the r2gg README and already made progress. Here is what I've done so far:

I have several questions:

Thanks in advance for your feedback :)


Je cherche à créer un itinéraire qui passe par les voies contenues au sein d'un polygone (IRIS), pour créer une carte qui servira d'appui à une enquête de terrain (itinéraire d'enquête d'une équipe piétonne).

Ça correspond au problème du postier chinois: https://fr.wikipedia.org/wiki/Probl%C3%A8me_du_postier_chinois

pgRouting semble être en mesure de calculer ces itinéraires: https://docs.pgrouting.org/latest/en/chinesePostmanProblem-family.html. Les données à partir desquelles je souhaite travailler correspondent à la couche troncon_de_route de la BD TOPO. Si je ne fais pas erreur, il faut donc que je passe par route-graph-generator pour générer les graphes à partir de la BD TOPO.

J'ai suivi le README et déjà avancé. Voilà où j'en suis:

Je me pose donc plusieurs questions:

Merci d'avance pour vos retours :)

azarz commented 1 year ago

(Version française à la fin)


Hi! First of all, thank you for your interest in our project! :)

I think you are on the right track.

The fist advice I'll have is to use directly the SQL script provided for BD Topo, bdtopo_v3.3.sql, which is I think more adapted to what you need to achieve. If you want to remove the fields that are useless to you, you also need to remove them in the _pivot_to_pgr.py file.

One question I have is whether r2gg-pivot2pgrouting config.json returns an error. The logs of this first step are important when trying to solve this kind of issue.

I'd also like to see the errors you get when trying to do the second conversion step.

For you third question, I haven't found any easy solution...

Cheers,


Bonjour ! Tout d'abord, merci pour l'intérêt que vous portez à notre projet ! :)

Je pense que vous êtes sur la bonne voie.

Le premier conseil que j'aurais serait d'utiliser directement le script SQL que nous avons adapté pour une conversion à partir de la BD Topo : bdtopo_v3.3.sql. Pour enlever les champs qui ne vous sont pas utiles, il faut également les enlever du fichier _pivot_to_pgr.py.

Une question que j'ai est de savoir si la commande r2gg-pivot2pgrouting config.json renvoie une erreur. Pour régler ce genre de problème (ça nous est souvent arrivés), parfois la solutions était dans les logs de cette commande.

J'aimerais également voir les erreurs que vous obtenez en lançant la seconde commande.

Enfin, pour votre troisième question, je n'ai pas trouvé d'autre solution qui serait plus facile...

Cordialement,