Skip to content

Axes do not normalize when calling proj_normalize_for_visualization and (Swedish) WKT #4619

@richy46

Description

@richy46

I have this WKT (coming out of WMTS Service URL=https://geokatalog.sjofartsverket.se/MapService/wmts.axd/FyrenBakgrund?Service=WMTS&request=GetCapabilities)

PROJCS["SWEREF99 TM",GEOGCS["SWEREF99",DATUM["SWEREF99",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6619"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4619"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",15],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Northing",NORTH],AXIS["Easting",EAST],AUTHORITY["EPSG","3006"]]

With proj4 the axis do not get normalized:

// case WKT not working
PJ* p2D = proj_create(m_pContext, sWKT);
auto p2DNorm = proj_normalize_for_visualization(m_pContext, p2D);

auto info = proj_pj_info(p2DNorm);

// with  "EPSG:3006" ok

Problem description

When I call with EPSG, info.Description = SWEREF99 TM (with axis order normalized for visualization)
When I call with WKT String: info.Description = SWEREF99 TM

Expected Output

Environment Information

  • PROJ version (proj)
    GDAL 3.8.4
  • Operation System Information
    Win 11

Installation method

  • conda, apt-get, from source, etc...

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