[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-geo
Subject: [R-sig-Geo] class ker (ks) --> conversion --> raster
From: Nicolas Bergeron <nicolas.bergeron () sympatico ! ca>
Date: 2008-02-28 2:17:58
Message-ID: 874pbtddt5.fsf () sympatico ! ca
[Download RAW message or body]
Hi All,
I'm searching for the method to convert a class ker (library(ks)) to the format
raster. Can you suggest a possible solution?
This code produces the object of class ker:
# Modules
library(ks)
# xy
xy <- as.matrix(loc[loc$ID_animal == 2004021,c("x","y")])
# HPI-SCALE
HpiScale <- Hpi(x=xy, pilot="samse", pre="scale")
fhat.HpiScale <- kde(x=xy, H = HpiScale)
# Code for conversion
# Export {XY=long,lat, Z=fhat} --> GRASS (r.in.xyz)
XY <- data.frame(x=fhat.HpiScale[[2]][[1]],y=fhat.HpiScale[[2]][[2]])
Z <- fhat.HpiScale[[3]]
... suggestions will appreciate or others methods to write a text file
of X,Y coordinates and Z value.
after that, in GRASS-GIS r.in.xyz
Thank's
--
Nicolas Bergeron
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic