WFS-NG 'usedefaultsrs' when set to false does not make Remote WFS server do Re-projection

Description

Take the below Feature from a WFS 1.1.0 capabilities doc

<FeatureType xmlns:topp="http://www.opengis.net/cite/geometry">
<Name>cgf:Lines</Name>
<Title>Lines</Title>
<Abstract/>
<ows:Keywords>
<ows:Keyword>features</ows:Keyword>
<ows:Keyword>Lines</ows:Keyword>
</ows:Keywords>
<DefaultSRS>EPSG:26713</DefaultSRS>
<OtherSRS>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>

The default SRS of this remote feature is EPSG:26713 but additionally it also supports EPSG:4326 and EPSG:3857. When this feature is configured as a cascaded layer in a geoserver (local). The requests made by local geoserver to remote geoserver are always in EPSG:26713 irrespective of the SRS intended in output locally (e.g 4326) for both WFS and WMS.

Currently Geoserver is hardwired to use Native or Declared SRS and does not consider looking at other available SRS for a FeatureType. The WFS-NG datastore configuration provides an option to enable/disable the use of defaultsrs, Ideally when this option is disabled, Geoserver should check if the output SRS exists as a supported SRS in remote Feature type, if so, then it should not re-project the filters to Default SRS but relay the filter as it is and have the remote WFS server do the re-projection.

The list of Other supported SRSs can be persisted inside FeatureType..getMetadata(). Geoserver`s part of rendering pipeline can pass this down to FeatureSource and make it part of outgoing Query.

Environment

None

Status

Assignee

Nuno Oliveira

Reporter

Imran Rajjad

Triage

Fix versions

Affects versions

2.17-RC

Components

Priority

Medium
Configure