> For the complete documentation index, see [llms.txt](https://olivers-expression-lab.gitbook.io/filter-expressions-in-fme/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olivers-expression-lab.gitbook.io/filter-expressions-in-fme/defaultcrs-vs-othercrs.md).

# DefaultCRS vs OtherCRS

You have the choice - really!

Have you ever wondered if it is possible to download the features in a different coordinate system than the default?&#x20;

Have you also tried to change the coordinate system in FME's user interface, but without success?

Then you should first check the capabilities of your WFS and look there for the supported coordinate systems.

For demonstration purposes we will again have a look at the cadastral parcel service of North Rhine-Westphalia, we've seen in chapter [GetCapabilities](/filter-expressions-in-fme/getcapabilities.md).

```url
https://www.wfs.nrw.de/geobasis/wfs_nw_inspire-flurstuecke_alkis?SERVICE=WFS&REQUEST=GetCapabilities&VERSION=2.0.0
```

Please open the GetCapabilities-URL in a browser and search for the **Feature Type** of your interest, e.g. **CadastralParcel**.

```xml
<wfs:FeatureType>
<wfs:Name>cp:CadastralParcel</wfs:Name>
<wfs:Title>Flurstück</wfs:Title>
<wfs:Abstract>
Gebiete, die anhand des Liegenschaftskatasters oder gleichwertiger Verzeichnisse bestimmt werden.
</wfs:Abstract>
<ows:Keywords>
<ows:Keyword>Flurstück</ows:Keyword>
<ows:Keyword>Cadastral Parcel</ows:Keyword>
</ows:Keywords>
<wfs:DefaultCRS>urn:ogc:def:crs:EPSG::25832</wfs:DefaultCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/25832</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/25833</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/3034</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/3857</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/4258</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/4326</wfs:OtherCRS>
<wfs:OtherCRS>http://www.opengis.net/def/crs/EPSG/0/900913</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::25833</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::3034</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::3857</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::4258</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::4326</wfs:OtherCRS>
<wfs:OtherCRS>urn:ogc:def:crs:EPSG::900913</wfs:OtherCRS>
<ows:WGS84BoundingBox>
<ows:LowerCorner>5.60719400147395 50.2373512078443</ows:LowerCorner>
<ows:UpperCorner>9.59059953291114 52.6005473870064</ows:UpperCorner>
</ows:WGS84BoundingBox>
<wfs:MetadataURL xlink:type="simple" xlink:href="https://apps.geoportal.nrw.de/soapServices/CSWStartup?Service=CSW&Request=GetRecordById&Version=2.0.2&outputSchema=http://www.isotc211.org/2005/gmd&elementSetName=full&id=af87d424-64e9-4d2d-9dd1-b3bd80423209"/>
</wfs:FeatureType>
```

As you can see, there is excatly one default coordinate reference system, aka **DefaultCRS**, of course.

In this case, there are **6** alternative coordinate reference systems listed in **OtherCRS**.

Why 6, I count 13 OtherCRSes?

If you take a closer look, you'll recognize two different notations

1. <http://www.opengis.net/def/crs/EPSG/0/\\>\*
2. urn:ogc:def:crs:EPSG::\*

According to the WFS 1.1.0 specification (see chapter "**9.2 Request"**) even **three notations** are allowed.

Let's quote the specification:

```
The optional srsName attribute of the <Query> element is used to specify a specific
WFS-supported SRS to be used for returned feature geometries.

Its value may be the <DefaultSRS> or any of the <OtherSRS> values listed for the
feature type in WFS capabilities document.
If no srsName value is supplied, then the features shall be returned using the
advertised <DefaultSRS> value.

Any valid URI value can be assigned to the srsName attribute.
However, in order to enhance interoperability, a web feature service must be able 
to process srsName attribute values with the following format models:
• EPSG:<EPSG code>
• http://www.opengis.net/gml/srs/epsg.xml#<EPSG code>
• urn:EPSG:geographicCRC:<epsg code>

In these format models, the values <EPSG code> are placeholders for actual EPSG 
code values.
```

The specification refers to **format models** (not notations).

Ok, let's dive into practice.

<table><thead><tr><th width="215">Parameter</th><th>Value</th></tr></thead><tbody><tr><td>WFS URL</td><td><a href="https://www.wfs.nrw.de/geobasis/wfs_nw_inspire-flurstuecke_alkis?">https://www.wfs.nrw.de/geobasis/wfs_nw_inspire-flurstuecke_alkis?</a></td></tr><tr><td>Version</td><td>2.0.0</td></tr><tr><td>Feature Types</td><td>CadastralParcel</td></tr><tr><td>Max Features</td><td><strong>1</strong></td></tr></tbody></table>

Leave empty the **\[Coord. System] ...**

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2FwL6nvUb0aLOj3j42RHqR%2Fwfs_053.png?alt=media&amp;token=43922e46-c488-4067-b48c-aae52db83e7e" alt=""><figcaption></figcaption></figure>

... run the Workspace and inspect the result.

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2F8whxTpOgxfUWTEb7e2qk%2Fwfs_055.png?alt=media&amp;token=3ccd841a-ad92-4c03-8729-ff2420900776" alt=""><figcaption></figcaption></figure>

As you can see, the coordinate system is **EPSG:25832**, which **is the DefaultCRS**.

Next go to **Translation Log** and search for the **\<WFS GetFeature URL>**:

```url
http://www.wfs.nrw.de:80/geobasis/wfs_nw_inspire-flurstuecke_alkis?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=cp%3ACadastralParcel&NAMESPACES=xmlns%28cp%2Chttp%3A%2F%2Finspire.ec.europa.eu%2Fschemas%2Fcp%2F4.0%29&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2&COUNT=1
```

If you look the URL for "**25832**", you will **not** find it!

This means, that

1. the Get Feature request does not contain a coordinate system and&#x20;
2. therefore the features are returned in **DefaultCRS**, in this case EPSG:25832

Next edit the reader parameters (right click) and set the coordinate system to EPSG:4326, wich is listed as OtherCRS, see capabilities above.

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2F7AsGNyOgUAHE4TzipIJ7%2Fwfs_056.png?alt=media&amp;token=e354c89e-fb0b-45f2-b31e-452c3346d3f5" alt=""><figcaption></figcaption></figure>

Run the Workbench again and inspect the result.

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2FnNiqmeX5AJQtBoCFlpbe%2Fwfs_057.png?alt=media&amp;token=7592cb1e-033e-4011-85d6-5df145ad8a40" alt=""><figcaption></figcaption></figure>

Mmh, this looks strange!

To understand what happens under the hood, fetch the **\<WFS GetFeature URL>** from the **Translation Log** again.

```url
http://www.wfs.nrw.de:80/geobasis/wfs_nw_inspire-flurstuecke_alkis?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=cp%3ACadastralParcel&NAMESPACES=xmlns%28cp%2Chttp%3A%2F%2Finspire.ec.europa.eu%2Fschemas%2Fcp%2F4.0%29&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2&COUNT=1
```

Compare this URL with the URL above.

Doing this, you'll recognize three things:

1. the Get Feature request does not contain any coordinate system like EPSG:4326 and&#x20;
2. therefore the features are returned in DefaultCRS, in this case EPSG:25832.
3. Both URLs are absolutely identical!

What is the conclusion?

If you define a coordinate system in the user interface,&#x20;

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2Fj8UtvnQxmOP5krnjPZ2d%2Fwfs_058.png?alt=media&amp;token=3a03a4d2-9e4d-44fd-b966-a8df308b581d" alt=""><figcaption></figcaption></figure>

this coordinate system will **NOT be integrated into the request**!

The only thing that happens is, that FME displays an EPSG:25832-feature in EPSG:4326.&#x20;

This is the reason for the distorted visual representation.

And what now?

Remember the specification:

```
The optional srsName attribute of the <Query> element is used to specify a specific
WFS-supported SRS to be used for returned feature geometries.
```

<mark style="color:green;">The optional</mark> <mark style="color:green;"></mark><mark style="color:green;">**srsName**</mark> <mark style="color:green;"></mark><mark style="color:green;">for OtherCRSes is part of the \<Query> element and therefore</mark> <mark style="color:green;"></mark><mark style="color:green;">**part of the request URL**</mark><mark style="color:green;">!</mark>

Q: Adding a srsName attribute to the request URL? How do I do that?

A: Take it literally!

<figure><img src="https://60501452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFgBfA6ZqJjyopUS8Ss5Q%2Fuploads%2FmJkvShzbzlzVE2vBj8dN%2Fwfs_059.png?alt=media&amp;token=3cd24df0-0ab1-4856-b051-5396a8753c38" alt=""><figcaption></figcaption></figure>

Just append "*<mark style="color:blue;">srsName=</mark><mark style="color:blue;background-color:yellow;">\<any CRS string from the capabilities></mark><mark style="color:red;">&</mark>*" behind the question mark of the WFS-URL.

```url
https://www.wfs.nrw.de/geobasis/wfs_nw_inspire-flurstuecke_alkis?srsName=urn:ogc:def:crs:EPSG::4326&
```

<mark style="color:red;">**Important note: You must end the URL with an Ampersand "**</mark><mark style="color:red;background-color:yellow;">**&**</mark><mark style="color:red;">**"!**</mark>&#x20;

Finally, the following note: If you are working with [Spatial Operators](/filter-expressions-in-fme/spatial-operators.md) which are containing coordinate system definitions as part of the filter expression AND you want to fetch the features in an OtherCRS, you have to specifiy the coordinate system **twice**:

1. as **part of the Filter Expression**\
   and
2. as **part of the GetFeature-Request** as discussed in this chapter.

I have not studied the specification for this detail, but in my experience both CRSes must be identical.

Some WFS only understand the Spatial Filter, if the CRS is defined in Default.
