How to migrate from EPSG.io to Coordinates API
After ten years, the EPSG.io coordinates search and transformation service API is being transitioned to the MapTiler Coordinates API for improved security, scalability, and sustainability. If you would like to read more about EPSG.io, visit the About page or the GitHub page. This new API requires registration but remains free.
Old endpoints (EPSG.io)
- Search: https://epsg.io/?q=swiss&format=json
- Transform: https://epsg.io/trans?data=7.457914,46.948563&s_srs=4326&t_srs=2056
New endpoints (MapTiler Coordinates API)
- Search: https://api.maptiler.com/coordinates/search/swiss.json
- Transform: https://api.maptiler.com/coordinates/transform/7.457914,46.948563.json?s_srs=4326&t_srs=2056
How to migrate to Coordinates API
1. Change the URL
Update the API URL from https://epsg.io to https://api.maptiler.com/coordinates
2. Search:
After the search/
term put in your phrase (even with spaces or parameters) and add .json
at the end.
Example:
https://api.maptiler.com/coordinates/search/swiss lv95.json
https://api.maptiler.com/coordinates/search/swiss deprecated:* kind:*.json
More details about search/
and its parameters are available at: Coordinates API documentation.
3. Transform:
Give coordinates after transform/
with coordinate system and transformation parameters after?
.
For multiple points, separate the coordinates with;
.
Example:
https://api.maptiler.com/coordinates/transform/7.457914,46.948563;7.467914,46.958563.json?s_srs=4326&t_srs=2056
More details about transform/
and its parameters are in the Coordinates API Transform Documentation.
Requirement for API key
Every query to the search or transformation endpoints requires the ?key=YOUR-SECURE-KEY parameter.
Transformation:
https://api.maptiler.com/coordinates/transform/7,46.json?s_srs=4326&t_srs=2056&key=YOUR-SECURE-KEY
Search:
https://api.maptiler.com/coordinates/search/swiss.json?key=YOUR-SECURE-KEY
To get a MapTiler key, follow the guide MapTiler Documentation. The key provides usage statistics and enhances your app's security. MapTiler ensures privacy protection as outlined in its privacy policy.
Change in search endpoint response
Response to the endpoints has changed. The old one looks like this:
(on request https://epsg.io/?q=swiss lv95&format=json).
{
"number_result": 1,
"results": [
{
"accuracy": 1,
"area": "Liechtenstein; Switzerland.",
"authority": "EPSG",
"bbox": [
47.81,
5.96,
45.82,
10.49
],
"code": "2056",
"default_trans": 1676,
"kind": "CRS-PROJCRS",
"name": "CH1903+ / LV95",
"proj4": "+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",
"trans": [
1509,
1647,
1676,
8457
],
"unit": "metre",
"wkt": "PROJCS[\"CH1903+ / LV95\",GEOGCS[\"CH1903+\",DATUM[\"CH1903+\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128],TOWGS84[674.374,15.056,405.346,0,0,0,0]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4150\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAMETER[\"latitude_of_center\",46.9524055555556],PARAMETER[\"longitude_of_center\",7.43958333333333],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_grid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",2600000],PARAMETER[\"false_northing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2056\"]]"
}
],
"status": "ok"
}
The new one looks like this:
(on request https://api.maptiler.com/coordinates/search/swiss lv95.json?exports=true)
{
"results": [
{
"id": {
"authority": "EPSG",
"code": 2056
},
"kind": "CRS-PROJCRS",
"name": "CH1903+ / LV95",
"exports": {
"proj4": "+proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs +type=crs",
"wkt": "PROJCS[\"CH1903+ / LV95\",GEOGCS[\"CH1903+\",DATUM[\"CH1903+\",SPHEROID[\"Bessel 1841\",6377397.155,299.1528128],TOWGS84[674.374,15.056,405.346,0,0,0,0]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4150\"]],PROJECTION[\"Hotine_Oblique_Mercator_Azimuth_Center\"],PARAMETER[\"latitude_of_center\",46.9524055555556],PARAMETER[\"longitude_of_center\",7.43958333333333],PARAMETER[\"azimuth\",90],PARAMETER[\"rectified_grid_angle\",90],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",2600000],PARAMETER[\"false_northing\",1200000],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2056\"]]"
},
"unit": "metre",
"accuracy": 1,
"area": "Liechtenstein; Switzerland.",
"bbox": [
5.96,
45.82,
10.49,
47.81
],
"deprecated": false,
"default_transformation": {
"authority": "EPSG",
"code": 1676
},
"transformations": [
1509,
1647,
1676,
8457
]
}
],
"total": 1
}
Key changes are
- Renamed number_result to total
- Renamed default_trans to default_transformation
- Renamed trans to transformations
- Nested code and authority into id:{authority, code}
- Nested default transformation code into default_transformation:{authority, code}
- The value of the code is not a string but it is a number
- Bounding box list from [Ymax, Xmin, Ymin, Xmax] to [Xmin, Ymin, Xmax, Ymax]
-
proj4 and wkt are available only if you pass the parameter exports=true
Nested in exports: {proj, wkt
Without exports=true will be export:null - Added deprecated (boolean) information
- Dropped status
Change in transformation endpoint
Selecting particular transformation
Instead of using single "coordinate-system - transformation" value, e.g., 5514 - 15965 value, use the ops parameter for transformation (e.g. https://api.maptiler.com/coordinates/transform/17,50.json?s_srs=4326&t_srs=5514&ops=15965).
More details in the Coordinates API Transform Documentation.
Changes in response
Old response to transform one point (on request: https://epsg.io/trans?data=17,50&s_srs=4326&t_srs=5514-15965):
{
"x": "-560595.6992028592",
"y": "-1074706.2565340507",
"z": "0.0"
}
Old response to transform multiple points (on request:
https://epsg.io/trans?data=17,50;17.1,50.1&s_srs=4326&t_srs=5514-15965):
[
{
"x": "-560595.6992028592",
"y": "-1074706.2565340507",
"z": "0.0"
},
{
"x": "-552340.3607729311",
"y": "-1064368.376869001",
"z": "0.0"
}
]
New response transforming multiple points (on request https://api.maptiler.com/coordinates/transform/17,50;17.1,50.1.json?s_srs=4326&t_srs=5514&ops=15965):
{
"transformer_selection_strategy": "listed",
"results": [
{
"x": -560595.6992028592,
"y": -1074706.2565340507,
"z": 0
},
{
"x": -552340.3607729311,
"y": -1064368.376869001,
"z": 0
}
]
}
Key changes are
- Add transformer_selection_strategy Details in Coordinates API Transform Documentation)
- Nested results of transformations into result:[{x1,y1,z1},{x2,y2,z2}]
- Moved from string values to number values
All other endpoints remain unchanged. You can still use and download definitions like Proj4, SQL, or WKT2 using the same links (e.g., https://epsg.io/2056.proj4, https://epsg.io/5514-1623.sql, or https://epsg.io/3857.wkt2). A full list of current definitions can be found in epsg.io/docs.
Conclusion
If you run into any issues, feel free to contact MapTiler Support. We realize that a transition like this might not always be easy.
Comments
0 comments
Please sign in to leave a comment.