-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
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])