Skip to content

fix the reported CRS identifier when the CRS84 alias URI is requested#567

Merged
azahnen merged 2 commits into
masterfrom
crs84-alias-uri
Jul 10, 2026
Merged

fix the reported CRS identifier when the CRS84 alias URI is requested#567
azahnen merged 2 commits into
masterfrom
crs84-alias-uri

Conversation

@cportele

@cportele cportele commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Part of addressing ldproxy/ldproxy#1681.

When a request references CRS84 by its registered alias URI http://www.opengis.net/def/crs/OGC/0/CRS84, the CRS of the response (e.g., in the Content-Crs header) was reported with the primary URI http://www.opengis.net/def/crs/OGC/1.3/CRS84. OGC API Features Part 2 requires that the CRS identifier used in the request is echoed.

  • EpsgCrs: new auxiliary attribute uriOverride, excluded from equals()/hashCode(); toUriString() returns it when present. Instances that differ only in the URI used to reference the CRS remain equal everywhere (supported-CRS checks, transformer caches, CRS84 special cases).
  • OgcCrs: new constant CRS84_OGC0, the same CRS as CRS84, but with the alias URI as uriOverride; fromString() returns it for the alias spelling.
  • EpsgCrs: toAlternativeUriString() replaced by allUris(), which lists all registered URIs of a CRS (the canonical URI plus, for CRS84, the alias URI).

When a request references CRS84 by its registered alias URI
http://www.opengis.net/def/crs/OGC/0/CRS84, the CRS of the response
(e.g., in the Content-Crs header) was reported with the primary URI
http://www.opengis.net/def/crs/OGC/1.3/CRS84. OGC API Features Part 2
requires that the CRS identifier used in the request is echoed.

- EpsgCrs: new auxiliary attribute uriOverride, excluded from
  equals()/hashCode(); toUriString() returns it when present. Instances
  that differ only in the URI used to reference the CRS remain equal
  everywhere (supported-CRS checks, transformer caches, CRS84 special
  cases).
- OgcCrs: new constant CRS84_OGC0, the same CRS as CRS84, but with the
  alias URI as uriOverride; fromString() returns it for the alias
  spelling.
- EpsgCrs: toAlternativeUriString() replaced by allUris(), which lists
  all registered URIs of a CRS (the canonical URI plus, for CRS84, the
  alias URI).
@azahnen azahnen enabled auto-merge (squash) July 10, 2026 11:01
@azahnen azahnen merged commit 3604dab into master Jul 10, 2026
3 checks passed
@azahnen azahnen deleted the crs84-alias-uri branch July 10, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants