I'm trying to use v.net.path through gis manager (GRASS6.2) to define the
shortest path between two points of given coordinates, but the panel of the
command seems not to allow the coordinates input, even though the
description of the last parameter in the panel reports explicitly this
possibility 'Maximum distance to the network if start/end are given as
coordinates'
In command line mode the following works:
v.net.path in=roads ou=roads_pt <<end
I'm trying to use v.net.path through gis manager (GRASS6.2) to define the
shortest path between two points of given coordinates, but the panel of the
command seems not to allow the coordinates input, even though the
description of the last parameter in the panel reports explicitly this
possibility 'Maximum distance to the network if start/end are given as
coordinates'
In command line mode the following works:
v.net.path in=roads ou=roads_pt <<end
Yes it works, at least with only one point as I didn't discover the correct
separator.
However my question was about the possibility of using v.net.path through
Vector > Network analysis > Shortest route. I'm not able to specify the
start/end points in the panel. In which section they can be introduced?
Thanks again
A. Clerici
-----Messaggio originale-----
Da: Moritz Lennert [mailto:mlennert@club.worldonline.be]
Inviato: martedì 20 febbraio 2007 17.06
A: aldo.clerici@unipr.it
Cc: grassuser@grass.itc.it
Oggetto: Re: [GRASS-user] v.net.path through gis manager (GRASS6.2)
On 20/02/07 15:21, Aldo Clerici wrote:
> Dear GRASSusers,
>
> I'm trying to use v.net.path through gis manager (GRASS6.2)
to define
> the shortest path between two points of given coordinates, but the
> panel of the command seems not to allow the coordinates input, even
> though the description of the last parameter in the panel reports
> explicitly this possibility 'Maximum distance to the network if
> start/end are given as coordinates'
>
> In command line mode the following works:
> v.net.path in=roads ou=roads_pt <<end
>> 1 592634 4925356 596568 4922912
>> 2 591738 4923061 593170 4915608
>> end
>
> Is there a way to perform the same operation using gis manager?
You can define a command layer and in this layer use something like:
Yes it works, at least with only one point as I didn't discover the correct
separator. However my question was about the possibility of using v.net.path through
Vector > Network analysis > Shortest route. I'm not able to specify the
start/end points in the panel. In which section they can be introduced?
For this module (in its current state) a GUI panel probably does not really make sense as it only works through piping the coordinates. From the html page:
"Nodes can be piped into the program from file or from stdin. The syntax is as follows:
id start_point_category end_point_category
or
id start_point_x start_point_y end_point_x end_point_y
Points specified by category must be exactly on network nodes, while, when specifying coordinates, the next node to a given coordinate pair is used."
You should also be able to put all your points into a file and do something like:
cat PathToFile | v.net.path in=roads ou=roads_pt
It shouldn't be too difficult to add the capacity to read from file, or to pass coordinates as a parameter, but apparently noone amongst those capable has felt enough need up to now to do that...
Moritz
Thanks again
A. Clerici
-----Messaggio originale-----
Da: Moritz Lennert [mailto:mlennert@club.worldonline.be] Inviato: martedì 20 febbraio 2007 17.06
A: aldo.clerici@unipr.it
Cc: grassuser@grass.itc.it
Oggetto: Re: [GRASS-user] v.net.path through gis manager (GRASS6.2)
On 20/02/07 15:21, Aldo Clerici wrote:
Dear GRASSusers,
I'm trying to use v.net.path through gis manager (GRASS6.2)
to define
the shortest path between two points of given coordinates, but the panel of the command seems not to allow the coordinates input, even though the description of the last parameter in the panel reports explicitly this possibility 'Maximum distance to the network if start/end are given as coordinates'
In command line mode the following works:
v.net.path in=roads ou=roads_pt <<end
Ok. Now it's clear to me that is not possible to pass the coordinates
through the panel. Shouldn't be a good idea to delete the panel itself
waiting for a future improvement? In its present form it is useless and
misleading.
Best regards
A. Clerici
-----Messaggio originale-----
Da: Moritz Lennert [mailto:mlennert@club.worldonline.be]
Inviato: martedì 20 febbraio 2007 19.18
A: aldo.clerici@unipr.it
Cc: grassuser@grass.itc.it; Michael Barton
Oggetto: Re: R: [GRASS-user] v.net.path through gis manager (GRASS6.2)
On 20/02/07 18:58, Aldo Clerici wrote:
> Yes it works, at least with only one point as I didn't discover the
> correct separator.
> However my question was about the possibility of using v.net.path
> through Vector > Network analysis > Shortest route. I'm not able to
> specify the start/end points in the panel. In which section
they can be introduced?
For this module (in its current state) a GUI panel probably
does not really make sense as it only works through piping
the coordinates. From the html page:
"Nodes can be piped into the program from file or from stdin.
The syntax is as follows:
id start_point_category end_point_category
or
id start_point_x start_point_y end_point_x end_point_y
Points specified by category must be exactly on network
nodes, while, when specifying coordinates, the next node to a
given coordinate pair is used."
You should also be able to put all your points into a file
and do something like:
cat PathToFile | v.net.path in=roads ou=roads_pt
It shouldn't be too difficult to add the capacity to read
from file, or to pass coordinates as a parameter, but
apparently noone amongst those capable has felt enough need
up to now to do that...
Moritz
> Thanks again
> A. Clerici
>
>> -----Messaggio originale-----
>> Da: Moritz Lennert [mailto:mlennert@club.worldonline.be]
>> Inviato: martedì 20 febbraio 2007 17.06
>> A: aldo.clerici@unipr.it
>> Cc: grassuser@grass.itc.it
>> Oggetto: Re: [GRASS-user] v.net.path through gis manager (GRASS6.2)
>>
>> On 20/02/07 15:21, Aldo Clerici wrote:
>>> Dear GRASSusers,
>>>
>>> I'm trying to use v.net.path through gis manager (GRASS6.2)
>> to define
>>> the shortest path between two points of given
coordinates, but the
>>> panel of the command seems not to allow the coordinates
input, even
>>> though the description of the last parameter in the panel reports
>>> explicitly this possibility 'Maximum distance to the network if
>>> start/end are given as coordinates'
>>>
>>> In command line mode the following works:
>>> v.net.path in=roads ou=roads_pt <<end
>>>> 1 592634 4925356 596568 4922912
>>>> 2 591738 4923061 593170 4915608
>>>> end
>>> Is there a way to perform the same operation using gis manager?
>>
>> You can define a command layer and in this layer use
something like:
>>
>> echo "1 592634 4925356 596568 4922912 2 591738 4923061 593170
>> 4915608" | v.net.path in=roads ou=roads_pt
>>
>> (don't know if you need to add a separator between the points)
>>
>> Moritz
>>
>
>
For this module (in its current state) a GUI panel probably does not
really make sense as it only works through piping the coordinates.
..
It shouldn't be too difficult to add the capacity to read from file,
or to pass coordinates as a parameter, but apparently noone amongst
those capable has felt enough need up to now to do that...
Yes it should be possible to do, this is exactly how the GUI profile
tool works -- by collecting and passing coordines to the r.profile
module and plotting the result.
This could probably be done even easier than the profiler, more like the way
r.color.rules works. It just needs a wrapper script with the appropriate GUI
parser prompts to provide a place to type in coordinates and pass them to
the GRASS module.
If we wanted to do it interactively via mouse, then profile.tcl is a good
model from which to use code. It uses the mouse to grab screen coordinates,
convert them to geographic coordinates, and feed them to r.profile.
Michael
On 2/21/07 1:05 AM, "Hamish" <hamish_nospam@yahoo.com> wrote:
Aldo:
I'm trying to use v.net.path through gis manager (GRASS6.2)
to define the shortest path between two points of given
coordinates,
..
I'm not able to specify the start/end points in the panel. In which
section they can be introduced?
For this module (in its current state) a GUI panel probably does not
really make sense as it only works through piping the coordinates.
..
It shouldn't be too difficult to add the capacity to read from file,
or to pass coordinates as a parameter, but apparently noone amongst
those capable has felt enough need up to now to do that...
Yes it should be possible to do, this is exactly how the GUI profile
tool works -- by collecting and passing coordines to the r.profile
module and plotting the result.
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
This could probably be done even easier than the profiler, more like the way
r.color.rules works. It just needs a wrapper script with the appropriate GUI
parser prompts to provide a place to type in coordinates and pass them to
the GRASS module.
Two possibilities here:
1) either the GUI provides the pre-work to launch v.net.path, piping in the coordinates
2) someone amends v.net.path so that it accepts coordinates either from a file or as parameters.
If we wanted to do it interactively via mouse, then profile.tcl is a good
model from which to use code. It uses the mouse to grab screen coordinates,
convert them to geographic coordinates, and feed them to r.profile.
I think this is typically a module where interactive selection by mouse should be possible.