[GRASS5] d.site.pg and s.to.rast

Glynn Clements glynn.clements at virgin.net
Sat Mar 9 16:12:38 EST 2002


Alex Shevlakov wrote:

> I could not convert to pixels sites list if they had third column
> starting with '@' which is a string attribute sign. Then, I found
> out that sites produced by d.site.pg always had 'string' third
> column, even if fields of types int or float were selected from
> table as category fields. To make s.to.rast conversion possible, we
> had to change all '@' by '#' in site_lists.

> To somehow avoid this, I've added field type recognition to
> d.site.pg based on the values returned by PQftype and described in
> pg_type.h (which is not present in post-install postgres header
> directory), constructing different type site lists, at the CVS.

This concerns version 1.8 of d.site.pg/runInfxFile.c, right?

Are you saying that your PostgreSQL installation doesn't have
<catalog/pg_type.h>? If so, do you have any idea whether this is
likely to be a common problem?

Using integer constants in the source code should be avoided if at all
possible. If it's unreasonable to rely upon the presence of
<catalog/pg_type.h>, the various *OID macros should be #define'd
locally.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list