f1-circuits icon indicating copy to clipboard operation
f1-circuits copied to clipboard

Embedding tracks' curve numbers and names

Open AlexGustafsson opened this issue 1 year ago • 1 comments

I'd like to contribute the curve indices and names to this project. What would be the best way of going about doing that?

My use case is to use the data to identify what curve a car is currently in given its coordinate.

For example, for the French circuit, I could add the following JSON for the tenth curve.

{
  "type": "Feature",
  "properties": {
    "id": "10",
    "Name": "Courbe de Signes"
  },
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [5.802532, 43.25119],
      [5.802799, 43.251096],
      [5.803101, 43.250931],
      [5.803379, 43.250709],
      [5.803556, 43.250497],
      [5.803681, 43.250229],
      [5.803716, 43.249894]
    ]
  }
}

An alternative would be to have "bounding circles" instead to include the area of the curve, that way the math would probably be easier, but then again, that could be done by using a bounding box for the line as well.

AlexGustafsson avatar Jul 30 '22 12:07 AlexGustafsson

While I like the idea, I am afraid that something like that would be hell to maintain and keep up-to-date. Say the track is modified, or just one vertex is moved, it would mess up the curve indices, and it would no longer overlap.

bacinger avatar Sep 13 '22 07:09 bacinger