Hi All,

 

I have several txt files for a forest structures analysis and I wish to
import, get coordinates and convert in shape. I need eventually if this code
is correct:

(files name: vegetation_2.txt, vegetation_3.txt, etc.etc.)

 

 

#import 4 files txt

for (i in 2:4){read.delim (file=paste("vegetation_", i,".txt",sep=""))} 

# get coordinates

for (i in 2:4) {coordinates(file=paste("vegetation_",i,sep="") =~X+Y)}

# convert in shape file

For(I in 2:4) {

writeOGR(file=paste(vegetation_["Z"], "vegetation_", I, ".shp",
"vegetation_", driver="ESRI Shapefile"))}

 

 

thanks

 

Ale


	[[alternative HTML version deleted]]


