Hello again, There is any package which does Z aware (real 3D) interpolations? It can be any method (IDW, kriging or spline) but it should take into consideration not only x and y coordinates for interpolation, but also z coordinate. I looked into different packages but it seems i didn't find the right one. The ultimate goal is to import the output into a GIS (Geographical Information System) for further analysis. Alternatively, maybe you know a source for codes for normal IDW (Inverse Distance Weight) interpolation (i mean the one which takes into consideration only x and y coordinates) so i can try to modify it to take into consideration z values as well. I am not sure it will work, or i can do it - but it worth a try - of course if this is not already done. Thanks, Monica Monica Palaseanu-Lovejoy University of Manchester School of Geography Mansfield Cooper Building Oxford Road, Manchester M13 9PL, UK. email: monica.palaseanu-lovejoy at stud.man.ac.uk
On Sun, 21 Sep 2003, Monica Palaseanu-Lovejoy wrote:> Hello again, > > There is any package which does Z aware (real 3D) interpolations? > It can be any method (IDW, kriging or spline) but it should take into > consideration not only x and y coordinates for interpolation, but > also z coordinate. I looked into different packages but it seems i > didn't find the right one.Assuming that you have points with x and y coordinates, and a z attribute that you want to interpolate to a grid, then the akima package provides spline interpolation as interp(). See Chapter 15 in Venables and Ripley (2002) Modern Applied Statistics with S for more ideas.> > The ultimate goal is to import the output into a GIS (Geographical > Information System) for further analysis. > > Alternatively, maybe you know a source for codes for normal IDW > (Inverse Distance Weight) interpolation (i mean the one which > takes into consideration only x and y coordinates) so i can try to > modify it to take into consideration z values as well. I am not sure > it will work, or i can do it - but it worth a try - of course if this is not > already done. > > Thanks, > > Monica > > > Monica Palaseanu-Lovejoy > University of Manchester > School of Geography > Mansfield Cooper Building > Oxford Road, Manchester > M13 9PL, UK. > email: monica.palaseanu-lovejoy at stud.man.ac.uk > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand at nhh.no
Date sent: Sun, 21 Sep 2003 15:50:49 +0200 (CEST) From: Roger Bivand <Roger.Bivand at nhh.no> Send reply to: Roger.Bivand at nhh.no To: Monica Palaseanu-Lovejoy <monica.palaseanu-lovejoy at stud.man.ac.uk> Copies to: r-help at stat.math.ethz.ch Subject: Re: [R] Z aware interpolation Hi, Well, i guess i was not very clear. My points have x, y, z coordinates, and PAH concentration values. I need to do my interpolation for PAH taking into consideration all my x, y, z coordinates. Otherwise my data seems not to behave - which could be normal since the data points are not in the same plan. Besides, if i project the points into a XY plan ... the distance between points will change, points quite far apart in an xyz coordinate system can be very close into a projected XY system. So i need to work with "real" distances taking into consideration z values as well. Maybe there is an other way to do it in which z can be translated as a kind of "weight" for distance .... if i work only in a XY system. I don't know yet .... so i hope somebody will give me a clue. Thanks again, Monica On Sun, 21 Sep 2003, Monica Palaseanu-Lovejoy wrote:> Hello again, > > There is any package which does Z aware (real 3D) interpolations? > It can be any method (IDW, kriging or spline) but it should take into > consideration not only x and y coordinates for interpolation, but > also z coordinate. I looked into different packages but it seems i > didn't find the right one.Assuming that you have points with x and y coordinates, and a z attribute that you want to interpolate to a grid, then the akima package provides spline interpolation as interp(). See Chapter 15 in Venables and Ripley (2002) Modern Applied Statistics with S for more ideas.> > The ultimate goal is to import the output into a GIS (Geographical > Information System) for further analysis. > > Alternatively, maybe you know a source for codes for normal IDW > (Inverse Distance Weight) interpolation (i mean the one which > takes into consideration only x and y coordinates) so i can try to > modify it to take into consideration z values as well. I am not sure > it will work, or i can do it - but it worth a try - of course if this is not > already done. > > Thanks, > > Monica > > > Monica Palaseanu-Lovejoy > University of Manchester > School of Geography > Mansfield Cooper Building > Oxford Road, Manchester > M13 9PL, UK. > email: monica.palaseanu-lovejoy at stud.man.ac.uk > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Breiviksveien 40, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93 e-mail: Roger.Bivand at nhh.no Monica Palaseanu-Lovejoy University of Manchester School of Geography Mansfield Cooper Building Oxford Road, Manchester M13 9PL, UK. email: monica.palaseanu-lovejoy at stud.man.ac.uk
Hi Monica geoR enables you to do universal kriging, kriging where the mean is modelled on one or more Z variables, you can do this by specifying the trend component (your Z variable) with the likfit function (if you are using maximum liklihood based methods), or with variog function which is used with variofit for least squares based methods. As Edzer pointed out there is also gstat, you may like to look at co-kriging which enables spatial information in your Z variable to be included in you interpolation. With co-kriging you end up using 3 variogram models compared to 1 used in universal kriging, but it may (or may not) give a more meaningful prediction depending on your problem. Then with some cunning wizardry and a little luck you can then export to your GIS package. Hope this helps Dave>Hello again, > >There is any package which does Z aware (real 3D) interpolations? >It can be any method (IDW, kriging or spline) but it should take into >consideration not only x and y coordinates for interpolation, but >also z coordinate. I looked into different packages but it seems i >didn't find the right one. > >The ultimate goal is to import the output into a GIS (Geographical >Information System) for further analysis.