[Proj] Some ideas about the general inverse method
support.mn at elisanet.fi
support.mn at elisanet.fi
Wed Sep 24 18:41:43 EDT 2008
Glynn Clements <glynn at gclements.plus.com> kirjoitti:
>
> In order for this method to work in general, you would need to be able
> to reliably determine the initial rectangle; you can't just assume
> 180W-180E, 90S-90N.
I am 100% sure it will work, since the binary search works! And you can
assume anything! We simply generate and ordered list of let's say
for example 1000 points using the fwd-routine. Then we do the most
simple binary search in that table. For binary search it takes usually
no more than 3..4 table reads even for a large set. And I tell you that
reading a table is something very fast in modern computers (no math
at all). If we have 1000 points on the whole globe, that will allready make
the resulting area rather small, and we could use other more efficient
methods there after.
But anyway. As long as the binary searh routine works and is very fast,
there will always be a way to do the inverse projection. BUT what is the
most efficient method (or combination of several) and fastest is a
different question. And how much memory and CPU that will use. And
what is the cost of generating that table somewhere at the initialization of
the projection.
That would sure need some experimenting...
One very clever idea would be to generate the table as the user calls
the forward (inverse) routine, since it is mostly true that if a point is used
forward it will called inverse also. And vice versa.
Janne.
More information about the Proj
mailing list