I have point shapefile. Some points have Z value and others not. I have to determin somehow missing values.

I want to do next:

0.) find a point(1) without Z value

1.) select two points(2,3) with Z value on the opposit side of first point(1)

2.) calculate average Z of points(2,3)

3.) select point(1) and write calculated average Z in Z column of point(1)

I had once code for this in Avenue (AV 3.3), but now is different.

Can you give me some advice?

I want to do next:

0.) find a point(1) without Z value

1.) select two points(2,3) with Z value on the opposit side of first point(1)

2.) calculate average Z of points(2,3)

3.) select point(1) and write calculated average Z in Z column of point(1)

I had once code for this in Avenue (AV 3.3), but now is different.

Can you give me some advice?

H Franci,

I think it is necessary to provide some more information in order to solve it:

- how do you want to determine the points on opposite sides of the current point without Z?

- what to do if one of those point doesn't have a Z value itself?

- wouldn't it be more accurate to use a distance weighted average value?

- what if you can't interpolate between points and have to extrapolate?

- do the points represent vertices on a line or are they randomly distributed?

In this case maybe the easiest way would be to create a surface or TIN based of the known Z values and then use "Add Surface Information (3D Analyst)" to obtain the Z values in the point feature class.Kind regards,

Xander