Code Monkey home page Code Monkey logo

Comments (11)

Gustry avatar Gustry commented on May 27, 2024

Tables are created by the installation
https://github.com/3liz/lizmap-pgrouting-module/blob/master/pgrouting/install/sql/install.pgsql.sql#L26 L26 and L33

Did you run the installation process completely ?

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

@Gustry this

https://github.com/3liz/lizmap-pgrouting-module/blob/master/docs/import/import_french_bdtopo_to_pgrouting.sql

implies this

ogr2ogr -progress --config PG_USE_COPY YES -f PostgreSQL PG:'service=lizmap-pgrouting active_schema=bdtopo' -lco DIM=2 -append -lco GEOMETRY_NAME=geom -lco FID=gid -nln bdtopo.troncon_de_route -t_srs EPSG:2154 -nlt PROMOTE_TO_MULTI "TRONCON_DE_ROUTE.shp"

from

https://github.com/3liz/lizmap-pgrouting-module/blob/master/docs/configuration.md

but "TRONCON_DE_ROUTE.shp" is no part of the repo, nor the Zipped sample project.

from lizmap-pgrouting-module.

Gustry avatar Gustry commented on May 27, 2024

TRONCON_DE_ROUTE.shp is an example, from the French GIS data provider. You should adapt this with your own data.
https://docs.3liz.org/lizmap-pgrouting-module/configuration/

You need to populate pgrouting.edges, pgrouting.nodes with your own workflow.

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

TRONCON_DE_ROUTE.shp is an example, from the French GIS data provider.

@Gustry yes that is clear, but for testing purposes (to understand how the module works and how the data must be structured) it would be very good to have access to such sample. Is that data not redistributable?

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

@Gustry to get a practical idea on how these columns must actually be filled

https://github.com/3liz/lizmap-pgrouting-module/blob/master/docs/configuration.md#import-the-road-data-into-pgrouting-graph-nodes-and-edges

from lizmap-pgrouting-module.

Gustry avatar Gustry commented on May 27, 2024

Indeed, the data is not available because it was project specific (and country specific).

There is the sample demo : https://demo.lizmap.com/lizmap/index.php/view/map?repository=modules&project=pgrouting

The data contains only INSERT, because tables are created by the installation process of the module.

from lizmap-pgrouting-module.

mdouchin avatar mdouchin commented on May 27, 2024

At present, original data can be found here:
https://geoservices.ign.fr/telechargement?bdd%5B0%5D=233&bdd%5B1%5D=233
source :
https://www.data.gouv.fr/fr/datasets/bd-topo-r/

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

At present, original data can be found here:
https://geoservices.ign.fr/telechargement?bdd%5B0%5D=233&bdd%5B1%5D=233
source :
https://www.data.gouv.fr/fr/datasets/bd-topo-r/

@mdouchin thanks! that helps a lot, also because not everyone has access to such good public data (i.e. here there is no public, good, topologically correct transportation dataset), so having a real example as a starter is very important.

Notes:

  • downloads here

3liz/lizmap-web-client#4030

do not seem to work, files are always served with 0 bytes size.

  • downloads here work

https://geoservices.ign.fr/bdtopo#telechargementshpreg

but the format to be downloaded/used is GPKG not Shapefile, otherwise the SQL script here

https://docs.3liz.org/lizmap-pgrouting-module/configuration/#import-the-road-data-into-pgrouting-graph-nodes-and-edges

won't work because in the SHP version of the data the column names are truncated (and uppercase)

ogr2ogr -progress --config PG_USE_COPY YES -f PostgreSQL PG:'service=lizmap-pgrouting active_schema=bdtopo' -lco DIM=2 -append -lco GEOMETRY_NAME=geom -lco FID=gid -nln bdtopo.troncon_de_route -t_srs EPSG:2154 -nlt PROMOTE_TO_MULTI "TRONCON_DE_ROUTE.shp"

to be more like

ogr2ogr -progress --config PG_USE_COPY YES -f PostgreSQL PG:'service=lizmap-pgrouting active_schema=bdtopo' -lco DIM=2 -append -lco GEOMETRY_NAME=geom -lco FID=gid -nln bdtopo.troncon_de_route -t_srs EPSG:2154 -nlt PROMOTE_TO_MULTI "YOUR_DOWNLOADED_GPKG.gpkg" troncon_de_route

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

Indeed, the data is not available because it was project specific (and country specific).

@Gustry understand that, but it is hard to set up a working/testing environment without some sample data, Data that is actually referred in docs without being very clear where to get it.

There is the sample demo : https://demo.lizmap.com/lizmap/index.php/view/map?repository=modules&project=pgrouting

In the "installation" and "configuration" docs pages

https://docs.3liz.org/lizmap-pgrouting-module/installation/

https://docs.3liz.org/lizmap-pgrouting-module/configuration/

I can't see any link to that project. There is a link to a sample project in the sentence "We offer you here a basic project which contains only the layers required and configured for Lizmap." but that returns 404 on 3liz.com but works on github but as stated it is "just" to load/view the already imported data and to be used as template for publishing on LMWC.

This https://demo.lizmap.com/lizmap/index.php/view/media/getMedia?repository=modules&project=pgrouting&path=/media/pgrouting.zip on the other hand is much more useful for a testing setup as it contains the "data.sql" with the inserts (to populate the tables created by installing the module), but there is no mention to this SQL script in docs, just a reference to a sample dataset that is also not linked anywhere. At this point I think you are getting why people gets confused.

Minor detail 1: I also think that "data.sql" should not contain the CREATE SCHEMA pgrouting IF NOT EXISTS; statement, if is assumed that the tables pgrouting.nodes pgrouting.edges are already existing (there are not CREATE TABLE... statements) then the schema "pgrouting" is also already there.

Minor detail 2: It seems your demo here https://demo.lizmap.com/lizmap/index.php/view/map?repository=modules&project=pgrouting is not working, it returns always "No route have been found.".

The data contains only INSERT, because tables are created by the installation process of the module.

See above.

from lizmap-pgrouting-module.

Gustry avatar Gustry commented on May 27, 2024

The 404 link was leading to the directory on GitHub https://github.com/3liz/lizmap-pgrouting-module/tree/master/tests/lizmap/instances/pgrouting
With the data in https://github.com/3liz/lizmap-pgrouting-module/tree/master/tests/sql
This was IMHO not easy, I have edited the link to the demo website, in 8f997c9

The ZIP is easier and more info.

Minor detail 1: I also think that "data.sql" should not contain the CREATE SCHEMA pgrouting IF NOT EXISTS;

Fixed 3liz/lizmap-web-client-demo@ce115ea
I hope during the next export of the data that we won't forget, I didn't check the script.

Minor detail 2: It seems your demo here https://demo.lizmap.com/lizmap/index.php/view/map?repository=modules&project=pgrouting is not working, it returns always "No route have been found.".

Thanks for the feedback, it has been fixed !

from lizmap-pgrouting-module.

gioman avatar gioman commented on May 27, 2024

Thanks for the replies and patience!

from lizmap-pgrouting-module.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.