Runways
Create a runway
Interacting with the API
The endpoint below is used to create a single runway for project with ID project_id
.
POST /p-{project_id}/runways/
Tip: setting the coordinate type of points
This endpoint supports the extra path parameter coordinate_type
that allows you to work with local and global coordinates for the runway points. Please
see API - Setting the Coordinate Type of Points for more information.
The payload of this endpoint includes the following elements:
Element | Type | Unit | Description | Observations |
---|---|---|---|---|
name |
string |
- | Name commonly used to identify the runway. It can be set to any string | Any name accepted, but must be unique amongst all runways of a project |
airport |
string |
- | 4-letter ICAO code of the runway's airport | Maximum 4 characters accepted |
designation |
string |
- | Actual designator of the runway | 2 or 3 characters accepted, from 01 to 36 (L, C, R) |
start |
list |
meter / decimal degree | The start point of the runway | Expected as [x, y] (local) or [lat, lon] (global) |
end |
list |
meter / decimal degree | The end point of the runway | Expected as [x, y] (local) or [lat, lon] (global) |
threshold |
list |
meter / decimal degree | The points where the runway's threshold is located | Expected as [x, y] (local) or [lat, lon] (global) |
The runway length
is not part of the payload. Instead, it is derived from the distance between the start
and end
points.
Below is an example of how you can create a runway for your project.
import requests
def create_runway(base_url: str, project_id: int, headers: dict):
# Define payload
runway_payload = {
"airport": "AAAA",
"designation": "36R",
"name": "My New Runway",
"start": [0, 0],
"end": [3000, 0],
"threshold": [0, 0]
}
# Choose type of coordinates for the payload
coordinate = "xy"
# Create runway
runway_response = requests.post(
f"{base_url}/p-{project_id}/runways/" + f"?coordinate_type={coordinate}",
json=runway_payload,
headers=headers
)
# Extract response after creating runway
runway = runway_response.json()
Using the Website
DOCUMENTATION TO BE ADDED SOON
The documentation for this section has not been completed yet.
Read a runway
Interacting with the API
To read a single runway with name runway_name
from a project with ID project_id
, the endpoint below can be used.
GET /p-{project_id}/runways/{runway_name}/
Tip: setting the coordinate type of points
This endpoint supports the extra path parameter coordinate_type
that allows you to work with local and global coordinates for the runway points. Please
see API - Setting the Coordinate Type of Points for more information.
Below is an example of how you can read a single runway.
import requests
def read_runway(base_url: str, project_id: int, headers: dict, runway_name: str):
# Choose type of coordinates
coordinate = "xy"
# Read runway
runway_response = requests.get(
f"{base_url}/p-{project_id}/runways/{runway_name}/" + f"?coordinate_type={coordinate}",
headers=headers
)
# Extract response after fetching runway
runway = runway_response.json()
Using the Website
DOCUMENTATION TO BE ADDED SOON
The documentation for this section has not been completed yet.
Read all project runways
Interacting with the API
It is also possible to obtain information about all runways that are part of a project with ID project_id
. To get this list, the endpoint below can be used.
GET /p-{project_id}/runways/
Tip: setting the coordinate type of points
This endpoint supports the extra path parameter coordinate_type
that allows you to work with local and global coordinates for the runway points. Please
see API - Setting the Coordinate Type of Points for more information.
Below is an example of how you can get a list with information about all runway from a certain project.
import requests
def read_all_runways(base_url: str, project_id: int, headers: dict):
# Choose type of coordinates
coordinate = "xy"
# Read all runways
runways_response = requests.get(
f"{base_url}/p-{project_id}/runways/" + f"?coordinate_type={coordinate}",
headers=headers
)
# Extract response as a list after fetching all runways
runways = runways_response.json()
Using the Website
DOCUMENTATION TO BE ADDED SOON
The documentation for this section has not been completed yet.
Update a runway
Interacting with the API
Once a runway is created, only some of its fields can be updated. To make sure the finished calculations that use a certain runway remain valid, all the fields that can affect the results are not allowed to be changed.
To update a runway named runway_name
in a project with ID project_id
, the endpoint below is used.
PATCH /p-{project_id}/runways/{runway_name}/
The payload of this endpoint is a subset of the payload required when creating a runway. All these fields are optional in this payload, which means that you can update any combination of them. The available fields to be changed are shown below:
Element | Type | Observations |
---|---|---|
airport |
string |
Optional |
designation |
string |
Optional |
name |
string |
Optional |
Below is an example of how you can update some fields of your runway.
import requests
def update_runway(base_url: str, project_id: int, headers: dict, runway_name: str):
# Define payload
update_payload = {
"designation": "18L",
"name": "My New Other Runway",
}
# Update runway
runway_response = requests.patch(
f"{base_url}/p-{project_id}/runways/{runway_name}/",
json=update_payload,
headers=headers
)
# Extract response after updating runway
runway = runway_response.json()
Using the Website
DOCUMENTATION TO BE ADDED SOON
The documentation for this section has not been completed yet.
Delete a runway
Interacting with the API
It is possible to delete a single runway named runway_name
belonging to a project with ID project_id
. The endpoint below allows you to perform this action.
DELETE /p-{project_id}/runways/{runway_name}/
Deleting a runway is an irreversible action
After deleting a runway, it is not possible to recover it. Furthermore, all the data linked to that runway will also be deleted, including tracks, events and traffics. You will have to create a new runway to replace it.
Below is an example of how you can delete a runway.
import requests
def delete_runway(base_url: str, project_id: int, headers: dict, runway_name: str):
# Delete runway
runway_response = requests.delete(
f"{base_url}/p-{project_id}/runways/{runway_name}/",
headers=headers
)
# Extract information about deleted runway
runway = runway_response.json()
Using the Website
DOCUMENTATION TO BE ADDED SOON
The documentation for this section has not been completed yet.