[GRASS-stats] spgrass problem importing category 999 when plugin is FALSE

Markus Neteler neteler at osgeo.org
Fri Apr 3 02:59:17 EDT 2009


Here my tests which look ok:

GRASS 6.5.svn (portugal):> echo "test_map=999"|r.mapcalc
 100%
GRASS 6.5.svn (portugal):> R

R version 2.8.1 (2008-12-22)
...
> library(spgrass6)
Loading required package: sp
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.6.0, released 2008/11/26
Path to GDAL shared files: /usr/local/share/gdal
Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
Path to PROJ.4 shared files: (autodetected)
GRASS GIS interface loaded with GRASS version: 6.5.svn
and location: portugal
> testNoPlugin=readRAST6("test_map",plugin=FALSE)
/home/neteler/grassdata/portugal/PERMANENT/.tmp/localhost/test_map has
GDAL driver GTiff
and has 1 rows and 1 columns
>
> summary(testNoPlugin at data)
    test_map
 Min.   :999
 1st Qu.:999
 Median :999
 Mean   :999
 3rd Qu.:999
 Max.   :999
>
> testPlugin=readRAST6("test_map",plugin=TRUE)
/home/neteler/grassdata/portugal/PERMANENT/cellhd/test_map has GDAL driver GRASS
and has 1 rows and 1 columns
> summary(testNoPlugin at data)
    test_map
 Min.   :999
 1st Qu.:999
 Median :999
 Mean   :999
 3rd Qu.:999
 Max.   :999

Markus


2009/4/3 Jarek Jasiewicz <jarekj at amu.edu.pl>:
> Hi
>
> I during batch processing of couple of maps I found strange behaviour of
> readRAST6 when I import cell map with value 999.
> Instead of 999 Na is imported (?? _
>
> It is for me completely strange, so I test it with folowing:
>
> echo "test_map=999"|r.mapclac
> R
> library(spgrass6)
> testNoPlugin=readRAST6("test_map",plugin=FALSE)
>
> summary(testNoPlugin at data)
>
>    test      Min.   :    NA 1st Qu.:    NA Median :    NA Mean   :   NaN 3rd
> Qu.:    NA Max.   :    NA NA's   :156740
>
> testPlugin=readRAST6("test_map",plugin=TRUE)
>
> summary(testPlugin at data)
>
>    test   Min.   :999 1st Qu.:999 Median :999 Mean   :999 3rd Qu.:999 Max.
> :999
>
> It is very strange for me but I tested it on several maps. I think someone
> could try to reproduce this.
>
> Jarek
>
>
> BTW:
>
> R version 2.8.1 (2008-12-22)
>
>
> library(spgrass6)
> Loading required package: sp
> Loading required package: rgdal
> Geospatial Data Abstraction Library extensions to R successfully loaded
> Loaded GDAL runtime: GDAL 1.5.3, released 2008/09/09
> GDAL_DATA: /usr/local/lib/R/site-library/rgdal/gdal
> Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
> PROJ_LIB: /usr/local/lib/R/site-library/rgdal/proj
> GRASS GIS interface loaded with GRASS version: 6.5.svn
> and location: Rzeki
>
> Package: spgrass6
> Version: 0.5-16
> Date: 2008-11-13
> Built: R 2.8.1; ; 2009-01-02 14:02:31; unix
>
>
>
>
> _______________________________________________
> grass-stats mailing list
> grass-stats at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-stats
>


More information about the grass-stats mailing list