[Proj] how to compare 2 proj4 definitions? or: how to normalize proj4 definition?

Frank Warmerdam warmerdam at pobox.com
Wed Feb 28 12:50:54 EST 2007


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 am not aware of a proj.4 definition normalization function.  In general
I think it is very hard to compare coordinate systems without a great deal
of knowledge about parameter semantics, etc. As you mention, order is an
issue.  Also there are issues with expanding init strings, precision of
arguments, arguments formats (ie. +lat=15.5 vs. +lat=15d30), defaulted
arguments.

However, if you want to take a crack at it, I'd be interested in incorporating
it into the library.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the Proj mailing list