Skip to content
Prev 17999 / 29559 Next

3D KDE to Triangular Irregular Network

Thanks a lot Michael that was very helpful.  It seems like you might be able
to make a TIN from one of the contour levels, say 75% or something.  I'm not
really sure how to get to those isosurface vertex coordinates for a given
contour level.  Is that possible in R.

-----Original Message-----
From: r-sig-geo-bounces at r-project.org
[mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Michael Sumner
Sent: Friday, April 12, 2013 2:06 PM
To: Duff, Andrew A (DFW)
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] 3D KDE to Triangular Irregular Network

A TIN cannot represent that data structure, the plot shows multiple surfaces
that wrap around in 3D. (A TIN cannot do that). The plot is made by
"contouring" (isosurfaces) from a 3D array.

You can represent the array in NetCDF, and maybe your GIS can read that.
Otherwise you could do the same as here but create a 2D raster for every
slice in the 3rd dimension and reconstruct over there.

Bare bones using raster to NetCDF:

library(raster)
r <- brick(UD$estimate, xmn = min(UD$eval.points[[1]]), xmx =
max(UD$eval.points[[1]]),
  ymn = min(UD$eval.points[[2]]), ymx = max(UD$eval.points[[2]]))

## Plot each 3D slice
plot(r)

## write to NetCDF, you need ncdf or ncdf4 package writeRaster(r, "file.nc")

See ?writeRaster for further options to add descriptors to the file, and you
will likely need to worry about the orientation when making the raster
object.



On Sat, Apr 13, 2013 at 4:29 AM, Duff, Andrew A (DFW) <
Andrew.Duff at dfw.wa.gov> wrote:

            
--
Michael Sumner
Hobart, Australia
e-mail: mdsumner at gmail.com


_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo