# Interpolating over time based on distance in R?

I have points with unequal distance from each other. Each point is a GPS sampling point which means it follows a non linear path. I have taken samples at defined interval: 1 hour. In each sampling point, I have also recorded elevation. I would like to make these points interpolated to 20 -minutes, which means elevation will also be interpolated with weight based on the distance of each station from each other.

Is this possible to do in ArcGIS Desktop 10.1, perhaps using ModelBuilder?

• The Z is the problem, you could create a polylineM and use time as the M unit then split the line by M desktop.arcgis.com/en/arcmap/10.3/guide-books/extensions/…, this might be better scripted, but still interpolating the Z with any degree of accuracy is going to be nearly impossible unless you have a surface to extract the Z from. – Michael Stimson Apr 11 '18 at 6:23
• Hi Michael. I am using ArcGIS 10.1 so I was wondering just as you suggested if it is better to use script which I do not know how to start with. – user2543 Apr 11 '18 at 7:12
• Are you trying to do this using Spatial Analyst? By a "non lineatr path" do you just mean a series of points? Do these have elevation stored as Z coordinates or in a field? What tools have you already researched/tried? Do "you have a surface to extract the Z from"? – PolyGeo Apr 11 '18 at 7:29
• The Z values (elevation) are field values. The same goes with Hour/Date. – user2543 Apr 11 '18 at 7:45
• Would linearly interpolating elevation between 2 points be even sensible? If these GPS points say represent someone walking then in 1 hour you could have walked up a hill and down again to a lower level. The interpolation between the two points would loose the peak. – Hornbydd Apr 11 '18 at 9:28

As I understand you have this scenario (just for 3 points)

The green lines represent 20 minute intervals. So in this fictitious example they have walked a shorter distance between 1h-2h as they are going uphill and then a longer distance between 2h-3h as they are going downhill.

So you could use a combination of tools and build a model but I suspect this will be easier to script because you are building, manipulating and extrapolating along individual line segments.

Another (bigger) problem you are going to have is that you are using quite an old version of ArcMap, if you upgrade there will be many new tools and arcpy functions available that could help you do this, for example there is the Generate Points Along Lines tool that is currently not available to you. Another helpful tool which is not available to you is points to lines.

You will make your life considerably easier and open up new processing opportunities if you upgrade...

As a side note it is useful to include simple images/screenshots of what you are trying to achieve, this will attract attention to your question as it often clarifies what a wordy paragraph is trying to explain.

• Hi, @Hornbydd: This solution only splits the line into segments but does not consider the M (time part) and elevation based on M – user2543 Apr 14 '18 at 13:02
• I was thinking if each line segment represents 1 hour then you can have two 20 mins intervals as shown by my green lines. So they are the locations. Then you apportion the difference in z values between the segment end points to the green locations. – Hornbydd Apr 14 '18 at 13:12
• That might make sense for my purpose so I'll give it a try. – user2543 Apr 14 '18 at 13:15