SDFIdk / WEBPROJ

REST API exposing coordinate transformations with PROJ
MIT License
8 stars 6 forks source link

Include EPSG code in API requests for a CRS #38

Closed kirstinebundgaard closed 2 years ago

kirstinebundgaard commented 2 years ago

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:

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" }

kbevers commented 2 years ago

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

kirstinebundgaard commented 2 years ago

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

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