Fw: [STATSGRASS] problem during importation of vector grass
Roger.Bivand at nhh.no
Mon Feb 12 06:14:54 EST 2007
On Mon, 12 Feb 2007, Pierluigi De Rosa wrote:
> Dear Roger,
> Maybe I found the problem.
> I saw that into the directory .tmp/uni the readVECT6 doesn't write alway the
> shapefile but sometimes it write a file nemad 941.0 or 610.0 ecc. everytime
> It seems the pid of the command instead of the name of shapefile.
> Why do you think it happen?
It is only a trick to be able to read the name of the GRASS session
temporary directory - create a random empty file, and take the directory
name of the fully qualified file name returned. Under Linux/OSX this isn't
necessary, as the file systems are rooted in the same place, so GRASS can
write to R's temporary directory, but under Cygwin this doesn't work,
hence the "jumping through hoops".
The output file should be written by v.out.ogr to the GRASS session
temporary directory. Can you watch the contents of the directory as you
run readVECT6() under debug()? Do you see the:
Exporting 90 points/lines...
90 features written
(or different number of points for you - this is bugsites in spearfish)
at all? Could you please repeat sessionInfo()? Does v.out.ogr work on that
vector object when not run inside R? What does v.info of the object say?
This is a puzzling case, I hope that we can solve it.
> Alle 20:28, sabato 10 febbraio 2007, Roger Bivand ha scritto:
> > Puzzling. Can you try to run:
> > system("v.out.ogr -e input=ascii_punti type=point dsn=. olayer=ascii_pu
> > format=ESRI_Shapefile") # without the line break
> > tmp <- readOGR(".", "ascii_pu")
> > inside GRASS in R in some suitable directory? Is there any reason why
> > v.out.ogr might fail on these data?
> > Roger
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