0

Actually I want to convert the shp file to .grd file. But before I convert the .shp to .grd, on my thinking, first I must convert the .shp into ascii. Is it possible to convert directly from .shp to .grd? if not, so I just want to know how to convert .shp into ascii in QGIS or R?. Thank you.

Thank you.

Din
  • 1

1 Answers1

1

Within the library(raster) you can write out both grid and ascii files. Be sure to look into the dataTypes when writing grids as they will be different depending on the size of the values within your grid.

Once you have the raster package running use writeFormats() to see what kinds of grids you can write out. The first column will indicate the call within write Raster() In your case:

writeRaster(format="ascii")

Use rgdal and readOGRto get the .shp files into R.

Further, you can use writeOGR within rgdal to write out in many other formats which, can all be seen usin gdalDrivers().

Badger
  • 111