[STATSGRASS] Problem with gmeta6() in spgrass6.

Roger Bivand Roger.Bivand at nhh.no
Tue Jun 20 05:08:45 EDT 2006


On Tue, 20 Jun 2006 Seppo.Kaitala at fimr.fi wrote:

> 
> 
> Hello,
> 
> We are having problem with importing region data from GRASS (6.1) to R
> (2.3.1) with gmeta6(), which in turn makes it impossible to export the
> processed data back to GRASS. Here's our region:
> 
> projection: 3 (Latitude-Longitude)
> zone:       0
> datum:      wgs84
> ellipsoid:  wgs84
> north:      66N
> south:      53N
> west:       9E
> east:       31E
> nsres:      0:00:30
> ewres:      0:01
> rows:       1560
> cols:       1320
> 
> And gmeta6() gives 6 "NAs introduced by coercion" warnings, replacing
> north, south, west, east, nsres and ewres with NAs. I suspect it is
> because it tries to import them as numeric (but why?). 

Because it is not written to parse non-numerical values. This may be 
changed, but in fact just throwing an error will be enough. Why - because 
the values are simply not used anywhere in code, that is the values 
returned by gmeta6() are not required in any of the other functions. 

I can look at this sometime (late August earliest), but spgrass6 is
available for anonymous CVS from the r-spatial sourceforge site, so anyone
can contribute a fix if need be - see ?"DMS-class" in sp for some ideas,
although it will not accept the data as formatted in g.region -p output.

> However, replacing them with numeric values by hand doesn't help much,
> exporting with rast.put6() still doesn't work properly. Any hints?
> 

There is no reason why rast.put6() should not work, unless the first 
argument passed to it is malformed because the (wrong) values returned by 
gmeta6() are being used (for constructing a GridTopology object, for 
example).  

Could you explain in more detail why you have problems? traceback() after 
an error message from rast.put6()? sessionInfo() so that the package 
versions are known?

Roger

> 
> Przemyslaw Bojczuk
> 
> and
> 
> Seppo Kaitala, Ph.D., Scientist
> Dept. of  Biological Oceanography
> Finnish Institute of Marine Research
> Erik Palménin aukio 1 (P.O. Box 2)
> FIN-00561 Helsinki, Finland
> tel. +358-9-61394417    fax +358-9-323 2970
> mobile +358-400-609-269
> E-mail:Seppo.Kaitala at fimr.fi
> 
> 
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no





More information about the grass-stats mailing list