[GRASS-user] river and dams in netwok analysis

Dear all,
I'm try to understand network analysis fonction in grass 6.4. I have 2 layers :
* Points layer with the spatial dams repartition
* polylines layer with rivers
I would like to know for each dam how is before and how is after in the network. I at the end I would like to export a shp files with those data in the attribute table.

I have find some informations here : http://www.ing.unitn.it/~grass/docs/tutorial_641_en/htdocs/esercitazione/network_analysis/node1.html

And I have done that :

##save a region
v.in.region --overwrite --verbose output=region_central

## clip rivers
v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT atype=line binput=region_central output=rivers_central operator=and

v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT atype=line binput=bv_dordogne@PERMANENT output=rivers_bv operator=and
v.select ainput=barrage_energie@PERMANENT binput=bv_dordogne@PERMANENT output=barrage_e_bv
##Connect dam points to the network
## thresh=500 means that only points within
## the distance of 500 metres are connected to the lines
v.net --overwrite --verbose input=rivers_bv points=barrage_e_bv@PERMANENT output=network operation=connect thresh=500

## link the attribute table of the fire stations to layer 2 of the network map
v.db.connect -o --verbose map=network table=barrage_e_bv@PERMANENT layer=2

But I'm not so smart with data manipulation in GRASS so If someone can give me a hand it's nice :slight_smile:

Thank you

Best regards

E.

--
Cordialement

Etienne DELAY
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le Fri, 16 Oct 2015 18:38:28 +0200,
Etienne DELAY <etienne.delay@etu.unilim.fr> a écrit :

Dear all,
I'm try to understand network analysis fonction in grass 6.4. I have
2 layers :
* Points layer with the spatial dams repartition
* polylines layer with rivers
I would like to know for each dam how is before and how is after in
the network. I at the end I would like to export a shp files with
those data in the attribute table.

I have find some informations here :
http://www.ing.unitn.it/~grass/docs/tutorial_641_en/htdocs/esercitazione/network_analysis/node1.html

And I have done that :

##save a region
v.in.region --overwrite --verbose output=region_central

## clip rivers
v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=region_central output=rivers_central operator=and

v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=bv_dordogne@PERMANENT output=rivers_bv operator=and
v.select ainput=barrage_energie@PERMANENT
binput=bv_dordogne@PERMANENT output=barrage_e_bv
##Connect dam points to the network
## thresh=500 means that only points within
## the distance of 500 metres are connected to the lines
v.net --overwrite --verbose input=rivers_bv
points=barrage_e_bv@PERMANENT output=network operation=connect
thresh=500

## link the attribute table of the fire stations to layer 2 of the
network map
v.db.connect -o --verbose map=network table=barrage_e_bv@PERMANENT
layer=2

But I'm not so smart with data manipulation in GRASS so If someone
can give me a hand it's nice :slight_smile:

What is your actual question, i.e. with what do you need help ?

Also note that network modules have been significantly improved in
GRASS 7, so you should consider updating to that.

Moritz

Hi Will and Hi Moritz,
I would like to be able to export the dam layer with 2 new columns : one with the ID of the dam positioned before and an other one with the ID of the dam after in the network.

I don't know how to do that :-S

Thank you

Etienne

Cordialement

Etienne DELAY (Skype : etienne.delay.tic)
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le 17/10/2015 08:58, Moritz Lennert a écrit :

Le Fri, 16 Oct 2015 18:38:28 +0200,
Etienne DELAY <etienne.delay@etu.unilim.fr> a écrit :

Dear all,
I'm try to understand network analysis fonction in grass 6.4. I have
2 layers :
* Points layer with the spatial dams repartition
* polylines layer with rivers
I would like to know for each dam how is before and how is after in
the network. I at the end I would like to export a shp files with
those data in the attribute table.

I have find some informations here :
http://www.ing.unitn.it/~grass/docs/tutorial_641_en/htdocs/esercitazione/network_analysis/node1.html

And I have done that :

##save a region
v.in.region --overwrite --verbose output=region_central

## clip rivers
v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=region_central output=rivers_central operator=and

v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=bv_dordogne@PERMANENT output=rivers_bv operator=and
v.select ainput=barrage_energie@PERMANENT
binput=bv_dordogne@PERMANENT output=barrage_e_bv
##Connect dam points to the network
## thresh=500 means that only points within
## the distance of 500 metres are connected to the lines
v.net --overwrite --verbose input=rivers_bv
points=barrage_e_bv@PERMANENT output=network operation=connect
thresh=500

## link the attribute table of the fire stations to layer 2 of the
network map
v.db.connect -o --verbose map=network table=barrage_e_bv@PERMANENT
layer=2

But I'm not so smart with data manipulation in GRASS so If someone
can give me a hand it's nice :slight_smile:

What is your actual question, i.e. with what do you need help ?

Also note that network modules have been significantly improved in
GRASS 7, so you should consider updating to that.

Moritz

Re,
I have read carefully the v.out.ogr as will said for tring to export the network layer but I've got an error :

v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/ layer=2 format=ESRI_Shapefile

WARNING: 111738 line(s) found, but not requested to be exported. Verify
          'type' parameter.
WARNING: OGR layer <network> already exists and will be overwritten
DBMI-DBF driver error:
Table 'barrage_e_bv@PERMANENT' doesn't exist

So I have suspected something going wrong in the script :

v.in.ogr dsn=/home/delaye/gama_workspace/barragents/includes/barrage_energie/barrage_energie_bv.shp output=barrage_e_bv min_area=0.0001 snap=-1

seems to be good

v.net --overwrite --verbose input=rivers_bv points=barrage_e_bv@PERMANENT output=network operation=connect thresh=1000

WARNING: Vector map <network> already exists and will be overwritten
WARNING: Table <barrage_e_bv@PERMANENT> linked to vector map <network> does not exist

where is my problem ?

Etienne

Le 17/10/2015 10:43, Etienne DELAY a écrit :

Hi Will and Hi Moritz,
I would like to be able to export the dam layer with 2 new columns : one
with the ID of the dam positioned before and an other one with the ID of
the dam after in the network.

I don't know how to do that :-S

Thank you

Etienne

Cordialement

Etienne DELAY (Skype : etienne.delay.tic)
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le 17/10/2015 08:58, Moritz Lennert a écrit :

Le Fri, 16 Oct 2015 18:38:28 +0200,
Etienne DELAY <etienne.delay@etu.unilim.fr> a écrit :

Dear all,
I'm try to understand network analysis fonction in grass 6.4. I have
2 layers :
* Points layer with the spatial dams repartition
* polylines layer with rivers
I would like to know for each dam how is before and how is after in
the network. I at the end I would like to export a shp files with
those data in the attribute table.

I have find some informations here :
http://www.ing.unitn.it/~grass/docs/tutorial_641_en/htdocs/esercitazione/network_analysis/node1.html

And I have done that :

##save a region
v.in.region --overwrite --verbose output=region_central

## clip rivers
v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=region_central output=rivers_central operator=and

v.overlay --overwrite --verbose ainput=troncon_dordogne@PERMANENT
atype=line binput=bv_dordogne@PERMANENT output=rivers_bv operator=and
v.select ainput=barrage_energie@PERMANENT
binput=bv_dordogne@PERMANENT output=barrage_e_bv
##Connect dam points to the network
## thresh=500 means that only points within
## the distance of 500 metres are connected to the lines
v.net --overwrite --verbose input=rivers_bv
points=barrage_e_bv@PERMANENT output=network operation=connect
thresh=500

## link the attribute table of the fire stations to layer 2 of the
network map
v.db.connect -o --verbose map=network table=barrage_e_bv@PERMANENT
layer=2

But I'm not so smart with data manipulation in GRASS so If someone
can give me a hand it's nice :slight_smile:

What is your actual question, i.e. with what do you need help ?

Also note that network modules have been significantly improved in
GRASS 7, so you should consider updating to that.

Moritz

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Sat, Oct 17, 2015 at 11:17 AM, Etienne DELAY <etienne.delay@etu.unilim.fr> wrote:

Re,
I have read carefully the v.out.ogr as will said for tring to export the
network layer but I’ve got an error :

v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/ layer=2
format=ESRI_Shapefile

WARNING: 111738 line(s) found, but not requested to be exported. Verify
‘type’ parameter.

(I guess that you need to set “type=line” and not “type=point”)

… this is why you may consider to upgrade to the current 7.0.x stable version. Note the differences:

https://grass.osgeo.org/grass64/manuals/v.out.ogr.html
type=string[,string,…] Feature type(s).
Combinations not supported by all output formats. Default: first type found in input.
Options: point,line,boundary,centroid,area,face,kernel,auto
Default: line,boundary

https://grass.osgeo.org/grass70/manuals/v.out.ogr.html
type=string[,string,…] Feature type(s)
Combination of types is not supported by all output formats.
Default is to use first type found in input vector map.
Options: point, line, boundary, centroid, area, face, kernel, auto
Default: auto <<==

Less to think about, much faster vector data processing, improved network analysis along with new graphical frontend:
https://grasswiki.osgeo.org/wiki/Vector_network_analysis#Screenshots

Best
Markus

Dear all dear Markus,
Above all great job GRASS dev team ! Grass 7 is so nice and powerful. I'm always in the dark with my dams problem.

I would like to export dams points as node and for each node in the attribute table 2 new column : dam before | dam after. I'm looking for network analysis but it may be a wrong way ?

There is a way to do that in Grass?

Cordialement

Etienne DELAY (Skype : etienne.delay.tic)
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le 18/10/2015 17:30, Markus Neteler a écrit :

On Sat, Oct 17, 2015 at 11:17 AM, Etienne DELAY
<etienne.delay@etu.unilim.fr <mailto:etienne.delay@etu.unilim.fr>> wrote:
> Re,
> I have read carefully the v.out.ogr as will said for tring to export the
> network layer but I've got an error :
>
> v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/ layer=2
> format=ESRI_Shapefile
>
> WARNING: 111738 line(s) found, but not requested to be exported. Verify
> 'type' parameter.
...

(I guess that you need to set "type=line" and not "type=point")

... this is why you may consider to upgrade to the current 7.0.x stable
version. Note the differences:

https://grass.osgeo.org/grass64/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s).
   Combinations not supported by all output formats. Default: first type
found in input.
   Options: point,line,boundary,centroid,area,face,kernel,auto
   Default: line,boundary

https://grass.osgeo.org/grass70/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s)
   Combination of types is not supported by all output formats.
   Default is to use first type found in input vector map.
   Options: point, line, boundary, centroid, area, face, kernel, auto
   Default: auto <<==

Less to think about, much faster vector data processing, improved
network analysis along with new graphical frontend:
https://grasswiki.osgeo.org/wiki/Vector_network_analysis#Screenshots

Best
Markus

Etienne DELAY (deust 2010) wrote

Dear all dear Markus,
Above all great job GRASS dev team ! Grass 7 is so nice and powerful.
I'm always in the dark with my dams problem.

I would like to export dams points as node and for each node in the
attribute table 2 new column : dam before | dam after. I'm looking for
network analysis but it may be a wrong way ?

There is a way to do that in Grass?

Cordialement

Etienne DELAY (Skype : etienne.delay.tic)
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le 18/10/2015 17:30, Markus Neteler a écrit :

On Sat, Oct 17, 2015 at 11:17 AM, Etienne DELAY
&lt;

etienne.delay@.unilim

&lt;mailto:

etienne.delay@.unilim

&gt;> wrote:

> Re,
> I have read carefully the v.out.ogr as will said for tring to export
the
> network layer but I've got an error :
>
> v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/
layer=2
> format=ESRI_Shapefile
>
> WARNING: 111738 line(s) found, but not requested to be exported.
Verify
> 'type' parameter.
...

(I guess that you need to set "type=line" and not "type=point")

... this is why you may consider to upgrade to the current 7.0.x stable
version. Note the differences:

https://grass.osgeo.org/grass64/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s).
   Combinations not supported by all output formats. Default: first type
found in input.
   Options: point,line,boundary,centroid,area,face,kernel,auto
   Default: line,boundary

https://grass.osgeo.org/grass70/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s)
   Combination of types is not supported by all output formats.
   Default is to use first type found in input vector map.
   Options: point, line, boundary, centroid, area, face, kernel, auto
   Default: auto <<==

Less to think about, much faster vector data processing, improved
network analysis along with new graphical frontend:
https://grasswiki.osgeo.org/wiki/Vector_network_analysis#Screenshots

Best
Markus

_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

v.distance?

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/river-and-dams-in-netwok-analysis-tp5230692p5232617.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Etienne DELAY (deust 2010) wrote

Dear all dear Markus,
Above all great job GRASS dev team ! Grass 7 is so nice and powerful.
I'm always in the dark with my dams problem.

I would like to export dams points as node and for each node in the
attribute table 2 new column : dam before | dam after. I'm looking for
network analysis but it may be a wrong way ?

There is a way to do that in Grass?

Cordialement

Etienne DELAY (Skype : etienne.delay.tic)
Chaire: Capital environnemental et gestion durable des cours d'eau
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
blog : http://elcep.legtux.org

Le 18/10/2015 17:30, Markus Neteler a écrit :

On Sat, Oct 17, 2015 at 11:17 AM, Etienne DELAY
&lt;

etienne.delay@.unilim

&lt;mailto:

etienne.delay@.unilim

&gt;> wrote:

> Re,
> I have read carefully the v.out.ogr as will said for tring to export
the
> network layer but I've got an error :
>
> v.out.ogr --overwrite input=network@PERMANENT type=point dsn=~/
layer=2
> format=ESRI_Shapefile
>
> WARNING: 111738 line(s) found, but not requested to be exported.
Verify
> 'type' parameter.
...

(I guess that you need to set "type=line" and not "type=point")

... this is why you may consider to upgrade to the current 7.0.x stable
version. Note the differences:

https://grass.osgeo.org/grass64/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s).
   Combinations not supported by all output formats. Default: first type
found in input.
   Options: point,line,boundary,centroid,area,face,kernel,auto
   Default: line,boundary

https://grass.osgeo.org/grass70/manuals/v.out.ogr.html
type=string[,string,...] Feature type(s)
   Combination of types is not supported by all output formats.
   Default is to use first type found in input vector map.
   Options: point, line, boundary, centroid, area, face, kernel, auto
   Default: auto <<==

Less to think about, much faster vector data processing, improved
network analysis along with new graphical frontend:
https://grasswiki.osgeo.org/wiki/Vector_network_analysis#Screenshots

Best
Markus

_______________________________________________
grass-user mailing list

grass-user@.osgeo

http://lists.osgeo.org/mailman/listinfo/grass-user

Have a look at

https://grass.osgeo.org/grass71/manuals/lrs.html

and v.lrs.where

-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/river-and-dams-in-netwok-analysis-tp5230692p5232638.html
Sent from the Grass - Users mailing list archive at Nabble.com.