{
    "circuit": {
        "slug": "portimao",
        "name": "Autódromo Internacional do Algarve (Portimão)"
    },
    "licence": {
        "name": "Open Database Licence 1.0",
        "url": "https://opendatacommons.org/licenses/odbl/1-0/"
    },
    "attribution": "© OpenStreetMap contributors",
    "source": "OpenStreetMap, through the Overpass API",
    "fetched_at": "2026-10-02T16:11:51Z",
    "ways": [
        {
            "id": 363133199,
            "version": 8
        },
        {
            "id": 511858148,
            "version": 2
        },
        {
            "id": 363133200,
            "version": 6
        },
        {
            "id": 157736307,
            "version": 4
        },
        {
            "id": 511858151,
            "version": 4
        },
        {
            "id": 511858149,
            "version": 2
        },
        {
            "id": 511858150,
            "version": 3
        },
        {
            "id": 511858549,
            "version": 2
        },
        {
            "id": 363133201,
            "version": 6
        },
        {
            "id": 511858548,
            "version": 2
        },
        {
            "id": 511858547,
            "version": 2
        },
        {
            "id": 363133187,
            "version": 6
        },
        {
            "id": 511858546,
            "version": 2
        },
        {
            "id": 511859284,
            "version": 2
        },
        {
            "id": 363133194,
            "version": 6
        },
        {
            "id": 511858536,
            "version": 2
        },
        {
            "id": 363133190,
            "version": 6
        },
        {
            "id": 511858533,
            "version": 2
        },
        {
            "id": 511858543,
            "version": 3
        },
        {
            "id": 511858539,
            "version": 2
        },
        {
            "id": 511859291,
            "version": 2
        },
        {
            "id": 511859290,
            "version": 2
        },
        {
            "id": 511859289,
            "version": 2
        },
        {
            "id": 363133193,
            "version": 5
        },
        {
            "id": 511859287,
            "version": 2
        },
        {
            "id": 511859288,
            "version": 2
        },
        {
            "id": 511859286,
            "version": 2
        },
        {
            "id": 363133197,
            "version": 5
        },
        {
            "id": 511859285,
            "version": 2
        },
        {
            "id": 511859282,
            "version": 2
        },
        {
            "id": 363133196,
            "version": 5
        },
        {
            "id": 511859283,
            "version": 2
        },
        {
            "id": 363133198,
            "version": 4
        },
        {
            "id": 363133195,
            "version": 5
        }
    ],
    "reproducible": true,
    "join": {
        "method": "build_track and gen_trackjs",
        "spacing_metres": 2,
        "smoothing_passes": 8,
        "keep_every": 2,
        "control_line": {
            "latitude": 37.229934,
            "longitude": -8.630027
        },
        "steps": [
            "Take the OpenStreetMap ways listed in \"ways\", by their ids, as they were on \"fetched_at\". They are the ways of the lap: of the ways tagged highway=raceway at the Circuit, the ones tagged width 14 or 18 and not named for the pits, chained end to start from the first listed way into every closed loop, keeping the longest loop that runs through each numbered section (ref 1 and 3 to 15) and not through ref 2, another layout. The ways are listed in the order the loop runs.",
            "Put the points of the ways one after the other, each way without its last point, which is the first point of the next. The line closes from the last point back to the first.",
            "Put every point on a plane around the mean point of them all: x is the longitude difference in degrees times pi/180 times 6,371,000 m times the cosine of the mean latitude, and y is the latitude difference times pi/180 times 6,371,000 m.",
            "Measure the closed line and set N to its length divided by 2 m, rounded down. Place N points evenly along it, each the straight-line interpolation between the two points around it.",
            "Smooth the points 8 times: each becomes the weighted mean of itself and its two neighbours on each side round the closed line, weighted 3 for itself, 2 for the next ones and 1 for the ones after, divided by 9.",
            "Start the line at the point nearest the control line at latitude 37.229934, longitude -8.630027 (the Formula 1 timing line of 2021), keeping the order.",
            "Keep one point in every 2 (every second point when it is 2), from the first, and turn each back into latitude and longitude, rounded to 6 decimals. The outline is that line, closed.",
            "The heights in the drawn file come from the Copernicus GLO-30 elevation model, not from OpenStreetMap, and are not part of the outline."
        ]
    },
    "geojson_on_request": "hello@apexscout.app"
}