[GRASS5] r.in.gdal and GCPs

Markus Neteler neteler at itc.it
Thu Sep 6 05:06:20 EDT 2001


Frank,

On Wed, Sep 05, 2001 at 10:19:39PM -0400, Frank Warmerdam wrote:
> Markus,
> 
> I have committed a change to r.in.gdal to support GCPs.  If GCPs are
> detected an imagery group will be made, even if normally only a raster
> would have been created, and the GCPs are written out to a POINTS file.
> The user will still have to pick an appropriate location and mapset to
> rectify to with i.target, and use i.rectify to take advantage of the
> GCPs.

great work - I will try this later the day. This is really a help.
 
> I also realized that I can't translate signed integers to FTYPE_CELL
> because it is unsigned.  That means that complex integer bands must be
> converted to floating point layers as occurs now, contrary to the
> change I tried this morning.

I see. Anyway, it's no bug.
 
> I have tried the altered r.in.gdal with ERS2 CEOS and other datasets and
> they seem to work OK, though I found it challenging to visualize the
> resulting images.  How does one normally display floating point data in
> a monitor?  I even tried converting the complex images to magnitude and
> scaling with r.mapcalc, but somehow I wasn't doing it right.

I have done it like this:
# SLC: intensity image
 
r.mapcalc sar.intensity="sqrt((sar.real*sar.real) + (sar.imaginary*sar.imaginary))"

Then, important, change the color table with r.colors. What do you (not)
see?

> Also, how
> do I get information on the min, max, and mean of a raster?  I tried
> r.info, r.describe, and r.stats but couldn't seem to find what I would
> wanting.

You can look at r.colors (main.c), it is checking for the range (there is a
GRASS function to get the mean).

Later,

 Markus



More information about the grass-dev mailing list