Skip to content

wrong parameters in the Krovak projection #2199

Closed

Description

@mbudaj

Example of problem

PROJ 6 and 7 supplies wrong parameters to Krovak projection in this case:

$ projinfo "+proj=krovak +ellps=bessel +type=crs"
PROJ.4 string:
+proj=krovak +lat_0=0 +lon_0=0 +alpha=30.2881397527778 +k=1 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs +type=crs

Problem description

The problem is that lat_0, lon_0 and k have wrong values, the correct ones being +lat_0=49.5 +lon_0=24.833333333333333333 +k=0.9999. The correct values are also the defaults in the src/projections/krovak.cpp.

This is the reason for wrong transformation results mentioned in #2087 (comment).

Expected Output

Either omit +lat_0=0 +lon_0=0 +k=1 or provide the correct values.

Interestingly, when you add parameter +czech, these parameters are not supplied and the transformation works correctly (also see #2087 (comment)):

$ projinfo "+proj=krovak +czech +ellps=bessel +type=crs"
PROJ.4 string:
+proj=krovak +czech +ellps=bessel +type=crs

Related issue

WKTs generated by projinfo contain wrong parameter values as well.

Possibly other issue

WKT generated by projinfo from those two definitions (with and without the +czech parameter) is identical, although +czech is meant for using the traditional axes orientation (west / south) with positive coordinates. If +czech is not used, negative coordinates and GIS axes order (east / north) is expected.

Both WKTs contain

    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]

Environment Information

  • PROJ version 7.0.0
  • Operation System Information: Debian testing

Installation method

  • apt-get

Activity

  1. kbevers commented on Apr 27, 2020

    @kbevers
    Member

    This indeed looks like a bug. I don't have a fix but I see that the docs doesn't mention the actual default values of +lon_0, +lat_0 and +k_0.

  2. rouault commented on Apr 27, 2020

    @rouault
    Member

    I'm looking at that

  3. added a commit that references this issue on Apr 27, 2020
    738fd1b
  4. mbudaj commented on Apr 28, 2020

    @mbudaj
    Author

    For the reference values of the parameters, see e.g. the page 14 of the technical report published by the Slovak Geodetical and Cartographical Authority (unfortunately in Slovak, but it's easy to find the constants):

    https://www.geoportal.sk/files/gz/etrs89_s-jtsk_tech_sprava_2014_ver3_0.pdf

    φ_0=49d30', λ_KP=42d30' and k'=0.9999

    The value of λ_KP (42d30') is traditionally measured from Ferro meridian, which is assumed to be exactly 17d40' west from Greenwich in Krovak's projection, thus giving 24.8333333333 east from Greenwich.

  5. added a commit that references this issue on Apr 28, 2020
    b7ec687
  6. added a commit that references this issue on May 1, 2020
    1f93923
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions