[OSRS-PROJ] Horrors of the Internet

Ron Russell ron at lsl.co.uk
Thu Feb 13 04:42:06 EST 2003


Gerald I. Evenden wrote:
> 
> A few days ago I took up the seemingly minor task of installing
> the Czech projection Krovak Oblique Conformal Conic in my version
> of PROJ.4.  There seemed to be documentation and benchmarks on
> the net, so away we go.
> 
> Wrong!!!  I have rarely seen a more screwed up mess.  Some sites
> had what on the surface seemed like a proper mathematical
> definition of the projection.  BUT, closer examination revealed
> variables/constants appearing our of thin air and values computed
> but never participating in the final solution.  I even found a
> FORTRAN program that successfully compiled and yielded results
> comparing with other sources.
> 
> As a defining example that can be demonstrated here without
> proper math display mode is one of the first computations in the
> projection's initialization:  The term is usually referred to a 'B'
> 
> B = sqrt( (1 + e^2 cos^4(phi_c)) / (1-e^2) )
> 
> Of course I was lured into coding from the nicely displayed
> source but learned, after painful hours of debugging, that this
> material was seriously flawed:  The above expression that was
> employed in the code was the improbable expression:
> 
> B = sqrt( 1. + (e^2 cos^4(phi_c))/(1-e^2) )
> 
> This just shows how much BS floats on the Internet.
> 
> My biggest question is: are the executable sources and example
> numbers listed out there correct, irrespective of the documentation?
> For example one site lists:
> 
>   1 FI: 50 12 32.4416 LAMBDA: 16 50 59.1790 X:1050538.643 Y: 568990.997
>   2 FI: 49 50 35.7896 LAMBDA: 12 50 23.7895 X:1053301.049 Y: 859084.699
>   3 FI: 49 50 35.7896 LAMBDA: 22 19 38.8766 X:1117926.669 Y: 180241.362
>   4 FI: 48 38 23.4659 LAMBDA: 22 19 38.8766 X:1251684.182 Y: 184607.141
>   5 FI: 50 15 30.7008 LAMBDA: 17 25 51.1792 X:1049221.190 Y: 527189.195
>   6 FI: 50 12 32.4414 LAMBDA: 16 50 59.1790 X:1050538.649 Y: 568990.997
> 
> where FI and LAMBDA are respective latitude and longitude.
> 
> Oh yes, an example site where the impressive math display has many
> holes in it is:
> 
> http://www.posc.org/Epicentre.2_2/DataModel/ExamplesofUsage/eu_cs34e2.html
> 
> It is interesting how often the same material appears on different
> web sites where the local web master has not paid a bit of attention
> to the contents of what he/she has copied.  For shame!
> 
> ----------------------------------------
> PROJ.4 Discussion List
> See http://www.remotesensing.org/proj for subscription, unsubscription
> and other information.


10 years ago I implemented this projection in Fortran in our (extended)
version of GCTPLIB. I was given a photocopy of the relevent chapter
of a Czeck publication (in Czeck!) by our clients, the Czeck Institute
for Surveying and Mapping and after a lot of interpretation of the
diagrams and figures (but with only the odd word translated) 
produced the code.

This paper used two constants for the Projection of the (Bessel) 
ellipsoid onto A Gausian Conformal Sphere, (using a latitude of
49 30N), what they called alpha and k.

I finally tracked these down, alpha is what you call B and k is much
to complicated to write out in an email!

As if the source document was not enough of a problem, the Czecks use
a left handed coordinate system (Westings and Southings) with the origin
at the apex of the cone. Our display systems assume a Easting/Northing
so in fact we produced a pseudo Krovak system with a large False Northing;
The numbers are correct but they all have the wrong sign, however the
maps come out the correct way on the paper!

The Czecks also sometimes use Ferra as their prime meridian.

My code gives exactly the same results for the points you have listed.

The last two points are the test points given in the paper I used (with
a few more decimal places)

Phi 50 12 32.44140 Lambda 34 30 59.17900 => 568990.9973W 1050538.6493S
Phi 50 15 30.70080 lambda 35 05 51.17920 => 527189.1948W 1049221.1899S

(They assume Ferra is 17 40e of Greenwich.)

Given the problems I had interpreting this document, if it is the
definitive source, I am not surprised it there are several intepretations
about!

Ron
-- 


---------------------------------------------------------------------
Ron Russell
Senior Software Engineer, Laser-Scan Ltd
+44(0)1223 420414

http://www.laser-scan.com

----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.



More information about the Proj mailing list