Skip to content

Allow epsg-code to be provided as string? #259

@m-mohr

Description

@m-mohr

The specification asks to provide EPSG codes as numbers (e.g. 4326 instead of EPSG:4326). We see many code snippets that actually use the string variant, which strictly speaking should be WKT2.

So an idea coming up in recent discussions is that we use the clients to correct this common mistake.
So for subtype epsg-code a client could simply match against the pattern/regexp /^EPSG:(\d{4,})$/i and replace it with the first match converted to an int.

In pseudo-code something like:

if $subtype == 'epsg-code':
  $matches = $value.match(/^EPSG:(\d{4,})$/i)
  if $matches:
    $value = int($matches[1])

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions