[GRASS-user] change the cell value of a geotiff

maven apache apachemaven0 at gmail.com
Wed Jan 20 21:00:27 EST 2010


2010/1/21 Hamish <hamish_b at yahoo.com>

> maven apache wrote:
> > I have a geotiff now, and some cells have a not-expected
> > value, so I want to Interpolation them, and I notice that
> > there is a command named r.fillnull, however the cell to be
> > changed is not null, so I want to :
> > 1) change the special  cell value to null
> >
> > 2) use the r.fillnull to Interpolation.
> >
> > The problem is I do not know how to do the step 1 with
> > grass, anyone can do me a favor?
>
>
> try r.null.
>
>
> Hamish
>
>
>
> Hi;
It seems that the r.null does not work.

1) I use the r.info to get the info of the tiff which I have imported to
grass and I got that:
Hi:

(Thu Jan 21 09:56:46
2010)
r.info map=aaa at PERMANENT

 +----------------------------------------------------------------------------+
 | Layer:    aaa at PERMANENT                  Date: Tue Jan 12 16:02:39
2010    |
 | Mapset:   PERMANENT                      Login of Creator:
Administrator   |
 | Location:
hdf5loc                                                          |
 | DataBase:
D:\GrassDataBase                                                 |
 | Title:     ( aaa
)                                                         |
 | Timestamp:
none                                                            |
 |----------------------------------------------------------------------------|
 |
|
 |   Type of Map:  raster               Number of Categories:
499             |
 |   Data Type:
FCELL                                                      |
 |   Rows:
720                                                        |
 |   Columns:
1440                                                       |
 |   Total Cells:
1036800                                                    |
 |        Projection:
Latitude-Longitude                                      |
 |            N:        90N    S:        90S   Res:
0:15                     |
 |            E:       180E    W:       180W   Res:
0:15                     |
 |   Range of data:    min = -1267650600228229401496703205376.000000  max =
4 |
 |
|
 |   Data
Description:                                                        |
 |    generated by
r.in.gdal                                                  |
 |
|
 |
Comments:                                                                |
 |    r.in.gdal input="D:\data\hdf5\aaa.tif"
output="aaa"                     |
 |
|
 +----------------------------------------------------------------------------+
(Thu Jan 21 09:56:47 2010) Command finished (0
sec)
(Thu Jan 21 09:56:50 2010)


2)then I use r.null to set the null value to null:   r.null
setnull=-1.26765060022823e+030


3) I use the r.info again to see if it is changed :
r.info -r map=aaa at PERMANENT

min=-1.26765060022823e+030
max=498.5
(Thu Jan 21 09:56:50 2010) Command finished (0
sec)

It seems that the valuse are  not changed to null.

I wonder why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100121/ffd91c8d/attachment.html


More information about the grass-user mailing list