[GRASS5] [GRASSLIST:1765] list GRASSLIST: List Message Rejected

ÿôÿý
Subject: d.rast problems in latest 5.0 beta snapshots

I think I am doing something wrong with r.in.png and/or d.rast. I first
try importing an image like a scanned map or an aerial photo using
r.in.png, which appears to work. I've tried various color depths and
grayscale with similar results. Then, when I try to display the map using
d.rast, I get a vertical white bar covering about the middle 30% of the
display window. Looking at colormaps for the map it looks like it is the
right set of colors, they are just not showing up.

Also, if I try to change to float color mode with d.colormode, it says
"Sorry, floating color table not available on this device". Is this not
yet supported, or do I need to change my monitor window?

I am doing all this on Red Hat Linux 7.0 with updates on an AMD Athlon
CPU. Everything compiles and installs beautifully, and most other
functions seem fine.

Typical session:
GRASS:/opt/grass5-20010416/bin > r.in.png -v input=/data/lot-north-256.png
output=lot-north3

Type of png image is palette

reading a 552 x 376 image, 8 bits palette, image gamma = 0.45
CREATING SUPPORT FILES FOR lot-north3
GRASS:/opt/grass5-20010416/bin > d.erase
GRASS:/opt/grass5-20010416/bin > d.rast lot-north3

[The infamous vertical white rectangle shows up]

Thanks for any suggestions...

---------------------------------------------------------
David C Niemi

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

On Wed, 25 Apr 2001 grass@anon.tuxers.net wrote:

Subject: d.rast problems in latest 5.0 beta snapshots

I think I am doing something wrong with r.in.png and/or d.rast. I first
try importing an image like a scanned map or an aerial photo using
r.in.png, which appears to work. I've tried various color depths and
grayscale with similar results. Then, when I try to display the map using
d.rast, I get a vertical white bar covering about the middle 30% of the
display window. Looking at colormaps for the map it looks like it is the
right set of colors, they are just not showing up.

David,

It looks to me like you need to pay attention to your region settings.

The GRASS monitor displays data within a preset geographic region. If the
region doesn't correspond to the region covered by the raster file then
d.rast will show you nothing, or just part of the data. If the region is
larger than the image, then your data may fit in only a small part of the
screen. It's also possible that you will have problems if the vertical
and horizontal resolution prescribed for the region are different from the
resolution required by the image.

The raster file produced by r.in.png is *not* georeferenced.

If your mapset is in a location with simple X-Y coordinates then you may
be able to just set the region to the area of the scanned image. From a
command line this is done with "g.region rast=<filename>", where
<filename> is the name of the raster file that contains your scanned and
imported image.

In the more general case your mapset uses geographic coordinates and you
need to register the image to the geographic coordinates of the area it
covers. You can use i.points and i.rectify to get the image registered,
then g.region (as above) to set the current region to the area covered by
the image. Once all that's done you should be able to view the image in a
GRASS monitor.

Roger Miller

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

grass@anon.tuxers.net wrote:

Also, if I try to change to float color mode with d.colormode, it says
"Sorry, floating color table not available on this device". Is this not
yet supported, or do I need to change my monitor window?

It requires a PseudoColor visual; it won't work on a display which
only has TrueColor visuals. For most systems, this translates to "you
have to use 8-bpp".

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