Add all local circuit work — year-by-year SVGs and tooling

This commit is contained in:
2026-03-25 22:17:47 +01:00
parent 6ceeba7fb9
commit c94ebcfb22
1149 changed files with 171650 additions and 421 deletions
+23
View File
@@ -0,0 +1,23 @@
from dataclasses import dataclass
from typing import Optional, List, Dict, Any, TYPE_CHECKING
from models.geo_json.geometry import GeoJSONGeometry
from models.geo_json.properties import GeoJSONProperties
if TYPE_CHECKING:
from models.circuit import Circuit
@dataclass
class GeoJSONFeature:
type: str
properties: GeoJSONProperties
bbox: Optional[List[float]]
geometry: GeoJSONGeometry
@classmethod
def from_dict(cls, circuit: 'Circuit', data: Dict[str, Any]) -> 'GeoJSONFeature':
return cls(
type=data['type'],
properties=GeoJSONProperties.from_dict(circuit, data['properties']),
geometry=GeoJSONGeometry.from_dict(data['geometry']),
bbox=data.get('bbox')
)