using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace GC.EarthModels;
/// 地球地理模型的数据文件:全部是经纬度折线,只有轮廓没有填色。
public sealed class GeoData
{
[JsonPropertyName("lines")] public List> Lines { get; set; } = new();
}
public sealed class PlateEntry
{
[JsonPropertyName("id")] public string Id { get; set; } = "";
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
/// 标签锚点 [lon, lat];缺省时用轮廓质心。
[JsonPropertyName("label")] public double[]? Label { get; set; }
[JsonPropertyName("lines")] public List> Lines { get; set; } = new();
}
public sealed class PlateData
{
[JsonPropertyName("plates")] public List Plates { get; set; } = new();
}
/// 大陆(六块大陆里的教材五块写法)。结构与板块一致,纯线稿。
public sealed class ContinentData
{
[JsonPropertyName("continents")] public List Continents { get; set; } = new();
}
public sealed class BorderEntry
{
/// 分界的两个大洲,如「亚洲-非洲」。
[JsonPropertyName("between")] public string Between { get; set; } = "";
/// 分界标志名称,如「苏伊士运河」。
[JsonPropertyName("name")] public string Name { get; set; } = "";
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
[JsonPropertyName("lines")] public List> Lines { get; set; } = new();
/// 复合分界的逐段明细(如亚欧分界的六个地理标志)。
[JsonPropertyName("segments")] public List? Segments { get; set; }
}
public sealed class BorderSegment
{
[JsonPropertyName("name")] public string Name { get; set; } = "";
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
[JsonPropertyName("lines")] public List> Lines { get; set; } = new();
}
public sealed class BorderData
{
[JsonPropertyName("borders")] public List Borders { get; set; } = new();
}
/// 七大洲四大洋的标签位置(经纬度 + 名称)。
public sealed class ZoneLabel
{
[JsonPropertyName("lat")] public double Lat { get; set; }
[JsonPropertyName("lon")] public double Lon { get; set; }
[JsonPropertyName("kind")] public string Kind { get; set; } = "continent";
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
}
public sealed class LabelData
{
[JsonPropertyName("labels")] public List Labels { get; set; } = new();
}
/// 五带:以纬度区间定义的五个温度带。
public sealed class ClimateZone
{
[JsonPropertyName("id")] public string Id { get; set; } = "";
/// 南边界纬度(可为负)。
[JsonPropertyName("latMin")] public double LatMin { get; set; }
/// 北边界纬度。
[JsonPropertyName("latMax")] public double LatMax { get; set; }
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
[JsonPropertyName("descI18n")] public Dictionary? DescI18n { get; set; }
}
/// 地理模型场景清单。
public sealed class GeoScene
{
[JsonPropertyName("schemaVersion")] public int SchemaVersion { get; set; } = 1;
[JsonPropertyName("type")] public string Type { get; set; } = "geography";
[JsonPropertyName("defaultView")] public string DefaultView { get; set; } = "zones";
[JsonPropertyName("views")] public List Views { get; set; } = new();
[JsonPropertyName("nameI18n")] public Dictionary? NameI18n { get; set; }
[JsonPropertyName("descriptionI18n")] public Dictionary? DescriptionI18n { get; set; }
/// 黄赤交角 / 回归线纬度,教学里统一 23.5°。
[JsonPropertyName("tropicDeg")] public double TropicDeg { get; set; } = 23.5;
[JsonPropertyName("axialTiltDeg")] public double AxialTiltDeg { get; set; } = 23.5;
[JsonPropertyName("oceanColor")] public string OceanColor { get; set; } = "#0E2A4A";
[JsonPropertyName("zones")] public List Zones { get; set; } = new();
}