[Geoserver-devel] [JIRA] (GEOS-9758) CRS Panel (Resource Config GUI) overrides URN SRS format with EPSG:XXXX format

Imran Rajjad created an issue

GeoServer / BugGEOS-9758

CRS Panel (Resource Config GUI) overrides URN SRS format with EPSG:XXXX format

Issue Type:

BugBug

Assignee:

Imran Rajjad

Attachments:

image-2020-10-02-21-32-42-850.png, image-2020-10-02-21-33-12-896.png

Components:

web

Created:

02/Oct/20 6:42 PM

Fix Versions:

2.18-RC

Priority:

MediumMedium

Reporter:

Imran Rajjad

Consider the below Remote WFS Layer with additional native SRS. One of the SRS is in URN OGC format. (urn:ogc:def:crs:EPSG::4326)

<FeatureType xmlns:topp=“http://www.topp.com”>
<Name>topp:roads</Name>
<Title>roads</Title>
<Abstract />
<ows:Keywords>
<ows:Keyword>features</ows:Keyword>
<ows:Keyword>roads</ows:Keyword>
</ows:Keywords>
<DefaultSRS>EPSG:26713</DefaultSRS>
<OtherSRS>urn:ogc:def:crs:EPSG::4326</OtherSRS>
<OtherSRS>EPSG:3857</OtherSRS>
<ows:WGS84BoundingBox>
<ows:LowerCorner>-103.87779468316292 44.37288961726252</ows:LowerCorner>
<ows:UpperCorner>-103.62268570651278 44.50217396380937</ows:UpperCorner>
</ows:WGS84BoundingBox>
</FeatureType>

Steps to reproduce

Configure layer with URN OGC SRS
Configure a layer using epsg 4326 in urn ogc format. The WKT of underlying CRS object shows correct Axis (y/x)

Save the layer, and open map preview, the layer seems to be rendering fine

Open the Layer page to Edit
Again open the layer page and press Apply . The CRS will switch axis back to X/Y.

The GUI page depends upon the Text fields to generate the CRS object for catalog persistence, the URN OGC is lost after page is saved or revisited for editing. EPSG and URN OGC representations of same code can have different Axis orders, hence this will cause issues ( 4326 is a common case).

The problem is at CRSPanel.toSRS function, which blindly converts a CRS object into EPSG code.

A fix is proposed to update the CRSPanel class to accept a boolean flag, which will ensure the text field for SRS will always chose the string literal from SRS Provider items. This will allow to keep other representations of SRS intact.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100148-sha1:d3a00c3)

Atlassian logo