# [R] Z aware interpolation - clarification

Monica Palaseanu-Lovejoy monica.palaseanu-lovejoy at stud.man.ac.uk
Sun Sep 21 20:33:21 CEST 2003

```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
>
> 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
M13 9PL, UK.
email: monica.palaseanu-lovejoy at stud.man.ac.uk

```