Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Interpolating multivalued functions

  1. Mar 30, 2012 #1
    Hi everyone,

    I have a problem I am unsure how to solve. I have a set of latitude and longitude data points for a coastline. I need to run a program to interpolate some function that will map this coastline reasonably accurately. This would not usualy be a problem but due to the nature of the data it is multvalued i.e. some latitude values have multiple meaningful longitude values and vice versa.

    I need a method of interpolating a function taking into account these multivalued points.

    Thanks for any help,

    Matt
     
  2. jcsd
  3. Mar 30, 2012 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Are the points listed "in order", i.e as a person walking along the coastline would record them? If, so you could introduce an artificial parameter t so the data is of the form (lat(t), lon(t), t) and try to interpolate the data as a parameterized curve. If the data is not in such a form, we might be able to figure out an algorithm to put it in that form. This is an interesting problem.
     
  4. Mar 30, 2012 #3
    It seems to me that the data would have to be in order. Otherwise, there is no way to know how the various data points are connected.

    But, as Tashi said, you can just think of this as two functions one for lat and one for long. Then just put them together. Do you know how to do this?
     
  5. Mar 30, 2012 #4
    They are in order. I am not entirely sure how you would treat them as 2 separate functions. The obvious parameter values to use would be 0 at one end and 1 at the other. I originaly tried to parameterise the coastline so that everything was a function of just latitude or just longitude but obviously that won't work with multvalued points.

    I would really appreciate it if you could point me in the right direction with parameterising the curve here.

    Thanks,

    Matt
     
  6. Mar 30, 2012 #5
    So, imagine that you are walking along the coastline. Now, let's say every 10 feet (or 100 feet or whatever) you walk along the coastline[i/] you take a new long/lat measurement. Is this how the data are arranged? That is, are the data points "equi-distant" from each other on the coastline? If they don't, you will need to know what the distance is between each point on the coastline.

    Now, let's assume that from the starting point to the endpoint is 100 miles of coastline. So, this 100miles isn't the vector norm from the start to the beginning (i.e. it is not the distance "as the crow flies"), it is how long you would walk, if you walk along the coastline. And let's say you took a measurement every 1/10th of a mile that you walked. So, you have 1000 readings.

    Now, let's just forget about the long. and concentrate on the latitude readings. So, let's just say that the first few latitude readings are:

    f(0/1000) = lat_0
    f(1/1000) = lat_1
    f(2/1000) = lat_2

    and so on. Is this clear?

    If so, then do the same thing with long:

    g(0/1000) = long_0
    g(1/1000) = long_1
    g(2/1000) = long_2

    and so on. Then, the composite function would be something like:

    F(0/1000) = (f(0/1000), g(0/1000))
    F(1/1000) = (f(1/1000), g(1/1000))
    F(2/1000) = (f(2/1000), g(2/1000))

    and so on.

    Now, you have two tables of values. One for latitude and one for longitude. Furthermore, you have the latitude and longitude as a function of the distance you have walked on the coastline. Now, do a interpolation for the functions f and g described above. Then just put them together to get F(s) = (f(s), g(s)), where s is the distance walked along the coastline.

    Now, I'm sure some (let's hope not all) of this has been unclear, so just let me know and hopefully I'll be able to elaborate.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Interpolating multivalued functions
  1. Interpolation method (Replies: 2)

Loading...