[GRASS-user] Vector Labels

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

You need to type into the column name box the name of the column (i.e., database field) in your vector attribute table that you want to use for labeling. You are getting the error because whatever you have in the box is not the correct name of a column (field).

Michael

On 3/19/07 9:13 AM, “Amaginary Studios” amagine@telus.net wrote:

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node52.html

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

Thank you for the quick reply!

You need to type into the column name box the name of the column (i.e., database field)

hmm hmm,

I have tried this, many times. Including using full CapsLock.

I have double checked by using the “manager” db.select table button…

Here is a little picture, to visualize what I am doing. Perhaps this can help find what I am doing wrong here,

grass label problems picture

Thank you!

Mars

Amaginary Studios
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 10:19 AM, Michael Barton wrote:

You need to type into the column name box the name of the column (i.e., database field) in your vector attribute table that you want to use for labeling. You are getting the error because whatever you have in the box is not the correct name of a column (field).

Michael

On 3/19/07 9:13 AM, “Amaginary Studios” <amagine@telus.net> wrote:

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node52.html

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

A picture is worth a lot of words, even if not the full thousand.

You have the ‘use SQL query’ box checked and nothing in the query field. Uncheck this box.

Michael

On 3/19/07 11:12 AM, “Amaginary Studios” amagine@telus.net wrote:

Thank you for the quick reply!

You need to type into the column name box the name of the column (i.e., database field)

hmm hmm,

I have tried this, many times. Including using full CapsLock.

I have double checked by using the “manager” db.select table button…

Here is a little picture, to visualize what I am doing. Perhaps this can help find what I am doing wrong here,

grass label problems picture http://www.pixilive.com/uploads/20070319/grass%20label%20problems.tiff

Thank you!

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 10:19 AM, Michael Barton wrote:

You need to type into the column name box the name of the column (i.e., database field) in your vector attribute table that you want to use for labeling. You are getting the error because whatever you have in the box is not the correct name of a column (field).

Michael

On 3/19/07 9:13 AM, “Amaginary Studios” amagine@telus.net wrote:

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node52.html

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

You have the ‘use SQL query’ box checked and nothing in the query field. Uncheck this box.

Whoops, Yes indeed.

I must have accidentally selected this…

However, this unfortunately does not solve my problem.

I have tried multiple vector files, from tutorials, my own v.org imports and I have never been able to get the labels to work…

I hope there may be some other little catch I am not picking up on…

Thank you for your quick responses , much appreciated…

cheers!

mars

Amaginary Studios
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 11:56 AM, Michael Barton wrote:

A picture is worth a lot of words, even if not the full thousand.

You have the ‘use SQL query’ box checked and nothing in the query field. Uncheck this box.

Michael

On 3/19/07 11:12 AM, “Amaginary Studios” <amagine@telus.net> wrote:

Thank you for the quick reply!

You need to type into the column name box the name of the column (i.e., database field)

hmm hmm,

I have tried this, many times. Including using full CapsLock.

I have double checked by using the “manager” db.select table button…

Here is a little picture, to visualize what I am doing. Perhaps this can help find what I am doing wrong here,

grass label problems picture http://www.pixilive.com/uploads/20070319/grass%20label%20problems.tiff

Thank you!

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 10:19 AM, Michael Barton wrote:

You need to type into the column name box the name of the column (i.e., database field) in your vector attribute table that you want to use for labeling. You are getting the error because whatever you have in the box is not the correct name of a column (field).

Michael

On 3/19/07 9:13 AM, “Amaginary Studios” <amagine@telus.net> wrote:

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node52.html

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

correcting myself.

The sql check box has nothing to do with it. I just check with my copy of the spearfish data and my screen looks just like yours. My best guess at the moment is that there is something in your attribute table that is somehow not compliant with the database driver. Did you do a display fields? I notice that you appear to have fields ID, ELEVATION, CAT. I don’t know what happens if CAT is not the first field (it shouldn’t matter IMHO, but I didn’t write the database drivers). I also don’t think that ID is permitted because it doesn’t begin with a letter or numeral.

First try renaming your first field to “ID” and see if that fixes the problem.

Michael

On 3/19/07 11:12 AM, “Amaginary Studios” amagine@telus.net wrote:

Thank you for the quick reply!

You need to type into the column name box the name of the column (i.e., database field)

hmm hmm,

I have tried this, many times. Including using full CapsLock.

I have double checked by using the “manager” db.select table button…

Here is a little picture, to visualize what I am doing. Perhaps this can help find what I am doing wrong here,

grass label problems picture http://www.pixilive.com/uploads/20070319/grass%20label%20problems.tiff

Thank you!

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 10:19 AM, Michael Barton wrote:

You need to type into the column name box the name of the column (i.e., database field) in your vector attribute table that you want to use for labeling. You are getting the error because whatever you have in the box is not the correct name of a column (field).

Michael

On 3/19/07 9:13 AM, “Amaginary Studios” amagine@telus.net wrote:

Mac OS X.4.9 - GRASS 6.2/6.3 Williams Latest Builds March 2007

I am having no luck in displaying Labels for various vectors.

I thought perhaps It had something to do with my PostgreSQL connection, so I tried a tutorial file from:
http://www.gdf-hannover.de/download
for the GDF Hannover Tutorial http://www.gdf-hannover.de/lit_html/grass60_v1.2_en/node52.html

I still have the same problem of not being able to display labels.

Now, perhaps I do not understand how the columns work for selecting the attribute column for the labels…

I select the attribute columns button from the vector display manager, and I can see my column ‘titles’
I then type in the column title name I wish to display as a label in the field provided.

When I go to re-draw the display, the Output pane errors that there is not such column name.

Sometimes the full vector file is not even displayed until I uncheck the ‘Labels’ box.

Thank you for your help,

Mars

Amaginary Studios http://amaginarystudios.spymac.com
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

On Mon, March 19, 2007 20:03, Amaginary Studios wrote:

You have the ‘use SQL query’ box checked and nothing in the query
field. Uncheck this box.

Whoops, Yes indeed.

I must have accidentally selected this...

However, this unfortunately does not solve my problem.

I have tried multiple vector files, from tutorials, my own v.org
imports and I have never been able to get the labels to work...

I hope there may be some other little catch I am not picking up on...

I think it is the fact that the column names are capitalized. If you look
at the picture, you see that the column name is 'ELEVATION', but the error
message is that 'elevation' is not found. Try renaming the column to
elevation in PostgreSQL and see what happens.

Normally, identifier names in PostgreSQL are case insensitive, so this
shouldn't make any difference. I imagine the problem must be somewhere in
the GRASS db driver.

Moritz

On Mon, Mar 19, 2007 at 09:04:42PM +0100, Moritz Lennert wrote:

On Mon, March 19, 2007 20:03, Amaginary Studios wrote:
>
>> You have the ?use SQL query? box checked and nothing in the query
>> field. Uncheck this box.
>
> Whoops, Yes indeed.
>
> I must have accidentally selected this...
>
> However, this unfortunately does not solve my problem.
>
> I have tried multiple vector files, from tutorials, my own v.org
> imports and I have never been able to get the labels to work...
>
> I hope there may be some other little catch I am not picking up on...

I think it is the fact that the column names are capitalized. If you look
at the picture, you see that the column name is 'ELEVATION', but the error
message is that 'elevation' is not found. Try renaming the column to
elevation in PostgreSQL and see what happens.

Normally, identifier names in PostgreSQL are case insensitive, so this
shouldn't make any difference. I imagine the problem must be somewhere in
the GRASS db driver.

I am fairly sure that PostgreSQL column names are case *sensitive*.
This means that they have to be quoted. But I am not sure if GRASS
is able to work with quoted column names.
If ever possible, I would avoid capitalized column names.

If you are using v.in.ogr, there is this flag:
-w
    Change column names to lowercase characters

Markus

Moritz

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
FBK-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

On Mon, March 19, 2007 21:25, Markus Neteler wrote:

On Mon, Mar 19, 2007 at 09:04:42PM +0100, Moritz Lennert wrote:

On Mon, March 19, 2007 20:03, Amaginary Studios wrote:
>
>> You have the ?use SQL query? box checked and nothing in the query
>> field. Uncheck this box.
>
> Whoops, Yes indeed.
>
> I must have accidentally selected this...
>
> However, this unfortunately does not solve my problem.
>
> I have tried multiple vector files, from tutorials, my own v.org
> imports and I have never been able to get the labels to work...
>
> I hope there may be some other little catch I am not picking up on...

I think it is the fact that the column names are capitalized. If you
look
at the picture, you see that the column name is 'ELEVATION', but the
error
message is that 'elevation' is not found. Try renaming the column to
elevation in PostgreSQL and see what happens.

Normally, identifier names in PostgreSQL are case insensitive, so this
shouldn't make any difference. I imagine the problem must be somewhere
in
the GRASS db driver.

I am fairly sure that PostgreSQL column names are case *sensitive*.

From the PostgreSQL manual:

"Identifier and key word names are case insensitive. Therefore

UPDATE MY_TABLE SET A = 5;

can equivalently be written as

uPDaTE my_TabLE SeT a = 5;"

(this hasn't changed since PostgreSQL 7.4)

A quick test:

testdb=# create table testcase (cat int, ELEVATION float, TextField
varchar(10))

testdb=# \d testcase
              Table «public.testcase»
  Colonne | Type | Modificateurs
-----------+-----------------------+---------------
cat | integer |
elevation | double precision |
textfield | character varying(10) |
Espace logique «homepg»

testdb=# select ELEVATION from testcase;
elevation
-----------
      15.6
(1 ligne)

testdb=# select elevation from testcase;
elevation
-----------
      15.6
(1 ligne)

Moritz

[please cc to GRASS-user list]

On Mon, March 19, 2007 21:26, Amaginary Studios wrote:

Now I have the problem of my ISOLINES, no longer being properly
linked to the correct field in the database...

The Label information is all muddled... aaahhh... a whole new problem
to fix.

Could you be more precise about your problem ?

It would be so simple if I could just simply move CAT to the
beginning of the Table.

Why ? The position of a field in a table does not make any difference.

Moritz

Could you be more precise about your problem ?

I removed the ‘ID_’ column from the database, and also tried renaming this column to ‘ID’, and ‘id’
doing so, removed the proper linking to my vector polygons…

This is under advisement that perhaps the ‘ID_’ is not readable by the GRASS database manager.

I have found out that in someway it is readable though. ( I’m no database geek… sure wish I was though!)

It would be so simple if I could just simply move CAT to the
beginning of the Table.

Why ? The position of a field in a table does not make any difference.

Moritz

You are right, in some instances it does not make a difference, however, in one of my many tests I found that if ‘cat’ is in the first column my ‘Elevation’ column was now readable and the labels were appearing in the display.

The problem with this last test was that the proper linking to each vector polygon was destroyed and the attribute data was improperly linked.

Any time I had the ‘ID_’ column in any other position from the first column or renamed, the proper linking was destroyed…

From a previous note:

I am fairly sure that PostgreSQL column names are case sensitive.
This means that they have to be quoted. But I am not sure if GRASS
is able to work with quoted column names.
If ever possible, I would avoid capitalized column names.

If you are using v.in.ogr, there is this flag:
-w
Change column names to lowercase characters

Markus

Taking Markus’s advice I simply renamed my column ‘Elevation’ to ‘elevation’ within PostgreSQL.

Doing so has fixed everything!

or so it seems so far…

So far, leaving ‘ID_’ column as it is does not pose any problems, perhaps it will in the future somehow, but it keeps the linking bound like this so I’ll leave it this way…

Sooo,

It is important to have all your columns in lowercase.

Thank You!

Learning a lot here.

Mars

Amaginary Studios
amagine@telus.net
Phone 250 845 7999

Mars Sjoden
3320 Mount Davis Way
Houston BC
V0J 1Z2

READ CAREFULLY.
By reading this email, you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (“BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

On 19-Mar-07, at 2:01 PM, Moritz Lennert wrote:

[please cc to GRASS-user list]

On Mon, March 19, 2007 21:26, Amaginary Studios wrote:

Now I have the problem of my ISOLINES, no longer being properly
linked to the correct field in the database…

The Label information is all muddled… aaahhh… a whole new problem
to fix.

Could you be more precise about your problem ?

It would be so simple if I could just simply move CAT to the
beginning of the Table.

Why ? The position of a field in a table does not make any difference.

Moritz

On 19-Mar-07, at 1:59 PM, Moritz Lennert wrote:

From the PostgreSQL manual:

"Identifier and key word names are case insensitive. Therefore

UPDATE MY_TABLE SET A = 5;

can equivalently be written as

uPDaTE my_TabLE SeT a = 5;"

(this hasn’t changed since PostgreSQL 7.4)

I think this is why I was so confused… or… perhaps why I may still be :slight_smile:

I was not worried about case sensitivity in my PostgreSQL database table columns.

Somehow, though, it appears I could not query my ‘Elevation’ column for labeling until I edited it to ‘elevation’ lowercase.

So, this must be something to do with the way the Database manager in GRASS works?

very interesting.

Mars

On Mon, 2007-03-19 at 21:59 +0100, Moritz Lennert wrote:

> I am fairly sure that PostgreSQL column names are case *sensitive*.

>From the PostgreSQL manual:

"Identifier and key word names are case insensitive. Therefore

UPDATE MY_TABLE SET A = 5;

can equivalently be written as

uPDaTE my_TabLE SeT a = 5;"

(this hasn't changed since PostgreSQL 7.4)

A quick test:

testdb=# create table testcase (cat int, ELEVATION float, TextField
varchar(10))

testdb=# \d testcase
              Table «public.testcase»
  Colonne | Type | Modificateurs
-----------+-----------------------+---------------
cat | integer |
elevation | double precision |
textfield | character varying(10) |
Espace logique «homepg»

testdb=# select ELEVATION from testcase;
elevation
-----------
      15.6
(1 ligne)

testdb=# select elevation from testcase;
elevation
-----------
      15.6
(1 ligne)

Yes, this example is indeed so, but consider also the following:

Koe=# create table testcase (cat int, "ELEVATION" float, "TextField" varchar(10));
CREATE TABLE

Koe=# \d testcase
            Table "public.testcase"
  Column | Type | Modifiers
-----------+-----------------------+-----------
cat | integer |
ELEVATION | double precision |
TextField | character varying(10) |

Koe=# select elevation from testcase;
ERROR: column "elevation" does not exist

Koe=# select "ELEVATION" from testcase;
ELEVATION
-----------
(0 rows)

So it is possible to have Uppercase names for the database objects, and
these names indeed do cause trouble when you want to use the tables from
GRASS. Been there by myself, also.

In this particular problem I'd suggest adding double quotes (") to the
gis manager. The quotes might make it through to the actual query, which
then should produce the right results.

--
Harri Kiiskinen <harri.kiiskinen@utu.fi>