Hi,
A colleague of mine has a data set with airports (and their coordinates) and flights between these airports, i.e. something like this:
x1 y1 x2 y2 flights
He wants to display these connections as lines between the airports, whose line width is proportional to the number of flights.
Anyone have a great idea of how to do this in GRASS ? I currently see the following possibility:
1) use awk to transform the file into an ascii vector line file, i.e.:
L 2 1
x1 y1
x2 y2
1 flights
2) import with v.in.ascii
3) select distinct values from the cats column
4) loop through those distinct values and d.vect with line width set to cats value * scale
Anyone have a better idea ?
Moritz
Alle 11:56, martedì 01 agosto 2006, Moritz Lennert ha scritto:
Hi,
A colleague of mine has a data set with airports (and their coordinates)
and flights between these airports, i.e. something like this:
x1 y1 x2 y2 flights
He wants to display these connections as lines between the airports,
whose line width is proportional to the number of flights.
Anyone have a great idea of how to do this in GRASS ? I currently see
the following possibility:
1) use awk to transform the file into an ascii vector line file, i.e.:
L 2 1
x1 y1
x2 y2
1 flights
2) import with v.in.ascii
3) select distinct values from the cats column
4) loop through those distinct values and d.vect with line width set to
cats value * scale
For line depth you can use the buffer feature...you can set the extension of
the buffer by the number of flight between airport.
Can it works?
Bye
Luca
--
"Chiunque può simpatizzare col dolore di un amico, ma solo chi ha un animo
nobile riesce a simpatizzare col successo di un amico (Oscar Wilde)"
LINUX User #411601
GENTOO-GIS Development Team
jabber: casagrande@jabber.linux.it
Luca Casagrande wrote:
Alle 11:56, martedì 01 agosto 2006, Moritz Lennert ha scritto:
Hi,
A colleague of mine has a data set with airports (and their coordinates)
and flights between these airports, i.e. something like this:
x1 y1 x2 y2 flights
He wants to display these connections as lines between the airports,
whose line width is proportional to the number of flights.
Anyone have a great idea of how to do this in GRASS ? I currently see
the following possibility:
1) use awk to transform the file into an ascii vector line file, i.e.:
L 2 1
x1 y1
x2 y2
1 flights
2) import with v.in.ascii
3) select distinct values from the cats column
4) loop through those distinct values and d.vect with line width set to
cats value * scale
For line depth you can use the buffer feature...you can set the extension of the buffer by the number of flight between airport.
Can it works?
I probably could, but I think working with the 'width' option of d.vect just seems easier.
Moritz