[GRASS-dev] [grass-code I][537] d.vect and d.vect.thematic attributes from other layers than 1

code I item #537, was opened at 2007-11-23 14:01
Status: Open
Priority: 3
Submitted By: Harri Kiiskinen (harrikoo)
Assigned to: Nobody (None)
Summary: d.vect and d.vect.thematic attributes from other layers than 1
Issue type: library bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: None
Operating system: Linux
Operating system version: Debian testing
GRASS CVS checkout date, if applies (YYMMDD): 071122

Initial Comment:
It seems, that neither d.vect nor d.vect.thematic can any more display labels based on attributes other layers than 1. Example:

GRASS 6.3.cvs (TS): > v.db.connect -p allfindspots
Vector map <allfindspots> is connected by:
layer <1> table <overall.allfindspots> in database <host=localhost,dbname=TS> through driver <pg> with key <id>
layer <10> table <overall.sites_amounts10> in database <host=localhost,dbname=TS,port=5432> through driver <pg> with key <id>

GRASS 6.3.cvs (TS): > v.db.connect -c allfindspots layer=1
CHARACTER|findspot
INTEGER|id
CHARACTER|alternative_name
CHARACTER|modern_country
CHARACTER|roman_province
DOUBLE PRECISION|latitude
DOUBLE PRECISION|longitude

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=id layer=1 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green

produces nice map, see map1.png

But:

GRASS 6.3.cvs (TS): > v.db.connect -c allfindspots layer=10
INTEGER|id
CHARACTER|site
INTEGER|amount

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=id layer=10 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green

outputs:

Thematic map legend for column id of map allfindspots@overall
Value range: 1 - 843
Mapped by 4 intervals of 210.5
Size/width Value
========== =====
PNG: GRASS_TRUECOLOR status: FALSE
PNG: collecting to file: map.png,
GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started
20 632.5 - 843
15 422 - 632.5
10 211.5 - 422
5 1 - 211.5
Monitor 'PNG' terminated

But the map is empty.

In addition:

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=amount layer=10 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green
ERROR: No such column [amount]

Although v.db.connect above did show the column. And yes, the data is in the table. The database connection is working fine, I can list the tables and do whatever.

So on layer 1, all the column can be accessed; on layer 10, only the key-column; others "do nnot exist".

I guess this might as well be a database driver problem.

Debugging:

Debugging in the "missing column" case does not help:

D2/5: filename = /usr/lib/grass/scripts/d.vect.thematic
D2/5: set GIS_FLAG_G=0
D2/5: set GIS_FLAG_L=0
D2/5: set GIS_FLAG_F=0
D2/5: set GIS_FLAG_U=0
D2/5: set GIS_FLAG_S=1
D2/5: set GIS_FLAG_M=0
D2/5: set GIS_OPT_MAP=allfindspots@overall
D2/5: set GIS_OPT_TYPE=point
D2/5: set GIS_OPT_COLUMN=amount
D2/5: set GIS_OPT_THEMETYPE=graduated_points
D2/5: set GIS_OPT_THEMECALC=interval
D2/5: set GIS_OPT_BREAKPOINTS=
D2/5: set GIS_OPT_LAYER=10
D2/5: set GIS_OPT_ICON=basic/circle
D2/5: set GIS_OPT_SIZE=5
D2/5: set GIS_OPT_MAXSIZE=20
D2/5: set GIS_OPT_NINT=4
D2/5: set GIS_OPT_COLORSCHEME=blue-green
D2/5: set GIS_OPT_POINTCOLOR=255:0:0
D2/5: set GIS_OPT_LINECOLOR=0:0:0
D2/5: set GIS_OPT_STARTCOLOR=255:0:0
D2/5: set GIS_OPT_ENDCOLOR=0:0:255
D2/5: set GIS_OPT_MONITOR=none
D2/5: set GIS_OPT_WHERE=
D2/5: set GIS_OPT_PSMAP=
D2/5: set GIS_OPT_GROUP=
D2/5: G__home home = /home/harri
ERROR: No such column [amount]

In the case where the key field is used (i.e. att=id), I get different
different results (see attached debug log)

I have checked this with different maps in different locations and mapsets using different tables, but have found no explanations. One old map (over 2 years) does show attrbutes from layer 100 with d.vect and d.vect.thematic, but I cannot create new maps that do the same.

Perhaps this is a PostgreSQL driver bug, after all?

Best,

Harri K.

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=537&group_id=21

From MAILER-DAEMON Fri Nov 23 08:02:07 2007
Return-Path: <>
X-Original-To: grass-dev@lists.osgeo.org
Delivered-To: grass-dev@lists.osgeo.org
Received: from grass.itc.it (grass.itc.it [217.77.80.24])
  by lists.osgeo.org (Postfix) with ESMTP id 3E975E005E8
  for <grass-dev@lists.osgeo.org>; Fri, 23 Nov 2007 08:02:07 -0500 (EST)
Received: from pyrosoma.intevation.org (wald.intevation.org [78.47.251.62])
  by grass.itc.it (8.13.1/8.13.1) with ESMTP id lAND26Wq004424
  for <grass-dev@grass.itc.it>; Fri, 23 Nov 2007 14:02:06 +0100
Received: by pyrosoma.intevation.org (Postfix)
  id 76568B4023; Fri, 23 Nov 2007 14:02:05 +0100 (CET)
Date: Fri, 23 Nov 2007 14:02:05 +0100 (CET)
From: MAILER-DAEMON@wald.intevation.org (Mail Delivery System)
To: grass-dev@grass.itc.it
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
  boundary="0FBB1B4020.1195822925/pyrosoma.intevation.org"
Message-Id: <20071123130205.76568B4023@pyrosoma.intevation.org>
Cc:
Subject: [GRASS-dev] Undelivered Mail Returned to Sender
X-BeenThere: grass-dev@lists.osgeo.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: GRASS GIS Development mailing list <grass-dev.lists.osgeo.org>
List-Unsubscribe: <http://lists.osgeo.org/mailman/listinfo/grass-dev&gt;,
  <mailto:grass-dev-request@lists.osgeo.org?subject=unsubscribe>
List-Archive: <http://lists.osgeo.org/pipermail/grass-dev&gt;
List-Post: <mailto:grass-dev@lists.osgeo.org>
List-Help: <mailto:grass-dev-request@lists.osgeo.org?subject=help>
List-Subscribe: <http://lists.osgeo.org/mailman/listinfo/grass-dev&gt;,
  <mailto:grass-dev-request@lists.osgeo.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Nov 2007 13:02:07 -0000
Status: O
Content-Length: 6300
Lines: 178

This is a MIME-encapsulated message.

--0FBB1B4020.1195822925/pyrosoma.intevation.org
Content-Description: Notification
Content-Type: text/plain

This is the Postfix program at host pyrosoma.intevation.org.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

      The Postfix program

<noreply@wald.intevation.org>: unknown user: "noreply"

--0FBB1B4020.1195822925/pyrosoma.intevation.org
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; pyrosoma.intevation.org
X-Postfix-Queue-ID: 0FBB1B4020
X-Postfix-Sender: rfc822; grass-dev@grass.itc.it
Arrival-Date: Fri, 23 Nov 2007 14:01:58 +0100 (CET)

Final-Recipient: rfc822; noreply@wald.intevation.org
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; unknown user: "noreply"

--0FBB1B4020.1195822925/pyrosoma.intevation.org
Content-Description: Undelivered Message
Content-Type: message/rfc822

Received: by pyrosoma.intevation.org (Postfix, from userid 33)
  id 0FBB1B4020; Fri, 23 Nov 2007 14:01:58 +0100 (CET)
Reply-To: grass-dev@grass.itc.it
To: noreply@wald.intevation.org
From: <grass-dev@grass.itc.it>
Subject: =?UTF-8?B?W2dyYXNzLWNvZGUgSV1bNTM3XSBkLnZlY3QgYW5kIGQudmVjdC50aGVtYXRpYyBhdHRyaWJ1dGVzIGZyb20gb3RoZXIgbGF5ZXJzIHRoYW4gMQ==?=
Content-type: text/plain; charset=UTF-8
Message-Id: <20071123130158.0FBB1B4020@pyrosoma.intevation.org>
Date: Fri, 23 Nov 2007 14:01:58 +0100 (CET)

code I item #537, was opened at 2007-11-23 14:01
Status: Open
Priority: 3
Submitted By: Harri Kiiskinen (harrikoo)
Assigned to: Nobody (None)
Summary: d.vect and d.vect.thematic attributes from other layers than 1
Issue type: library bug
Issue status: None
GRASS version: CVS HEAD
GRASS component: None
Operating system: Linux
Operating system version: Debian testing
GRASS CVS checkout date, if applies (YYMMDD): 071122

Initial Comment:
It seems, that neither d.vect nor d.vect.thematic can any more display labels based on attributes other layers than 1. Example:

GRASS 6.3.cvs (TS): > v.db.connect -p allfindspots
Vector map <allfindspots> is connected by:
layer <1> table <overall.allfindspots> in database <host=localhost,dbname=TS> through driver <pg> with key <id>
layer <10> table <overall.sites_amounts10> in database <host=localhost,dbname=TS,port=5432> through driver <pg> with key <id>

GRASS 6.3.cvs (TS): > v.db.connect -c allfindspots layer=1
CHARACTER|findspot
INTEGER|id
CHARACTER|alternative_name
CHARACTER|modern_country
CHARACTER|roman_province
DOUBLE PRECISION|latitude
DOUBLE PRECISION|longitude

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=id layer=1 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green

produces nice map, see map1.png

But:

GRASS 6.3.cvs (TS): > v.db.connect -c allfindspots layer=10
INTEGER|id
CHARACTER|site
INTEGER|amount

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=id layer=10 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green

outputs:

Thematic map legend for column id of map allfindspots@overall
Value range: 1 - 843
Mapped by 4 intervals of 210.5
Size/width Value
========== =====
PNG: GRASS_TRUECOLOR status: FALSE
PNG: collecting to file: map.png,
GRASS_WIDTH=640, GRASS_HEIGHT=480
Graphics driver [PNG] started
20 632.5 - 843
15 422 - 632.5
10 211.5 - 422
5 1 - 211.5
Monitor 'PNG' terminated

But the map is empty.

In addition:

GRASS 6.3.cvs (TS): > d.vect.thematic -s map=allfindspots@overall type=point column=amount layer=10 icon=basic/circle size=5 maxsize=20 nint=4 pointcolor=255:0:0 linecolor=0:0:0 startcolor=255:0:0 endcolor=0:0:255 themetype=graduated_points monitor=none themecalc=interval colorscheme=blue-green
ERROR: No such column [amount]

Although v.db.connect above did show the column. And yes, the data is in the table. The database connection is working fine, I can list the tables and do whatever.

So on layer 1, all the column can be accessed; on layer 10, only the key-column; others "do nnot exist".

I guess this might as well be a database driver problem.

Debugging:

Debugging in the "missing column" case does not help:

D2/5: filename = /usr/lib/grass/scripts/d.vect.thematic
D2/5: set GIS_FLAG_G=0
D2/5: set GIS_FLAG_L=0
D2/5: set GIS_FLAG_F=0
D2/5: set GIS_FLAG_U=0
D2/5: set GIS_FLAG_S=1
D2/5: set GIS_FLAG_M=0
D2/5: set GIS_OPT_MAP=allfindspots@overall
D2/5: set GIS_OPT_TYPE=point
D2/5: set GIS_OPT_COLUMN=amount
D2/5: set GIS_OPT_THEMETYPE=graduated_points
D2/5: set GIS_OPT_THEMECALC=interval
D2/5: set GIS_OPT_BREAKPOINTS=
D2/5: set GIS_OPT_LAYER=10
D2/5: set GIS_OPT_ICON=basic/circle
D2/5: set GIS_OPT_SIZE=5
D2/5: set GIS_OPT_MAXSIZE=20
D2/5: set GIS_OPT_NINT=4
D2/5: set GIS_OPT_COLORSCHEME=blue-green
D2/5: set GIS_OPT_POINTCOLOR=255:0:0
D2/5: set GIS_OPT_LINECOLOR=0:0:0
D2/5: set GIS_OPT_STARTCOLOR=255:0:0
D2/5: set GIS_OPT_ENDCOLOR=0:0:255
D2/5: set GIS_OPT_MONITOR=none
D2/5: set GIS_OPT_WHERE=
D2/5: set GIS_OPT_PSMAP=
D2/5: set GIS_OPT_GROUP=
D2/5: G__home home = /home/harri
ERROR: No such column [amount]

In the case where the key field is used (i.e. att=id), I get different
different results (see attached debug log)

I have checked this with different maps in different locations and mapsets using different tables, but have found no explanations. One old map (over 2 years) does show attrbutes from layer 100 with d.vect and d.vect.thematic, but I cannot create new maps that do the same.

Perhaps this is a PostgreSQL driver bug, after all?

Best,

Harri K.

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=537&group_id=21

--0FBB1B4020.1195822925/pyrosoma.intevation.org--

From MAILER-DAEMON Fri Nov 23 09:14:08 2007
Return-Path: <>
X-Original-To: grass-dev@lists.osgeo.org
Delivered-To: grass-dev@lists.osgeo.org
Received: from grass.itc.it (grass.itc.it [217.77.80.24])
  by lists.osgeo.org (Postfix) with ESMTP id 2D364E00D43
  for <grass-dev@lists.osgeo.org>; Fri, 23 Nov 2007 09:14:08 -0500 (EST)
Received: from pyrosoma.intevation.org (wald.intevation.org [78.47.251.62])
  by grass.itc.it (8.13.1/8.13.1) with ESMTP id lANEE7RM006176
  for <grass-dev@grass.itc.it>; Fri, 23 Nov 2007 15:14:07 +0100
Received: by pyrosoma.intevation.org (Postfix)
  id E828540319; Fri, 23 Nov 2007 15:14:06 +0100 (CET)
Date: Fri, 23 Nov 2007 15:14:06 +0100 (CET)
From: MAILER-DAEMON@wald.intevation.org (Mail Delivery System)
To: grass-dev@grass.itc.it
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
  boundary="32941B4020.1195827246/pyrosoma.intevation.org"
Message-Id: <20071123141406.E828540319@pyrosoma.intevation.org>
Cc:
Subject: [GRASS-dev] Undelivered Mail Returned to Sender
X-BeenThere: grass-dev@lists.osgeo.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: GRASS GIS Development mailing list <grass-dev.lists.osgeo.org>
List-Unsubscribe: <http://lists.osgeo.org/mailman/listinfo/grass-dev&gt;,
  <mailto:grass-dev-request@lists.osgeo.org?subject=unsubscribe>
List-Archive: <http://lists.osgeo.org/pipermail/grass-dev&gt;
List-Post: <mailto:grass-dev@lists.osgeo.org>
List-Help: <mailto:grass-dev-request@lists.osgeo.org?subject=help>
List-Subscribe: <http://lists.osgeo.org/mailman/listinfo/grass-dev&gt;,
  <mailto:grass-dev-request@lists.osgeo.org?subject=subscribe>
X-List-Received-Date: Fri, 23 Nov 2007 14:14:08 -0000
Status: O
Content-Length: 2463
Lines: 75

This is a MIME-encapsulated message.

--32941B4020.1195827246/pyrosoma.intevation.org
Content-Description: Notification
Content-Type: text/plain

This is the Postfix program at host pyrosoma.intevation.org.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

      The Postfix program

<noreply@wald.intevation.org>: unknown user: "noreply"

--32941B4020.1195827246/pyrosoma.intevation.org
Content-Description: Delivery report
Content-Type: message/delivery-status

Reporting-MTA: dns; pyrosoma.intevation.org
X-Postfix-Queue-ID: 32941B4020
X-Postfix-Sender: rfc822; grass-dev@grass.itc.it
Arrival-Date: Fri, 23 Nov 2007 15:14:01 +0100 (CET)

Final-Recipient: rfc822; noreply@wald.intevation.org
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; unknown user: "noreply"

--32941B4020.1195827246/pyrosoma.intevation.org
Content-Description: Undelivered Message
Content-Type: message/rfc822

Received: by pyrosoma.intevation.org (Postfix, from userid 33)
  id 32941B4020; Fri, 23 Nov 2007 15:14:01 +0100 (CET)
Reply-To: grass-dev@grass.itc.it
To: noreply@wald.intevation.org
From: <grass-dev@grass.itc.it>
Subject: =?UTF-8?B?W2dyYXNzLWNvZGUgSV1bNTM3XSBkLnZlY3QgYW5kIGQudmVjdC50aGVtYXRpYyBhdHRyaWJ1dGVzIGZyb20gb3RoZXIgbGF5ZXJzIHRoYW4gMQ==?=
Content-type: text/plain; charset=UTF-8
Message-Id: <20071123141401.32941B4020@pyrosoma.intevation.org>
Date: Fri, 23 Nov 2007 15:14:01 +0100 (CET)

code I item #537, was opened at 2007-11-23 14:01

Status: Deleted

Priority: 3
Submitted By: Harri Kiiskinen (harrikoo)
Assigned to: Nobody (None)
Summary: d.vect and d.vect.thematic attributes from other layers than 1
Issue type: library bug

Issue status: rejected

GRASS version: CVS HEAD
GRASS component: None
Operating system: Linux
Operating system version: Debian testing
GRASS CVS checkout date, if applies (YYMMDD): 071122

Comment By: Harri Kiiskinen (harrikoo)

Date: 2007-11-23 15:14

Message:
Sorry, my own mistake. Should have remembered to give categories to new layers, also...

----------------------------------------------------------------------

You can respond by visiting:
http://wald.intevation.org/tracker/?func=detail&atid=204&aid=537&group_id=21

--32941B4020.1195827246/pyrosoma.intevation.org--