[Proj] how to compare 2 proj4 definitions? or: how to normalize proj4 definition?
Gerald I. Evenden
geraldi.evenden at gmail.com
Wed Feb 28 13:21:13 PST 2007
On Wednesday 28 February 2007 12:50 pm, Frank Warmerdam wrote:
> Sergey Spiridonov wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi
> >
> > I need to compare two proj4 definitions. It is clear that I can not
> > compare them as strings, because order of the parameters can be changed,
> > floats can be in different format, there can be various units.
> >
> > Is there any normalization function available. If not, I will write one.
>
> Sergey,
I was totally confused by the above request and thus chose to ignore it. But
I was confused even more by the response so please forgive my added notes.
> I am not aware of a proj.4 definition normalization function. In general
There is not any "normalizing function" in either the library nor program
[l]proj. Of course, I have no idea as to what is meant by such a function in
terms of cartographic transformations.
> I think it is very hard to compare coordinate systems without a great deal
> of knowledge about parameter semantics, etc.
"semantics" ?
> As you mention, order is an
> issue.
The + options for a projection can be in any order. As for [l]proj input it
is either lon lat or lat lon with the -r switch.
> Also there are issues with expanding init strings, precision of
> arguments, arguments formats (ie. +lat=15.5 vs. +lat=15d30), defaulted
> arguments.
Both of the above values will yield identical internal numbers with maybe the
least significant bit off. Details as to equivalent precision between
various forms of DMS is easily worked out with simple arithmatic.
>
> However, if you want to take a crack at it, I'd be interested in
> incorporating it into the library.
>
> Best regards,
If you desire analyzing projection performance I suggest using the -V option
and start studying pp. 20-25 in Synder's Prof. Paper 1395 for starters.
--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
More information about the Proj
mailing list