[GRASS5] d.vect.thematic wish: handle null values

Moritz Lennert mlennert at club.worldonline.be
Thu Aug 11 17:20:00 EDT 2005


Hi,

Trying to make maps with d.vect.thematic I have stumbled upon the problem that
the module fails when there are null values in the table (postgresql):

**********
awk: (FILENAME=- FNR=1) fatal: division by zero attempted


Thematic map legend for column revmed of map ssbxl01

Value range:   -  33079
Mapped by 7 intervals of

Color(R:G:B)    Value
============    ==========
0:0:250         7 -
DBMI-Postgres driver error:
Cannot select:
SELECT cat FROM ssbxl01 WHERE revmed >= 7 and revmed<=
ERREUR:  L'opérateur n'existe pas : integer <=
HINT:  Aucun opérateur correspond au nom donné et aux types d'arguments. Vous
devez ajouter des conversions explicites de type.


35:0:215                 -
DBMI-Postgres driver error:
Cannot select:
SELECT cat FROM ssbxl01 WHERE revmed >  and revmed<=
ERREUR:  syntax error sur ou près de «and» at character 41

etc...
************

Now I can see two theoretical solutions to this:

1) handle null values
2) allow to give a value that represents null values (e.g. -99999)

For both of these solutions, d.vect.thematic should offer the choice of a
color for these values, so that they do not use the same color scheme as the
'valid' values.

Moritz




More information about the grass-dev mailing list