micha-silver / grass-hecras

Scritps for interfacing between GRASS and HEC RAS
10 stars 4 forks source link

xsections #1

Open jmfsilva opened 10 years ago

jmfsilva commented 10 years ago

Dear Micha Silver, I'm trying to use your xsections script on Grass 6.4.

My vector is a vector line xsections Input: http://imgur.com/7arLupb

i'm getting the following errors: ERROR: option must be provided in multiples of 2 You provided 1 items: river, Description: Copies available data files in the user's current mapset search path and location to the appropriate element directories under the user's current mapset. Keywords: general, map management Usage: g.copy [rast=from,to] [rast3d=from,to] [vect=from,to] [oldvect=from,to] [asciivect=from,to] [icon=from,to] [labels=from,to] [sites=from,to] [region=from,to] [region3d=from,to] [group=from,to] [3dview=from,to] [--verbose] [--quiet] Flags: --v Verbose module output --q Quiet module output Parameters: rast rast file(s) to be copied rast3d rast3d file(s) to be copied vect vect file(s) to be copied oldvect oldvect file(s) to be copied asciivect asciivect file(s) to be copied icon icon file(s) to be copied labels labels file(s) to be copied sites sites file(s) to be copied region region file(s) to be copied region3d region3d file(s) to be copied group group file(s) to be copied 3dview 3dview file(s) to be copied ERROR: Vector map <> not found Traceback (most recent call last): File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s cripts/v.xsections.py", line 331, in sys.exit(main()) File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s cripts/v.xsections.py", line 317, in main reach_cats = create_river_network(river, smooth_river) File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s cripts/v.xsections.py", line 270, in create_river_network grass.run_command('v.db.addcolumn', map=outvect, columns="reach_len DOUBLE PRECISION", quiet=True) File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho n/grass/script/core.py", line 189, in run_command ps = start_command(_args, *_kwargs) File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho n/grass/script/core.py", line 177, in start_command return Popen(args, popts) File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho n/grass/script/core.py", line 56, in init startupinfo, creationflags) File "/System/Library/Frameworks/Python.framework/Versions /2.6/lib/python2.6/subprocess.py", line 623, in init** errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions /2.6/lib/python2.6/subprocess.py", line 1141, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory (Wed May 21 18:21:36 2014) Command finished (2 sec)

Do i'v an error on input file?

micha-silver commented 10 years ago

body p { margin-bottom: 0cm; margin-top: 0pt; } Hi: Thanks for your feedback. To be truthful, I haven't touched this script in many months. I think I see where the problem is. Can you add a name for the "smooth_river" parameter. It's on the Optional tab. I think I need to make it required. Have another try, and let me know what happens. Cheers, Micha On 05/21/2014 08:42 PM, jmfsilva wrote:

  Dear Micha Silver,
    I'm trying to use your xsections script on Grass 6.4.
  My vector is a vector line
    xsections Input: http://imgur.com/7arLupb
  i'm getting the following errors:
    ERROR: option must be provided in multiples of 2
    You provided 1 items:
    river,
    Description:
    Copies available data files in the user's current mapset
    search path and location to the appropriate element
    directories under the user's current mapset.
    Keywords:
    general, map management
    Usage:
    g.copy [rast=from,to] [rast3d=from,to] [vect=from,to]
    [oldvect=from,to] [asciivect=from,to] [icon=from,to]
    [labels=from,to]
    [sites=from,to] [region=from,to] [region3d=from,to]
    [group=from,to]
    [3dview=from,to] [--verbose] [--quiet]
    Flags:
    --v Verbose module output
    --q Quiet module output
    Parameters:
    rast rast file(s) to be copied
    rast3d rast3d file(s) to be copied
    vect vect file(s) to be copied
    oldvect oldvect file(s) to be copied
    asciivect asciivect file(s) to be copied
    icon icon file(s) to be copied
    labels labels file(s) to be copied
    sites sites file(s) to be copied
    region region file(s) to be copied
    region3d region3d file(s) to be copied
    group group file(s) to be copied
    3dview 3dview file(s) to be copied
    ERROR: Vector map <> not found
    Traceback (most recent call last):
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s
    cripts/v.xsections.py", line 331, in 
    sys.exit(main())
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s
    cripts/v.xsections.py", line 317, in main
    reach_cats = create_river_network(river, smooth_river)
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/gui/s
    cripts/v.xsections.py", line 270, in create_river_network
    grass.run_command('v.db.addcolumn', map=outvect,
    columns="reach_len DOUBLE PRECISION", quiet=True)
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho
    n/grass/script/core.py", line 189, in run_command
    ps = start_command(*args, **kwargs)
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho
    n/grass/script/core.py", line 177, in start_command
    return Popen(args, **popts)
    File "/Applications/GRASS-6.4.app/Contents/MacOS/etc/pytho
    n/grass/script/core.py", line 56, in init
    startupinfo, creationflags)
    File "/System/Library/Frameworks/Python.framework/Versions
    /2.6/lib/python2.6/subprocess.py", line 623, in init
    errread, errwrite)
    File "/System/Library/Frameworks/Python.framework/Versions
    /2.6/lib/python2.6/subprocess.py", line 1141, in
    _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory
    (Wed May 21 18:21:36 2014) Command finished (2 sec)
  Do i'v an error on input file?
  —
    Reply to this email directly or view
      it on GitHub.

  This mail was received via Mail-SeCure System.
jmfsilva commented 10 years ago

Thank you for your awnser, That did solve the problem, but i got an error with v.db.addcolumn... it is not a reconized command on grass 6.4.3 (http://grass.osgeo.org/grass65/manuals/v.db.addcol.html), so i runned it on grass 7.0 beta2 (http://grass.osgeo.org/grass70/manuals/v.db.addcolumn.html) and it worked fine :D. I suggest to add the Grass version for wich the script work at the readme file.

The output layers are not as i expected... The sections look fine, and the intersections too. But, i'm only getting 1 station for each section, in the middle. Is that suppose to happen? Do i need to have Parallel lines to the main channel line? Output: http://imgur.com/7oZWYlJ

micha-silver commented 10 years ago

body p { margin-bottom: 0cm; margin-top: 0pt; } Hi On 05/23/2014 06:58 PM, jmfsilva wrote:

  Thank you for your awnser,
    That did solve the problem, but i got an error with
    v.db.addcolumn... it is not a reconized command on grass 6.4.3 (http://grass.osgeo.org/grass65/manuals/v.db.addcol.html),
    so i runned it on grass 7.0 beta2 (http://grass.osgeo.org/grass70/manuals/v.db.addcolumn.html)
    and it worked fine :D.
    I suggest to add the Grass version for wich the script work at
    the readme file.

Will do, thanks

  The output layers are not as i expected... The sections look
    fine, and the intersections too. But, i'm only getting 1 station
    for each section, in the middle. Is that suppose to happen?

Yes, that was the intention. I am hoping to complete a GRASS
  procedure to make the required input to HEC-RAS. AFAIK, the
  HEC-RAS setup of transects allows one station at each cross point
  where the transect intersects the channel.

Regards,
Micha

    Do i need to have Parallel lines to the main channel line?
    Output: http://imgur.com/7oZWYlJ
  —
    Reply to this email directly or view
      it on GitHub.

  This mail was received via Mail-SeCure System.
jmfsilva commented 10 years ago

Thanks for the answer, So, i guess that i'm done with this part. Now that i'v the first part done, i will go ahead and try the second document. I already tryied but i was worried that the erros that i got were because of the result in first part. As soon as i can i will post the errors.

Thank you very much, Best regards,