Complete early roadmap foundation and calendar helpers
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"generated_at_utc": "2026-05-16T04:33:53Z",
|
||||
"source_registry": "Data/Tiles/ground_zero_tiles.json",
|
||||
"generation_rule": "Only tiles with real source status and explicit growing-zone data are emitted.",
|
||||
"tiles": [
|
||||
{
|
||||
"tile_id": "gz_us_ca_pacifica_utm10n_e544_n4160",
|
||||
"center_latitude": 37.5925,
|
||||
"center_longitude": -122.4995,
|
||||
"growing_zone_label": "USDA 10a",
|
||||
"climate_profile": "coastal_mediterranean_mild",
|
||||
"growing_season_start_day": 46,
|
||||
"growing_season_end_day": 350,
|
||||
"frost_free_days": 305,
|
||||
"min_average_growing_temp_c": 7.0,
|
||||
"crop_safety_buffer_days": 14,
|
||||
"data_basis": "MVP conservative coastal Pacifica profile; replace with authoritative zone/temperature datasets during regional expansion."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -107,6 +107,12 @@
|
||||
"$ref": "#/$defs/source"
|
||||
}
|
||||
},
|
||||
"solar_metadata": {
|
||||
"$ref": "#/$defs/solar_metadata"
|
||||
},
|
||||
"growing_season_metadata": {
|
||||
"$ref": "#/$defs/growing_season_metadata"
|
||||
},
|
||||
"notes": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -161,6 +167,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"solar_metadata": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"time_zone_id",
|
||||
"standard_utc_offset_hours",
|
||||
"daylight_utc_offset_hours",
|
||||
"solar_model"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"time_zone_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"standard_utc_offset_hours": {
|
||||
"type": "number",
|
||||
"minimum": -12,
|
||||
"maximum": 14
|
||||
},
|
||||
"daylight_utc_offset_hours": {
|
||||
"type": "number",
|
||||
"minimum": -12,
|
||||
"maximum": 14
|
||||
},
|
||||
"solar_model": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"growing_season_metadata": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"growing_zone_label",
|
||||
"climate_profile",
|
||||
"growing_season_start_day",
|
||||
"growing_season_end_day",
|
||||
"frost_free_days",
|
||||
"crop_safety_buffer_days"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"growing_zone_label": {
|
||||
"type": "string"
|
||||
},
|
||||
"climate_profile": {
|
||||
"type": "string"
|
||||
},
|
||||
"growing_season_start_day": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 366
|
||||
},
|
||||
"growing_season_end_day": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 366
|
||||
},
|
||||
"frost_free_days": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 366
|
||||
},
|
||||
"min_average_growing_temp_c": {
|
||||
"type": "number"
|
||||
},
|
||||
"crop_safety_buffer_days": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 90
|
||||
},
|
||||
"data_basis": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"source": {
|
||||
"type": "object",
|
||||
"required": ["source_kind", "source_name", "coverage_status"],
|
||||
|
||||
@@ -40,6 +40,30 @@ ON terrain_tiles (grid_scheme, projection, utm_zone, easting_min_m, northing_min
|
||||
CREATE INDEX IF NOT EXISTS idx_terrain_tiles_status
|
||||
ON terrain_tiles (status);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS terrain_tile_solar_metadata (
|
||||
tile_id TEXT PRIMARY KEY,
|
||||
time_zone_id TEXT NOT NULL,
|
||||
standard_utc_offset_hours REAL NOT NULL CHECK (standard_utc_offset_hours >= -12 AND standard_utc_offset_hours <= 14),
|
||||
daylight_utc_offset_hours REAL NOT NULL CHECK (daylight_utc_offset_hours >= -12 AND daylight_utc_offset_hours <= 14),
|
||||
solar_model TEXT NOT NULL DEFAULT 'NOAA approximate sunrise/sunset',
|
||||
generated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (tile_id) REFERENCES terrain_tiles(tile_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS terrain_tile_growing_season_metadata (
|
||||
tile_id TEXT PRIMARY KEY,
|
||||
growing_zone_label TEXT NOT NULL,
|
||||
climate_profile TEXT NOT NULL DEFAULT 'unknown',
|
||||
growing_season_start_day INTEGER NOT NULL CHECK (growing_season_start_day >= 1 AND growing_season_start_day <= 366),
|
||||
growing_season_end_day INTEGER NOT NULL CHECK (growing_season_end_day >= 1 AND growing_season_end_day <= 366),
|
||||
frost_free_days INTEGER NOT NULL CHECK (frost_free_days >= 0 AND frost_free_days <= 366),
|
||||
min_average_growing_temp_c REAL NOT NULL DEFAULT 7.0,
|
||||
crop_safety_buffer_days INTEGER NOT NULL DEFAULT 14 CHECK (crop_safety_buffer_days >= 0 AND crop_safety_buffer_days <= 90),
|
||||
data_basis TEXT NOT NULL DEFAULT '',
|
||||
generated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (tile_id) REFERENCES terrain_tiles(tile_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS terrain_tile_neighbors (
|
||||
tile_id TEXT NOT NULL,
|
||||
direction TEXT NOT NULL CHECK (direction IN ('n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw')),
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"generated_at_utc": "2026-05-16T04:14:42Z",
|
||||
"source_registry": "Data/Tiles/ground_zero_tiles.json",
|
||||
"generation_rule": "Only tiles with real source status and explicit timezone data are emitted.",
|
||||
"tiles": [
|
||||
{
|
||||
"tile_id": "gz_us_ca_pacifica_utm10n_e544_n4160",
|
||||
"center_latitude": 37.5925,
|
||||
"center_longitude": -122.4995,
|
||||
"time_zone_id": "America/Los_Angeles",
|
||||
"standard_utc_offset_hours": -8.0,
|
||||
"daylight_utc_offset_hours": -7.0,
|
||||
"solar_model": "NOAA approximate sunrise/sunset",
|
||||
"sample_solar_hours": {
|
||||
"march_equinox": {
|
||||
"sunrise_hour": 7.231,
|
||||
"sunset_hour": 19.364,
|
||||
"solar_noon_hour": 13.298,
|
||||
"day_length_hours": 12.133
|
||||
},
|
||||
"june_solstice": {
|
||||
"sunrise_hour": 5.807,
|
||||
"sunset_hour": 20.571,
|
||||
"solar_noon_hour": 13.189,
|
||||
"day_length_hours": 14.764
|
||||
},
|
||||
"september_equinox": {
|
||||
"sunrise_hour": 6.956,
|
||||
"sunset_hour": 19.122,
|
||||
"solar_noon_hour": 13.039,
|
||||
"day_length_hours": 12.166
|
||||
},
|
||||
"december_solstice": {
|
||||
"sunrise_hour": 8.348,
|
||||
"sunset_hour": 17.912,
|
||||
"solar_noon_hour": 13.13,
|
||||
"day_length_hours": 9.564
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user