Skip to content

API - Setting the Coordinate Type of Points

Internally, Echo works with a local coordinate system, defined on a project level. However, for some assets, besides being possible for you to work with the local coordinates, you can also use global geodetic coordinates (EPSG:4326 used in GPS).

Echo will always make the conversion internally to the local coordinate system defined in the project.

When interacting with certain API endpoints that manage the assets, an extra parameter called coordinate_type can be added to the URL. This parameter indicates in which coordinate system you want to send or retrieve information. It can be assigned two values:

  • 🗺️ latlon: default value. It refers to the global coordinate system, and the coordinates are given in the format [lat, lon], where lat is the latitude and lon is the longitude, both given in decimal degrees
  • 🗺️ xy: it refers to the specific local coordinate system of the project, and the coordinates are given in the format [x, y], where x and y correspond to the axes of the local coordinate system

To manually set the value for coordinate type, you can add an extra path parameter to the URL:

/p-{project_id}/your_asset/?coordinate_type=latlon

If you do not provide this extra parameter in your calls to the API (for the endpoints that accept it), Echo will expect inputs and return outputs in the local coordinate system, since this is the default behaviour.