[Proj] Some ideas about the general inverse method
support.mn at elisanet.fi
support.mn at elisanet.fi
Mon Sep 22 17:10:03 EDT 2008
The basic idea might be that if the forward projection is available,
it is always possible to find the inverse just by calling the forward one,
by probing, until required amount of accuracy is achieved.
The basic idea is the same as in binary search algotrithm.. or Newton
iteration algotrithm.
1) Assume that the requested point is exactly in the middle of the projection
space (by very good luck). Calculate forward point.
2) if not... in wihch part of the space it is.Here we compare the
coordinates we have against the coordinates given by the user.
Or use Newton methods, which are a bit similar.
3) At this point we can exclude 75% of the remaining area since the
point must be in some quarter space of the area and we know where.
Divide lattitudes and longitudes so that the point is always in the
halve which we are going to use in next iteration.
4) Now repeat the assumption that the point must be in the middle
of the remaining area.
5) Loop until required amount of accuracy is achieved.
-----
As we all know binary search is rather fast, since the area gets halved
at every iteration. Especially if we can limit the area at the beginning
strongly. We have for example some direct (hash) table, that already
gives us a very small area to start with (not the entire world).
There might be several other ways to speed up that method...
The user could supply some limiting points where the following
points must be. At that point the size of the tables and amount of
search loops could be even smaller.
Even if we first have just some version of the routine, even very
slow and large... when we continue to improve it... finally we have
something that is very fast, accurate and reliable.
The routine could use the parameter: "accepted amount of error"
in meters for example. As soon as that is achieved, no more iterations
is needed. People that need more accuracy, would also need more
computer power (and time)...
Regards: Janne.
More information about the Proj
mailing list