[GRASSLIST:6214] RE: labels and TIGER line data?

Even if I'd known that I had to manually create the dig_cats file, I
don't think I would have been able to figure out the
necessary format by
looking at a dig_cats file in the spearfish location sample. As shown
below, the initial number in each line of a spearfish dig_cats file
appears to be something other than a TLID.

Greg,

Please note, TLID is NOT a grass term. TLID is a US Census tiger file
term for the numbers given to the polylines in the tiger file. See the
"Data Dictionary" section of the Tiger Line Technical Documentation:

http://www.census.gov/geo/www/tiger/tigerua/ua2ktgr.pdf 2000 tiger line
or
http://www.census.gov/geo/www/tiger/tiger2002/tgr2002.pdf 2002 tiger line

These will tell you, for example, what character positions to find the
feature name.

Grass is flexible about attribute numbers (sometimes also called category numbers
or categories). They don't have to be sequential, they don't have to start at 1,
and they don't have to be unique. In the spearfish example, they represent different
categories of roads.

They could also represent different heights in a contour map, for example.

The author of the v.in.tig.basic program wrote it to have the attribute correspond
to the TLID number so you could relate the line in the map to the tiger data files
in an external database. This information is in the man page for the v.in.tig.basic
command.

Did you learn that tip by looking at the source code, or is
there GRASS
documentation that specifies the dig_cats file format? (I'm new to
GRASS and am not sure if I have complete documentation.)

When I started, I used "FREC 682: Spatial Analysis "
at http://www.udel.edu/johnmack/frec682/ as a tutorial.

This, as well as lots of other info, is referenced on the
"GDP - GRASS Documentation Project" page at
http://grass.itc.it/gdp/index.html

(From <main page>, find "First Time User?"
   From <Welcome, First Time Users of GRASS!> page, find "Tutorials")

I recommend:

M. Neteler, H. Mitasova, 2002. Open Source GIS: A GRASS GIS Approach.
464 pages, Kluwer Academic Publishers, Boston, Dordrecht, ISBN 1-4020-7088-8.

GRASS tutorial project, especially Part III of the full tutorial:
GRASS in 10 minutes - Quick Intro for Newbies

GRASS 5.0.x Programmer's Manual (PDF)

AND, browse the directories and look in the files. Understanding where things are
and how its stored will be helpful.

John

I recently installed the Grass 5.0.2 binary for
Cygwin/Xwindows.

A script that I wrote for 5.0.0pre3 no longer works quite
right. The colors have changed in the raster maps (in one
case the map is a solid color, in another case querying the
raster map gives very large negative values). and the scale
produced by d.scale has moved and changed length. When I
revert to 5.0.0pre3, all is well again. I will reprint the
script below--perhaps there are commands that now function
differently. Or are there different data formats for the
two versions? IF so, is it possible to convert old files to
new?

Also, in 5.0.2, I get frequent "Socket is not accepting
connections..." messages whenever I start or select a
monitor. I can usually make Grass display what I want but
the message is troubling.

Here is the script:

#!/usr/bin/sh/

g.region n=1500 s=-1400 w=-3000 e=3000

d.mon stop=x0
d.mon stop=x1
d.mon stop=x2

d.monsize 1000 700 x0
d.erase
d.rast onsitegridsmoothlog bg=black
echo "Log RSEI Score" | d.text color=red

d.monsize 1000 700 x1
d.erase
d.rast bg.smoothavg bg=black
echo "Block Groups in Urbanized Areas" | d.text color=red

g.region n=745 s=440 w=589 e=849
# d.monsize 1000 1000 x2
d.mon start=PNG
echo "Chicago and Milwaukee" | d.text line=1 color=red
d.frame -c frame=rsei at=45,90,0,45
d.frame -c frame=black at=45,90,45,90
d.frame -c frame=hisp at=0,45,0,45
d.frame -c frame=income at=0,45,45,90

d.frame -s frame=rsei
d.scale at=100,0
d.rast -o bg.logsmoothavg
echo "Log RSEI Score" | d.text line=2 color=red

d.frame -s frame=black
d.rast bg.nh_black bg=black
echo "Percent Black" | d.text line=2 color=red

d.frame -s frame=hisp
d.rast bg.hisp bg=black
echo "Percent Hispanic" | d.text line=2 color=red

d.frame -s frame=income
d.rast bg.hhinck bg=black
echo "Median Household Income" | d.text line=2 color=red
d.mon stop=PNG

Best regards,

Michael

Michael Ash, Assistant Professor
  of Economics and Public Policy
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003
Tel 413-545-6329 Fax 413-545-2921
Email mash@econs.umass.edu
http://people.umass.edu/maash

Hi Michael.

What happens when you substitute "x0" for the "PNG" driver?

What computer/CPU/OS?

No data format changes should have occurred between those two versions. I'm
wondering whether there is a difference in the region or projection/datum
handling leading to attempts to retrieve data out of the region.

Have you tried recreating the project with the new version of Grass.

Cheers

Mike Thomas.

----- Original Message -----
From: "Michael Ash" <mash@econs.umass.edu>
To: <GRASSLIST@baylor.edu>
Sent: Wednesday, May 21, 2003 4:29 PM
Subject: [GRASSLIST:92] 5.0.0pre3 to 5.0.2 conversion problem

I recently installed the Grass 5.0.2 binary for
Cygwin/Xwindows.

A script that I wrote for 5.0.0pre3 no longer works quite
right. The colors have changed in the raster maps (in one
case the map is a solid color, in another case querying the
raster map gives very large negative values). and the scale
produced by d.scale has moved and changed length. When I
revert to 5.0.0pre3, all is well again. I will reprint the
script below--perhaps there are commands that now function
differently. Or are there different data formats for the
two versions? IF so, is it possible to convert old files to
new?

Also, in 5.0.2, I get frequent "Socket is not accepting
connections..." messages whenever I start or select a
monitor. I can usually make Grass display what I want but
the message is troubling.

Here is the script:

#!/usr/bin/sh/

g.region n=1500 s=-1400 w=-3000 e=3000

d.mon stop=x0
d.mon stop=x1
d.mon stop=x2

d.monsize 1000 700 x0
d.erase
d.rast onsitegridsmoothlog bg=black
echo "Log RSEI Score" | d.text color=red

d.monsize 1000 700 x1
d.erase
d.rast bg.smoothavg bg=black
echo "Block Groups in Urbanized Areas" | d.text color=red

g.region n=745 s=440 w=589 e=849
# d.monsize 1000 1000 x2
d.mon start=PNG
echo "Chicago and Milwaukee" | d.text line=1 color=red
d.frame -c frame=rsei at=45,90,0,45
d.frame -c frame=black at=45,90,45,90
d.frame -c frame=hisp at=0,45,0,45
d.frame -c frame=income at=0,45,45,90

d.frame -s frame=rsei
d.scale at=100,0
d.rast -o bg.logsmoothavg
echo "Log RSEI Score" | d.text line=2 color=red

d.frame -s frame=black
d.rast bg.nh_black bg=black
echo "Percent Black" | d.text line=2 color=red

d.frame -s frame=hisp
d.rast bg.hisp bg=black
echo "Percent Hispanic" | d.text line=2 color=red

d.frame -s frame=income
d.rast bg.hhinck bg=black
echo "Median Household Income" | d.text line=2 color=red
d.mon stop=PNG

Best regards,

Michael

Michael Ash, Assistant Professor
  of Economics and Public Policy
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003
Tel 413-545-6329 Fax 413-545-2921
Email mash@econs.umass.edu
http://people.umass.edu/maash

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06

Dear Mike

Thank you for the interest in my difficulties.

What happens when you substitute "x0" for the "PNG" driver?

The PNG driver is not the source of the problem. I tried the script with d.mon start=x0, etc., instead of PNG and had the same problems.

What computer/CPU/OS?

Intel (Pentium II or something) Dell Inspiron 4100/Windows XP/Cygwin/xfree86

No data format changes should have occurred between those two versions. I'm
wondering whether there is a difference in the region or projection/datum
handling leading to attempts to retrieve data out of the region.

GRASS 5.0.2 displayed maps that looked about right in terms of the geographic layout. Resetting the region worked as I expected, etc. The raster values seemed out of whack:
in one raster map, the values were right according to d.what.rast but the non-null cells were all white instead of color-graded; and the values were all wrong (huge negative numbers, long strings of numbers) in another raster map; in most of the maps the color scheme had changed. (It almost looked as if GRASS was changing datatypes.)

Have you tried recreating the project with the new version of Grass.

This is an excellent suggestion, and I have not, but I will. The project is computationally intensive (lots of smoothing); so I need to set aside time for me and the computer.

I have done new work in 5.0.2 since you posted it and everything has been a-ok.

Thanks again for your interest and suggestions.

Best,

Michael Ash
mash@econs.umass.edu

On Wed, 21 May 2003, Michael Ash wrote:

Dear Mike

Thank you for the interest in my difficulties.

> What happens when you substitute "x0" for the "PNG" driver?

The PNG driver is not the source of the problem. I tried the script
with d.mon start=x0, etc., instead of PNG and had the same problems.

> What computer/CPU/OS?

Intel (Pentium II or something) Dell Inspiron 4100/Windows XP/Cygwin/xfree86

> No data format changes should have occurred between those two versions. I'm
> wondering whether there is a difference in the region or projection/datum
> handling leading to attempts to retrieve data out of the region.

GRASS 5.0.2 displayed maps that looked about right in terms of the
geographic layout. Resetting the region worked as I expected, etc.
The raster values seemed out of whack: in one raster map, the values
were right according to d.what.rast but the non-null cells were all
white instead of color-graded; and the values were all wrong (huge
negative numbers, long strings of numbers) in another raster map; in
most of the maps the color scheme had changed. (It almost looked as if
GRASS was changing datatypes.)

Just a thought - I can date the lzw to z compression change to 25-Nov-2000
(the r.lzw2z README) - what date was 5.0.0pre3? I recently hit an old
raster still in lzw compression, and puzzled a bit before remembering the
shift. I think 5.0.0pre3 was early 2002, so having an lzw floating-point
raster isn't likely (and probably wouldn't open), but it may be worth
checking when it was created.

> Have you tried recreating the project with the new version of Grass.

This is an excellent suggestion, and I have not, but I will. The
project is computationally intensive (lots of smoothing); so I need to
set aside time for me and the computer.

I have done new work in 5.0.2 since you posted it and everything has
been a-ok.

Thanks again for your interest and suggestions.

Best,

Michael Ash
mash@econs.umass.edu

--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand@nhh.no

Just a thought - I can date the lzw to z compression change to 25-Nov-2000
(the r.lzw2z README) - what date was 5.0.0pre3? I recently hit an old
raster still in lzw compression, and puzzled a bit before remembering the
shift. I think 5.0.0pre3 was early 2002, so having an lzw floating-point
raster isn't likely (and probably wouldn't open), but it may be worth
checking when it was created.

> Just a thought - I can date the lzw to z compression change to 25-Nov-2000
> (the r.lzw2z README) - what date was 5.0.0pre3? I recently hit an old
> raster still in lzw compression, and puzzled a bit before remembering the
> shift. I think 5.0.0pre3 was early 2002, so having an lzw floating-point
> raster isn't likely (and probably wouldn't open), but it may be worth
> checking when it was created.

Sorry about that misfired message. I meant to cancel and
sent instead.

I think that 5.0.0pre3 was indeed early 2002, but I am not
sure that I ven understand the possibility.

Best regards,

Michael

Michael Ash said:

> Just a thought - I can date the lzw to z compression change to
25-Nov-2000
> (the r.lzw2z README) - what date was 5.0.0pre3? I recently hit an old
> raster still in lzw compression, and puzzled a bit before remembering
the
> shift. I think 5.0.0pre3 was early 2002, so having an lzw
floating-point
> raster isn't likely (and probably wouldn't open), but it may be worth
> checking when it was created.

Sorry about that misfired message. I meant to cancel and
sent instead.

I think that 5.0.0pre3 was indeed early 2002, but I am not
sure that I ven understand the possibility.

See http://grass.itc.it/announces/announce_lzw_removal.html for an
explanation.

Moritz

On Wed, May 21, 2003 at 04:20:01PM -0400, Michael Ash wrote:

> > Just a thought - I can date the lzw to z compression change to 25-Nov-2000
> > (the r.lzw2z README) - what date was 5.0.0pre3? I recently hit an old
> > raster still in lzw compression, and puzzled a bit before remembering the
> > shift. I think 5.0.0pre3 was early 2002, so having an lzw floating-point
> > raster isn't likely (and probably wouldn't open), but it may be worth
> > checking when it was created.

Sorry about that misfired message. I meant to cancel and
sent instead.

I think that 5.0.0pre3 was indeed early 2002, but I am not
sure that I ven understand the possibility.

For clarification, see GRASS releases and LZW related things here:

http://freegis.org/cgi-bin/viewcvs.cgi/~checkout~/grass/NEWS.html

"What's new in GRASS 5 beta11 comparing to beta10
[GRASS 5.0 beta11 released 4 Feb 2001]

Floating point raster maps and G3D raster volume maps
in zlib/FLATE compression now due to patent restrictions
(all floating point raster maps and G3D volumes have to be converted -
see announcement) "
-> http://grass.itc.it/announces/announce_lzw_removal.html

Best regards,

Markus