[GRASS-dev] v.lrs.where users wanted

Hi,

I finally got my LRS working (playing with the busroute in
the new NC dataset). The trick is to have the route built
as polyline (v.build.polylines), otherwise you will get
crazy to figure out the milepost order.

- documentation updated
- v.lrs.label now works (SQL fix in CVS)
- v.lrs.where:
   Then I tested v.lrs.where and discovered that the "offset"
   was reported incorrectly. I have fixed it in CVS but would
   like to ask LRS users to test if it still works ok for you.
   Please let me know.

- v.lrs.segment: still to test, seems to do something

Related question: how to add a new milepost into an existing
LRS?

Markus
--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
FBK-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Greatings!
I will make other tests on the modules in the next days!

Hopefully
Leonardo

Hi,

I finally got my LRS working (playing with the busroute in
the new NC dataset). The trick is to have the route built
as polyline (v.build.polylines), otherwise you will get
crazy to figure out the milepost order.

- documentation updated
- v.lrs.label now works (SQL fix in CVS)
- v.lrs.where:
   Then I tested v.lrs.where and discovered that the "offset"
   was reported incorrectly. I have fixed it in CVS but would
   like to ask LRS users to test if it still works ok for you.
   Please let me know.

- v.lrs.segment: still to test, seems to do something

Related question: how to add a new milepost into an existing
LRS?

Markus
--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
FBK-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

lami@faunalia.it ha scritto:

Greatings!
I will make other tests on the modules in the next days!

Hopefully
Leonardo
  

v.lrs.create works but the output table route_lrs is not linked to any vector. Is it rigth?

- v.lrs.label now works (SQL fix in CVS)
  

It works but the label route_lrs_labels seems empity. Do you see
somethings when you load it from GRASS?

- v.lrs.where:
   Then I tested v.lrs.where and discovered that the "offset"
   was reported incorrectly. I have fixed it in CVS but would
   like to ask LRS users to test if it still works ok for you.
   Please let me know.
    

It seems work well

GRASS 6.3.cvs (spearfish60):~ > v.lrs.where lines=route_lrs points=newpoints rstable=route_lrs
1|22|1.000000+247.431064
2|22|1.000000+779.074470
3|22|2.000000+573.928936
4|22|3.000000+147.765972
5|22|3.000000+967.703060
6|22|4.000000+952.605484
7|22|5.000000+948.312258
8|22|6.000000+470.481043
[8] points read from input
[8] positions found

- v.lrs.segment: still to test, seems to do something

Related question: how to add a new milepost into an existing
LRS?
    

test in progress....

Markus
--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
FBK-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Leonardo Lami wrote on 06/27/2007 12:46 PM:

lami@faunalia.it ha scritto:
  

Greatings!
I will make other tests on the modules in the next days!

Hopefully
Leonardo
  

v.lrs.create works but the output table route_lrs is not linked to any vector. Is it rigth?
  

Yes. Because LRS knows about it.

- v.lrs.label now works (SQL fix in CVS)
  

It works but the label route_lrs_labels seems empity. Do you see
somethings when you load it from GRASS?

You need to use d.label.
Please see v.lrs.label for new example. Currently I recommend to not use
the DBF driver.

- v.lrs.where:
   Then I tested v.lrs.where and discovered that the "offset"
   was reported incorrectly. I have fixed it in CVS but would
   like to ask LRS users to test if it still works ok for you.
   Please let me know.

It seems work well

Cool.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

On Thu, Jun 28, 2007 at 03:54:47PM +0200, Markus Neteler wrote:

Leonardo Lami wrote on 06/27/2007 12:46 PM:

...

> It works but the label route_lrs_labels seems empity. Do you see
> somethings when you load it from GRASS?
You need to use d.label.
Please see v.lrs.label for new example. Currently I recommend to not use
the DBF driver.

Hint: my v.lrs.create example needs an update once an improvement
in v.edit is done to avoid wrong line selection.
The trick is that the line *must* be a polyline to make nice
labels and so forth. Otherwise, no guarantee :slight_smile:

The current example doesn't deliver a perfect route, I improve
that asap (for now, you can v.clean/break and remove the "dangles").

markus

Ciao,

2007/6/28, Markus Neteler <neteler@itc.it>:

Hint: my v.lrs.create example needs an update once an improvement
in v.edit is done to avoid wrong line selection.

Should be fixed in CVS (v.edit).

Martin

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa wrote on 06/28/2007 04:27 PM:

2007/6/28, Markus Neteler <neteler@itc.it>:

Hint: my v.lrs.create example needs an update once an improvement
in v.edit is done to avoid wrong line selection.

Should be fixed in CVS (v.edit).

Confirmed, thanks.

Now I have updated the v.lrs.create example again.
And also the v.lrs.label example works which is based on the previous.
Additionally, a new working v.lrs.where example. :slight_smile:

Remaining problem: how to insert a new milepost into a LRS?

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Hi,
Only for information, I have a problem with the new GRASS csv with the
command v.lrs.label with dbf database

GRASS 6.3.cvs (spearfish60):~ > v.lrs.label route_lrs rstable=route_lrs
output=route_lrs_labels labels=labels col=red size=50 xoffset=100
D0/0: line = 1 / 1
DBMI-DBF driver error:
SQL parser error: syntax error, unexpected $undefined, expecting $end
processing ';'
in statement:
select start_map, end_map, start_mp, start_off, end_mp, end_off, lid
from route_lrs where lcat = 1;
Error in db_open_select_cursor()

ERRORE: Cannot select records from LRS table: select start_map, end_map,
        start_mp, start_off, end_mp, end_off, lid from route_lrs where lcat
        = 1;

No this problem with sqlite also if I can not again see the label also
if I use v.clean/break and remove the "dangles" on the vectors.

But I thin k the problem is in this output:
unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
file or directory

Best regards

Leonardo

Markus Neteler ha scritto:

Martin Landa wrote on 06/28/2007 04:27 PM:
  

2007/6/28, Markus Neteler <neteler@itc.it>:
    

Hint: my v.lrs.create example needs an update once an improvement
in v.edit is done to avoid wrong line selection.
      

Should be fixed in CVS (v.edit).
    

Confirmed, thanks.

Now I have updated the v.lrs.create example again.
And also the v.lrs.label example works which is based on the previous.
Additionally, a new working v.lrs.where example. :slight_smile:

Remaining problem: how to insert a new milepost into a LRS?

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Leonardo Lami wrote on 07/03/2007 06:27 PM:

Hi,
Only for information, I have a problem with the new GRASS csv with the
command v.lrs.label with dbf database

GRASS 6.3.cvs (spearfish60):~ > v.lrs.label route_lrs rstable=route_lrs
output=route_lrs_labels labels=labels col=red size=50 xoffset=100
D0/0: line = 1 / 1
DBMI-DBF driver error:
SQL parser error: syntax error, unexpected $undefined, expecting $end
processing ';'
in statement:
select start_map, end_map, start_mp, start_off, end_mp, end_off, lid
from route_lrs where lcat = 1;
Error in db_open_select_cursor()

ERRORE: Cannot select records from LRS table: select start_map, end_map,
        start_mp, start_off, end_mp, end_off, lid from route_lrs where lcat
        = 1;
  

Already fixed in CVS, it was a DBF driver limitation not accepting the
';' (now it does).

No this problem with sqlite also if I can not again see the label also
if I use v.clean/break and remove the "dangles" on the vectors.

But I thin k the problem is in this output:
unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
file or directory
  

Huh? Never see that problem... Apparently something went wrong when you
compiled lib/fonts/.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------

Markus Neteler wrote:

> No this problem with sqlite also if I can not again see the label also
> if I use v.clean/break and remove the "dangles" on the vectors.
>
> But I thin k the problem is in this output:
> unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
> file or directory

Huh? Never see that problem... Apparently something went wrong when you
compiled lib/fonts/.

That error message indicates that the current font name is the empty
string. The current font should always be initialised by either
mon.select or (for direct rendering) LOC_init(). It's possible that
the current font has actually been set to the empty string, either by
$GRASS_FONT being defined but empty or by a call to R_font("").

--
Glynn Clements <glynn@gclements.plus.com>

Ok, all rigth!
Under the Config menù there is the command "display font", it was
necessary just setting it.

Ciao
leonardo

Glynn Clements ha scritto:

Markus Neteler wrote:

No this problem with sqlite also if I can not again see the label also
if I use v.clean/break and remove the "dangles" on the vectors.

But I thin k the problem is in this output:
unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
file or directory
      

Huh? Never see that problem... Apparently something went wrong when you
compiled lib/fonts/.
    
That error message indicates that the current font name is the empty
string. The current font should always be initialised by either
mon.select or (for direct rendering) LOC_init(). It's possible that
the current font has actually been set to the empty string, either by
$GRASS_FONT being defined but empty or by a call to R_font("").

This is my first result with v.lrs.segment...not encouraging...
the vector road_plus is a line (whitout nodes) that start and stop on
the lrs vector.

GRASS 6.3.cvs (spearfish60):~ > v.lrs.segment input=road_plus@router
output=route_lrs_labels_plus llayer=1 rsdriver=sqlite
rsdatabase=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db rstable=route_lrs
--overwrite
DBMI-SQLite driver error:
Cannot open database: unable to open database file

ERRORE: Cannot open database for reference table

If I put the explicit rsdatabase path:

GRASS 6.3.cvs (spearfish60):~ > v.lrs.segment input=road_plus@router
output=route_lrs_labels_plus llayer=1 rsdriver=sqlite
rsdatabase=/home/Documenti/datigrass/spearfish60/router/sqlite.db
rstable=route_lrs --overwrite
ATTENZIONE: Il vettoriale 'route_lrs_labels_plus' è già presente e sarà
            sovrascritto

<all stops>
....
<I press Return>

ATTENZIONE: Incorrect segment type:

<all stops>
....
<I press Return>

ATTENZIONE: Incorrect segment type:

<all stops>
....
<I press Return>

ATTENZIONE: Incorrect segment type:

and I must press ctrl-C

Any idea?

Leonardo

Leonardo Lami ha scritto:

Ok, all rigth!
Under the Config menù there is the command "display font", it was
necessary just setting it.

Ciao
leonardo

Glynn Clements ha scritto:
  

Markus Neteler wrote:

No this problem with sqlite also if I can not again see the label also
if I use v.clean/break and remove the "dangles" on the vectors.

But I thin k the problem is in this output:
unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
file or directory
      

Huh? Never see that problem... Apparently something went wrong when you
compiled lib/fonts/.
    

That error message indicates that the current font name is the empty
string. The current font should always be initialised by either
mon.select or (for direct rendering) LOC_init(). It's possible that
the current font has actually been set to the empty string, either by
$GRASS_FONT being defined but empty or by a call to R_font("").

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Leonardo Lami wrote on 07/05/2007 11:53 AM:

This is my first result with v.lrs.segment...not encouraging...
the vector road_plus is a line (whitout nodes) that start and stop on
the lrs vector.

GRASS 6.3.cvs (spearfish60):~ > v.lrs.segment input=road_plus@router
output=route_lrs_labels_plus llayer=1 rsdriver=sqlite
rsdatabase=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db rstable=route_lrs
--overwrite
DBMI-SQLite driver error:
Cannot open database: unable to open database file

ERRORE: Cannot open database for reference table
  

You have to single quote to avoid shell expansion, e.g.
rsdatabase='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db'

BUT: I don't that you should (re)define rsdriver and rsdatabase. It' s
predefined, see
v.lrs.segment help
which tells you the current settings.

If I put the explicit rsdatabase path:

GRASS 6.3.cvs (spearfish60):~ > v.lrs.segment input=road_plus@router
output=route_lrs_labels_plus llayer=1 rsdriver=sqlite
rsdatabase=/home/Documenti/datigrass/spearfish60/router/sqlite.db
rstable=route_lrs --overwrite
ATTENZIONE: Il vettoriale 'route_lrs_labels_plus' è già presente e sarà
            sovrascritto
  
<all stops>
....
<I press Return>
  
Why do you press <Return>?

I have added a new example to the manual page in CVS.

Markus

ATTENZIONE: Incorrect segment type:

<all stops>
....
<I press Return>

ATTENZIONE: Incorrect segment type:

<all stops>
....
<I press Return>

ATTENZIONE: Incorrect segment type:

and I must press ctrl-C

Any idea?

Leonardo

Leonardo Lami ha scritto:
  

Ok, all rigth!
Under the Config menù there is the command "display font", it was
necessary just setting it.

Ciao
leonardo

Glynn Clements ha scritto:
  

Markus Neteler wrote:

No this problem with sqlite also if I can not again see the label also
if I use v.clean/break and remove the "dangles" on the vectors.

But I thin k the problem is in this output:
unable to open font map '/usr/local/grass-6.3.cvs/fonts/.hmp': No such
file or directory
      

Huh? Never see that problem... Apparently something went wrong when you
compiled lib/fonts/.
    

That error message indicates that the current font name is the empty
string. The current font should always be initialised by either
mon.select or (for direct rendering) LOC_init(). It's possible that
the current font has actually been set to the empty string, either by
$GRASS_FONT being defined but empty or by a call to R_font("").

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser
  
------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------