[SOLVED] ESRI ASCII Raster format to db-format

Here you can report the problems encountered with the graphical functions (db.plot, vario.plot, ...)

[SOLVED] ESRI ASCII Raster format to db-format

Postby KevHa83 » Mon Mar 16, 2015 11:45 am

Hello RGeostats-Team,

I want to use your Bivariate-Kriging-Tool, I have big problems to get the grid data in the db-format. I have the usual grid-formats from ArcMap (AscII, grid, etc).
I can import it in the Raster-Format (from the Raster-Package).
But I don't know to get the data in the db-Format (from the RGeostats-Package). The AscII-Zycor-Format is the import-Format for RGeostats-db-Format? How can I convert automatically from ArcMap-Grid-data (AscII) in AscII-Zycor-Format? Where can I find the Specific of AscII-Zycor-Format?

Sincerely,

Kevin
KevHa83
 
Posts: 1
Joined: Mon Mar 16, 2015 11:21 am

Re: ESRI ASCII Raster format to db-format

Postby Nicolas Desassis » Mon Jun 22, 2015 9:02 am

Dear Kevin,

First we would like to apologize for the delays.

The first step is to load your data in R by using the standard R functions read.table or read.csv.

For instance, if your ascii file is in the file named "file.txt" (relative path from the current R directory) you can write

Code: Select all
data = read.data("file.txt")


It will create a R object of the class data.frame.

Then you can create a RGeostats object of the class db by using the command

Code: Select all
db1 = db.create(data)


After this step, you can specify the roles of each column of your db by using the command db.locate.

First you should display the content of the db by

Code: Select all
db1


and then if you want for instance that the second and third fields becomes the geographical coordinates, write the command

Code: Select all
db1 = db.locate(db1,c(2,3),"x")


I hope it will help you.

Best regards,

Nicolas
Nicolas Desassis
 
Posts: 198
Joined: Thu Sep 20, 2012 4:22 pm


Return to Graphical representation

Who is online

Users browsing this forum: No registered users and 1 guest

cron