API interface
Introduction
To automatise the conversion of coordinates, one can make use of the Restful-API. That is, one can put the coordinates, codes of the input and output reference frame in the URL and one will receive a json string with the results.
Grid
example:2D
https://dgt-webapp.teromovigo.com/pt/transform/transform?x=-8.45322&y=38.56714&area=Portugal%20continental&crsin=4274&crsout=3763&metodo=grelhas
results:
{"xout": -27821.168, "yout": -122108.142}
example:2D (DMS)
https://dgt-webapp.teromovigo.com/pt/transform/transform?x=-8°27'11.52"&y=38°34'1.56"&area=Portugal%20continental&crsin=4274&crsout=3763&metodo=grelhas
results:
{"xout": -27819.44, "yout": -122112.589}
example:3D https://dgt-webapp.teromovigo.com/pt/transform/transform?x=-8.53234&y=38.56714&z=234.00&area=Portugal%20continental&crsin=4274&crsout=3763&metodo=grelhas&altin=Elipsoidal&altout=Ortometrica
results:
{"xout": -34716.976, "yout": -122081.185, "zout": 179.888}
Bursa-Wolf
example:2D
https://dgt-webapp.teromovigo.com/pt/transform/transform?x=60120.415&y=-207760.586&area=Portugal%20continental&crsin=3763&crsout=27493&metodo=bursaWolf
results:
{"xout": 60117.042, "yout": -207762.689}
example:2D (DMS)
https://dgt-webapp.teromovigo.com/pt/transform/transform? x=-8°27'2711.52"&y=38°34'271.56"&area=Portugal%20continental&crsin=4274&crsout=3763&metodo=bursaWolf
results:
{"xout": -27819.44, "yout": -122112.589}
example:3D
https://dgt-webapp.teromovigo.com/pt/transform/transform?x=60120.415&y=-207760.586&z=316.01&area=Portugal%20continental&crsin=3763&crsout=27493&metodo=bursaWolf&altin=Elipsoidal&altout=Elipsoidal
results:
{"xout": 60117.045, "yout": -207762.685, "zout": 262.878}
Parameters
Parameters | Required/Optional | Comments |
---|---|---|
x | Required | If geodetic coordenates are selected, then it represents the longitude. Format of the value= 67675.76 or -9.1345 or -9 23 56.4567 |
y | Required | If geodetic coordinates are selected, then it represents the latitude. Format of the value= 87987.776 or 38.5677 or 38 0 35 |
z | Optional | Height. Format of the value= 456.7 |
area | Required | Area of applicability of reference systems and their transformations. |
crsin | Required | EPSG code of the input reference frame |
crsout | Required | EPSG code of the output reference frame |
metodo | Required | Method used to perform the transformation of the reference frames. |
altin | Optional unless h or z is used in the input. | Indication of the input altitude type. |
altout | Optional unless h or z is used in the output. | Indication of the output altitude type. |
Parameter codes
Parameters | Code | Comments |
---|---|---|
area | ||
Portugal Continental | - | |
Acores | - | |
Madeira | - | |
crsin,crsout | ||
3763 | ETRS89/ PT-TM06 | |
4937 | ETRS89 - Coordenadas Geográficas | |
4936 | ETRS89 - Coordenadas Geocêntricas | |
4207 | Datum Lisboa - Coordenadas Geográficas | |
4274 | Datum 73 - Coordenadas Geográficas | |
5018 | Datum Lisboa/Hayford-Gauss | |
20790 | Datum Lisboa/Hayford-Gauss com Falsa Origem | |
27493 | Datum 73/Hayford-Gauss | |
5014 | ITRF93/PTRA08-UTM 25N - Açores Ocidental | |
5015 | ITRF93/PTRA08-UTM 26N - Açores Central e Oriental | |
5011 | ITRF93 - Coordenadas Geocêntricas | |
2942 | Datum Base SE (Porto Santo)/UTM 28N - Madeira | |
5012 | ITRF93 - Coordenadas Geográficas | |
2188 | Datum Observatório (Flores)/UTM 25N - Açores Ocidental | |
2189 | Datum Base SW (Graciosa)/UTM 26N - Açores Central | |
2190 | Datum S. Braz (S. Miguel)/UTM 26N -Açores Oriental | |
5016 | ITRF93/PTRA08-UTM 28N - Madeira, Porto Santo, Desertas e Selvagens | |
88888 | Datum 73 - Coordenadas Geocêntricas | |
99999 | Datum Lisboa - Coordenadas Geocêntricas | |
37249 | Datum S. Braz (S. Miguel) - Açores Oriental - Coordenadas Geográficas | |
77772 | Datum S. Braz (S. Miguel) - Açores Oriental - Coordenadas Geocêntricas | |
37241 | Datum Base SW (Graciosa) - Coordenadas Geográficas | |
77771 | Datum Base SW (Graciosa) - Coordenadas Geocêntricas | |
37245 | Datum Observatório (Flores) - Coordenadas Geográficas | |
77770 | Datum Observatório (Flores) - Coordenadas Geocêntricas | |
37247 | Datum Base SE (Porto Santo) - Coordenadas Geográficas | |
77773 | Datum Base SE (Porto Santo) - Coordenadas Geocêntricas | |
metodo | ||
bursaWolf | Bursa-Wolf | |
grelhas | Grid (NTv2), area="Portugal Continental" | |
altin, altout | ||
Ortometrica | - | |
Elipsoidal | - |