[GRASSLIST:1773] Re: [GRASS5] list GRASSLIST: List Message Rejected
Roger S. Miller
rgrmill at rt66.com
Thu Apr 26 11:49:58 EDT 2001
On Wed, 25 Apr 2001 grass at 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
More information about the grass-user
mailing list