[R-sig-Geo] spgrass6, readVECT and overwriting ?

Rainer M Krug Rainer at krugs.de
Sat Oct 24 13:34:30 CEST 2015


Mathieu Rajerison <mathieu.rajerison at gmail.com> writes:

> Hi,
>
> I'm using spgrass6 and I use readVECT function in a loop.
>
> Using it causes an error because it doesn't overwrite the the temporary
> shapefile..
>
>> thin = readVECT(vname="zoneBDTOPOthin")
> with_c: argument reversed from version 0.7-11 and in GRASS 6
> ERROR :Layer <zoneBDTO> already exists in OGR data source
>         'D:/GRASSDB/paca/mapset/.tmp'
> OGR data source with driver: ESRI Shapefile
> Source: "D:/GRASSDB/paca/mapset/.tmp", layer: "zoneBDTO"
> with 770 features
> It has 3 fields
> Warning message:
> running command 'v.out.ogr.exe -e -c input=zoneBDTOPOthin2 type=line
> layer=1 dsn=D:/GRASSDB/paca/mapset/.tmp olayer=zoneBDTO
> format=ESRI_Shapefile' had status 1
>
>
> I wonder how to specify to spgrass that I want to overwrite the file in
> readVECT, although I know using execGRASS and v.out.ogr with the
> appropriate overwrite flags would do the job.
>
> Thanks in advance for the answer..

One reason why probably nobody replied is that

1) no version information about R and GRASS (there are several GRASS 6 versions)
2) no session information i.e. package versions used
3) no information about the OS (I guess it is windows based on the
Source path above)
4) no reproducible example which could be easily done by using the GRASS 
5) as far as I can see, in the newest version of spgrass6 there is no function readVECT()

So I would suggest to provide the info and give a reproducible example
using a GRASS sample dataset
(see https://grass.osgeo.org/download/sample-data/ - the Spearfish
dataset is probably the best)

I will happily look int this if you can provide the necessary info.

Cheers,

Rainer

>
> Mathieu
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug

PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20151024/3d752df5/attachment.bin>


More information about the R-sig-Geo mailing list