[GRASS5] New thematic mapper for GRASS 6
Jachym Cepicky
jachym.cepicky at centrum.cz
Thu May 12 11:00:53 EDT 2005
hallo
On Thu, May 12, 2005 at 04:21:51PM +0200, Moritz Lennert wrote:
>
> Great ! But watch out: I think the patch is not against the latest version of
> the code which fixes the bug of a possible missing value in the first
> category...
>
sorry,
now I patched the file against patched d.vect.thematic from Martin Landa
> >
> > d.vect.thematic could be renamed to v.thematic... or even v.colors :-) ?
>
> I think d.vect.thematic is better as the module is clearly a display module.
> Moritz
well, now it is display & update module
Jáchym
--
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://www.fle.czu.cz/~jachym/gnupg_public_key/
-------------- next part --------------
109a110,116
> #%flag
> #% key: u
> #% description: Update color values to the table
> #%end
>
> # setting environment, so that awk works properly in all languages
> export LC_NUMERIC=C
140a148,161
> # update color values to the table?
> if [ "$GIS_FLAG_u -eq 1" ] ; then
> # which is the database table?
> table=`v.db.connect -g $GIS_OPT_map |grep $GIS_OPT_layer | awk '{print $2}'`
>
> # test, if the column GRASSRGB is in the table
> if [ "`db.columns $table | grep -i grassrgb`" == "" ] ; then
> echo "Creating column 'grassrgb' in table '$table'"
> "ALTER TABLE $table ADD COLUMN grassrgb varchar(11)"|db.execute
> fi
>
> fi
>
>
143c164,167
< v.univar.sh -e table=$GIS_OPT_map column=$GIS_OPT_column > TMP1
---
> dblink=`v.db.connect $GIS_OPT_map -g | grep -w $GIS_OPT_layer`
> driver=`echo $dblink | awk '{print $5}'`
> database=`echo $dblink | awk '{print $4}'`
> v.univar.sh -e table=$GIS_OPT_map column=$GIS_OPT_column drv=$driver db=$database > TMP1
230a255,262
>
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
232c264
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
263a296,303
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
>
265c305
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
284a325,331
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
286c333
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
301a349,355
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
303c357
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
322a377,384
>
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
324c386
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
343a406,412
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
345c414
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
360a430,436
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
362c438
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
382a459,465
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
384c467
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
399a483,489
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
401c491
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
416a507,513
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
418c515
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
433a531,537
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
435c539
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
457a562,568
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
459c570
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
484a596,602
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
486c604
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
497a616,622
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
499c624
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
506a632,638
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
508c640
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
519a652,658
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
521c660
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
532a672,678
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
534c680
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
541a688,694
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
543c696
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
559a713,719
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
561c721
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
568a729,735
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
570c737
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
577a745,751
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
579c753
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
586a761,767
> # update color to database?
> sqlwhere="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax"
> if [ $GIS_FLAG_u -eq 1 ] ; then
> echo "UPDATE $table SET GRASSRGB = '$themecolor' WHERE $sqlwhere"\
> | db.execute
> fi
>
588c769
< where="$GIS_OPT_column>$rangemin and $GIS_OPT_column<=$rangemax" \
---
> where="$sqlwhere" \
More information about the grass-dev
mailing list