chore: 全量快照提交以防磁盘风险
This commit is contained in:
@@ -52,6 +52,35 @@ LIGHT_COLOR_REMARK_MAP = {
|
||||
"A": "amber",
|
||||
}
|
||||
|
||||
NAVIGATION_MARK_DISPLAY_ICON_MAP = {
|
||||
"30300000": "symbol-daytime-303",
|
||||
"30300002": "symbol-daytime-303",
|
||||
"30300004": "symbol-daytime-303",
|
||||
"30500001": "symbol-daytime-30500001",
|
||||
"30500002": "symbol-daytime-30500002",
|
||||
"30500003": "symbol-daytime-30500003",
|
||||
"30500004": "symbol-daytime-30500003",
|
||||
"30500010": "symbol-daytime-30500003",
|
||||
"30600000": "symbol-daytime-303",
|
||||
"30600001": "symbol-daytime-303",
|
||||
"30600002": "symbol-daytime-303",
|
||||
"30600003": "symbol-daytime-303",
|
||||
"30600004": "symbol-daytime-303",
|
||||
"30600006": "symbol-daytime-303",
|
||||
"30700000": "symbol-daytime-30700003",
|
||||
"30700001": "symbol-daytime-30700001",
|
||||
"30700002": "symbol-daytime-30700002",
|
||||
"30700003": "symbol-daytime-30700003",
|
||||
"30700004": "symbol-daytime-30700003",
|
||||
"30700007": "symbol-daytime-30700003",
|
||||
"30800000": "symbol-daytime-308",
|
||||
"30900000": "symbol-daytime-30500003",
|
||||
"30900002": "symbol-daytime-30500002",
|
||||
"30900004": "symbol-daytime-30500003",
|
||||
"30900009": "symbol-daytime-30500003",
|
||||
"30900011": "symbol-daytime-30500003",
|
||||
}
|
||||
|
||||
FINAL_RELEASE_PROPERTY_ALLOWLIST = frozenset(
|
||||
{
|
||||
"canonical_object_type",
|
||||
@@ -75,16 +104,119 @@ FINAL_RELEASE_PROPERTY_ALLOWLIST = frozenset(
|
||||
"light_sector_mode",
|
||||
"name_ja",
|
||||
"place_name_en",
|
||||
"shape_class_code",
|
||||
}
|
||||
)
|
||||
|
||||
RELEASE_CANONICAL_OBJECT_TYPE_MAP = {
|
||||
"港湾灯台": "harbor_lighthouse",
|
||||
"防波堤灯台": "breakwater_lighthouse",
|
||||
"沿岸灯台 (15M over)": "coastal_lighthouse_over_15m",
|
||||
"灯 (Lt)": "minor_light",
|
||||
"灯標": "light_beacon",
|
||||
"浮標 (やぐら型)": "lattice_buoy",
|
||||
"円柱型浮標": "pillar_buoy",
|
||||
"円筒型浮標": "can_buoy",
|
||||
"船体露出沈船": "wreck_hull_exposed",
|
||||
"危険全沈没船": "dangerous_fully_submerged_wreck",
|
||||
"測定済みの沈船": "surveyed_wreck",
|
||||
"魚礁": "fish_reef",
|
||||
"錨泊地": "anchorage",
|
||||
"海上地名": "sea_place_name",
|
||||
"陆上地名": "land_place_name",
|
||||
"底質": "seabed_material",
|
||||
"等深线": "depth_contour",
|
||||
"未分类对象": "unclassified_object",
|
||||
"P基本線ククリ": "baseline_outline",
|
||||
"P穴": "seabed_hole",
|
||||
"p地名": "sea_place_name",
|
||||
"p地名陸": "land_place_name",
|
||||
"潜提": "submerged_reef",
|
||||
"税関": "customs_office",
|
||||
"河川域": "river_area",
|
||||
"湖沼域": "lake_area",
|
||||
"陸上水域": "inland_water_area",
|
||||
"干潮帯": "tidal_flat",
|
||||
"未測海域": "unsurveyed_area",
|
||||
"浅所危険界": "shoal_danger_area",
|
||||
"防波堤": "breakwater",
|
||||
"浮施設・桟橋": "floating_facility_pier",
|
||||
"撤去跡": "removed_structure_remains",
|
||||
"煙突": "chimney",
|
||||
"塔、やぐら、風車": "tower_yagura_windmill",
|
||||
"海事関係署": "maritime_office",
|
||||
"漁業協同組合": "fishing_cooperative",
|
||||
"山頂": "mountain_top",
|
||||
"その他 (記念碑等)": "other_landmark_monument",
|
||||
"9000m以深": "over_9000m",
|
||||
"等深線": "depth_contour_line",
|
||||
"L海底地形": "bathymetry_line",
|
||||
"P陸域": "land_area",
|
||||
"道路": "road",
|
||||
"P危険界ククリ": "hazard_boundary_outline",
|
||||
"区画漁業": "demarcated_fishery",
|
||||
"橋 (水門)": "bridge_water_gate",
|
||||
"一本線で表わす桟橋": "pier_single_line",
|
||||
"暗岩": "sunken_rock",
|
||||
"概略等深線": "overview_depth_contour",
|
||||
"険悪物": "dangerous_object",
|
||||
"ビル": "building",
|
||||
"漁港": "fishing_port",
|
||||
"海底線 (電信電話)": "subsea_cable_telecom",
|
||||
"一本線で表わす海上バース": "offshore_berth_single_line",
|
||||
"P投錨注意障害物ククリ": "anchor_caution_hazard_outline",
|
||||
"p投錨注意障害物": "anchor_caution_hazard_point",
|
||||
"タンク": "tank",
|
||||
"立標": "beacon",
|
||||
"洗岩": "awash_rock",
|
||||
"海底線 (電力)": "subsea_power_cable",
|
||||
"灯浮標 (やぐら型)": "light_buoy_lattice",
|
||||
"橋梁灯": "bridge_light",
|
||||
"円錐型浮標": "conical_buoy",
|
||||
"ポンツーン、パイル、杭": "pontoon_pile_posts",
|
||||
"一本線で表わす潜提": "submerged_reef_single_line",
|
||||
"一本線で表わす撤去跡": "removed_structure_single_line",
|
||||
"海底輸送管 (水)": "subsea_water_pipeline",
|
||||
"架空線、送電線": "overhead_transmission_line",
|
||||
"海草": "seagrass",
|
||||
"シーバース灯": "sea_berth_light",
|
||||
"平水境界": "shoreline_boundary",
|
||||
"港則法による境界": "port_regulation_boundary",
|
||||
"p高さ制限": "clearance_limit_point",
|
||||
"ドルフィン": "mooring_dolphin",
|
||||
"P施設・境界線等ククリ": "facility_boundary_outline",
|
||||
"全沈没船 (危険なし)": "fully_submerged_wreck_non_dangerous",
|
||||
"マリーナ": "marina",
|
||||
"ケーソン仮置き場": "caisson_storage_yard",
|
||||
"サンドウェーブ": "sand_wave",
|
||||
"一般港湾 (港則法区域、重要港湾)": "general_port_regulated_major",
|
||||
"海底設置物、放水口、取水口": "seabed_installation_outfall_intake",
|
||||
"定置漁業": "fixed_fishery",
|
||||
"孤立危険物": "isolated_danger",
|
||||
"P錨泊地等ククリ": "anchorage_outline",
|
||||
"p錨泊地等": "anchorage_point",
|
||||
"障害物": "obstruction",
|
||||
"導灯": "leading_light",
|
||||
"指向灯/照射灯": "directional_light",
|
||||
"検疫錨地": "quarantine_anchorage",
|
||||
"P754ククリ": "special_outline_754",
|
||||
"養殖場": "aquaculture_area",
|
||||
"海の駅": "sea_station",
|
||||
"塔、やぐら、測台": "tower_yagura_survey_platform",
|
||||
"P航行危険障害物ククリ": "navigation_hazard_outline",
|
||||
"土砂捨て場": "spoil_ground",
|
||||
"錨泊禁止区域": "anchorage_prohibited_area",
|
||||
"漁網": "fishing_net",
|
||||
}
|
||||
|
||||
|
||||
def normalize_release_canonical_object_type(source_layer: str, canonical_object_type: str) -> str:
|
||||
object_type = text_or_none(canonical_object_type) or ""
|
||||
if source_layer == "p高さ制限":
|
||||
return "clearance_limit_point"
|
||||
if source_layer == "L高さ制限":
|
||||
return "clearance_limit_line"
|
||||
return canonical_object_type
|
||||
return RELEASE_CANONICAL_OBJECT_TYPE_MAP.get(object_type, object_type)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -534,11 +666,12 @@ class NavSeaTileBuilder:
|
||||
properties["source_layer_rule_id"] = source_layer_rule_id
|
||||
properties["feature_id"] = row["feature_id"]
|
||||
|
||||
canonical_object_type = normalize_release_canonical_object_type(
|
||||
raw_canonical_object_type = text_or_none(row["canonical_object_type"]) or ""
|
||||
release_canonical_object_type = normalize_release_canonical_object_type(
|
||||
source_layer_jp,
|
||||
text_or_none(row["canonical_object_type"]) or "",
|
||||
raw_canonical_object_type,
|
||||
)
|
||||
properties["canonical_object_type"] = canonical_object_type
|
||||
properties["canonical_object_type"] = raw_canonical_object_type
|
||||
properties["canonical_family"] = row["canonical_family"]
|
||||
properties["semantic_key"] = row["semantic_key"]
|
||||
properties["detection_key"] = row["detection_key"]
|
||||
@@ -547,19 +680,20 @@ class NavSeaTileBuilder:
|
||||
properties=properties,
|
||||
source_layer=source_layer_jp,
|
||||
output_layer=output_layer,
|
||||
canonical_object_type=canonical_object_type,
|
||||
canonical_object_type=raw_canonical_object_type,
|
||||
canonical_family=text_or_none(row["canonical_family"]) or "",
|
||||
geom_type=str(source_feature.get("geometry", {}).get("type", "")),
|
||||
feature_id=int(row["feature_id"]),
|
||||
tile=job,
|
||||
)
|
||||
properties.update(chart_properties)
|
||||
properties["canonical_object_type"] = release_canonical_object_type
|
||||
if self.engineering_mode:
|
||||
properties["trace_status"] = trace_status
|
||||
properties, field_name_unresolved = self.standardize_output_properties(
|
||||
properties=properties,
|
||||
source_layer=source_layer_jp,
|
||||
canonical_object_type=canonical_object_type,
|
||||
canonical_object_type=release_canonical_object_type,
|
||||
canonical_family=text_or_none(row["canonical_family"]) or "",
|
||||
geom_type=str(source_feature.get("geometry", {}).get("type", "")),
|
||||
feature_id=int(row["feature_id"]),
|
||||
@@ -786,6 +920,7 @@ class NavSeaTileBuilder:
|
||||
chart_symbol_code=text_or_none(chart.get("chart_symbol_code")) or "",
|
||||
light_color_code=text_or_none(chart.get("light_color_code")) or "",
|
||||
hazard_class=text_or_none(chart.get("hazard_class")) or "",
|
||||
display_code=text_or_none(properties.get("表示用番号")) or text_or_none(properties.get("display_code")) or "",
|
||||
)
|
||||
if chart_icon_image:
|
||||
chart.setdefault("chart_icon_image", chart_icon_image)
|
||||
@@ -895,7 +1030,7 @@ class NavSeaTileBuilder:
|
||||
|
||||
if not self.strip_legacy_japanese_delivery:
|
||||
normalized[key] = value
|
||||
if self.release_minimal and rule.field_name_std in {"class_code", "display_code"}:
|
||||
if self.release_minimal and rule.field_name_std in {"class_code", "display_code", "shape_class_code"}:
|
||||
normalized[rule.field_name_std] = value
|
||||
if rule.keep_in_delivery:
|
||||
normalized[rule.field_name_std] = value
|
||||
@@ -1112,6 +1247,8 @@ class NavSeaTileBuilder:
|
||||
return "navigation_light", "lighthouse"
|
||||
if "導灯" in object_type:
|
||||
return "navigation_light", "leading_light"
|
||||
if object_type == "灯 (Lt)":
|
||||
return "navigation_light", "minor_light"
|
||||
if "灯" in object_type or "灯標" in object_type or "灯柱" in object_type:
|
||||
return "navigation_light", "light_beacon"
|
||||
if "浮標" in object_type:
|
||||
@@ -1375,8 +1512,13 @@ class NavSeaTileBuilder:
|
||||
chart_symbol_code: str,
|
||||
light_color_code: str,
|
||||
hazard_class: str,
|
||||
display_code: str,
|
||||
) -> str | None:
|
||||
if source_layer == "p航路標識群":
|
||||
if display_code:
|
||||
mapped = NAVIGATION_MARK_DISPLAY_ICON_MAP.get(display_code)
|
||||
if mapped:
|
||||
return mapped
|
||||
if chart_symbol_code == "leading_light":
|
||||
return "symbol-daytime-300"
|
||||
if chart_symbol_code == "lighthouse":
|
||||
|
||||
Reference in New Issue
Block a user