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

Ed McNierney ed at topozone.com
Wed Feb 28 18:04:21 EST 2007


Sergey -

I made a mild effort at this task a few years ago and gave up.  I had
implemented an ArcIMS emulator on top of a MapServer WMS service.  At
the time, ArcIMS specified a projection through the use of an EPSG
code/index.  ESRI later changed the ArcGIS client for ArcIMS to use a
parametric definition of the desired projection, in WKT format.  Since
the WMS interface requires an EPSG definition, I wanted to convert a
parametric projection description to its EPSG equivalent.

I found it sufficiently difficult to give up, especially since - in the
same release - ArcGIS gained WMS support, so I was able to just abandon
the emulator.

The chief difficulty is in determining whether two very similar
parameter values are supposed to be identical.  Is 0.9997 the same as
0.999721, just rounded, or is it supposed to be a different number?
Some parameters can be superfluous or redundant in certain
circumstances, but what do you do when things are very similar but
different?

If you can constrain the domain to include a specific subset of possible
definitions (however large that may be), the problem may become much
more manageable.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com

-----Original Message-----
From: proj-bounces at lists.maptools.org
[mailto:proj-bounces at lists.maptools.org] On Behalf Of Sergey Spiridonov
Sent: Wednesday, February 28, 2007 11:21 AM
To: proj at lists.maptools.org
Subject: [Proj] how to compare 2 proj4 definitions? or: how to
normalizeproj4 definition?

-----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.
- --
Best regards, Sergey Spiridonov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF5avXJ3NEeIx4r3YRAsqyAJ4lSlgwhRYOW31lUKThrkZCsGh4NQCdFMfb
fJaMMtptZgQq1z/kN3XjGDY=
=vgzE
-----END PGP SIGNATURE-----

_______________________________________________
Proj mailing list
Proj at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/proj



More information about the Proj mailing list