SDFIdk / WEBPROJ

REST API exposing coordinate transformations with PROJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include EPSG code in API requests for a CRS

kirstinebundgaard opened this issue · comments

When using the /crs/{crs}/ API entry it would be helpful to include the EPSG code in the returned information.

In the response we have everything we need, except the EPSG code, to transform from one coordinate to another, using /{src}/{dst}/{v1},{v2}.

For example if we want to be able to select which CRS we want to transform from and to, based on a list that is created from the title, we don't have the needed EPSG code unless we either:

  • have created a new object from the response where we insert the epsg code that has been called
  • or we call every item on the list until the selected title matches the title returned by a EPSG code

I hope that makes sense.

Current response:
{
"country": "DK",
"title": "ETRS89 / UTM Zone 32 Nord + DVR90",
"title_short": "ETRS89/UTM32N+DVR90",
"v1": "Easting",
"v1_short": "x",
"v2": "Northing",
"v2_short": "y",
"v3": "kote",
"v3_short": "h",
"v4": null,
"v4_short": null
}

What would be helpful for frontend development:
{
"country": "DK",
"title": "ETRS89 / UTM Zone 32 Nord + DVR90",
"title_short": "ETRS89/UTM32N+DVR90",
"v1": "Easting",
"v1_short": "x",
"v2": "Northing",
"v2_short": "y",
"v3": "kote",
"v3_short": "h",
"v4": null,
"v4_short": null
"epsg_code": "EPSG:7416"
}

I'm sure it is helpful, but why is it helpful?

I'm sure it is helpful, but why is it helpful?

I have updated the issues and hope it is sufficient :)