Hi,

In case of polylines (i.e. road segments, single layer) - each polyline is vertex and edge is pure virtual (so it identifier is -1).

There are different cases, for example:

1. Water network with pipes (vertices) and edges (valves)

2. Road network - each road segment is vertex, edges are virtual

3. Product supply chain - warehouses, shops are vertices, edges may be virtual or real roads.

Best regards,
    Dmitry

19.08.2020 14:38, marto salata пишет:
Thank you very much for your fast reply.
regarding step 2, i have a polyline shapefile, how to get the vertices required in step 3 so i can connect them. i know the gfid in the imported shapefile, but from where i can get the vertices?

On Wed, Aug 19, 2020 at 11:25 AM Dmitry Baryshnikov <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    You need to follow these steps:

    1. Create empty network

    > gnmmanage.exe create -f GNMFile -t_srs "EPSG:4326" -dsco
    "net_name=my_network_1" C:\tmp\gnmnetwork

    2. Load your data

    > gnmmanage.exe import lines.shp -l lines C:\tmp\gnmnetwork

    Repeat for all your layers

    3. Connect features to create network. Features identifiers set
    while importing your spatial data. Use ogrinfo to check them.

    > gnmmanage.exe connect 1 2 -1 C:\tmp\gnmnetwork

    4. Perform shortest path using Dijkstra

    > gnmanalyse.exe dijkstra 1 2 -ds shortestpath.shp -f "ESRI
    Shapefile" -l shortestpath C:\tmp\gnmnetwork


    Some links:

    * https://trac.osgeo.org/gdal/wiki/geography_network_support

    * https://nextgis.com/blog/gnm/ <https://nextgis.com/blog/gnm/>

    * http://gsoc2014gnm.blogspot.com/

    Best regards,
         Dmitry

    19.08.2020 07:31, marto salata пишет:
    dear GDAL team,
    how  i can create a network using gnmmanage.exe from a polyline
    shapefile, so i can perform a dijkstra with gnmanalyse.exe

    best regards

    _______________________________________________
    gdal-dev mailing list
    [email protected]  <mailto:[email protected]>
    https://lists.osgeo.org/mailman/listinfo/gdal-dev
    _______________________________________________
    gdal-dev mailing list
    [email protected] <mailto:[email protected]>
    https://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to