[GRASS-user] to shorten lines
Ivan Shmakov
oneingray at gmail.com
Mon Jul 16 00:48:05 EDT 2007
>>>>> ivan marchesini <marchesini at unipg.it> writes:
> Many thanks Markus...
> I did this way (for a line only, which has category=163 ... now I
> will create a cycle for each line of the map):
> with this I obtain the length of the line subtracted of 20 meters:
> echo "`v.report map=Reticol layer=1 option=area units=meters | grep
> 163 | cut -f3 -d'|'`-20" | bc -l
You may find `sed' useful as well, e. g.:
$ v.report map=Reticol layer=1 option=area units=meters \
| grep 163 \
| cut -f3 -d'|' \
| sed -e s/\$/-20/ \
| bc -q
[...]
More information about the grass-user
mailing list