[Proj] Question on +czech option

Even Rouault even.rouault at spatialys.com
Thu Aug 11 01:30:30 PDT 2016


Melita,

I did a bit of digging into history and :

* +czech was introduced in 2006 per 
https://github.com/OSGeo/proj.4/commit/d3506b59ebf799225600bab48e697f8ed6a2c1e9
-->The patch indeeds negates values

It was contributed by Martin Landa and Radim Blazek, 
http://lists.maptools.org/pipermail/proj/2006-April/002209.html, whom I'm 
CC'ing if they can have some clues to share.

I guess that proj natively always expected the first value to be something 
"horizontal" regarding the projection plane and the second value to be 
"vertical", and that +czech was an attempt of getting closer to the "native" 
Krovak convention while staying close to proj convention. So it is probably 
essentially a matter of documenting what the +czech parameter does.

* There's another switch that can be used to control axis order in a cleaner 
and more general way, and was introduced later (2010) in 
https://github.com/OSGeo/proj.4/commit/3405bf76e70d12df6b9dc0c9c129c7dc96918e8d

Playing it with it shows interesting results :

* axis=swu (south, west, up)

echo "20 50" | cs2cs +to +proj=krovak +ellps=bessel +pm=ferro +x_0=0.0 
+y_0=0.0 +lon_0=42d30'E +lat_0=49d30'N +k_0=0.9999  +axis=swu +no_defs

864777.51	1589829.67 0.00

* or equivalently, but more convoluted, +czech +axis=neu ("northing", 
"easting" since +czech already negated values) :

echo "20 50" | cs2cs +to +proj=krovak +ellps=bessel +pm=ferro +x_0=0.0 
+y_0=0.0 +lon_0=42d30'E +lat_0=49d30'N +k_0=0.9999 +czech +axis=neu +no_defs

864777.51	1589829.67 0.00


Even


> I am wondering if the parameter/option +czech is working correctly.
> 
> If anyone is unfamiliar with it, this option is used with +proj=krovak, the
> Krovak projection used in former Czechoslovakia (and current Czech
> Republic).
> 
> The 'native' Krovak has positive south, west axes (given in that order
> according to EPSG). Many Czech users are happy to use east, north axes in
> order to use various software packages that don't support multiple axis
> directions.
> 
> Using an input point of latitude = 50, longitude = 20, I got these results
> (point is a little nonsensical due to using Ferro prime meridian in the
> tests):
> 
> with czech (2065)
> cs2cs +to +proj=krovak +ellps=bessel +pm=ferro +x_0=0.0 +y_0=0.0
>           +lon_0=42d30'E +lat_0=49d30'N +k_0=0.9999 +czech +no_defs
> 
>    cs2cs - PJ lib: 1589829.67     864777.51
>    forward 2065  :  864777.51    1589829.67 (Esri projection engine)
> 
> without czech (5211)
> cs2cs +to +proj=krovak +ellps=bessel +pm=ferro +x_0=0.0 +y_0=0.0
>           +lon_0=42d30'E +lat_0=49d30'N +k_0=0.9999 +no_defs
> 
>    cs2cs - PJ lib: -1589829.67   -864777.51
>    forward 5211  : -1589829.67   -864777.51 (Esri projection engine)
> 
> So without the +czech option, we get east, north axes. With +czech, we get
> values in west, south axes order, rather than south, west. Is this correct
> behavior?
> 
> Disclosure: I work at Esri and I'm on the subcommittee that maintains the
> EPSG Geodetic Registry.
> 
> Melita
> 
> Melita Kennedy
> Esri Sr. Product Engineer
> 
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com



More information about the Proj mailing list