chore(task): archive 09-08-junction-reference-fidelity
No files matched your search
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="800" viewBox="-80 -53.33 160 106.66"><rect x="-80" y="-53.33" width="160" height="106.66" fill="#d6e1dd"/><path d="M-444.13261,253.71346 L-294.41416,171.29057 L-289.71224,179.83185 L-439.43069,262.25474 L-444.13261,253.71346 Z" fill="#3c494f"/><path d="M-275.28606,115.74802 L-294.00937,80.50900 L-423.15657,-156.17219 L-414.59793,-160.84238 L-285.44404,75.85108 L-266.67608,111.17317 L-275.28606,115.74802 Z" fill="#3c494f"/><path d="M86.00729,-441.32835 L187.50351,-271.88603 L249.88937,-164.75927 L244.27213,-161.48831 L181.91123,-268.57257 L80.43084,-437.98833 L86.00729,-441.32835 Z" fill="#3c494f"/><path d="M-430.42112,-151.61759 L-305.35874,84.49392 L-284.43729,120.85575 L-292.88869,125.71768 L-313.95308,89.09848 L-439.03726,-147.05397 L-430.42112,-151.61759 Z" fill="#3c494f"/><path d="M-33.51874,567.55812 L-45.11454,538.22380 L-208.80803,237.21309 L-232.74749,195.09260 L-239.75252,182.76473 L-231.27604,177.94766 L-224.27132,190.27497 L-200.25403,232.53505 L-36.50213,533.65422 L-24.45538,563.96515 L-33.51874,567.55812 Z" fill="#3c494f"/><path d="M-296.30848,167.36131 L-347.37638,196.04969 L-444.70445,252.94213 L-449.62465,244.52469 L-352.24716,187.60355 L-301.08373,158.86079 L-296.30848,167.36131 Z" fill="#3c494f"/><path d="M-246.92118,186.70231 L-218.34731,242.58539 L-53.35910,531.69448 L-25.37229,562.49077 L-32.60183,569.03251 L-61.70639,536.73262 L-226.85022,247.35619 L-255.60177,191.14161 L-246.92118,186.70231 Z" fill="#3c494f"/><path d="M-225.43269,139.65914 L-162.13782,107.37793 L-154.18814,103.32705 L-17.42759,27.15641 L194.09486,-88.68068 L266.09559,-127.79177 L270.74942,-119.22417 L198.77052,-80.12497 L-12.72049,35.69486 L-149.46118,111.85451 L-157.70818,116.06357 L-221.00303,148.34477 L-225.43269,139.65914 Z" fill="#3c494f"/><path d="M297.14850,-144.65865 L344.31484,-170.27760 L420.62096,-212.94124 L552.47866,-280.85081 L590.69581,-301.79926 L595.38224,-293.24938 L556.99375,-272.20922 L425.19487,-204.33064 L349.03345,-161.74544 L301.80228,-136.09096 L297.14850,-144.65865 Z" fill="#3c494f"/><path d="M554.98888,-294.12175 L550.49035,-291.75987 L339.91566,-176.05522 L262.94627,-135.47224 L258.39868,-144.09680 L335.25935,-184.62158 L545.79827,-300.30668 L550.45489,-302.75347 L554.98888,-294.12175 Z" fill="#3c494f"/><path d="M232.16893,-118.09515 L192.48376,-95.69234 L-165.25138,97.70192 L-254.40802,144.68728 L-258.95373,136.06176 L-169.87016,89.11531 L187.83112,-104.26065 L227.37569,-126.58560 L232.16893,-118.09515 Z" fill="#3c494f"/><path d="M-266.67608,111.17317 L-254.21749,134.62109 L-262.82745,139.19594 L-275.28605,115.74802 L-266.67608,111.17317 Z" fill="#3c494f"/><path d="M-228.83308,131.20937 L-251.47267,143.14033 L-256.01819,134.51477 L-233.37860,122.58381 L-228.83308,131.20937 Z" fill="#3c494f"/><path d="M-239.75382,182.76272 L-252.57725,160.19531 L-244.10036,155.37838 L-231.27696,177.94578 L-239.75382,182.76272 Z" fill="#3c494f"/><path d="M-221.00303,148.34477 L-245.45691,158.30238 L-248.59187,149.07014 L-225.43269,139.65914 L-221.00303,148.34477 Z" fill="#3c494f"/><path d="M-284.43809,120.85454 L-271.15450,143.94449 L-279.60560,148.80653 L-292.88922,125.71658 L-284.43809,120.85454 Z" fill="#3c494f"/><path d="M-301.08373,158.86079 L-278.59331,146.22620 L-273.81805,154.72672 L-296.30848,167.36131 L-301.08373,158.86079 Z" fill="#3c494f"/><path d="M-255.60177,191.14160 L-267.36388,168.14125 L-258.68328,163.70196 L-246.92118,186.70231 L-255.60177,191.14160 Z" fill="#3c494f"/><path d="M-294.41316,171.29001 L-272.26818,159.09877 L-267.56619,167.64003 L-289.71118,179.83127 L-294.41316,171.29001 Z" fill="#3c494f"/><path d="M-230.51095,153.22709 L-232.44909,153.97968 L-234.12480,154.83206 L-235.53810,155.78422 L-236.68898,156.83616 L-237.57744,157.98788 L-238.20348,159.23938 L-238.56710,160.59067 L-238.66830,162.04174 L-238.50709,163.59260 L-238.08345,165.24323 L-237.39739,166.99365 L-236.44892,168.84385 L-261.52885,151.29780 L-230.51095,153.22709 Z" fill="#3c494f"/><path d="M-262.07426,178.48492 L-263.03211,176.79716 L-264.06099,175.34112 L-265.16089,174.11679 L-266.33182,173.12418 L-267.57376,172.36328 L-268.88672,171.83409 L-270.27071,171.53662 L-271.72572,171.47086 L-273.25175,171.63682 L-274.84880,172.03449 L-276.51688,172.66387 L-278.25597,173.52497 L-261.52885,151.29780 L-262.07426,178.48492 Z" fill="#3c494f"/><path d="M-290.91821,153.15004 L-289.29250,152.14139 L-287.89467,151.07006 L-286.72474,149.93603 L-285.78269,148.73930 L-285.06854,147.47989 L-284.58228,146.15779 L-284.32391,144.77299 L-284.29343,143.32550 L-284.49085,141.81533 L-284.91615,140.24246 L-285.56935,138.60689 L-286.45044,136.90864 L-261.52885,151.29780 L-290.91821,153.15004 Z" fill="#3c494f"/><path d="M-259.75423,124.20058 L-258.87310,125.69811 L-257.92926,126.99199 L-256.92272,128.08223 L-255.85349,128.96884 L-254.72154,129.65179 L-253.52690,130.13111 L-252.26956,130.40679 L-250.94951,130.47882 L-249.56676,130.34721 L-248.12131,130.01196 L-246.61316,129.47307 L-2Line truncated
|
||||
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 192 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="-52.78889359712193 -40.86147050800531 71.14669386644465 70.76835623217826"><rect x="-52.78889359712193" y="-40.86147050800531" width="71.14669386644465" height="70.76835623217826" fill="#454950"/><path d="M-200.13011320235026,96.97316481090922L-50.40949800958033,14.550274196968616L-45.7075152497884,23.09155309989208L-195.42813044255834,105.51444371383269L-200.13011320235026,96.97316481090922Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-793.7916770658974,-387.7839318791216L-845.1650567582058,-487.13703187901854L-839.3910080114139,-490.1224555961643L-788.0176283191055,-390.76935559626736L-793.7916770658974,-387.7839318791216Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-2212.489088585786,-179.16371676032455L-2140.8373837257627,-212.76908247573147L-2055.3546438878975,-257.7298604933583L-1946.504942587327,-317.49844706818476L-1920.2967912232373,-331.66965274156485L-1909.267437792862,-337.1847523911823L-1906.360681520644,-331.370885985413L-1917.2587011279645,-325.9233227337445L-1943.3834621352125,-311.79698440706477L-2052.2709166003433,-252.00789098238346L-2137.93042558401,-206.9553169993128L-2209.728856397725,-173.27887471468827L-2212.489088585786,-179.16371676032455Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-1901.3832252060452,-341.1116816775457L-1893.2847693869107,-346.1210816775538L-1889.8652200042864,-340.5932057979503L-1897.9636758234208,-335.5838057979422L-1901.3832252060452,-341.1116816775457Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-1885.5446540386663,-350.90762542444725L-1871.3336073778248,-359.69567637035624L-1867.9004329088675,-361.592089505735L-1865.3636714937468,-362.96850950667204L-1661.6452375512724,-473.3089209311598L-1559.2054575963696,-528.7900258071686L-1488.0931582262856,-565.8036376884446L-1468.1927540956744,-576.4637935848872L-1465.1233484809766,-570.7341030074538L-1485.0769145942518,-560.045785786982L-1556.1481677590236,-523.0538616679592L-1658.5494243487235,-467.59345454390456L-1862.2677570264448,-357.2530979688686L-1864.7781375089362,-355.89104596944264L-1867.9657385322353,-354.13616310486475L-1882.125719951502,-345.3793670833436L-1885.5446540386663,-350.90762542444725Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-1452.1469867840974,-585.0594846582919L-1432.104456652289,-595.7962435514792L-1218.1918007211652,-715.7288498478376L-1079.6540729108235,-790.43451194658L-1040.3070028720547,-810.8356521885094L-1036.7982547964043,-812.6787966482818L-1034.9293077213947,-813.3780107231175L-1032.694005761087,-807.2744083702975L-1034.0080950149177,-806.8080348272504L-1037.312028967057,-805.0666752870558L-1076.5890667358456,-784.7024315287647L-1215.0492330132888,-710.0389176276485L-1428.9346271731526,-590.1214519235243L-1449.0771977421884,-579.3299639841225L-1452.1469867840974,-585.0594846582919Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-845.1547466225953,-487.1172091076758L-991.4358727260025,-765.306591104199L-1010.3303829813176,-801.425404366697L-1014.8573823615368,-809.2944049210076L-1009.2222786408443,-812.5345388472233L-1004.5927835431219,-804.4803871083212L-985.6817062029568,-768.3302563710397L-839.4013181470243,-490.14227836750706L-845.1547466225953,-487.1172091076758Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-1019.3748880334443,-817.1506845179565L-1021.636937053879,-820.9759595915772L-1022.7230343166299,-822.7935558234957L-1024.4987487264195,-825.8113064161093L-1028.258392942898,-832.1536348496203L-1022.6664397364649,-835.4679646260355L-1018.9033477431357,-829.1198130591567L-1017.1287912346535,-826.1040196516587L-1016.0463446409709,-824.2925838838808L-1013.7793994102785,-820.4590429573801L-1019.3748880334443,-817.1506845179565Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-476.8493517975444,185.05069806548647L-592.2916845241798,-18.86100573671456L-601.6200539462159,-33.298132793636626L-793.7597756470255,-387.7240606086096L-788.0455703603151,-390.8219232925737L-595.9156037179849,-36.41392268205806L-586.6482297994067,-22.085961738993376L-471.1930466514354,181.84833493475026L-476.8493517975444,185.05069806548647Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-2200.3163351069234,-874.7506753824654L-2195.2308119016593,-867.4814793825467L-2197.8941022197573,-865.6185440926313L-2202.9796254250214,-872.88774009255L-2200.3163351069234,-874.7506753824654Z" fill="#62666c" stroke="none" stroke-width="0"/><path d="M-2190.6066283641294,-859.4800486845243L-2171.2290628963233,-825.8985000095679L-1988.6461687232077,-504.8129046352983L-1927.0761413734326,-393.358987669808L-1912.2793798232574,-366.9302321034586L-1910.2267214089243,-362.8642615497772L-1913.128617930232,-361.4004206149873L-1915.1242567726058,-365.35846337230555L-1929.9194830758202,-391.7844438058693L-1991.4766892366433,-503.21543084034914L-2174.0535517972303,-824.2903874656485L-2193.421878582618,-857.8558191919022L-2190.6066283641294,-8Line truncated
|
||||
|
After Width: | Height: | Size: 236 KiB |
@@ -0,0 +1,3 @@
|
||||
{"file": ".trellis/spec/backend/direct-edit-api.md", "reason": "纯求解、几何可行域、稳定身份与预览保存合约"}
|
||||
{"file": ".trellis/spec/frontend/direct-edit-client.md", "reason": "共享编辑会话、预览隔离与输入约定"}
|
||||
{"file": ".trellis/tasks/09-08-junction-reference-fidelity/research/current-state.md", "reason": "现有表达限制和跨层风险"}
|
||||
@@ -0,0 +1,66 @@
|
||||
# 技术设计:共享结构驱动的复杂路口构建
|
||||
|
||||
## 核心选择
|
||||
|
||||
采用“来源拓扑 → 有效结构与接入断面 → 共享边界 → 道路区域 → 设施与连接”的分层管线。不增加按 T/十字等标签分派的独立绘图模板,也不首期引入不可解释的全局非线性自动优化器。
|
||||
|
||||
自动推断提供初稿,显式结构校正与几何校正处理源数据不足。支持范围有限且可检测;无法求解时输出对象级原因,不制造假连通。
|
||||
|
||||
## 模型与边界
|
||||
|
||||
新增内部纯数据 JunctionBuildPlan(内部版本独立于展示结构):
|
||||
|
||||
- SourceTopology:有向车行道及来源 ID、外部接入/内部连接、道路臂归组、已知分隔关系、允许通行关系和推断来源。臂不是一个实心总宽矩形。
|
||||
- EntrySection:所属 carriageway、接入中心/方向、左右边界端点、远端固定截面、可用过渡范围。边界按朝路口外侧的局部坐标定义,与 forward/backward 显式换算。
|
||||
- BoundaryGraph:接入边、路缘曲线、共享接缝、闭合环、已知排除区域;每条共享边只有一个几何所有者,由相邻面引用。内部允许凹形区域、孔洞及多个通行区域,不能用“全部端点凸包”抹去分隔关系。
|
||||
- Dependency:参数到接入断面、边界、面、设施的依赖。修改局部只重新求值必要对象;不承诺相邻角部完全不变,但必须保持约束外的固定锚点和不相关路口不变。
|
||||
|
||||
junction-structure/v1 保持前端投影,按需扩展展示字段;不在客户端生成第二份几何模型。稳定键由来源和显式关系决定,不随坐标调整或角度排序变化。归组改变属于拓扑编辑,改变 fingerprint 并触发受影响约束重检。
|
||||
|
||||
## 构建步骤
|
||||
|
||||
1. 服务层预加载参考配置,纯拓扑解析统一 compiler 与 resolver 当前重复逻辑。先区分进出车行道、分隔关系与内部通路,再形成道路臂;方向相近只作候选依据。
|
||||
2. 按各车行道真实中心线和可用长度定义固定远端与可编辑接入断面。不能将“沿线距离”与“到平均中心的半径”混用。允许偏移/方向/左右展宽通过过渡接回固定远端。
|
||||
3. 邻接边界先求交和安全连接,局部选择直线/受约束曲线。圆角切点限制来自两侧可用边界;不可行则拒绝该编辑或给出明确降级,不用孤立补面遮盖。
|
||||
4. 从闭合边界图构造铺装区域,保留已知不可通行区域;验证连通、相交与孔洞。几何布尔运算只是实现工具,不能决定哪个区域“应当是岛”。共享语义键不依赖布尔运算输出顺序。
|
||||
5. 所有道路面、路缘/步行带、边线和车道标线使用同一有效接入与裁切计划。设施定位消费最终可行区域;交通连接是有向运动关系,与平面面邻接分开。允许机动车路径相交,不将其误判成边界自交。
|
||||
6. 编译几何验证与 solver 诊断合并,经同一 compileEditCandidate 供预览与保存使用。
|
||||
|
||||
## 编辑协议
|
||||
|
||||
复用 native-road-edits/v2 约束与操作历史。新增语义约束建议为 carriageway 接入位姿、左右横向边界与过渡长度;schema 的名称及单位在阶段 1 契约落地时固定。位姿以源断面为基准的局部米制偏移/角度定义,避免绝对坐标缺乏来源;分量标量输入也必须落到完整同一约束。归组覆盖使用稳定源 carriageway 集合,禁止保存界面序号。
|
||||
|
||||
优先级:显式局部覆盖 > 已保存路口默认 > 自动基线;批量操作先确定目标集合,再合成约束,不能把后一次草稿的基线覆盖前一次修改。重置沿现有禁用约束语义,保存版本冲突遵循 409 合约。
|
||||
|
||||
## 数据不足和设施范围
|
||||
|
||||
仅根据夹角不能证明存在导流岛或独立右转道路。已知设施使用显式来源/区域;推断对象标明推断原因,缺少通行区域或步行端点证据时不输出伪造有效设施。未知与不存在分开表达。本期不提供岛体自由编辑器,但 BoundaryGraph 可表达其排除区域与相邻通道,避免下一期推翻基础模型。
|
||||
|
||||
## 设施语义契约
|
||||
|
||||
复杂路口中的行人安全岛不是独立的固定角部多边形。它是三组过街连接之间的不可通行区域:两条相邻道路臂斑马线和一条长边侧斑马线共同限定其边界。`CrosswalkConnection` 必须连接两个有效步行边界;其内侧端点吸附到 `PedestrianIsland` 或路缘边界,不能悬空或穿过岛体。
|
||||
|
||||
- `PedestrianIsland`:独立的不可通行区域,有连续路缘边界,可作为分阶段过街等待空间。
|
||||
- `CrosswalkConnection`:连接人行道、路缘或安全岛的过街区域;斑马线不是道路装饰层。
|
||||
- `CurbBoundary`:机动车通行区与步行区域的共享边界,安全岛和斑马线都消费同一边界。
|
||||
- `CurbExtension` 与 `PedestrianIsland` 分开建模;前者是人行道向车行道的扩展,后者位于机动车流之间。
|
||||
- 复杂路口设施的求解顺序为:机动车区域 → 步行边界 → 三组过街连接 → 安全岛可行区域 → 端点吸附和冲突验证。
|
||||
|
||||
## 兼容、性能与风险
|
||||
|
||||
- 新管线先在显式 geometry version 下验证;旧复杂文档不能直接换默认值或静默裁剪。缺省构建应确定性;迁移报告逐约束列出可重放、需重检、失效及原因。普通路口输出回归保持不变。
|
||||
- 半径和收口既有语义不等同于新接入位姿,不能凭名称强行映射;保留兼容适配,冲突显式处理。
|
||||
- 不为性能让浏览器复制几何算法。记录相同输入的冷/热预览耗时与 payload;300 ms 是既有预算提示,不是无需实测的完成承诺。pending 从排队到最新结果完成持续有效。
|
||||
- 局部米制计算与 GeoJSON 经纬度输出分离;方向绕回、曲线进口、短路段、多区域、来源不完整均为失败风险。
|
||||
- 回滚按管线/能力关闭;保留新文档的可读性和不支持诊断,禁止旧管线忽略新约束却显示成功。
|
||||
|
||||
|
||||
## 2026-09-11 完整短边接触求解(待实现)
|
||||
|
||||
执行契约见 `.trellis/spec/backend/junction-island-contact.md`。最新用户要求覆盖旧的独立岛体加端点吸附方案。
|
||||
|
||||
求解应先从整组过街矩形取得两条道路臂侧完整短边,并在局部米制坐标中求其支撑线;直角骨架来自这些短边而非道路边缘。以短边端点与可用区域约束求动态腿长和第三条接触短边的位置。三个接触段确定后,外轮廓的非接触部分才生成圆角/内弧;绿色六边形只使用六个接触端点,并按外边界顺序闭合。外轮廓与绿色区域共用接触段,不各自取近似坐标。
|
||||
|
||||
完整直线短边不可能整段贴在严格弯曲的曲线上:长边侧应提供与短边等长的直线接入段,内弧在该段两侧延续。圆角不得切入三个接触段。不能通过加描边或扩大渲染宽度掩盖几何缝隙。
|
||||
|
||||
实现边界:设施组成模块负责局部求解与验证,复杂路口生成器消费同一结果发布外轮廓、绿色区域与过街;如移动可编辑过街位置,resolver 手柄同步消费同一几何定位。不得为当前 OSM 节点 ID 单独适配。无可行解时给出对象级原因,不发布假装接通的部分组合;不得悄悄缩短斑马线短边来通过验证。
|
||||
@@ -0,0 +1,3 @@
|
||||
{"file": ".trellis/spec/backend/direct-edit-api.md", "reason": "纯求解、几何可行域、稳定身份与预览保存合约"}
|
||||
{"file": ".trellis/spec/frontend/direct-edit-client.md", "reason": "共享编辑会话、预览隔离与输入约定"}
|
||||
{"file": ".trellis/tasks/09-08-junction-reference-fidelity/research/current-state.md", "reason": "现有表达限制和跨层风险"}
|
||||
@@ -0,0 +1,217 @@
|
||||
# 实施计划与阶段出口
|
||||
|
||||
## 2026-09-16 生成器结构重构
|
||||
|
||||
用户确认梳理 `buildComplexJunctionGeometry`,已将千行入口缩为约 159 行阶段编排,按进口、过街、角部、位移、铺装和发布拆出私有函数。45 次完整新旧返回值深比较一致;几何/编辑/API/导入回归、191 项客户端单测、类型检查和 12 项 E2E 通过。`npm test` 最后仍有重构前已复现的 fixture 快照差异;全仓格式检查仍有未修改文件的既有问题,本次源文件格式通过。独立复核未发现行为变化。详细边界、可重跑差分脚本及证据见 `research/geometry-refactor.md`。未提交,父任务其余验收保持原状态。
|
||||
|
||||
后续评估已先迁出无状态局部几何工具至 `complex-junction-geometry.js`;`complex-junction.js` 从 1685 行降至 1472 行。设施阶段应以整体迁移的方式进入单独模块,避免将共享 arm frame 和角部失败依赖拆散。完整评估与本轮针对性验证见同一 research 文档。
|
||||
|
||||
该模块拆分已完成:`complex-junction-surfaces.js` 承担核心/进口/铺装,`complex-junction-facilities.js` 承担进口停止线、过街、角部和位移;入口文件现为 367 行。保持公开导出与构建顺序,差分和针对性回归通过;仍需按任务既有质量门在提交前重跑全量检查。
|
||||
|
||||
当前为 in_progress;任务已收敛为分阶段推进。第一个新阶段是“复杂路口区域模型”:先统一中心通行区、角部可行域和安全岛边界,再恢复设施与视觉验收。实验性固定安全岛修改已保存至 `/private/tmp/junction-island-experiment.patch`,不作为正式方案。
|
||||
|
||||
## 0. 契约与最小反例
|
||||
|
||||
- [x] 审计 compiler/resolver 的归组、方向、沿线距离/半径、共享边与各图层裁切;核实 research/current-state.md 风险。
|
||||
- [x] 写出 JunctionBuildPlan 字段、单位、引用完整性、歧义策略和兼容矩阵;确认现有 polygon 工具能力,必要时小型验证,不先扩展 UI。
|
||||
- [x] 构造无需图片的反例:分隔双向进口、T 形闭合侧、偏置且不等宽交叉、曲线短进口;在旧实现上记录问题。
|
||||
- [x] 出口:每个反例都有结构预期与几何不变量;任何样本 ID 专用分支均不接受。
|
||||
|
||||
## 1. 共享纯拓扑与接入计划
|
||||
|
||||
- [x] 统一重复归组;保存车行道和内部通路,不将不同通道按接近角度无条件合并。
|
||||
- [x] 引入 EntrySection 契约、来源/推断信息和稳定键;BoundaryGraph 留待连续边界阶段实现。
|
||||
- [x] 分离参考文件加载和纯 resolver;补输入重排、角度绕回、歧义、两路口隔离测试。
|
||||
- [x] 出口 A1/A2 基础:3~6 臂和分隔组合均能产生可解释结构或明确不支持原因;已覆盖偏置、不等宽、规则与不规则角度分布、曲线短进口、输入重排、平移、旋转及跨 0° 绕回回归。
|
||||
|
||||
## 2. 连续边界与区域求解(最高风险)
|
||||
|
||||
- [x] 将复杂路口边界半径映射到来源折线的实际首次相交站点,并把同一车行道裁切传递给道路面、边线、中心线、人行道和车道发布线。
|
||||
- [x] 为每条车行道生成带稳定边引用的内外断面,复杂进口面直接消费这些边;核心闭合边显式保留为待解,避免臆造跨分隔通行面。
|
||||
- [x] 对每臂单一来源车行道,用入口内断面原始边闭合核心面并保持共享接缝;分隔/并行车行道无法确认中心通行关系时拒绝闭合并报告对象级诊断。
|
||||
- [x] 实现接入断面到固定远端过渡;以共享边界构建中心/进口/角部,取消独立半径拼接作为权威。
|
||||
- [x] 支持凹形与已知排除区域,检查环、自交、接缝、必要连接;设计边界可行域并由 solver/manifest 共用。
|
||||
- [x] 审计 roadSurface、sidewalkSurface、edgeLines、lane/center markings 的每个裁切入口,确保消费同一计划。
|
||||
- [x] 出口 A3:接缝≤1 cm,必要区域连通,无自交与排除区侵占;自动测试验证实际几何,不只是参数回显。
|
||||
- 已验证:3~6 臂核心环闭合、正面积、无自交、共享内边邻接;maxSharedSeamErrorMeters 已测量核心与入口内边端点的实际米制误差,尚不等同于全图层接缝测量;入口 ring 闭合/有限/正面积;短过渡、零长度边、零宽度和排除区相切均有失败回归。
|
||||
- 连通性现作为构建产物显式发布:`connectedEntryCount`、`requiredPavementConnected`、`ringArea` 和 `ringSelfIntersects`;安全孔洞回归验证孔洞保留时全部入口仍与核心相连。
|
||||
- 限定:当前支持凹形边界、安全孔洞(含多个孔洞)与已知排除区;无法确认多个机动车通行区域时对象级拒绝闭合。全图层共享接入断面已验证,复杂排除区绕行和多通行区域自动重求解仍不承诺。
|
||||
- 新增回归:两个独立、包含于核心且不切断入口的孔洞会自动保留,所有入口仍保持连通;侵入必需通行区的排除区继续对象级拒绝并报告原因。
|
||||
- [ ] 此阶段不通过,不开启新几何控件。
|
||||
|
||||
## 3. 通用局部校正闭环
|
||||
|
||||
- [x] 首个跨层契约:固定 `cluster-carriageway-transition-length` 的米制值、来源车行道 anchor、最小/最大可行域及旧文档兼容策略;在 solver 与编译器共享同一派生值后再开放客户端控件。
|
||||
|
||||
- [x] 贯通接入位置、方向、左右边界、过渡长度的 validator/replay/solver/manifest/客户端;归组覆盖沿用稳定来源节点集合并触发版本保护。
|
||||
- [x] 保留已有宽度/收口/圆角语义兼容,超出可行域明确重检,不发布 current 超出自身范围的正常可编辑手柄。
|
||||
- [x] 输入和拖拽复用 EditSession;验证批量编辑已有约束、预览早于 Enter、请求乱序、切换路口、撤销重做、重置和 pending。
|
||||
- [x] 出口 A4/A5/A7:两类结构在浏览器完成预览→保存→编译→刷新,并验证最终地图 source/几何与服务端一致。
|
||||
|
||||
## 4. 现有设施联动与缺失信息治理
|
||||
|
||||
- [x] 停止按夹角和道路宽度自动伪造角部导流岛与短斑马线;缺少岛体区域或步行连接来源时省略并报告原因。
|
||||
- [x] 现有过街/停止线依附最终车行道;区分未知、已知存在、不支持。缺少匹配 OSM crossing 节点时不生成复杂斑马线或退让手柄,停止线独立保留并标记 `unknown-no-crossing-source`。
|
||||
- [x] 清理没有区域/连接依据的自动角部设施;对旧结果变化提供来源和诊断说明。
|
||||
- [x] 验证已知排除区和独立通道未被核心铺装吞并,未知岛体不臆造。
|
||||
- [x] 出口 A6(现有设施联动与缺失来源治理);导流岛自由编辑与新右转通道创建留后续任务。
|
||||
|
||||
## 当前阶段收口
|
||||
|
||||
已完成并验证的通用底座:共享来源拓扑、3~6 臂结构矩阵、重排/平移/旋转稳定性、核心与入口边界不变量、排除区域保护、入口过渡状态诊断、设施来源证据、预览/保存/刷新基础回归及端到端工作台流程。
|
||||
|
||||
明确遗留:复杂排除区绕行和多机动车通行区域自动重求解,全图层接缝测量,真实 OSM 视觉验收。导流岛自由编辑和独立右转通道继续留在后续任务。
|
||||
|
||||
人工验收按同目录 `visual-acceptance-checklist.md` 执行。用户只需对 7 项结构观察和最小编辑闭环记录通过/失败及截图,不需要自行判断内部几何指标。
|
||||
|
||||
## 5. 通用性验收与发布
|
||||
|
||||
- [x] 测试矩阵:3/4/5/6 臂,正交/斜交/偏置,不等宽,单/双向和分隔,曲线/短进口,邻接多个路口,缺失/矛盾数据;至少覆盖组合交互,不只各单变量。
|
||||
- [x] 变形测试:重排、平移、旋转(含跨 0°),允许范围内微调;对象身份稳定,几何无跳变。
|
||||
- [x] 保留未参与调参的真实 OSM 用作外部验证;若仓库不具备则记录数据需求,不冒称真实泛化通过。
|
||||
- [x] 生成纯效果/调试效果、几何指标、支持/拒绝情况、耗时及兼容报告;三组截图仅复核暴露的问题是否被通用机制处理。
|
||||
- [ ] 用户视觉验收合理初稿与局部校正结果;技术指标通过不能替代该验收。
|
||||
- [x] 更新 spec,记录迁移和剩余能力;按当前用户提交授权执行提交,不假定授权发布或合并。
|
||||
|
||||
## 验证命令
|
||||
|
||||
按阶段运行针对性测试:node test/direct-edit-solver.js;node test/junction-structure.js;node test/junction-projection.js;node test/workbench-edit-api.js;新增纯拓扑/区域不变量测试纳入 npm test。
|
||||
|
||||
最终质量门:npm test、npm run test:client、npm run test:client:unit、npm run test:e2e、npm run format:check、git diff --check。需要本地端口的测试串行执行,避免 8899 冲突。命令失败时后续未执行的子测试不得报告通过。
|
||||
|
||||
## 关键文件与回滚点
|
||||
|
||||
complex-junction.js / native-road.js:构建与全部消费者;direct-edit-solver.js / native-road-edits.js:纯求解与兼容;junction-structure.js / junction-topology.js / junction-projection.js:身份及投影;server.js:预览保存一致性;App.tsx / ParameterPanel.tsx / MapCanvas.tsx / edit/*:输入和状态。
|
||||
|
||||
每个阶段独立可回滚。几何更换前保存原始文档和输出比较,禁止先更新 fixture baseline 掩盖差异。任何大幅缩减支持范围或迁移语义变更先更新规划供用户审阅。
|
||||
|
||||
## 过渡长度编辑交付记录
|
||||
|
||||
已接通过渡长度的文档回放、独立 solver 结果、沿来源折线的内部断面定位、客户端输入映射与手柄。外部接缝保持固定,独立于收口距离。API 验证实际长度、保存再读取重放;浏览器验证参数输入请求被应用。曲线进口有沿线长度回归。此交付不代表接入位置/方向/左右边界、全图层几何及真实数据视觉验收完成。
|
||||
|
||||
本次进一步修复路口面板保存按钮漏读 EditSession.dirty、缺少撤销重做入口、保存回调误用渲染计数导致白屏,以及长短进口没有共同范围时仍显示统一输入的问题。浏览器回归覆盖单独过渡长度输入、撤销、重做、保存重编译与刷新;后端覆盖拒绝的收口约束不影响有效过渡范围。保持父任务进行中,不将本次编辑闭环等同于全部几何验收完成。
|
||||
|
||||
## 接入边界手柄几何交付记录
|
||||
|
||||
复杂车行道左右边界手柄现统一发布向右法线,由客户端仅对左侧反转一次,修复左边界向外拖反而收窄。手柄位置使用与 BoundaryGraph 相同的有效内断面站点 `outer - transition + position`,并消费当前方向、有效宽度及各侧边界偏移;左右手柄不再重叠,曲线进口和过渡长度变化后仍落在实际编辑断面。
|
||||
|
||||
回归按米制测量左右手柄间距、地理侧别、过渡断面对齐以及位置/方向响应;客户端覆盖两侧向外展宽、向内收窄、约束值、ghost 位置和边界钳制。npm test、190 项客户端单测、类型检查、生产构建、11 项 E2E、format:check 与 git diff --check 通过,构建仅保留既有 bundle 大小提示。
|
||||
|
||||
方向控件仍以沿切线的线性拖动米数映射角度,且位置/方向自身手柄仍显示旧收口点。完整旋转交互需要单独明确手柄契约,本轮不据此关闭 A4/A5。
|
||||
|
||||
后续已补齐该缺口:方向手柄发布有效内断面中心和旋转半径,客户端按最短方位角变化生成 `offsetDegrees`,ghost 沿圆周移动并显示角度;位置、方向和宽度手柄统一使用有效内断面。左右边界范围由有效宽度、另一侧偏移和最小车道总宽共同推导,manifest 与 solver 共用端点且越界阻塞。兼容数值输入及既有 `offsetDegrees` 文档。
|
||||
|
||||
浏览器回归现逐项编辑接入位置、方向和左右边界,验证请求被应用且目标道路面实际变化,并逐项撤销;随后继续验证过渡长度保存、正式重编译和刷新重放。该证据覆盖当前真实工作台 fixture,第二类结构的浏览器闭环仍需在最终 A4 矩阵中补齐。
|
||||
|
||||
第二类浏览器证据现使用 E2E 专用的独立三臂短节点簇:候选检测、接受、3 臂结构投影、位置/方向/左右边界/过渡长度预览、实际道路面变化、逐项撤销、保存重编译和刷新回放均通过。测试同时允许当前页面已同步版本时直接保存,或 API 外部接受候选造成 409 后显式重试;两种顺序最终产物一致。完整 E2E 为 12/12 通过。
|
||||
|
||||
第二真实候选审计发现一个两内部节点 cluster 会产生 solver 手柄但无法投影 `junctionStructure`。工作台状态与预览现统一隐藏此类无权威结构的手柄,并有 API 回归;该候选不再被错误计作第二类浏览器验收。A4 的第二类证据将使用具有完整结构投影的独立 3/4 臂 fixture。
|
||||
|
||||
本轮同时修复成功闭合且接缝合格的核心仍被误报为 `complex-junction-core-closure-unsupported` 的条件分支。npm test、191 项客户端单测、类型检查、生产构建、11 项 E2E、format:check 与 git diff --check 通过。区域邻接和排除区共同决定的更大向外边界仍留给区域级求解,不用固定范围冒充完整可行域。
|
||||
|
||||
本轮质量门:npm test 通过;npm run test:client 通过;npm run test:client:unit 15 文件/188 测试通过;npm run test:e2e(包含 production build)11 测试通过,包含保存后重置与放弃恢复;npm run format:check 与 git diff --check 通过。构建仍有既有 bundle 大小提示。遵循用户“整体任务完成再提交”,本轮未提交、未归档父任务。
|
||||
|
||||
下一阶段已实现共享内边的实际米制端点误差:`sharedSeamErrors` 逐车行道报告,缺失/非邻接为 Infinity;回归通过人为 2 米偏移验证指标变化。显式过渡站点统一限制在来源折线范围,超长请求标记来源长度不足并由 solver 拒绝。支持范围内的凹形边界、多个孔洞和已知排除区已有自动回归;全图层严格测量和真实 OSM 视觉验收仍未完成。
|
||||
|
||||
|
||||
## 共享入口断面消费交付记录
|
||||
|
||||
编译器现在只生成一次复杂入口 BoundaryGraph,外部道路面、边线、中心线、人行道、车道发布线的裁切直接读取其 outer.stationMeters;复杂过渡面复用同一图实例。过渡车道线按内外断面分别插值,局部展宽保持外侧车道端点固定,内部端点响应宽度与过渡长度。无效、来源长度不足或侵入已知排除区的过渡不发布预览车道线及其派生标线。
|
||||
|
||||
回归证据:真实 OSM fixture 的可配对外部道路面接缝实际误差 ≤1 cm;过渡车道起点与外断面一致;局部展宽保持外部道路面、边线、人行道、中心线和车道发布线不变;不可构建过渡不发布悬空预览车道线。npm test、客户端类型检查、188 项客户端单测、11 项浏览器测试、格式检查通过。
|
||||
|
||||
仍未关闭阶段 2:外侧偏移曲线的顶点切向统一、复杂排除区绕行和多机动车通行区域自动重求解仍需处理。当前回归证明了支持范围内 fixture 的接缝,不冒称任意曲线与相邻多路口已全部满足 A3。父任务保持进行中。
|
||||
|
||||
## 附属图层与已知排除区域发布约束
|
||||
|
||||
`79f2ee5` 已将角部人行道端点接到实际发布的外部人行道完整接缝,并覆盖带人行道的非空 fixture;短道路的道路边线、中心线、车道标线和人行道遵循道路面的发布集合。
|
||||
|
||||
本轮进一步补齐两个遗漏:角部道路补面、人行道转角复用 BoundaryGraph 的区域相交判定,侵入已知排除区域时省略并给出角部对象级诊断;复杂过街仅在所属道路臂全部车行道过渡面有效时发布,避免短道路已经无效却继续输出斑马线。短道路回归现在包含 crosswalks、vehicleStopLines 以及缺接缝诊断的对象和来源 ID。排除区回归覆盖实际生成的道路圆角和人行道转角。
|
||||
|
||||
用户复核指出探出分支不应自动出现斑马线。本轮收紧设施证据:道路包络和推断停止线不再充当过街存在证据;只有与道路和位置匹配的 OSM crossing 节点才生成复杂斑马线并发布 `cluster-crossing-inset`。无来源进口输出 `complex-junction-crossing-source-missing`,停止线保留但不消费不存在的退让值。单元与工作台 API 同时覆盖无来源省略和有来源编辑,且 solver 与 manifest 共用来源搜索半径,保证已发布手柄的最大值可实际应用。当前真实 fixture 的验证指标由 5 个过街手柄降为 0,纯效果图确认探出分支无斑马线。
|
||||
|
||||
此处采用明确省略冲突对象,尚未实现绕排除区域重新求解或多个机动车通行区域的自动连通规划;孔洞保留、已知排除区保护和现有设施来源治理已有回归。下一步是全图层严格接缝测量和真实数据视觉验收。
|
||||
|
||||
本轮验证:npm test、客户端类型检查、188 项客户端单元测试、11 项 E2E(含生产构建)、format:check 与 git diff --check 全部通过。构建保留既有 bundle 大小提示。
|
||||
|
||||
## 斑马线短边构造修正(未提交)
|
||||
|
||||
用户手绘明确:两条相邻斑马线向各自路口外侧退一个完整矩形短边长度;安全岛两条直角边来自斑马线短边延长线,不来自道路圆角切线。短边延长一倍,连接端点并向直角顶点弯曲,第三组条纹平行于连接弦。
|
||||
|
||||
已修复此前无效退让:旧代码移动 frame.center 后又用原 endpoints 覆盖,实际条带未移动。现在先移动中心再生成端点;手柄同步。岛体使用最近端点处的两条短边延长线交点及两倍 groupDepth;岛体弧线纯函数覆盖手绘象限、边界相接无面积重叠、旋转平移回归。
|
||||
|
||||
当前用户 OSM 编译实测:4 个岛体,跨组斑马线重叠面积 0 m²,岛体与条带总交集约 0.00004524 m²。纯几何图为 references/crossing-short-edge-composition.png(编译坐标直接绘制,仅含目标复杂路口道路面/岛体/斑马线)。中央铺装仍存在空洞,整体任务未完成。此次未提交,不能将上述局部通过记作 A3/A8 全部通过。
|
||||
|
||||
## 用户暂存后的白条规格与正交框架调整
|
||||
|
||||
本轮保留用户 index 暂存内容,新变更只在工作区。所有复杂斑马线白条长度 3.4m、宽度 0.42m、净间隔 0.4m;端部余量居中分配,不再通过缩放间隔填满跨度。四臂且每臂与拟合正交方向偏差不超过 15°时,斑马线方向共用正交框架;其他结构保留来源方向。岛体继续引用斑马线短边,手柄使用同一退让方向。
|
||||
|
||||
当前用户 OSM 实测:4 岛,142 白条;跨组过街重叠面积 0m²,岛体与过街交集面积 0m²。references/orthogonal-crossing-composition.png 是编译几何简图,不是浏览器整图验收。中心铺装连续性由后续核心闭合回归覆盖。
|
||||
|
||||
## 弧边贴合、三个圆角、停止线避让
|
||||
|
||||
第三组第一条白条按其实际宽度范围内的岛体曲线支撑位置放置,去掉首条居中余量,避免以弦代替弧造成间隙。岛体三个顶点使用曲线过渡,保留直边和中部内弯弧。停止线与手柄加入斑马线已发生的完整退让量。
|
||||
|
||||
当前 OSM 测量:停止线/斑马线面积交集 0;跨组斑马线面积交集 0;岛/斑马线约 1e-13 m²(浮点误差)。新增圆角、有限条宽弧边支撑、停止线与对应斑马线无交集回归。references/rounded-corner-detail.png 为局部编译几何图,黄色仅用于标示停止线;正式渲染颜色未改变。未提交、未改用户暂存内容。
|
||||
|
||||
### 本轮局部复核补充
|
||||
|
||||
复核修正一处遗漏:过街手柄虽然已计算四臂拟合方向,实际固定退让仍用了原道路臂方向;现使用同一 fitted heading。纯设施测试、direct-edit-solver、format:check、客户端类型检查通过。
|
||||
|
||||
停止线默认值 3m 在当前图上无交集,但不能据此宣称完整可编辑范围无重叠:将当前真实路口各 stopLineOffsetMeters 设为已允许的 0.5m,实际编译产生 47 对停止线/对应白条交集。需统一停止线退距的边界语义/可行域与手柄,再增加下界回归;复核未擅自更改文档参数语义。
|
||||
|
||||
上述下界问题已由主会话同步修正为距过街外缘的净退距,并包含停止线半厚度;复核重跑同一真实 OSM、相同 0.5m 参数,交集对数从 47 降为 0。此为当前真实样本验证,非任意斜交结构全范围保证。
|
||||
|
||||
停止线补充:按拟合斑马线方向放置,从退让后的斑马线外缘计净距,并计入停止线半厚 0.24m;编辑手柄同步。新增 0.5m 下界与对应过街无交集回归。当前真实 OSM 全部停止线/过街交集为 0。旧五臂 fixture 在最小退距时与非对应过街仍有少量交集,跨臂极端编辑避让尚未完成,不能外推为任意拓扑无冲突。
|
||||
预览 API 单独重跑通过;之前 degraded 断言失败源于其 300ms 时间预算,不能将其解释为几何功能失败。全量 fixture 基线仍与用户更新后的 OSM 不一致,未刷新基线。此次未暂存、未提交。
|
||||
|
||||
|
||||
## 2026-09-11 基线提交与新增完整接触规则
|
||||
|
||||
用户要求先提交当前视觉基线,已执行。随后补充的五条规则已写入 PRD、design 与 backend/junction-island-contact.md。此次补充为待实现契约,不声称已有代码满足完整短边接触或绿色六边形。下一实现单元:三段完整接触的共享求解 + 六点绿色区域 + 动态腿长,一起验证后交付;不得拆成独立挪动第三条斑马线、独立画绿色六边形的中间态。
|
||||
|
||||
## 完整接触求解实现(工作区,待提交)
|
||||
|
||||
新增 `solveIslandContacts`,复杂路口现在消费同一结果生成动态直角边、圆滑外轮廓和六点 `greenRing`;第三组斑马线中心也由该结果定位。前端以 `kind=island-green` 显示绿色六边形。真实 OSM 输出 4 个岛且每个都有 6 个接触点,相关重叠检查为 0。新增纯几何回归覆盖端点数量和动态腿长。尚未提交。
|
||||
|
||||
## 2026-09-14 四角协调与实际工作台配置复现(未提交)
|
||||
|
||||
实际最新导入工作区 import-fE8XI7 使用四节点、coreRadius=21;此前验证脚本硬编码五节点、24,漏掉真实失败。已复现两个 contact-crosses-corner 导致两岛省略。四臂过街现在在发布前共同检查相邻接触短边;必要时对称缩短所有过街跨度,以完整白条节距进行裁减,保留白条长度/宽度/间隔。找不到满足最小过街跨度的方案时不应用试探裁减,保留不可行诊断。未改保存配置或用户编辑。
|
||||
|
||||
实际配置现在发布四岛、四绿色六边形,各六个唯一点,面积约 19.49–28.70m²。新增真实 OSM 四节点 21m 回归检查四角对象、六点及岛体引用。references/four-islands-coordinated.png 为编译几何整图(黄色停止线用于辨识),非浏览器截图。接触交集约 4.2e-5m²、中心铺装缺口仍待解决;不能声称严格共享边界或整体验收完成。前序“六点数量通过即完整接触完成”的说法不成立。
|
||||
|
||||
## 2026-09-14 中心铺装与集群车辆轨迹(未提交)
|
||||
|
||||
按 research/core-and-trajectories-audit.md 实施。中心闭合改为每条有效车行道保留完整断面,按断面而非散点排序;多车行道内断面交叠产生自交时,对中心与边界形成的局部铺装单元做区域并集,不使用凸包,也不删除某条车行道。内接缝可成为并集内部线段,需逐边界交点拆分验证整段覆盖,随后与权威 BoundaryGraph 断面测量位置误差。原“必须缺失 core”断言改为连续区域验收;已有 T/五/六臂和排除区域反例仍通过。实际四节点、21m 配置生成中心面,8/8 入口接通,接缝误差0,四岛和绿色区域保持。
|
||||
|
||||
车辆轨迹先统一为端点切向 cubic 与自适应采样,随后实际叠加图证明原节点 connector 仍是局部碎片。因此继续增加集群级拼接:在原有允许的 lane movement 图上逐入口 BFS,追溯内部车道到外部出口,保留来源 movement IDs,遵守车道方向和默认目标车道对应关系。端口引用实际可见 approach lane(出口预览线按行驶方向反转)。用有限控制柄候选求曲线;检查整条发布折线的自交、与安全岛边相交、是否逐段落在真实铺装区域内。替代原四节点碎片;不可行候选明确诊断 deferred-region-conflict,不伪造可行轨迹。尚未提供车辆扫掠包络或曲率连续性保证。
|
||||
|
||||
实测与测试:中心8个入口全连通;集群28条发布完整路径,8条区域冲突暂缓。28条全部匹配可见车道端点,0条因端点缺失而跳过;最大端点切向误差0.9898度。合成T/四臂最大误差0.9807度。新 test/connector-trajectories.js 纳入 npm test。references/core-and-trajectories.png/svg 为实际配置编译几何叠加图(蓝线轨迹,黄色停止线),非浏览器截图。
|
||||
|
||||
npm test 中代码、投影、边界反例、设施、编辑与工作台导入检查通过;最后 test/fixtures.js 快照仍失败(当前 OSM 与旧基线不同,且本次轨迹几何也会改变输出),未刷新基线,因此不得写为全量测试通过。格式与diff检查通过。8条暂缓路径、车辆尺度转弯半径/扫掠、全图层接缝及已有岛/斑马线约4.2e-5m²微小面积交集尚未关闭。未提交、未归档。
|
||||
|
||||
## 2026-09-14 小范围预览性能优化(未提交)
|
||||
|
||||
用户同意取消300ms硬门槛,要求先试验、改动简洁、控制风险。本轮先做独立新旧差分,再仅接入两处等价优化:cluster selection 跳过会被过滤的其他手柄;标线裁切按排序包围盒减少精确碰撞候选。仍计算全量路网,接口和保存路径不变,不引入跨请求缓存或增量协议。
|
||||
|
||||
21组完整新旧结果深比较一致。真实接口热运行计算+序列化从约2.53秒降至约1.59秒,下降约37%;尚未测浏览器绘制。求解器、几何、编辑API、导入回归、类型/格式检查通过;npm test最终既有fixture快照差异仍失败。详见 research/preview-small-optimization.md 及对应脚本/原始结果。可作为独立提交候选,未归档父任务。
|
||||
|
||||
## 2026-09-14 浏览器编辑闭环复核
|
||||
|
||||
`npm run test:e2e` 12 项全部通过(包含 production build):普通编辑壳、路口选择与刷新、复杂四臂和三臂路口、全部入口控制预览、撤销/重做、重置、放弃草稿、保存后刷新、保存冲突与服务端几何一致性。客户端单测另覆盖拖拽投影、释放即预览、请求乱序、范围切换和 pending。编辑闭环相关 A4/A5/A7 现有证据充分;用户最终视觉验收仍未完成,不能替代真实地图复核。
|
||||
|
||||
## 2026-09-14 自动区域求解范围复核
|
||||
|
||||
支持范围内的凹形边界、单个或多个安全孔洞、已知排除区侵入检测均由 BoundaryGraph 与 polygon clipping 自动处理,不要求人工移动几何。两个独立孔洞的连通性回归已加入 `test/junction-build-plan-counterexamples.js`;无法确认多个机动车通行区域或需要绕障规划时,系统仍对象级拒绝并发布诊断。剩余需要用户参与的判断是视觉初稿是否合理,以及是否要把车辆轨迹升级为包含车辆扫掠范围和曲率连续性的规划器。
|
||||
|
||||
## 2026-09-14 全图层落面回归
|
||||
|
||||
`test/index.js` 新增道路附属层落面检查:道路边线、中心线、车道中心线和车道分隔线的每个发布坐标必须位于对应道路面内,或处于 0.3m 标线厚度容差内;所有附属对象仍必须引用已发布道路面,内部 cluster 对象继续不对外发布。该回归覆盖当前五臂复杂路口 fixture;任意曲线、多路口之间的统一边界误差仍不冒称已完全测量。
|
||||
|
||||
## 2026-09-14 现有设施联动收口
|
||||
|
||||
现有设施范围的 A6 已由 `test/index.js`、`test/workbench-edit-api.js` 和 `test/junction-facility-composition.js` 覆盖:无 crossing 来源时复杂斑马线省略并发布 `complex-junction-crossing-source-missing`,停止线保留 `unknown-no-crossing-source`;匹配 OSM crossing 节点时发布带来源证据的斑马线;已知交通岛作为排除区域保留并纳入结构投影;角部设施缺少有效道路/步行连接时不伪造。导流岛自由编辑、新右转通道和全套过街设施编辑器仍按 PRD 留在后续任务。
|
||||
|
||||
## 2026-09-14 内置箭头资源清单缓存
|
||||
|
||||
预览编译重复读取固定的 `assets/lane-icons/manifest.json`。`loadManifest()` 现在只缓存内置清单,并以文件 `mtimeMs` 和大小失效;自定义清单路径保持每次读取,避免改变调用方的动态配置语义。默认清单缓存身份回归已加入 `test/index.js`。真实预览输出未改变;本轮样本总耗时受几何计算抖动影响,不能单独宣称可测的额外百分比收益。
|
||||
@@ -0,0 +1,71 @@
|
||||
# 复杂路口通用构建:结构约束与连续边界
|
||||
|
||||
## 目标与价值
|
||||
|
||||
让复杂路口由可解释、可组合、可局部校正的结构生成连续道路几何。不同进口数量、方向、宽度和分隔方式应自然得到不同形态,而不是依靠针对具体路口的模板补丁。用户可从 OSM 得到合理初稿,在数据不足时用有限的结构/边界编辑修正,并可靠地预览、撤销、保存和重建。
|
||||
|
||||
“相对理想”的交付定义:支持范围内结构正确、必要接缝连续、编辑真实有效、无依据设施不被伪造、失败可定位;不是从不完整 OSM 自动还原卫星图的全部细节。
|
||||
|
||||
## 已确认背景
|
||||
|
||||
- 用户提供三组真实/生成截图以暴露问题,明确反对专门适配这三个样本。图片保存在 references/,仅作定性观察;尚未配准,遮挡处和尺寸不是事实输入。
|
||||
- 现有编辑已覆盖复杂车行道宽度、收口、角部圆角、过街退让、停止线偏移;继续复用编辑与存储闭环。
|
||||
- 当前构建仍分别生成中心包络、车行道矩形、圆角和角部设施。问题证据与代码入口见 research/current-state.md。
|
||||
- 用户已要求暂缓导流岛编辑;本阶段不以实现岛体编辑为完成条件,但通用结构不能把岛体误当作普通角部填充。
|
||||
|
||||
## 范围与要求
|
||||
|
||||
R1 通用结构:显式表达外部车行道、进出方向、接入断面、相邻边界、通行区域、已知排除区域及必要连接。道路臂是组合视图,不因方向近似便抹掉分隔车行道、辅路或独立通道的差异。分类标签用于说明,不控制是否采用同一矩形模板。
|
||||
|
||||
R2 连续构建:进口、中心、路缘和过渡以同一有效几何计划为依据。外部道路与进口共享接缝;进口与核心的必要连接可验证。支持不等宽、非正交、非对称和错位接入,调整局部参数不得制造断面或侵占已知排除区域。
|
||||
|
||||
R3 有限校正:支持选定车行道的接入位置、方向、左右边界及过渡长度校正;保留角部控制。道路远端锚定,改动通过过渡传播;控件明确展示作用对象。源拓扑有歧义时允许显式纠正道路臂归组,不能靠改几何角度隐式改变身份。每种控件必须贯通求解、图形、保存再编译后才开放。
|
||||
|
||||
R4 数据诚实:每个推断保留来源和原因;缺失的岛体、独立右转或过街连接不能被假定存在。已知但暂不支持的复杂结构应给对象级诊断,不能悄悄简化成正确外观。现有设施必须消费有效道路边界;无支撑的自动角部岛体/小斑马线应可识别并停止伪生成,同时报告原因。
|
||||
|
||||
R5 兼容与交互:保留稳定来源身份、普通路口行为及编辑文档的可读性。输入与拖拽共用会话、预览、撤销、保存协议;慢请求持续显示 pending,旧响应不能覆盖新编辑;无效参数保留最后有效几何并显示原因。
|
||||
|
||||
## 首期支持边界
|
||||
|
||||
- 同层平面交叉:3~6 个外部道路臂,含单向/双向及分隔车行道组合、T/斜交/十字/偏置/不等宽进口。
|
||||
- 已知分隔空间作为区域约束保留;已识别独立通道不被错误吞并。复杂渠化结构若不能安全构建,明确标记局部不支持。
|
||||
- 不承诺任意路网完全自动建模,不涉及立交、环岛专用设计、交通配时优化、卫星图自动识别、完整车道级交通仿真。
|
||||
- 导流岛自由编辑、独立右转通道创建、全套过街设施新编辑器作为后续阶段;本期仅完成结构预留、现有设施联动与错误自动生成治理。
|
||||
|
||||
## 验收标准
|
||||
|
||||
| ID | 可观察结果与验证 | 对应需求 |
|
||||
| --- | --- | --- |
|
||||
| A1 | 单一构建路径覆盖上述 3~6 臂组合;不得以图片编号、OSM ID、地名或固定坐标选分支 | R1、R2 |
|
||||
| A2 | 同一输入反复编译确定性一致;输入顺序重排不改变来源身份;平移/旋转后的拓扑和相对几何等价;调整一侧方向/宽度能连续响应 | R1、R2 |
|
||||
| A3 | 局部米制坐标下共享接缝端点偏差 ≤1 cm;环闭合、面积为正且无自交;必要铺装区域连通;已知排除区域不被侵入。逐项报告,不能仅靠截图或 GeoJSON 有变化通过 | R2 |
|
||||
| A4 | 至少两类不同结构验证接入位置、方向、左右边界、过渡长度的输入/拖拽、撤销/重做、重置、保存/重编译/刷新;目标区域变化且远端锚点保持;真实拓扑改变时旧约束明确重检/失效 | R3、R5 |
|
||||
| A5 | 每项参数边界可接受且有几何效果;超过边界返回明确诊断。旧文档超出新可行域时不静默截断;歧义归组可解释并可纠正 | R3、R5 |
|
||||
| A6 | 现有斑马线位于实际车行道范围;已知步行连接可追溯;未知连接标记不确定。无依据的孤立角部设施不作为有效结果输出 | R4 |
|
||||
| A7 | 预览与正式编译对同文档输出一致;预览不写盘;保存失败/409 不覆盖文档;跨路口、连续编辑和慢响应不串状态 | R5 |
|
||||
| A8 | 合成组合测试之外,用未参与调参的真实 OSM 验证;三张图仅为定性复核之一。纯效果与调试效果并列提供,用户确认整体达到合理初稿且可局部修正 | 全部 |
|
||||
|
||||
A3 的 1 cm 是内部拼接精度,不代表影像测绘精度。视觉相似度不设置虚假的百分比分数。真实图与源数据无法对应时,记录缺失信息,不猜测完成 A8。
|
||||
|
||||
## 交付物
|
||||
|
||||
通用结构/几何契约、构建实现、可用校正界面、兼容策略、结构组合与几何不变量测试、真实数据验证报告、前后纯效果/调试效果对照、遗留问题列表。
|
||||
|
||||
## 待验证技术问题
|
||||
|
||||
这些问题由实施阶段证据解决,不要求用户猜实现:现有 polygon 运算是否足以完成区域验证;车道线/步行带全部裁切调用是否统一;现有 OSM 数据能支持哪些歧义归组纠正;校正与旧半径/收口约束的兼容边界。若答案导致缩减上述支持范围,须修订规划后再实施该缩减。
|
||||
|
||||
|
||||
## 2026-09-11 用户补充:三组过街完整接触与绿色六边形
|
||||
|
||||
本节为最新用户验收要求,优先于此前固定岛体、固定两倍直角边及仅端点吸附的描述。状态:规则已确认,尚待实现;当前已提交的视觉基线不能视为满足以下全部条件。
|
||||
|
||||
1. 每个此类三角安全岛的三条关联斑马线均必须与岛体接触,不允许其中一条脱离岛体。
|
||||
2. 三条接触短边在各自岛边上的位置按现场几何确定,不固定在边中点或三角顶点。
|
||||
3. 接触必须覆盖斑马线矩形的完整短边;点接触、部分短边接触、跨圆角悬空均不合格。这里的短边是整组过街矩形的短边,不是任意一根白条的边。
|
||||
4. 三条短边各贡献两个真实端点,六个不同接触点沿岛体边界排列,连接形成岛上的绿色六边形。禁止独立拟合装饰六边形、取包围盒或以凸包删掉某些接触点。
|
||||
5. 安全岛两条直角边长度可随接触位置、过街宽度及可用空间动态调整;原先“两倍短边长度”仅为旧基线,不再作为固定长度约束。
|
||||
|
||||
仍保留:复杂路口默认过街、简单路口保持现状;三组白条规格一致;停止线与过街不重叠;岛体非接触部分保留圆角与内弯轮廓。绿色六边形与岛体外轮廓属于不同几何对象。
|
||||
|
||||
新增验收 A9:三条完整短边均与岛边共享线段;六点一一对应形成非退化绿色六边形;改变接触位置或过街宽度后同步重算岛边与绿色区域,不产生悬空、面积重叠或被圆角裁掉的接触段。不得只用岛数、条纹数和面积无交集来宣称 A9 通过。
|
||||
|
After Width: | Height: | Size: 244 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="-36.08719395540545 -36.08719395540545 72.1743879108109 72.1743879108109"><rect x="-36.08719395540545" y="-36.08719395540545" width="72.1743879108109" height="72.1743879108109" fill="#dce3df"/><g transform="scale(1,-1)"><path d="M-182.72631252387666,-102.1254779457577L-33.00576846735486,-19.702587331817085L-28.30378794160006,-28.24386623474055L-178.02433199812185,-110.66675684868116L-182.72631252387666,-102.1254779457577Z" fill="#344352"/><path d="M-13.877401061909028,35.83996618690307L-32.60097145071207,71.07898612677815L-161.74997668598377,307.7601702851575L-153.19122065898344,312.43036411201814L-24.035529937824496,75.7369070787422L-5.267299635186701,40.41480768260513L-13.877401061909028,35.83996618690307Z" fill="#344352"/><path d="M-169.01463130553654,303.2055773836122L-43.950508628821844,67.09405910058749L-23.02876457095017,30.732235013365L-31.480275695757523,25.87029876582065L-52.54496135333369,62.489498105253034L-177.6308895210455,298.6419478217193L-169.01463130553654,303.2055773836122Z" fill="#344352"/><path d="M227.89329146984065,-415.97013570007834L216.2973298218892,-386.63581315828185L52.601558673307466,-85.6251049921157L28.66176037225708,-43.50461866020552L21.656629977431322,-31.17675199865701L30.13323351541536,-26.35967778008009L37.13805004474461,-38.686992133814755L61.15567230865561,-80.94706580242772L224.90986798852398,-382.066237636286L236.95678034543502,-412.3771710938688L227.89329146984065,-415.97013570007834Z" fill="#344352"/><path d="M-34.90012262525051,-15.773328815598546L-85.9687356197671,-44.46171225077663L-183.29816268315759,-101.35414802585004L-188.21843339596572,-92.93670276831634L-90.83958152603056,-36.015570543775226L-39.675436564727946,-7.27280951919866L-34.90012262525051,-15.773328815598546Z" fill="#344352"/><path d="M14.487867939045346,-35.1143224160154L43.06213857618463,-90.99741176058245L208.05265473251958,-380.1064956216152L236.03985796447984,-410.9027824842917L228.81021385079586,-417.4445243096554L199.70524974312679,-385.1446351729646L34.55910884461189,-95.76820703344168L5.807165522069592,-39.553622662553494L14.487867939045346,-35.1143224160154Z" fill="#344352"/><path d="M35.97666266680469,11.928837813092201L99.27241954235028,44.21004944984773L107.22220535738948,48.26093672582374L243.9846680723037,124.43157018532702L455.510081483468,240.26866166835205L527.5118120727817,279.3797563671248L532.1657079866715,270.81215558769344L460.1858011875623,231.71295153723705L248.69183824237126,115.89312302060819L111.94923577452634,39.73346847966127L103.70211764688071,35.52441175560986L40.4063884383186,3.2432142290782906L35.97666266680469,11.928837813092201Z" fill="#344352"/><path d="M524.4852868960485,287.1272811170911L453.90409544962495,247.28311397322443L96.16102153715367,53.88725207466905L32.57094869790052,20.375806013470168L28.02516156424126,29.001316422333474L91.53776264174262,62.471489130865336L449.2411057296136,255.84583523250643L519.6919605940101,295.61773208885285L524.4852868960485,287.1272811170911Z" fill="#344352"/><path d="M-5.267301987357549,40.41481210969877L7.19145597908364,16.966896881429534L-1.4186221277396471,12.392046531540188L-13.87739870973818,35.83996175980943L-5.267301987357549,40.41481210969877Z" fill="#344352"/><path d="M32.576226528848196,20.378616826004645L9.936314014707545,8.44764971968658L5.390735592917476,17.07320856793075L28.030643108183735,29.004175674248813L32.576226528848196,20.378616826004645Z" fill="#344352"/><path d="M21.65533265089493,-31.174733991428383L8.83172652160411,-8.607331372620877L17.308727370561304,-3.7903951627757237L30.132315857888972,-26.35779778158323L21.65533265089493,-31.174733991428383Z" fill="#344352"/><path d="M40.406387662443116,3.243213833194716L15.952162468129686,-6.714401549583897L12.81716073391365,2.5178387161778915L35.97666344268018,11.928838208975776L40.406387662443116,3.243213833194716Z" fill="#344352"/><path d="M-23.029565476260696,30.733442482788433L-9.745785547033872,7.643493719473469L-18.19700835160192,2.781456926201855L-31.480806274594837,25.87140568951682L-23.029565476260696,30.733442482788433Z" fill="#344352"/><path d="M-39.67543890599017,-7.272810834196548L-17.18469783808538,5.361780903661071L-12.409373652688094,-3.138735762743039L-34.90012028398828,-15.773327500600658L-39.67543890599017,-7.272810834196548Z" fill="#344352"/><path d="M5.8071632026246,-39.553618127096115L-5.955117169320215,-16.553263765692634L2.7256082975662728,-12.113972590069295L14.48787025849034,-35.114326951472776L5.8071632026246,-39.553618127096115Z" fill="#344352"/><path d="M-33.004774561312836,-19.702030337864898L-10.85947931753688,-7.510787799941454L-6.157425483139099,-16.052048931212255L-28.302726014867837,-28.2432914691357L-33.004774561312836,-19.702030337864898Z" fill="#344352"/><path d="M30.898332217283116,-1.639110287941321L28.960168413725203,-2.3917021397042504L27.284427538434166,-3.2440767015880567L25.871109591410008,-4.196233976361157L24.720214575379885,-5.248173Line truncated
|
||||
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-450 -450 900 900"><rect x="-450" y="-450" width="900" height="900" fill="#dce3df"/><g transform="scale(1,-1)"><path d="M-1095.6378610867202,-614.4939932910518L-213.29226690488434,-128.75252876580362L-185.08038450530614,-180.0002021833444L-1067.425978687142,-665.7416667085926L-1095.6378610867202,-614.4939932910518Z" fill="#344352"/><path d="M-91.2281387728726,229.64177865092608L-194.88448613504542,424.73029225110537L-969.7798573551645,1844.819898804324L-918.4273067116812,1872.8410563457187L-143.49454366665378,452.68281574900556L-39.567515755664175,257.0908222480824L-91.2281387728726,229.64177865092608Z" fill="#344352"/><path d="M-1013.367775978229,1817.4923386851674L-262.9788561495375,400.81538004186086L-146.6896533301025,198.70817919698567L-197.39871872197082,169.53656171171957L-314.5539788141141,373.20371196017106L-1065.0653238878551,1790.1105613138106L-1013.367775978229,1817.4923386851674Z" fill="#344352"/><path d="M1368.0796969464438,-2497.5619398169756L1298.5039289205843,-2321.5560045661964L316.32932831210917,-515.4917555691998L172.69059072657845,-262.76892271129526L139.74385428270983,-204.78813411798058L190.6034741496094,-175.88568880651906L223.54823064656085,-233.8629932858376L367.6540087507484,-487.4235204310719L1350.1791565375627,-2294.1385514342214L1422.460628744775,-2476.0041521797184L1368.0796969464438,-2497.5619398169756Z" fill="#344352"/><path d="M-224.68214389959246,-105.37017947501909L-515.0872279286506,-268.508405769127L-1099.0689655095262,-609.8660146614541L-1128.5905818785022,-559.3613413365554L-544.3226771218121,-217.8375422311953L-253.33401979912497,-54.3670620023488L-224.68214389959246,-105.37017947501909Z" fill="#344352"/><path d="M96.00729472259131,-228.77471298523346L259.08850043594725,-547.7179305910286L1249.035871739387,-2282.3800965627515L1416.959086702971,-2467.1578178123714L1373.5812389882476,-2506.408274184322L1198.951459080782,-2312.6089394377386L208.07894106190946,-576.3580334061273L43.923097404736296,-255.4105197703302L96.00729472259131,-228.77471298523346Z" fill="#344352"/><path d="M233.23107689054936,78.32407338530714L596.3544862783302,263.51917209344833L644.0531963822988,287.82449395537043L1464.6279507213658,744.848294714763L2733.7803972421652,1439.870843622405L3165.7907692256213,1674.53741182216L3193.714150425086,1623.1318086737379L2761.834721195716,1388.5365843781185L1492.8709774984325,693.617613287837L672.4153846549552,236.65968604452843L622.932673703392,211.40534390628602L259.80943702630776,26.210333281251508L233.23107689054936,78.32407338530714Z" fill="#344352"/><path d="M3147.6316218828397,1721.022561086041L2724.144484536824,1481.957558222841L577.6875866113246,321.5831882999811L212.34319469364561,129.0496153944369L185.06847262156228,180.80267784761674L549.9450577610664,373.08700770021403L2696.1665469654463,1533.333885778533L3118.871664840227,1771.9652669166117L3147.6316218828397,1721.022561086041Z" fill="#344352"/><path d="M-39.56753130044502,257.0908514991723L36.48324042870114,113.96004334034217L-15.177237858416202,86.5109412410061L-91.22812322809177,229.64174939983621L-39.56753130044502,257.0908514991723Z" fill="#344352"/><path d="M212.3748085644226,129.06645133415338L72.97722234187077,55.605564096148896L45.703749759271446,107.3589171856139L185.10130518679426,180.8198044236184L212.3748085644226,129.06645133415338Z" fill="#344352"/><path d="M139.736084322184,-204.77603973318537L61.03073045062238,-66.26777311758019L111.89272412009689,-37.36615585850927L190.59796971816922,-175.87442247411445L139.736084322184,-204.77603973318537Z" fill="#344352"/><path d="M259.8094309965691,26.210330205936145L109.72581404490273,-37.513663091724254L90.91580285029158,17.879778502846477L233.2310829202881,78.3240764606225L259.8094309965691,26.210330205936145Z" fill="#344352"/><path d="M-146.6944393063166,198.71540106493455L-65.673415128586,57.88414994031797L-116.3807613167821,28.711929180688287L-197.4018952570284,169.54318030530487L-146.6944393063166,198.71540106493455Z" fill="#344352"/><path d="M-253.33403535208728,-54.367070739471615L-115.10164963295416,23.287542778271302L-86.44970842897918,-27.715557220153357L-224.68212834663015,-105.37017073789627L-253.33403535208728,-54.367070739471615Z" fill="#344352"/><path d="M43.923082138125224,-255.41048990465185L-28.346815539813434,-114.09152384517881L23.7375254445424,-87.45577679143878L96.00730998920238,-228.77474285091182L43.923082138125224,-255.41048990465185Z" fill="#344352"/><path d="M-213.2864112595747,-128.7492471907484L-76.57309690087986,-53.4869759236247L-48.360777562056626,-104.7345427112495L-185.07412454842827,-179.9968139783732L-213.2864112595747,-128.7492471907484Z" fill="#344352"/><path d="M185.65754388327525,-10.779602121181426L174.0285612176718,-15.295153231759002L163.97411612862376,-20.40940060306184L155.49420855886086,-26.12234424932751L148.58883856565333,-32.4339841610643L143.2580060835495,-39.344320350136854L139.501711194364,-46.85335279518881L137.31995383264513,-54.96108151Line truncated
|
||||
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 397 KiB |
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"clusterId": "cluster-8005332807",
|
||||
"topologyFingerprint": "1a99b5f202d59b65aab955a1c9d9de80e19e18b00c91bcc7e5bc8517678d7632",
|
||||
"armCount": 5,
|
||||
"carriagewayCount": 9,
|
||||
"handleCounts": {
|
||||
"cluster-carriageway-width": 9,
|
||||
"cluster-carriageway-transition-length": 9,
|
||||
"cluster-carriageway-cutback": 9,
|
||||
"cluster-carriageway-position": 9,
|
||||
"cluster-carriageway-direction": 9,
|
||||
"cluster-carriageway-edge-offset": 18,
|
||||
"cluster-corner-radius": 5,
|
||||
"cluster-stop-line-offset": 5
|
||||
},
|
||||
"diagnostics": [
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "unconnected-interior-road-end",
|
||||
"subjectId": "road:way/99505317:forward",
|
||||
"message": "道路在区域内部结束,未连接到其他机动车道路。请确认这是实际断头,还是 OSM 节点尚未连接。"
|
||||
},
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "unconnected-interior-road-end",
|
||||
"subjectId": "road:way/402682022:forward",
|
||||
"message": "道路在区域内部结束,未连接到其他机动车道路。请确认这是实际断头,还是 OSM 节点尚未连接。"
|
||||
},
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "unconnected-interior-road-end",
|
||||
"subjectId": "road:way/858770821:segment/2:forward",
|
||||
"message": "道路在区域内部结束,未连接到其他机动车道路。请确认这是实际断头,还是 OSM 节点尚未连接。"
|
||||
},
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "unconnected-interior-road-end",
|
||||
"subjectId": "road:way/860989007:forward",
|
||||
"message": "道路在区域内部结束,未连接到其他机动车道路。请确认这是实际断头,还是 OSM 节点尚未连接。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-candidate",
|
||||
"subjectId": "junction-cluster-candidate:1590698049+8042920686",
|
||||
"message": "检测到 2 个路口节点由 1 条短路段(最长 19.6 米)相连,可能是同一个物理路口。当前按独立路口编译;如需合并请在 nativeRoad.junctionTemplates.clusters 中配置。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-candidate",
|
||||
"subjectId": "junction-cluster-candidate:-91001+-91002+-91003",
|
||||
"message": "检测到 3 个路口节点由 3 条短路段(最长 10.7 米)相连,可能是同一个物理路口。当前按独立路口编译;如需合并请在 nativeRoad.junctionTemplates.clusters 中配置。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-crossing-source-missing",
|
||||
"subjectId": "crossing:cluster:cluster-8005332807:arm:8005332807/segment%3Away%2F859509947%2F2/road%3Away%2F859509947%3Asegment%2F2%3Aforward|8613058676/segment%3Away%2F858770823%2F3/road%3Away%2F858770823%3Asegment%2F3%3Aforward",
|
||||
"message": "该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-crossing-source-missing",
|
||||
"subjectId": "crossing:cluster:cluster-8005332807:arm:8613058676/segment%3Away%2F928582773%2F0/road%3Away%2F928582773%3Abackward/road%3Away%2F928582773%3Aforward",
|
||||
"message": "该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-crossing-source-missing",
|
||||
"subjectId": "crossing:cluster:cluster-8005332807:arm:8024512135/segment%3Away%2F851989492%2F1/road%3Away%2F851989492%3Asegment%2F1%3Aforward|8024512147/segment%3Away%2F858770822%2F2/road%3Away%2F858770822%3Asegment%2F2%3Aforward",
|
||||
"message": "该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-crossing-source-missing",
|
||||
"subjectId": "crossing:cluster:cluster-8005332807:arm:8024512145/segment%3Away%2F858770821%2F2/road%3Away%2F858770821%3Asegment%2F2%3Aforward|8024512147/segment%3Away%2F99505317%2F0/road%3Away%2F99505317%3Aforward",
|
||||
"message": "该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-crossing-source-missing",
|
||||
"subjectId": "crossing:cluster:cluster-8005332807:arm:8005332807/segment%3Away%2F253970456%2F0/road%3Away%2F253970456%3Aforward|8024512145/segment%3Away%2F851986783%2F0/road%3Away%2F851986783%3Aforward",
|
||||
"message": "该进口未找到匹配的 OSM 过街节点,过街状态未知,未生成斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-corner-facilities-omitted",
|
||||
"subjectId": "junction-cluster:cluster-8005332807",
|
||||
"message": "已省略 4 组缺少岛体或步行连接来源的角部导流岛和斑马线。"
|
||||
},
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "complex-junction-core-closure-unsupported",
|
||||
"subjectId": "junction-cluster:cluster-8005332807",
|
||||
"message": "路口中心区域缺少可验证的闭合边(parallel-carriageway-closure-unresolved),已保留各进口道路面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "complex-junction-generated",
|
||||
"subjectId": "junction-cluster:cluster-8005332807",
|
||||
"message": "已识别为5 臂非规则路口,独立生成 5 个进口、道路面、0 组斑马线和停止线。"
|
||||
},
|
||||
{
|
||||
"severity": "warning",
|
||||
"rule": "junction-connector-envelope-fallback",
|
||||
"subjectId": "junction:node/1218843451",
|
||||
"message": "路口面需要按转向路径的凸包兜底生成;请检查外缘和路缘与步行带是否符合实际。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/1218843451",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/1590698049",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/8042920686",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/8613058679",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/-91001",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/-91002",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "info",
|
||||
"rule": "ordinary-junction-surface",
|
||||
"subjectId": "junction:node/-91003",
|
||||
"message": "已按道路截面与转向路径生成普通路口面。"
|
||||
},
|
||||
{
|
||||
"severity": "pass",
|
||||
"rule": "effective-carriageway-width",
|
||||
"message": "车行道有效宽度符合标准范围。"
|
||||
},
|
||||
{
|
||||
"severity": "pass",
|
||||
"rule": "effective-carriageway-width",
|
||||
"message": "车行道有效宽度符合标准范围。"
|
||||
},
|
||||
{
|
||||
"severity": "pass",
|
||||
"rule": "effective-carriageway-width",
|
||||
"message": "车行道有效宽度符合标准范围。"
|
||||
},
|
||||
{
|
||||
"severity": "pass",
|
||||
"rule": "effective-carriageway-width",
|
||||
"message": "车行道有效宽度符合标准范围。"
|
||||
},
|
||||
{
|
||||
"severity": "pass",
|
||||
"rule": "effective-carriageway-width",
|
||||
"message": "车行道有效宽度符合标准范围。"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 154 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000" viewBox="-36.08719395540545 -36.08719395540545 72.1743879108109 72.1743879108109"><rect x="-36.08719395540545" y="-36.08719395540545" width="72.1743879108109" height="72.1743879108109" fill="#dce3df"/><g transform="scale(1,-1)"><path d="M-182.72631252387666,-102.1254779457577L-33.00576846735486,-19.702587331817085L-28.30378794160006,-28.24386623474055L-178.02433199812185,-110.66675684868116L-182.72631252387666,-102.1254779457577Z" fill="#344352"/><path d="M-13.877401061909028,35.83996618690307L-32.60097145071207,71.07898612677815L-161.74997668598377,307.7601702851575L-153.19122065898344,312.43036411201814L-24.035529937824496,75.7369070787422L-5.267299635186701,40.41480768260513L-13.877401061909028,35.83996618690307Z" fill="#344352"/><path d="M-169.01463130553654,303.2055773836122L-43.950508628821844,67.09405910058749L-23.02876457095017,30.732235013365L-31.480275695757523,25.87029876582065L-52.54496135333369,62.489498105253034L-177.6308895210455,298.6419478217193L-169.01463130553654,303.2055773836122Z" fill="#344352"/><path d="M227.89329146984065,-415.97013570007834L216.2973298218892,-386.63581315828185L52.601558673307466,-85.6251049921157L28.66176037225708,-43.50461866020552L21.656629977431322,-31.17675199865701L30.13323351541536,-26.35967778008009L37.13805004474461,-38.686992133814755L61.15567230865561,-80.94706580242772L224.90986798852398,-382.066237636286L236.95678034543502,-412.3771710938688L227.89329146984065,-415.97013570007834Z" fill="#344352"/><path d="M-34.90012262525051,-15.773328815598546L-85.9687356197671,-44.46171225077663L-183.29816268315759,-101.35414802585004L-188.21843339596572,-92.93670276831634L-90.83958152603056,-36.015570543775226L-39.675436564727946,-7.27280951919866L-34.90012262525051,-15.773328815598546Z" fill="#344352"/><path d="M14.487867939045346,-35.1143224160154L43.06213857618463,-90.99741176058245L208.05265473251958,-380.1064956216152L236.03985796447984,-410.9027824842917L228.81021385079586,-417.4445243096554L199.70524974312679,-385.1446351729646L34.55910884461189,-95.76820703344168L5.807165522069592,-39.553622662553494L14.487867939045346,-35.1143224160154Z" fill="#344352"/><path d="M35.97666266680469,11.928837813092201L99.27241954235028,44.21004944984773L107.22220535738948,48.26093672582374L243.9846680723037,124.43157018532702L455.510081483468,240.26866166835205L527.5118120727817,279.3797563671248L532.1657079866715,270.81215558769344L460.1858011875623,231.71295153723705L248.69183824237126,115.89312302060819L111.94923577452634,39.73346847966127L103.70211764688071,35.52441175560986L40.4063884383186,3.2432142290782906L35.97666266680469,11.928837813092201Z" fill="#344352"/><path d="M524.4852868960485,287.1272811170911L453.90409544962495,247.28311397322443L96.16102153715367,53.88725207466905L32.57094869790052,20.375806013470168L28.02516156424126,29.001316422333474L91.53776264174262,62.471489130865336L449.2411057296136,255.84583523250643L519.6919605940101,295.61773208885285L524.4852868960485,287.1272811170911Z" fill="#344352"/><path d="M-5.267301987357549,40.41481210969877L7.19145597908364,16.966896881429534L-1.4186221277396471,12.392046531540188L-13.87739870973818,35.83996175980943L-5.267301987357549,40.41481210969877Z" fill="#344352"/><path d="M32.576226528848196,20.378616826004645L9.936314014707545,8.44764971968658L5.390735592917476,17.07320856793075L28.030643108183735,29.004175674248813L32.576226528848196,20.378616826004645Z" fill="#344352"/><path d="M21.65533265089493,-31.174733991428383L8.83172652160411,-8.607331372620877L17.308727370561304,-3.7903951627757237L30.132315857888972,-26.35779778158323L21.65533265089493,-31.174733991428383Z" fill="#344352"/><path d="M40.406387662443116,3.243213833194716L15.952162468129686,-6.714401549583897L12.81716073391365,2.5178387161778915L35.97666344268018,11.928838208975776L40.406387662443116,3.243213833194716Z" fill="#344352"/><path d="M-23.029565476260696,30.733442482788433L-9.745785547033872,7.643493719473469L-18.19700835160192,2.781456926201855L-31.480806274594837,25.87140568951682L-23.029565476260696,30.733442482788433Z" fill="#344352"/><path d="M-39.67543890599017,-7.272810834196548L-17.18469783808538,5.361780903661071L-12.409373652688094,-3.138735762743039L-34.90012028398828,-15.773327500600658L-39.67543890599017,-7.272810834196548Z" fill="#344352"/><path d="M5.8071632026246,-39.553618127096115L-5.955117169320215,-16.553263765692634L2.7256082975662728,-12.113972590069295L14.48787025849034,-35.114326951472776L5.8071632026246,-39.553618127096115Z" fill="#344352"/><path d="M-33.004774561312836,-19.702030337864898L-10.85947931753688,-7.510787799941454L-6.157425483139099,-16.052048931212255L-28.302726014867837,-28.2432914691357L-33.004774561312836,-19.702030337864898Z" fill="#344352"/><path d="M30.898332217283116,-1.639110287941321L28.960168413725203,-2.3917021397042504L27.284427538434166,-3.2440767015880567L25.871109591410008,-4.196233976361157L24.720214575379885,-5.248173Line truncated
|
||||
|
After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"source": "/tmp/路口对应",
|
||||
"images": [
|
||||
{
|
||||
"file": "路口1-生成.png",
|
||||
"sha256": "6cd1ceae55223e1480af858e65cdd128d34286349d28f8b64316937b24b4794a",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
},
|
||||
{
|
||||
"file": "路口1-真实.png",
|
||||
"sha256": "aa9601801660ab7874042609c9408ebf33a8488e5f521bc710c65914a914ce9b",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
},
|
||||
{
|
||||
"file": "路口2-生成.png",
|
||||
"sha256": "0bebf0124f06f92cfec4f14944557dc3d5529b7237317af5a98a4cc1595f18d1",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
},
|
||||
{
|
||||
"file": "路口2-真实.png",
|
||||
"sha256": "256c8c8f133f26ddd986f7cf9f2772f952a232e6d95cb4fc04e873ecbc36fd1c",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
},
|
||||
{
|
||||
"file": "路口3-生成.png",
|
||||
"sha256": "ca74fffb839601dbc2a2b2e4ee1e83d06b0cfbb648fa1132d4a73c236905890a",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
},
|
||||
{
|
||||
"file": "路口3-真实.png",
|
||||
"sha256": "53852c16d62dd52202fc12cdd9c1864c73f76236d06da66cd7bf8485846cbc58",
|
||||
"role": "问题观察资料;非几何真值或专用适配目标"
|
||||
}
|
||||
],
|
||||
"registration": "未配准,无统一比例尺;不得据此确定米级尺寸或遮挡处拓扑"
|
||||
}
|
||||
|
After Width: | Height: | Size: 103 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-450 -450 900 900"><rect x="-450" y="-450" width="900" height="900" fill="#dce3df"/><g transform="scale(1,-1)"><path d="M-1095.6378610867202,-614.4939932910518L-213.29226690488434,-128.75252876580362L-185.08038450530614,-180.0002021833444L-1067.425978687142,-665.7416667085926L-1095.6378610867202,-614.4939932910518Z" fill="#344352"/><path d="M-91.2281387728726,229.64177865092608L-194.88448613504542,424.73029225110537L-969.7798573551645,1844.819898804324L-918.4273067116812,1872.8410563457187L-143.49454366665378,452.68281574900556L-39.567515755664175,257.0908222480824L-91.2281387728726,229.64177865092608Z" fill="#344352"/><path d="M-1013.367775978229,1817.4923386851674L-262.9788561495375,400.81538004186086L-146.6896533301025,198.70817919698567L-197.39871872197082,169.53656171171957L-314.5539788141141,373.20371196017106L-1065.0653238878551,1790.1105613138106L-1013.367775978229,1817.4923386851674Z" fill="#344352"/><path d="M1368.0796969464438,-2497.5619398169756L1298.5039289205843,-2321.5560045661964L316.32932831210917,-515.4917555691998L172.69059072657845,-262.76892271129526L139.74385428270983,-204.78813411798058L190.6034741496094,-175.88568880651906L223.54823064656085,-233.8629932858376L367.6540087507484,-487.4235204310719L1350.1791565375627,-2294.1385514342214L1422.460628744775,-2476.0041521797184L1368.0796969464438,-2497.5619398169756Z" fill="#344352"/><path d="M-224.68214389959246,-105.37017947501909L-515.0872279286506,-268.508405769127L-1099.0689655095262,-609.8660146614541L-1128.5905818785022,-559.3613413365554L-544.3226771218121,-217.8375422311953L-253.33401979912497,-54.3670620023488L-224.68214389959246,-105.37017947501909Z" fill="#344352"/><path d="M96.00729472259131,-228.77471298523346L259.08850043594725,-547.7179305910286L1249.035871739387,-2282.3800965627515L1416.959086702971,-2467.1578178123714L1373.5812389882476,-2506.408274184322L1198.951459080782,-2312.6089394377386L208.07894106190946,-576.3580334061273L43.923097404736296,-255.4105197703302L96.00729472259131,-228.77471298523346Z" fill="#344352"/><path d="M233.23107689054936,78.32407338530714L596.3544862783302,263.51917209344833L644.0531963822988,287.82449395537043L1464.6279507213658,744.848294714763L2733.7803972421652,1439.870843622405L3165.7907692256213,1674.53741182216L3193.714150425086,1623.1318086737379L2761.834721195716,1388.5365843781185L1492.8709774984325,693.617613287837L672.4153846549552,236.65968604452843L622.932673703392,211.40534390628602L259.80943702630776,26.210333281251508L233.23107689054936,78.32407338530714Z" fill="#344352"/><path d="M3147.6316218828397,1721.022561086041L2724.144484536824,1481.957558222841L577.6875866113246,321.5831882999811L212.34319469364561,129.0496153944369L185.06847262156228,180.80267784761674L549.9450577610664,373.08700770021403L2696.1665469654463,1533.333885778533L3118.871664840227,1771.9652669166117L3147.6316218828397,1721.022561086041Z" fill="#344352"/><path d="M-39.56753130044502,257.0908514991723L36.48324042870114,113.96004334034217L-15.177237858416202,86.5109412410061L-91.22812322809177,229.64174939983621L-39.56753130044502,257.0908514991723Z" fill="#344352"/><path d="M212.3748085644226,129.06645133415338L72.97722234187077,55.605564096148896L45.703749759271446,107.3589171856139L185.10130518679426,180.8198044236184L212.3748085644226,129.06645133415338Z" fill="#344352"/><path d="M139.736084322184,-204.77603973318537L61.03073045062238,-66.26777311758019L111.89272412009689,-37.36615585850927L190.59796971816922,-175.87442247411445L139.736084322184,-204.77603973318537Z" fill="#344352"/><path d="M259.8094309965691,26.210330205936145L109.72581404490273,-37.513663091724254L90.91580285029158,17.879778502846477L233.2310829202881,78.3240764606225L259.8094309965691,26.210330205936145Z" fill="#344352"/><path d="M-146.6944393063166,198.71540106493455L-65.673415128586,57.88414994031797L-116.3807613167821,28.711929180688287L-197.4018952570284,169.54318030530487L-146.6944393063166,198.71540106493455Z" fill="#344352"/><path d="M-253.33403535208728,-54.367070739471615L-115.10164963295416,23.287542778271302L-86.44970842897918,-27.715557220153357L-224.68212834663015,-105.37017073789627L-253.33403535208728,-54.367070739471615Z" fill="#344352"/><path d="M43.923082138125224,-255.41048990465185L-28.346815539813434,-114.09152384517881L23.7375254445424,-87.45577679143878L96.00730998920238,-228.77474285091182L43.923082138125224,-255.41048990465185Z" fill="#344352"/><path d="M-213.2864112595747,-128.7492471907484L-76.57309690087986,-53.4869759236247L-48.360777562056626,-104.7345427112495L-185.07412454842827,-179.9968139783732L-213.2864112595747,-128.7492471907484Z" fill="#344352"/><path d="M185.65754388327525,-10.779602121181426L174.0285612176718,-15.295153231759002L163.97411612862376,-20.40940060306184L155.49420855886086,-26.12234424932751L148.58883856565333,-32.4339841610643L143.2580060835495,-39.344320350136854L139.501711194364,-46.85335279518881L137.31995383264513,-54.96108151Line truncated
|
||||
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-450 -450 900 900"><rect x="-450" y="-450" width="900" height="900" fill="#dce3df"/><g transform="scale(1,-1)"><path d="M-1095.6378610867202,-614.4939932910518L-213.29226690488434,-128.75252876580362L-185.08038450530614,-180.0002021833444L-1067.425978687142,-665.7416667085926L-1095.6378610867202,-614.4939932910518Z" fill="#344352"/><path d="M-91.2281387728726,229.64177865092608L-194.88448613504542,424.73029225110537L-969.7798573551645,1844.819898804324L-918.4273067116812,1872.8410563457187L-143.49454366665378,452.68281574900556L-39.567515755664175,257.0908222480824L-91.2281387728726,229.64177865092608Z" fill="#344352"/><path d="M-1013.367775978229,1817.4923386851674L-262.9788561495375,400.81538004186086L-146.6896533301025,198.70817919698567L-197.39871872197082,169.53656171171957L-314.5539788141141,373.20371196017106L-1065.0653238878551,1790.1105613138106L-1013.367775978229,1817.4923386851674Z" fill="#344352"/><path d="M1368.0796969464438,-2497.5619398169756L1298.5039289205843,-2321.5560045661964L316.32932831210917,-515.4917555691998L172.69059072657845,-262.76892271129526L139.74385428270983,-204.78813411798058L190.6034741496094,-175.88568880651906L223.54823064656085,-233.8629932858376L367.6540087507484,-487.4235204310719L1350.1791565375627,-2294.1385514342214L1422.460628744775,-2476.0041521797184L1368.0796969464438,-2497.5619398169756Z" fill="#344352"/><path d="M-224.68214389959246,-105.37017947501909L-515.0872279286506,-268.508405769127L-1099.0689655095262,-609.8660146614541L-1128.5905818785022,-559.3613413365554L-544.3226771218121,-217.8375422311953L-253.33401979912497,-54.3670620023488L-224.68214389959246,-105.37017947501909Z" fill="#344352"/><path d="M96.00729472259131,-228.77471298523346L259.08850043594725,-547.7179305910286L1249.035871739387,-2282.3800965627515L1416.959086702971,-2467.1578178123714L1373.5812389882476,-2506.408274184322L1198.951459080782,-2312.6089394377386L208.07894106190946,-576.3580334061273L43.923097404736296,-255.4105197703302L96.00729472259131,-228.77471298523346Z" fill="#344352"/><path d="M233.23107689054936,78.32407338530714L596.3544862783302,263.51917209344833L644.0531963822988,287.82449395537043L1464.6279507213658,744.848294714763L2733.7803972421652,1439.870843622405L3165.7907692256213,1674.53741182216L3193.714150425086,1623.1318086737379L2761.834721195716,1388.5365843781185L1492.8709774984325,693.617613287837L672.4153846549552,236.65968604452843L622.932673703392,211.40534390628602L259.80943702630776,26.210333281251508L233.23107689054936,78.32407338530714Z" fill="#344352"/><path d="M3147.6316218828397,1721.022561086041L2724.144484536824,1481.957558222841L577.6875866113246,321.5831882999811L212.34319469364561,129.0496153944369L185.06847262156228,180.80267784761674L549.9450577610664,373.08700770021403L2696.1665469654463,1533.333885778533L3118.871664840227,1771.9652669166117L3147.6316218828397,1721.022561086041Z" fill="#344352"/><path d="M-39.56753130044502,257.0908514991723L36.48324042870114,113.96004334034217L-15.177237858416202,86.5109412410061L-91.22812322809177,229.64174939983621L-39.56753130044502,257.0908514991723Z" fill="#344352"/><path d="M212.3748085644226,129.06645133415338L72.97722234187077,55.605564096148896L45.703749759271446,107.3589171856139L185.10130518679426,180.8198044236184L212.3748085644226,129.06645133415338Z" fill="#344352"/><path d="M139.736084322184,-204.77603973318537L61.03073045062238,-66.26777311758019L111.89272412009689,-37.36615585850927L190.59796971816922,-175.87442247411445L139.736084322184,-204.77603973318537Z" fill="#344352"/><path d="M259.8094309965691,26.210330205936145L109.72581404490273,-37.513663091724254L90.91580285029158,17.879778502846477L233.2310829202881,78.3240764606225L259.8094309965691,26.210330205936145Z" fill="#344352"/><path d="M-146.6944393063166,198.71540106493455L-65.673415128586,57.88414994031797L-116.3807613167821,28.711929180688287L-197.4018952570284,169.54318030530487L-146.6944393063166,198.71540106493455Z" fill="#344352"/><path d="M-253.33403535208728,-54.367070739471615L-115.10164963295416,23.287542778271302L-86.44970842897918,-27.715557220153357L-224.68212834663015,-105.37017073789627L-253.33403535208728,-54.367070739471615Z" fill="#344352"/><path d="M43.923082138125224,-255.41048990465185L-28.346815539813434,-114.09152384517881L23.7375254445424,-87.45577679143878L96.00730998920238,-228.77474285091182L43.923082138125224,-255.41048990465185Z" fill="#344352"/><path d="M-213.2864112595747,-128.7492471907484L-76.57309690087986,-53.4869759236247L-48.360777562056626,-104.7345427112495L-185.07412454842827,-179.9968139783732L-213.2864112595747,-128.7492471907484Z" fill="#344352"/><path d="M185.65754388327525,-10.779602121181426L174.0285612176718,-15.295153231759002L163.97411612862376,-20.40940060306184L155.49420855886086,-26.12234424932751L148.58883856565333,-32.4339841610643L143.2580060835495,-39.344320350136854L139.501711194364,-46.85335279518881L137.31995383264513,-54.96108151Line truncated
|
||||
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 457 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 258 KiB |
@@ -0,0 +1,23 @@
|
||||
# Center pavement and vehicle trajectory audit — 2026-09-14
|
||||
|
||||
Scope: investigation and implementation plan only; no implementation changes.
|
||||
|
||||
Reproduced with workbench-data/import-fE8XI7/source.osm and its active area-config.snapshot.json: four nodes (8005332807, 8024512135, 8024512145, 8024512147), core radius 21 m. Do not substitute the older five-node/24 m script.
|
||||
|
||||
## Confirmed findings
|
||||
|
||||
- Actual compilation publishes no complex-core. Diagnostic: complex-junction-core-closure-unsupported / core-closure-invalid. Eight complex-approach surfaces and four complex-corner-fillet surfaces remain.
|
||||
- complex-junction.js constructs each corner fill as [...curve, center, curve[0]]. With the core absent, these center-directed fans explain the triangular gaps. This is not evidence of a triangulation-rendering defect.
|
||||
- buildCoreClosure in junction-boundary-graph.js selects one section per arm when arms contain multiple carriageways, discarding other entry seams from the candidate core. It then sorts endpoints by angle and rejects zero edges, unpaired edges, insufficient area or self-intersection with the same generic reason. Which individual predicate fails must be instrumented before changing construction.
|
||||
- compileConnectors in native-road.js works on enabled model.connections by node. Four-segment nodes use a quadratic curve through an endpoint node as control; other through movements use a straight chord; other turns use cubic curves with lane endpoint tangents. Fixed sampling is 12 segments. Existing tangent-based construction therefore does exist, but is not used consistently.
|
||||
- validateConnectorContainment checks samples against one junction exterior ring and skips kind=cluster; it does not establish swept vehicle clearance from island holes or authoritative complex pavement. No claim yet that a particular observed connector joins the wrong lane; that requires source/destination tracing and measured evidence.
|
||||
|
||||
## Implementation sequence
|
||||
|
||||
1. Establish reproducible metrics for this saved configuration: all entry section IDs, core failure predicate, pavement connected components and unexplained gap regions; each movement's source/destination lane and endpoint/tangent errors. Export pavement and trajectory overlays separately and together. Preserve current four islands as a regression invariant.
|
||||
2. Repair core closure using every valid carriageway entry seam and explicit connecting boundary edges. Reuse BoundaryGraph and polygon-clipping; validate a simple closed boundary, union with approach/turn pavement, and subtract justified non-drivable islands/exclusions. Crosswalks are markings on pavement, not holes. Do not force-fill a convex hull or disable closure validation.
|
||||
3. Trace cluster movements across internal source connections to external lane ports, preserving turn restrictions and source provenance. Determine whether current node-level connectors duplicate or omit these movements before replacing them. Lane endpoints/tangents and pavement must consume the same entry sections.
|
||||
4. Use lane endpoint positions and tangent directions for all connector shapes, including offset through movements. Begin with existing cubic machinery; constrain/control curvature and adapt sampling by geometric error. A cubic with tangent continuity does not automatically give curvature continuity across road joins. Add curvature limits or curvature-transition construction where required. Validate the full path and, with an explicit vehicle envelope, swept clearance against final drivable region and islands. Crossings between different traffic streams are not automatically errors.
|
||||
5. Acceptance: all expected external entries connect to continuous pavement; no unexplained holes; four islands/green polygons retained; movement IDs and permitted lane pairings correct; endpoint error <= 1 cm, measured endpoint tangent error <= 1 degree; no self-return/cusp or island penetration. Establish vehicle-specific minimum radius before declaring trajectories physically drivable. Include T/Y/oblique/multi-carriageway and short-source counterexamples.
|
||||
|
||||
Deliver as one reviewed change across pavement and trajectories after real-workbench visual verification. Do not archive parent task from local facility tests. Remaining uncertainty: exact closure rejection predicate, abnormal connector IDs, whether those displayed lines include lane separators as well as connectors, and necessary vehicle curvature assumptions.
|
||||
@@ -0,0 +1,20 @@
|
||||
# 当前证据与通用问题
|
||||
|
||||
## 图像观察
|
||||
|
||||
三组图显示角部设施离散、形态趋同和内部空间组织不足。紫色连接线/节点等属于调试显示,不能据此断定铺装或实际标线错误。路口 2 的 T 形判断、图像与 OSM 对应关系均待核实;禁止将截图观察硬编码成拓扑真值。
|
||||
|
||||
## 代码入口(规划时)
|
||||
|
||||
- src/compile/complex-junction.js:17 resolveComplexJunctionTopology:以来源和方向归组;独立通道/分隔关系需要显式保留。
|
||||
- src/compile/complex-junction.js:150 boundaryParts;约 325 行按夹角与过街框架生成岛体/小斑马线;约 550 行由进口端点排序生成核心;约 603 行生成独立进口矩形。彼此缺少统一边界所有权。
|
||||
- src/compile/complex-junction.js:698 classifyJunctionShape:有形态分类,但主要生成规则仍共用包络。
|
||||
- src/compile/junction-topology.js:29 structureFromTopology 和 junction-structure.js:已有来源、臂、角部、设施稳定键,但结构主要是输出读模型;不宜直接把展示 schema 当可求解计划。
|
||||
- src/compile/direct-edit-solver.js:276 clusterArms 再次归组,可能与几何生成器方向采样/来源判断漂移;规划需统一纯拓扑解析。
|
||||
- src/compile/native-road.js:3198 trimLineAtComplexCluster 及所有调用:最近修复只为道路面传 per-road 半径,其他裁切消费者仍可能使用默认半径,需跨图层审计。
|
||||
- src/compile/direct-edit-solver.js:17 引入 complexJunctionMetrics,而其所在模块读取参考文件。后端规范要求 resolver 无 IO,应将预加载参数与纯计算分离。
|
||||
- workbench/client/src/components/ParameterPanel.tsx 和 App.tsx:复用现有编辑通道;要验证预览先于 Enter 返回、批量修改已有约束、取消与旧响应等场景,避免只证明请求发生。
|
||||
|
||||
## 设计约束
|
||||
|
||||
遵守 .trellis/spec/backend/direct-edit-api.md、frontend/direct-edit-client.md;既有实现与规范不一致处需显式记录修正。数据中没有路缘/岛体精确形状时,只能推断或人工校正,不能宣称全自动真实还原。
|
||||
@@ -0,0 +1,38 @@
|
||||
# Geometry Library Evaluation
|
||||
|
||||
日期:2026-09-11
|
||||
|
||||
## 结论
|
||||
|
||||
首选 `polygon-clipping`(MIT)作为局部米制平面区域布尔运算库,配合项目已有的 `rbush` 空间索引。保留现有 `JunctionBuildPlan` 和 `BoundaryGraph` 作为来源拓扑与共享边界权威,不引入通用图框架替代道路来源身份。
|
||||
|
||||
## 候选比较
|
||||
|
||||
| 库 | 适合能力 | 主要问题 | 决策 |
|
||||
| --- | --- | --- | --- |
|
||||
| `polygon-clipping` | union/intersection/difference/xor;Polygon/MultiPolygon;适合中心区域、排除区、安全岛可行域 | 不负责道路语义、单位和拓扑来源 | 首选补充 |
|
||||
| `@turf/*` | buffer、lineOffset、空间关系和地理验证;可按模块引入 | 完整包较重;经纬度计算不应成为内部几何权威 | 作为可选验证/偏移工具 |
|
||||
| `JSTS` | 较完整的 GEOS/JTS 类几何算法 | 包体、API 和维护复杂度偏高 | 后备方案 |
|
||||
| `clipper2-js` | 高精度平面裁切和偏移 | 当前运行时与维护兼容性需额外验证 | 暂不采用 |
|
||||
| `graphlib/graphology` | 通用图遍历 | 不解决几何边界,不能替代 OSM 来源拓扑 | 不采用 |
|
||||
|
||||
## 目标数据流
|
||||
|
||||
```text
|
||||
JunctionBuildPlan
|
||||
-> BoundaryGraph(来源边、共享边、排除区)
|
||||
-> polygon-clipping(区域 union/intersection/difference)
|
||||
-> CornerFeasibleRegion
|
||||
-> IslandRegion
|
||||
-> CrossingRegion
|
||||
-> 统一连通/自交/重叠/接缝验证
|
||||
```
|
||||
|
||||
局部米制投影、稳定来源键、编辑约束和 GeoJSON 输出仍由项目代码负责。第三方库只接受已经投影到局部平面坐标的环,并返回经过规范化的区域结果;不得让布尔运算输出顺序决定来源身份。
|
||||
|
||||
## 引入前验证
|
||||
|
||||
- 在独立纯函数测试中验证凹形、孔洞、相切、重叠和多区域结果。
|
||||
- 验证许可证、Node CommonJS、Vite 浏览器构建和包体影响。
|
||||
- 先替换 `ringsOverlap` 等局部几何判断,再接入中心区域求解;不先改编辑协议或 UI。
|
||||
- 如果库无法稳定保留共享边引用,则只用于可行域裁切,BoundaryGraph 仍保留边界所有权和接缝计算。
|
||||
@@ -0,0 +1,47 @@
|
||||
'use strict';
|
||||
|
||||
// Run from the repo root with node --require <this file> test/<suite>.js.
|
||||
// This one-off comparison retains the pre-refactor generator as its oracle.
|
||||
const assert = require('node:assert/strict');
|
||||
const path = require('node:path');
|
||||
const Module = require('node:module');
|
||||
const { execFileSync } = require('node:child_process');
|
||||
const root = path.resolve(__dirname, '../../../..');
|
||||
const filename = path.join(root, 'src/compile/complex-junction.js');
|
||||
const baseline = new Module(filename, module);
|
||||
baseline.filename = filename;
|
||||
baseline.paths = Module._nodeModulePaths(path.dirname(filename));
|
||||
baseline._compile(
|
||||
execFileSync('git', ['show', '1679d1b:src/compile/complex-junction.js'], { cwd: root, encoding: 'utf8' }),
|
||||
filename,
|
||||
);
|
||||
const current = require(filename);
|
||||
const build = current.buildComplexJunctionGeometry;
|
||||
let comparisons = 0;
|
||||
const shapes = new Set();
|
||||
const diagnostics = new Set();
|
||||
let shifted = 0;
|
||||
let crossingEdits = 0;
|
||||
current.buildComplexJunctionGeometry = function (model, cluster, helpers) {
|
||||
const values = {};
|
||||
const functions = {};
|
||||
for (const [key, value] of Object.entries(helpers)) {
|
||||
(typeof value === 'function' ? functions : values)[key] = value;
|
||||
}
|
||||
const copied = structuredClone({ model, cluster, values });
|
||||
const expected = baseline.exports.buildComplexJunctionGeometry(copied.model, copied.cluster, {
|
||||
...copied.values,
|
||||
...functions,
|
||||
});
|
||||
const actual = build(model, cluster, helpers);
|
||||
assert.deepStrictEqual(actual, expected, `generator output changed for ${cluster.id}`);
|
||||
comparisons++;
|
||||
shapes.add(actual.shape?.kind || 'early-return');
|
||||
for (const item of actual.diagnostics) diagnostics.add(item.rule);
|
||||
if (helpers.clusterIslandOffsetMeters) shifted++;
|
||||
if (helpers.clusterCrossingControls?.size) crossingEdits++;
|
||||
return actual;
|
||||
};
|
||||
process.on('exit', () => {
|
||||
console.log('Generator parity:', { comparisons, shapes: [...shapes], shifted, crossingEdits, diagnostics: [...diagnostics] });
|
||||
});
|
||||
@@ -0,0 +1,47 @@
|
||||
# 复杂路口生成器结构整理
|
||||
|
||||
用户于 2026-09-16 确认实施代码审阅提出的结构重构。
|
||||
|
||||
## 边界与设计
|
||||
|
||||
现有 buildComplexJunctionGeometry 超过千行,阶段之间依赖 arm 上的可变字段和共享集合。本轮将入口整理为可读的阶段编排,抽取进口、过街布局、角部组合、位移联动和结果装配;角部组合继续拆出有明确职责的局部函数。阶段输入输出显式传递,避免通用可变 context。
|
||||
|
||||
实现范围为 src/compile/complex-junction.js 及必要的同目录内部模块。保留公开导出、运算顺序、坐标、Feature 顺序、ID、诊断和失败路径。清理本轮相关的无用变量、导入和过时注释;诊断内容不在此次改变。复用既有几何求解模块,不引入框架或新的配置机制,不改 UI 或几何算法。
|
||||
|
||||
## 验证计划
|
||||
|
||||
1. 保存重构前生成器,对实际测试输入逐次深比较完整返回值。
|
||||
2. 运行现有几何、编辑及完整 npm test 回归;既有失败需与基线区分,禁止刷新快照隐藏差异。
|
||||
3. 运行格式、客户端类型及 git diff --check;审阅阶段依赖和失败路径。
|
||||
4. 记录重构结果与验证证据,不关闭父任务的其他未完成验收。
|
||||
|
||||
## 实现与差分结果
|
||||
|
||||
生产修改仅位于 `src/compile/complex-junction.js`。主函数从 1021 行缩为约 159 行;同文件私有函数分别承担阶段编排及单个设施构建,最大新函数约 115 行。没有新增公开导出或依赖。删除两个无用导入和两项无用坐标计算;保留历史诊断并注明其兼容性原因。
|
||||
|
||||
差分工具最初位于 `/private/tmp/complex-junction-refactor-parity.cjs`,现保留在同目录 `geometry-refactor-parity.cjs`。用 Node Module 加载基线提交 `1679d1b` 的生成器,将每次实际调用的输入复制后交给旧函数,再对完整返回值执行 `assert.deepStrictEqual`。45 次比较全部一致:主测试流 41 次,单独 island-offset 测试 4 次(其中 3 次非零外移)。覆盖正交、偏置十字、T 形、多臂和节点不足返回,以及无效断面、短过渡、排除区、岛体求解失败、核心闭合失败、过街编辑等诊断路径。
|
||||
|
||||
检查结果:
|
||||
|
||||
- `npm test` 的代码、几何、编辑、API、工作台导入检查通过,最后 `test/fixtures.js` 失败。该快照差异在重构前已单独复现,重构后输出哈希相同;未刷新基线。
|
||||
- `node --require /private/tmp/complex-junction-refactor-parity.cjs test/junction-island-offset.js` 通过。
|
||||
- 客户端类型检查、191 项客户端单测通过。
|
||||
- 本次源文件格式和 `git diff --check` 通过。全仓 `format:check` 在未修改的 `junction-facility-composition.js` 失败;对 HEAD 原文运行 Prettier 同样失败。
|
||||
- `npm run test:e2e` 通过:生产构建及 12 项浏览器回归,包含三臂复杂路口控制编辑、保存和刷新。保留既有 bundle 大小提示。
|
||||
- 独立代码复核通过,无新增修复:核对角部失败依赖、Feature/诊断顺序、共享过街位移和停止线联动。
|
||||
|
||||
本轮未提交,父任务保持进行中。历史“角部设施已省略”诊断与实际默认生成行为的矛盾保留为单独行为修正事项。
|
||||
|
||||
## 后续模块边界评估(2026-09-16)
|
||||
|
||||
阶段编排已经从入口函数中抽出,但 `complex-junction.js` 仍保留了局部米制计算、道路臂包络、圆角相交、人行道接缝和环验证等无状态几何代码,导致文件仍有 1685 行。它们不依赖构建阶段、Feature 发布或诊断顺序,已迁入 `complex-junction-geometry.js`,入口文件降为 1472 行。
|
||||
|
||||
下一条清晰边界是 `complex-junction-facilities.js`:进口/停止线、道路臂过街、角部组合和位移联动共用可变的 arm frame,必须作为一个整体迁移;把它们逐个拆成更多小模块会掩盖阶段依赖。核心/入口面/统一铺装可作为之后的 `complex-junction-surfaces.js`。建议在当前功能任务结束并提交现有工作后,以完整输出差分为保护再实施这两次迁移,避免在仍频繁调整的设施算法中扩大冲突面。
|
||||
|
||||
本次几何模块提取保持输出:两组设施测试与 island-offset 测试通过,差分脚本对 5 次复杂路口完整返回值比较一致;铺装、落面和拓扑反例测试通过,变更文件 Prettier 与 `git diff --check` 通过。
|
||||
|
||||
随后迁出 `complex-junction-surfaces.js`:核心面、进口面与统一铺装区域现在作为一组独立的 surface 阶段。入口文件从 1473 行降至 1301 行。铺装、落面、拓扑反例与 island-offset 回归通过;差分脚本对 9 次复杂路口完整返回值比较一致,包含无效入口、T 形、圆角降级及非零岛体外移。
|
||||
|
||||
最后迁出 `complex-junction-facilities.js`:进口与停止线、道路臂过街、角部组合及共享位移共同拥有 arm frame 的写入、消费和最终应用,因此保持为单个模块。入口文件从 1301 行降至 367 行,只保留拓扑/指标/边界图、阶段编排和发布。迁移中补回形态分类所需的 `normalizeHeading` 与 `positiveHeadingDelta` 纯几何导入。设施组合、岛体外移、铺装、落面和拓扑反例通过;差分脚本对 5 次完整返回值比较一致,包含非零岛体外移。
|
||||
|
||||
完整 `npm test` 通过全部代码、几何、编辑 API 和工作台导入检查,最后仍在已有 `test/fixtures.js` 快照差异退出;该差异与重构前记录一致,未更新基线。首次完整回归暴露 facilities 模块遗漏 `ringsOverlap` 依赖,已补入并重跑。客户端类型检查和变更文件格式检查通过。
|
||||
@@ -0,0 +1,142 @@
|
||||
# Phase 0 Audit: Current Complex-Junction Construction
|
||||
|
||||
Date: 2026-09-08
|
||||
|
||||
## Scope and evidence
|
||||
|
||||
This audit uses source-independent synthetic fixtures in
|
||||
`test/junction-build-plan-counterexamples.js`. They deliberately do not contain
|
||||
the reference image names, OSM object IDs, place names, or fixed real-world
|
||||
coordinates. The file records the old behaviour as a baseline; phase 1 must
|
||||
replace its absence assertions with positive `JunctionBuildPlan` assertions.
|
||||
|
||||
## Findings
|
||||
|
||||
### 1. Source identity survives, but grouping and geometry have separate rules
|
||||
|
||||
- `src/compile/native-road.js:2823-2841` groups ordinary junction approaches by
|
||||
`segmentId`, sums both directions into one width, and selects the first road
|
||||
for the approach line.
|
||||
- `src/compile/complex-junction.js:17-89` creates one complex carriageway per
|
||||
existing approach, then groups them into an arm when heading differs by less
|
||||
than 20 degrees (`:60-71`). The direct-edit solver repeats that independently
|
||||
in `src/compile/direct-edit-solver.js:210-297`, including its own line and
|
||||
tangent sampling (`:254-258`, `:277-296`).
|
||||
- Stable keys use source identity (`complex-junction.js:47-88` and
|
||||
`junction-topology.js:3-9`), which is reusable. But an arm becomes the
|
||||
operative geometry unit: the core uses one envelope per arm
|
||||
(`complex-junction.js:551-566`), and arm crossings start from the
|
||||
representative (`:244-247`). That does not provide a distinct EntrySection
|
||||
or shared curb for each separated carriageway.
|
||||
|
||||
Result: directional/source identity is a good starting point, but no single
|
||||
pure structure resolver is authoritative for compiler and solver. Do not make
|
||||
the 20-degree threshold the `JunctionBuildPlan` grouping rule.
|
||||
|
||||
### 2. Distance semantics mix along-line and radial projection
|
||||
|
||||
- Ordinary cutback uses `pointAlongLine()` and a tangent at that cutback
|
||||
(`native-road.js:2844-2859`, `:2900-2918`), which is the correct local basis
|
||||
for a bent ordinary approach.
|
||||
- Complex geometry takes the first-segment heading at the node
|
||||
(`complex-junction.js:42-44`) and maps a radius to an along-line station by a
|
||||
scalar projection (`:857-861`). For a curve, that is not the intersection of
|
||||
the centre-radius boundary and the line. `armEnvelopeAtRadius()` and corner
|
||||
calculations reuse it (`:862-878`, `:919-934`).
|
||||
- External road surface has a late per-road radial correction
|
||||
(`native-road.js:656-699`, `:3215-3236`), but the other consumers do not all
|
||||
receive that same per-road radius.
|
||||
|
||||
Result: `EntrySection` must name a fixed far section and a station measured on
|
||||
the source polyline. It may derive a boundary intersection from the actual
|
||||
polyline, but may not equate that with a centre projection.
|
||||
|
||||
### 3. Existing surfaces have no shared-boundary authority
|
||||
|
||||
- Complex geometry independently emits a core polygon (`complex-junction.js:551-602`), one rectangular polygon per carriageway (`:603-631`), corner fills
|
||||
(`:450-490`), pedestrian corner bands (`:492-549`), and automatic corner
|
||||
islands/crossings (`:319-449`). Their overlap is intentional in places; it is
|
||||
not a referenced seam contract.
|
||||
- Ordinary boundaries merge parallel approaches into a single face
|
||||
(`native-road.js:2861-2897`) and then independently round corners
|
||||
(`:2900-2955`). This avoids one failure mode but loses separate-corridor
|
||||
semantics.
|
||||
- `roadRing()` and `sidewalkRing()` only offset independent centre lines
|
||||
(`native-road.js:3364-3396`); neither receives a shared boundary reference.
|
||||
- Validation is local: complex pedestrian corners check self-intersection
|
||||
(`complex-junction.js:519-530`) and the core checks one ring (`:565-566`).
|
||||
There is no validation of road/core seams, connected required pavement, holes,
|
||||
or exclusion zones.
|
||||
|
||||
Result: phase 2 needs `BoundaryGraph` ownership before adding more controls.
|
||||
Core, approach, corner, sidewalk, marking, and facility producers must consume
|
||||
edge references rather than reconstructing offset rectangles.
|
||||
|
||||
### 4. Layer trimming is inconsistent
|
||||
|
||||
| Consumer | Complex-cluster trim path | Per-carriageway boundary radius |
|
||||
| --- | --- | --- |
|
||||
| Road surface | `native-road.js:688-699` | Yes, from `complexApproachBoundaryRadii()` |
|
||||
| Edge lines | `native-road.js:1098-1120` | No |
|
||||
| Centre/lane separators | `native-road.js:1171-1192` | No |
|
||||
| Sidewalk strips | `native-road.js:1850-1855` | No |
|
||||
| Lane centre lines | `native-road.js:2109-2140` | No |
|
||||
| Complex carriageway, core, corners, facilities | `complex-junction.js:149-667` | Separate radial/core rules |
|
||||
|
||||
The shared helper falls back to `approachOuterRadius` when no radius is passed
|
||||
(`native-road.js:3201-3212`). Thus the earlier road-surface continuity repair
|
||||
does not establish a cross-layer contract. Every listed consumer must eventually
|
||||
take its termination from the same `EntrySection`/BoundaryGraph plan.
|
||||
|
||||
### 5. Solver purity is currently violated indirectly
|
||||
|
||||
`direct-edit-solver.js:17` imports `complexJunctionMetrics()`. That function
|
||||
calls `readReferenceCalibration()` (`complex-junction.js:740-757`), which uses
|
||||
`fs.existsSync` and `fs.readFileSync` (`:723-737`). This conflicts with the
|
||||
direct-edit resolver purity requirement in `.trellis/spec/backend/direct-edit-api.md`.
|
||||
Preload reference-derived metrics in the compile/service boundary, then pass
|
||||
plain values into a pure topology/plan resolver.
|
||||
|
||||
## Minimal counterexamples and required future invariants
|
||||
|
||||
| Fixture | Current baseline | Required plan invariant |
|
||||
| --- | --- | --- |
|
||||
| `divided` | Two 10 m-separated, same-heading carriageways become one 20-degree arm. | Two stable carriageways and EntrySections remain distinct; an arm may group them for presentation only. Their boundaries cannot collapse into a single solid approach unless an explicit traversable connection says so. |
|
||||
| `tee` | Shape is `t-junction`; no closure or boundary object exists. | The blocked side is represented by explicit boundary edges, with no invented through pavement or facility. |
|
||||
| `offset-unequal` | Label is `offset-cross`; widths remain approach metadata without boundary references. | Each section keeps its own position, tangent, left/right edge, and far anchor; generated rings have shared seams within 1 cm. |
|
||||
| `curved-short` | Heading samples the first segment and core/radius code uses a projection-derived station; length is below the minimum core radius. | Resolve against actual polyline length and local tangent. Return an object-scoped unsupported diagnostic when a required transition cannot fit; never extend or silently disconnect geometry. |
|
||||
|
||||
## Recommended first implementation slice
|
||||
|
||||
Implement a pure `junction-build-plan` module before touching rendering or UI.
|
||||
It should receive already-loaded model/config data and return either:
|
||||
|
||||
1. `JunctionBuildPlan` with version, source topology, stable carriageway keys,
|
||||
`EntrySection`s (source polyline, far station, entry station, tangent,
|
||||
left/right boundary endpoints), grouping provenance, and diagnostics; or
|
||||
2. an object-scoped unsupported/ambiguous result with no geometry claim.
|
||||
|
||||
The module must be the sole source for both `resolveComplexJunctionTopology()`
|
||||
and solver cluster handle anchors. First tests should make all four fixtures
|
||||
positive: input order and rotation stable, separated carriageways retained,
|
||||
curved stations bounded by actual length, and T closure explicit. Do not add a
|
||||
new user control until phase 2 verifies shared seams and all layer consumers use
|
||||
the plan.
|
||||
|
||||
## Compatibility matrix for the first slice
|
||||
|
||||
| Existing concept | First-slice treatment |
|
||||
| --- | --- |
|
||||
| Stable carriageway/arm/corner keys | Preserve source-derived keys; add plan-local keys without coordinate ordering. |
|
||||
| `cluster-carriageway-width` and cutback | Read existing constraints through an adapter; retain values only when the resolved EntrySection has a feasible range, otherwise mark recheck/stale. |
|
||||
| Corner radius | Preserve as a compatibility request, but do not derive a final curve until BoundaryGraph feasibility exists. |
|
||||
| Crossing and stop-line offsets | Keep document readability; mark as dependent on an arm/section plan and do not create a facility from angle alone. |
|
||||
| Ordinary junction output | No behavior change in the first slice. |
|
||||
| Reference-file calibration | Move I/O outside the pure resolver and inject resolved metrics. |
|
||||
|
||||
## Checks run
|
||||
|
||||
`node test/junction-build-plan-counterexamples.js`
|
||||
|
||||
This is a planning-stage baseline and is intentionally not added to `npm test`
|
||||
until phase 1 replaces its current-state assertions with the new plan contract.
|
||||
@@ -0,0 +1,12 @@
|
||||
// Run from repository root with BASELINE_ROOT pointing to a checkout of 6a8f026 with dependencies.
|
||||
const fs=require('fs'),assert=require('assert/strict'),{performance}=require('perf_hooks');
|
||||
const root=process.cwd(), old=require(process.env.BASELINE_ROOT+'/src/compile/native-road'),fast=require(root+'/src/compile/native-road');
|
||||
const solveOld=require(process.env.BASELINE_ROOT+'/src/compile/direct-edit-solver').resolveDirectEditConstraints,solveFast=require(root+'/src/compile/direct-edit-solver').resolveDirectEditConstraints;
|
||||
const dir=root+'/workbench-data/import-fE8XI7',options=JSON.parse(fs.readFileSync(dir+'/active/area-config.snapshot.json')).options,overrides=old.loadOverrides(dir+'/native-road-overrides.json'),model=old.compileRoadModel(fs.readFileSync(dir+'/source.osm','utf8'),overrides),doc=JSON.parse(fs.readFileSync(dir+'/active/native-road-edits.json'));
|
||||
const context={junctionTemplates:options.junctionTemplates,selection:{type:'cluster',id:options.junctionTemplates.clusters[0].id}};
|
||||
const handles=solveOld(model,doc,context).handles.handles;
|
||||
const fields={'cluster-carriageway-width':'widthMeters','cluster-carriageway-transition-length':'transitionLengthMeters','cluster-carriageway-direction':'offsetDegrees','cluster-carriageway-position':'offsetMeters','cluster-corner-radius':'radiusMeters','cluster-crossing-inset':'insetMeters','cluster-stop-line-offset':'offsetMeters'};
|
||||
const cases=[{name:'baseline',doc}];
|
||||
for(const [kind,field] of Object.entries(fields)) {const h=handles.find(h=>h.kind===kind);if(!h){console.log(JSON.stringify({missing:kind}));continue;} cases.push({name:kind,doc:{...doc,constraints:[{id:'experiment',kind,anchor:h.anchor,value:{[field]:Math.min(h.value.max,h.value.current+0.4)},enabled:true,status:'exact'}]}});}
|
||||
function run(native,solve,document){const t=performance.now(),resolution=solve(model,document,context),compiled=native.compileGeometry(model,overrides,{...options,directEdit:resolution});return {ms:performance.now()-t,resolution,compiled};}
|
||||
for(let i=0;i<3;i++)for(const c of cases){const a=run(old,solveOld,c.doc),b=run(fast,solveFast,c.doc);assert.deepEqual(b.resolution,a.resolution);assert.deepEqual(b.compiled,a.compiled);if(c.name!=='baseline')assert.equal(a.resolution.constraintStates[0].applied,true,c.name);console.log(JSON.stringify({round:i,kind:c.name,oldMs:a.ms,newMs:b.ms,equal:true}));}
|
||||
@@ -0,0 +1,31 @@
|
||||
# JunctionTools preview latency audit — 2026-09-14
|
||||
|
||||
Investigation only; implementation unchanged. Baseline commit 6a8f026. Real source/config: workbench-data/import-fE8XI7, four-node cluster, radius 21m. Called exported editPreview with selection={cluster:actualClusterId}, no added constraints; this measures repeated preview processing, not actual browser input-to-paint latency. No writes to user workspace data. Performance wrappers in /private/tmp/profile-junction-preview.js instrument exported model/solver/compiler/projection stages before server import.
|
||||
|
||||
## Measurements
|
||||
|
||||
CPU-profiled run: 1 cold + 5 repeated calls. Then independent unprofiled process: 1 cold + 2 repeated calls. Unprofiled repeated values:
|
||||
|
||||
| Phase | Run 1 ms | Run 2 ms |
|
||||
| --- | ---: | ---: |
|
||||
| OSM/model build | 66.8 | 73.7 |
|
||||
| Constraint resolution + handle construction | 306.3 | 313.1 |
|
||||
| Whole-area geometry | 1996.8 | 1951.3 |
|
||||
| Selected junction projection | 0.83 | 0.56 |
|
||||
| Total editPreview | 2375.9 | 2344.7 |
|
||||
| JSON.stringify response | 175.8 | 167.1 |
|
||||
|
||||
Response: 24,185,780 UTF-8 bytes. Counts include 20,942 lane-separator features (13.59MB), 4,978 direction-arrow features (4.24MB), 860 connectors (3.28MB), 2,212 center-line features (1.88MB). These are whole-region collections, not just the selected cluster. This already costs about 2.5 seconds before network/browser parsing/rendering. Small sample; do not label this P95.
|
||||
|
||||
CPU sampling across six selected-cluster previews: compileLaneMarkings inclusive ~7.1s, trimLineBeforeFirstControl inclusive ~6.8s (nested, do not sum); compileConnectors ~2.4s; resolver ~1.5s. The biggest hotspot is control avoidance, not core filling or four-island geometry. trimLineBeforeFirstControl probes every 0.25m and ringsOverlapControl scans control features; controlBounds alone consumes ~2.35s self time across six calls. Road/junction affects construction repeatedly scans global connections. Arrow assets are synchronously reread via loadManifest during generation.
|
||||
|
||||
## Confirmed causes
|
||||
|
||||
1. compileEditCandidate rereads/parses OSM and rebuilds the model, resolves constraints and compiles all area geometry for every request. selection reaches handle filtering; it does not restrict geometry compilation.
|
||||
2. resolveDirectEditConstraints constructs all road/junction/cluster/lane handles before selectHandles filters them. Cluster selection does not avoid global handle/affects construction.
|
||||
3. editPreview returns full-area layers. localJunctionPreview filters them only after browser receipt. Server JSON response is not compressed by sendJson; stringify is synchronous.
|
||||
4. UI schedules live changes with 80ms trailing debounce; settle flushes immediately. AbortController abandons requests on the client, but synchronous server computation has no cancellation signal or cooperative yields, so obsolete work can still occupy the single event loop.
|
||||
5. EditPreviewLayer.show clears touched sources, reparses GeoJSON, recreates features and reprojects to EPSG:3857. JunctionTools does scope its displayed collections, so do not claim it necessarily draws all ~30,000 features. Browser parsing/filtering/paint duration has not been measured.
|
||||
6. degraded only labels compute >300ms. It neither stops computation nor includes response serialization/network/paint. Historical comments about ~142ms reflect different data/code and are not current performance evidence.
|
||||
|
||||
Priority implied by evidence: avoid whole-area marking/control recomputation; generate selected handles before filtering; return scoped layers; cache stable parsing/assets. Do not promise 300ms from debounce tweaks, worker offloading alone, or merely adding Maps. Backend computation alone must be reduced by roughly an order of magnitude.
|
||||
@@ -0,0 +1,3 @@
|
||||
{"run":0,"computeMs":1564.985023,"stages":{"compileRoadModel":79.877753,"resolveDirectEditConstraints":28.894586000000004,"compileGeometry":1445.833637,"projectJunctionStructure":1.6543349999999464,"standardsDiagnostics":0.2963159999999334},"serializationMs":233.65626299999985,"bytes":24185780,"degraded":true,"layerBytes":{"roadSurface":259256,"edgeLines":42,"sidewalkSurface":22768,"intersectionSurface":151764,"laneCenterlines":285839,"laneSeparators":13587441,"centerLines":1875036,"directionArrows":4243365,"turnArrows":42,"crosswalks":256167,"vehicleStopLines":5999,"connectors":3278237},"counts":{"roadSurface":239,"edgeLines":0,"sidewalkSurface":8,"intersectionSurface":92,"laneCenterlines":499,"laneSeparators":20942,"centerLines":2212,"directionArrows":4978,"turnArrows":0,"crosswalks":141,"vehicleStopLines":4,"connectors":860}}
|
||||
{"run":1,"computeMs":1451.9432230000002,"stages":{"compileRoadModel":68.01373799999965,"resolveDirectEditConstraints":10.46456900000021,"compileGeometry":1367.673898,"projectJunctionStructure":0.9491409999995994,"standardsDiagnostics":0.021730999999817868},"serializationMs":171.42120999999997,"bytes":24185780,"degraded":true,"layerBytes":{"roadSurface":259256,"edgeLines":42,"sidewalkSurface":22768,"intersectionSurface":151764,"laneCenterlines":285839,"laneSeparators":13587441,"centerLines":1875036,"directionArrows":4243365,"turnArrows":42,"crosswalks":256167,"vehicleStopLines":5999,"connectors":3278237},"counts":{"roadSurface":239,"edgeLines":0,"sidewalkSurface":8,"intersectionSurface":92,"laneCenterlines":499,"laneSeparators":20942,"centerLines":2212,"directionArrows":4978,"turnArrows":0,"crosswalks":141,"vehicleStopLines":4,"connectors":860}}
|
||||
{"run":2,"computeMs":1387.485408,"stages":{"compileRoadModel":71.12653100000034,"resolveDirectEditConstraints":7.21379799999977,"compileGeometry":1302.8253790000003,"projectJunctionStructure":0.6795459999993909,"standardsDiagnostics":0.2227179999999862},"serializationMs":168.53626499999973,"bytes":24185780,"degraded":true,"layerBytes":{"roadSurface":259256,"edgeLines":42,"sidewalkSurface":22768,"intersectionSurface":151764,"laneCenterlines":285839,"laneSeparators":13587441,"centerLines":1875036,"directionArrows":4243365,"turnArrows":42,"crosswalks":256167,"vehicleStopLines":5999,"connectors":3278237},"counts":{"roadSurface":239,"edgeLines":0,"sidewalkSurface":8,"intersectionSurface":92,"laneCenterlines":499,"laneSeparators":20942,"centerLines":2212,"directionArrows":4978,"turnArrows":0,"crosswalks":141,"vehicleStopLines":4,"connectors":860}}
|
||||
@@ -0,0 +1,22 @@
|
||||
{"missing":"cluster-crossing-inset"}
|
||||
{"round":0,"kind":"baseline","oldMs":2285.4365359999997,"newMs":1292.1180959999997,"equal":true}
|
||||
{"round":0,"kind":"cluster-carriageway-width","oldMs":2376.678916,"newMs":1238.5497850000002,"equal":true}
|
||||
{"round":0,"kind":"cluster-carriageway-transition-length","oldMs":2178.8894229999987,"newMs":1192.483655,"equal":true}
|
||||
{"round":0,"kind":"cluster-carriageway-direction","oldMs":2180.4383500000004,"newMs":1218.5936649999985,"equal":true}
|
||||
{"round":0,"kind":"cluster-carriageway-position","oldMs":2216.8962889999984,"newMs":1221.5325800000028,"equal":true}
|
||||
{"round":0,"kind":"cluster-corner-radius","oldMs":2166.0852030000024,"newMs":1209.366739000001,"equal":true}
|
||||
{"round":0,"kind":"cluster-stop-line-offset","oldMs":2255.1596759999993,"newMs":1192.0639980000014,"equal":true}
|
||||
{"round":1,"kind":"baseline","oldMs":2172.251967,"newMs":1182.4069149999996,"equal":true}
|
||||
{"round":1,"kind":"cluster-carriageway-width","oldMs":2199.3163970000023,"newMs":1198.1523030000026,"equal":true}
|
||||
{"round":1,"kind":"cluster-carriageway-transition-length","oldMs":2240.4705299999987,"newMs":1194.0498739999966,"equal":true}
|
||||
{"round":1,"kind":"cluster-carriageway-direction","oldMs":2180.7153689999977,"newMs":1188.6622540000026,"equal":true}
|
||||
{"round":1,"kind":"cluster-carriageway-position","oldMs":2172.935529000002,"newMs":1196.8491980000035,"equal":true}
|
||||
{"round":1,"kind":"cluster-corner-radius","oldMs":2219.6554370000013,"newMs":1189.8391730000003,"equal":true}
|
||||
{"round":1,"kind":"cluster-stop-line-offset","oldMs":2100.577357999995,"newMs":1227.7292689999958,"equal":true}
|
||||
{"round":2,"kind":"baseline","oldMs":2165.955930999997,"newMs":1179.9063920000044,"equal":true}
|
||||
{"round":2,"kind":"cluster-carriageway-width","oldMs":2210.4734150000004,"newMs":1202.4629229999991,"equal":true}
|
||||
{"round":2,"kind":"cluster-carriageway-transition-length","oldMs":2111.6621700000032,"newMs":1153.514052999999,"equal":true}
|
||||
{"round":2,"kind":"cluster-carriageway-direction","oldMs":2172.6889870000014,"newMs":1251.9535700000051,"equal":true}
|
||||
{"round":2,"kind":"cluster-carriageway-position","oldMs":2256.1194470000046,"newMs":1234.4344730000012,"equal":true}
|
||||
{"round":2,"kind":"cluster-corner-radius","oldMs":2239.5719339999923,"newMs":1189.8456850000075,"equal":true}
|
||||
{"round":2,"kind":"cluster-stop-line-offset","oldMs":2228.122657,"newMs":1212.329448999997,"equal":true}
|
||||
@@ -0,0 +1,81 @@
|
||||
// Isolated experiment: invokes production pure functions; never writes active data.
|
||||
// Run from repository root: node .trellis/tasks/09-08-junction-reference-fidelity/research/preview-scope-experiment.cjs
|
||||
const fs = require('fs');
|
||||
const { performance } = require('perf_hooks');
|
||||
const { createHash } = require('crypto');
|
||||
const { compileRoadModel, compileGeometry, loadOverrides } = require(process.cwd() + '/src/compile/native-road');
|
||||
const { resolveDirectEditConstraints } = require(process.cwd() + '/src/compile/direct-edit-solver');
|
||||
const dir = 'workbench-data/import-fE8XI7';
|
||||
const start = performance.now();
|
||||
const options = JSON.parse(fs.readFileSync(dir + '/active/area-config.snapshot.json')).options;
|
||||
const overrides = loadOverrides(dir + '/native-road-overrides.json');
|
||||
const model = compileRoadModel(fs.readFileSync(dir + '/source.osm', 'utf8'), overrides);
|
||||
const document = JSON.parse(fs.readFileSync(dir + '/active/native-road-edits.json'));
|
||||
const cluster = options.junctionTemplates.clusters[0];
|
||||
const context = { junctionTemplates: options.junctionTemplates, selection: { type: 'cluster', id: cluster.id } };
|
||||
const byNode = new Map();
|
||||
for (const e of model.endpoints) { if (!byNode.has(e.nodeId)) byNode.set(e.nodeId, new Set()); byNode.get(e.nodeId).add(e.roadId); }
|
||||
function scope(depth) {
|
||||
const nodes = new Set(cluster.nodeIds), roads = new Set();
|
||||
for (let i = 0; i <= depth; i++) {
|
||||
for (const node of nodes) for (const id of byNode.get(node) || []) roads.add(id);
|
||||
for (const e of model.endpoints) if (roads.has(e.roadId)) nodes.add(e.nodeId);
|
||||
}
|
||||
const endpoints = model.endpoints.filter(e => roads.has(e.roadId));
|
||||
const ids = new Set(endpoints.map(e => e.id));
|
||||
return { ...model, roads: model.roads.filter(r => roads.has(r.id)), endpoints,
|
||||
connections: model.connections.filter(c => ids.has(c.fromEndpointId) && ids.has(c.toEndpointId)) };
|
||||
}
|
||||
function run(m, doc) {
|
||||
const t = performance.now();
|
||||
const resolution = resolveDirectEditConstraints(m, doc, context);
|
||||
const solved = performance.now();
|
||||
const compiled = compileGeometry(m, overrides, { ...options, directEdit: resolution });
|
||||
const end = performance.now();
|
||||
return { compiled, resolution, solveMs: solved-t, compileMs: end-solved, computeMs: end-t };
|
||||
}
|
||||
function features(compiled) {
|
||||
const map = new Map();
|
||||
for (const [layer, collection] of Object.entries(compiled)) for (const f of collection?.features || []) {
|
||||
const json = JSON.stringify(f), hash = createHash('sha256').update(json).digest('hex');
|
||||
const key = layer + ':' + hash;
|
||||
const old = map.get(key); map.set(key, { count: (old?.count || 0)+1, layer, feature: f });
|
||||
}
|
||||
return map;
|
||||
}
|
||||
function delta(before, after) {
|
||||
const result = new Map();
|
||||
for (const key of new Set([...before.keys(), ...after.keys()])) {
|
||||
const count = (after.get(key)?.count || 0)-(before.get(key)?.count || 0);
|
||||
if (count) result.set(key, { ...(after.get(key) || before.get(key)), count });
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function compare(a,b) {
|
||||
const mismatches=[];
|
||||
for(const key of new Set([...a.keys(),...b.keys()])) if(a.get(key)?.count !== b.get(key)?.count) {
|
||||
const f=a.get(key)||b.get(key); mismatches.push({layer:f.layer,id:f.feature.properties?.native_id,full:a.get(key)?.count||0,local:b.get(key)?.count||0});
|
||||
}
|
||||
return {equal:!mismatches.length,mismatchCount:mismatches.length,examples:mismatches.slice(0,8)};
|
||||
}
|
||||
const setupMs=performance.now()-start;
|
||||
const fullBase=run(model,document), fullFeatures=features(fullBase.compiled);
|
||||
const handle=fullBase.resolution.handles.handles.find(h=>h.kind==='cluster-carriageway-width');
|
||||
if(!handle) throw Error('Missing width handle');
|
||||
const scopes=[0,1,2].map(depth=>{const m=scope(depth), base=run(m,document);return {depth,m,base:features(base.compiled),rows:[]};});
|
||||
console.log(JSON.stringify({setupMs,fullRoads:model.roads.length,scopes:scopes.map(s=>({depth:s.depth,roads:s.m.roads.length})),handle:handle.handleId}));
|
||||
for(let i=0;i<20;i++) {
|
||||
const value=handle.value.current + 0.1 + (i%10)*0.1;
|
||||
const doc={...document,constraints:[...document.constraints,{id:'experiment-width',kind:handle.kind,anchor:handle.anchor,value:{widthMeters:value},enabled:true,status:'exact'}]};
|
||||
const full=run(model,doc);
|
||||
if(!full.resolution.constraintStates.find(s=>s.constraintId==='experiment-width')?.applied) throw Error('Edit not applied: '+JSON.stringify(full.resolution.constraintStates));
|
||||
const reference=delta(fullFeatures,features(full.compiled));
|
||||
for(const s of scopes) {
|
||||
const local=run(s.m,doc), diff=delta(s.base,features(local.compiled));
|
||||
const t=performance.now();const payload=JSON.stringify({changes:[...diff.values()],handles:local.resolution.handles,constraintStates:local.resolution.constraintStates});const serializationMs=performance.now()-t;
|
||||
const row={run:i,value,depth:s.depth,solveMs:local.solveMs,compileMs:local.compileMs,computeMs:local.computeMs,serializationMs,bytes:Buffer.byteLength(payload),fullComputeMs:full.computeMs,changed:reference.size,comparison:compare(reference,diff)};
|
||||
s.rows.push(row);console.log(JSON.stringify(row));
|
||||
}
|
||||
}
|
||||
function stats(values){const s=[...values].sort((a,b)=>a-b);return {min:s[0],median:s[Math.floor(s.length/2)],p95:s[Math.ceil(s.length*.95)-1],max:s.at(-1)};}
|
||||
console.log(JSON.stringify({summary:scopes.map(s=>({depth:s.depth,roads:s.m.roads.length,allDeltasEqual:s.rows.every(r=>r.comparison.equal),computeAndSerializationMs:stats(s.rows.map(r=>r.computeMs+r.serializationMs)),fullComputeMs:stats(s.rows.map(r=>r.fullComputeMs)),bytes:stats(s.rows.map(r=>r.bytes))}))}));
|
||||
@@ -0,0 +1,62 @@
|
||||
{"setupMs":82.091327,"fullRoads":318,"scopes":[{"depth":0,"roads":12},{"depth":1,"roads":32},{"depth":2,"roads":56}],"handle":"handle:cluster-carriageway-width:cluster:cluster-8005332807:carriageway:8005332807/segment%3Away%2F253970456%2F1/road%3Away%2F253970456%3Asegment%2F1%3Aforward"}
|
||||
{"run":0,"value":9.85,"depth":0,"solveMs":9.557064999999966,"compileMs":316.0986899999998,"computeMs":325.6557549999998,"serializationMs":2.232861000000412,"bytes":416605,"fullComputeMs":2170.9019529999996,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":0,"value":9.85,"depth":1,"solveMs":15.14473100000032,"compileMs":420.10305100000005,"computeMs":435.24778200000037,"serializationMs":2.4457000000002154,"bytes":418680,"fullComputeMs":2170.9019529999996,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":0,"value":9.85,"depth":2,"solveMs":21.637515999999778,"compileMs":547.5551640000003,"computeMs":569.1926800000001,"serializationMs":2.4221150000003036,"bytes":420460,"fullComputeMs":2170.9019529999996,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":1,"value":9.95,"depth":0,"solveMs":10.689680999999837,"compileMs":360.28462200000104,"computeMs":370.9743030000009,"serializationMs":1.907219000000623,"bytes":436363,"fullComputeMs":2162.349112,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":1,"value":9.95,"depth":1,"solveMs":13.274993000000904,"compileMs":432.1202119999998,"computeMs":445.3952050000007,"serializationMs":1.9363740000007965,"bytes":438438,"fullComputeMs":2162.349112,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":1,"value":9.95,"depth":2,"solveMs":20.685750000000553,"compileMs":569.7800330000009,"computeMs":590.4657830000015,"serializationMs":2.0177759999987757,"bytes":440218,"fullComputeMs":2162.349112,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":2,"value":10.049999999999999,"depth":0,"solveMs":5.940107000000353,"compileMs":319.55948499999977,"computeMs":325.4995920000001,"serializationMs":1.9293809999999212,"bytes":436351,"fullComputeMs":2111.5045450000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":2,"value":10.049999999999999,"depth":1,"solveMs":11.450167999999394,"compileMs":419.90083100000084,"computeMs":431.35099900000023,"serializationMs":2.2531980000003387,"bytes":438426,"fullComputeMs":2111.5045450000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":2,"value":10.049999999999999,"depth":2,"solveMs":20.372020999999222,"compileMs":547.839258,"computeMs":568.2112789999992,"serializationMs":2.001905999999508,"bytes":440206,"fullComputeMs":2111.5045450000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":3,"value":10.15,"depth":0,"solveMs":10.110854999998992,"compileMs":320.47782700000243,"computeMs":330.5886820000014,"serializationMs":1.9960460000002058,"bytes":436259,"fullComputeMs":2118.175674,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":3,"value":10.15,"depth":1,"solveMs":13.607135999998718,"compileMs":426.9146929999988,"computeMs":440.5218289999975,"serializationMs":2.1548540000003413,"bytes":438334,"fullComputeMs":2118.175674,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":3,"value":10.15,"depth":2,"solveMs":20.650824000000284,"compileMs":556.8770189999996,"computeMs":577.5278429999998,"serializationMs":1.9438280000031227,"bytes":440114,"fullComputeMs":2118.175674,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":4,"value":10.25,"depth":0,"solveMs":10.683538999997836,"compileMs":333.69013300000006,"computeMs":344.3736719999979,"serializationMs":2.4758959999999206,"bytes":436166,"fullComputeMs":2192.3786870000004,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":4,"value":10.25,"depth":1,"solveMs":13.00734999999986,"compileMs":447.440462999999,"computeMs":460.44781299999886,"serializationMs":2.4687530000010156,"bytes":438241,"fullComputeMs":2192.3786870000004,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":4,"value":10.25,"depth":2,"solveMs":22.45761499999935,"compileMs":601.8785310000021,"computeMs":624.3361460000015,"serializationMs":1.9048550000006799,"bytes":440021,"fullComputeMs":2192.3786870000004,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":5,"value":10.35,"depth":0,"solveMs":9.755558000000747,"compileMs":319.6855399999986,"computeMs":329.44109799999933,"serializationMs":1.9265759999980219,"bytes":434742,"fullComputeMs":2132.4120299999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":5,"value":10.35,"depth":1,"solveMs":13.406458999997994,"compileMs":424.9514990000025,"computeMs":438.3579580000005,"serializationMs":2.099941000000399,"bytes":436817,"fullComputeMs":2132.4120299999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":5,"value":10.35,"depth":2,"solveMs":23.12702100000024,"compileMs":567.2923549999978,"computeMs":590.419375999998,"serializationMs":1.9414530000030936,"bytes":438597,"fullComputeMs":2132.4120299999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":6,"value":10.45,"depth":0,"solveMs":5.993077000002813,"compileMs":330.5428659999998,"computeMs":336.5359430000026,"serializationMs":1.8765419999981532,"bytes":434706,"fullComputeMs":2136.052312,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":6,"value":10.45,"depth":1,"solveMs":13.188781000000745,"compileMs":430.75614199999836,"computeMs":443.9449229999991,"serializationMs":2.0286569999989297,"bytes":436781,"fullComputeMs":2136.052312,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":6,"value":10.45,"depth":2,"solveMs":20.827565999999933,"compileMs":568.7115779999986,"computeMs":589.5391439999985,"serializationMs":1.88463700000284,"bytes":438561,"fullComputeMs":2136.052312,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":7,"value":10.549999999999999,"depth":0,"solveMs":5.932803999996395,"compileMs":324.9480270000058,"computeMs":330.8808310000022,"serializationMs":1.9272359999959008,"bytes":434902,"fullComputeMs":2138.8442920000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":7,"value":10.549999999999999,"depth":1,"solveMs":10.703045999995084,"compileMs":441.81436500000564,"computeMs":452.5174110000007,"serializationMs":1.9678730000014184,"bytes":436977,"fullComputeMs":2138.8442920000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":7,"value":10.549999999999999,"depth":2,"solveMs":19.830455000002985,"compileMs":554.1457620000001,"computeMs":573.9762170000031,"serializationMs":1.9632649999985006,"bytes":438757,"fullComputeMs":2138.8442920000016,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":8,"value":10.65,"depth":0,"solveMs":5.800204999999551,"compileMs":319.26163500000257,"computeMs":325.0618400000021,"serializationMs":1.8717019999967306,"bytes":434769,"fullComputeMs":2196.7264460000006,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":8,"value":10.65,"depth":1,"solveMs":11.240945999998075,"compileMs":433.28231299999607,"computeMs":444.52325899999414,"serializationMs":1.9364040000000386,"bytes":436844,"fullComputeMs":2196.7264460000006,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":8,"value":10.65,"depth":2,"solveMs":20.785486999993736,"compileMs":547.6380000000063,"computeMs":568.423487,"serializationMs":1.9342800000013085,"bytes":438624,"fullComputeMs":2196.7264460000006,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":9,"value":10.75,"depth":0,"solveMs":10.293267000000924,"compileMs":316.29617999999755,"computeMs":326.5894469999985,"serializationMs":2.127483000003849,"bytes":443410,"fullComputeMs":2147.80616,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":9,"value":10.75,"depth":1,"solveMs":13.12561299999652,"compileMs":431.6866379999992,"computeMs":444.81225099999574,"serializationMs":1.9623530000026221,"bytes":445485,"fullComputeMs":2147.80616,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":9,"value":10.75,"depth":2,"solveMs":21.711364999995567,"compileMs":562.7895540000027,"computeMs":584.5009189999982,"serializationMs":2.3710900000005495,"bytes":447265,"fullComputeMs":2147.80616,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":10,"value":9.85,"depth":0,"solveMs":5.973549999995157,"compileMs":370.3468350000039,"computeMs":376.3203849999991,"serializationMs":1.7907410000043456,"bytes":416605,"fullComputeMs":2151.4998820000037,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":10,"value":9.85,"depth":1,"solveMs":15.134751999998116,"compileMs":439.9024070000014,"computeMs":455.0371589999995,"serializationMs":2.082798000003095,"bytes":418680,"fullComputeMs":2151.4998820000037,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":10,"value":9.85,"depth":2,"solveMs":20.18708400000469,"compileMs":631.2939239999978,"computeMs":651.4810080000025,"serializationMs":1.8393819999982952,"bytes":420460,"fullComputeMs":2151.4998820000037,"changed":124,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":11,"value":9.95,"depth":0,"solveMs":6.066925999999512,"compileMs":381.1988300000012,"computeMs":387.2657560000007,"serializationMs":2.6824540000015986,"bytes":436363,"fullComputeMs":2601.729800000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":11,"value":9.95,"depth":1,"solveMs":13.36330799999996,"compileMs":463.12375500000053,"computeMs":476.4870630000005,"serializationMs":2.1306079999994836,"bytes":438438,"fullComputeMs":2601.729800000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":11,"value":9.95,"depth":2,"solveMs":20.543462999994517,"compileMs":629.755717,"computeMs":650.2991799999945,"serializationMs":1.9414929999984452,"bytes":440218,"fullComputeMs":2601.729800000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":12,"value":10.049999999999999,"depth":0,"solveMs":6.153537999998662,"compileMs":331.8629030000011,"computeMs":338.01644099999976,"serializationMs":1.9528450000070734,"bytes":436351,"fullComputeMs":2191.8486420000045,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":12,"value":10.049999999999999,"depth":1,"solveMs":13.674271999996563,"compileMs":443.1867110000021,"computeMs":456.86098299999867,"serializationMs":3.3135089999996126,"bytes":438426,"fullComputeMs":2191.8486420000045,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":12,"value":10.049999999999999,"depth":2,"solveMs":23.825622000003932,"compileMs":574.9863939999996,"computeMs":598.8120160000035,"serializationMs":1.9795050000029732,"bytes":440206,"fullComputeMs":2191.8486420000045,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":13,"value":10.15,"depth":0,"solveMs":7.467855000002601,"compileMs":437.9851589999962,"computeMs":445.4530139999988,"serializationMs":3.034705000005488,"bytes":436259,"fullComputeMs":2208.0030289999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":13,"value":10.15,"depth":1,"solveMs":12.341310999996495,"compileMs":426.7040380000035,"computeMs":439.045349,"serializationMs":2.0565389999974286,"bytes":438334,"fullComputeMs":2208.0030289999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":13,"value":10.15,"depth":2,"solveMs":19.955190000000584,"compileMs":561.6838289999941,"computeMs":581.6390189999947,"serializationMs":2.0973060000033,"bytes":440114,"fullComputeMs":2208.0030289999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":14,"value":10.25,"depth":0,"solveMs":6.05423200000223,"compileMs":368.2168679999959,"computeMs":374.2710999999981,"serializationMs":2.1724969999995665,"bytes":436166,"fullComputeMs":2215.618040000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":14,"value":10.25,"depth":1,"solveMs":14.679307999998855,"compileMs":448.27351700000145,"computeMs":462.9528250000003,"serializationMs":1.9932710000066436,"bytes":438241,"fullComputeMs":2215.618040000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":14,"value":10.25,"depth":2,"solveMs":21.605415999998513,"compileMs":611.7472209999978,"computeMs":633.3526369999963,"serializationMs":1.9718310000025667,"bytes":440021,"fullComputeMs":2215.618040000001,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":15,"value":10.35,"depth":0,"solveMs":5.86444499999925,"compileMs":473.06164600000193,"computeMs":478.9260910000012,"serializationMs":3.323868000006769,"bytes":434742,"fullComputeMs":2201.9000949999972,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":15,"value":10.35,"depth":1,"solveMs":18.427781999998842,"compileMs":555.6714759999886,"computeMs":574.0992579999875,"serializationMs":2.3020499999984168,"bytes":436817,"fullComputeMs":2201.9000949999972,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":15,"value":10.35,"depth":2,"solveMs":20.98601300000155,"compileMs":609.2047100000054,"computeMs":630.190723000007,"serializationMs":3.538220000002184,"bytes":438597,"fullComputeMs":2201.9000949999972,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":16,"value":10.45,"depth":0,"solveMs":13.330818000002182,"compileMs":322.76873599999817,"computeMs":336.09955400000035,"serializationMs":2.1809229999926174,"bytes":434706,"fullComputeMs":2265.4950020000106,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":16,"value":10.45,"depth":1,"solveMs":12.398257000008016,"compileMs":437.89218399999663,"computeMs":450.29044100000465,"serializationMs":2.5593230000085896,"bytes":436781,"fullComputeMs":2265.4950020000106,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":16,"value":10.45,"depth":2,"solveMs":21.088917000000947,"compileMs":569.1401420000038,"computeMs":590.2290590000048,"serializationMs":1.9589859999978216,"bytes":438561,"fullComputeMs":2265.4950020000106,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":17,"value":10.549999999999999,"depth":0,"solveMs":14.146958999990602,"compileMs":340.1923450000031,"computeMs":354.3393039999937,"serializationMs":3.6743449999921722,"bytes":434902,"fullComputeMs":2297.191955999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":17,"value":10.549999999999999,"depth":1,"solveMs":18.01058900001226,"compileMs":500.56653299999016,"computeMs":518.5771220000024,"serializationMs":2.0068260000116425,"bytes":436977,"fullComputeMs":2297.191955999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":17,"value":10.549999999999999,"depth":2,"solveMs":20.03393700000015,"compileMs":564.0579949999956,"computeMs":584.0919319999957,"serializationMs":2.207872999992105,"bytes":438757,"fullComputeMs":2297.191955999995,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":18,"value":10.65,"depth":0,"solveMs":9.937007999993511,"compileMs":322.0552380000008,"computeMs":331.99224599999434,"serializationMs":1.876021000003675,"bytes":434769,"fullComputeMs":2154.9666179999913,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":18,"value":10.65,"depth":1,"solveMs":12.702348000006168,"compileMs":437.82925599999726,"computeMs":450.5316040000034,"serializationMs":1.9326770000043325,"bytes":436844,"fullComputeMs":2154.9666179999913,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":18,"value":10.65,"depth":2,"solveMs":23.21744100000069,"compileMs":827.8039559999888,"computeMs":851.0213969999895,"serializationMs":2.113415999992867,"bytes":438624,"fullComputeMs":2154.9666179999913,"changed":130,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":19,"value":10.75,"depth":0,"solveMs":6.400811999992584,"compileMs":328.2599120000086,"computeMs":334.6607240000012,"serializationMs":1.978984000001219,"bytes":443410,"fullComputeMs":2651.589730000007,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":19,"value":10.75,"depth":1,"solveMs":14.428186999997706,"compileMs":437.5252150000015,"computeMs":451.9534019999992,"serializationMs":2.0162639999907697,"bytes":445485,"fullComputeMs":2651.589730000007,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"run":19,"value":10.75,"depth":2,"solveMs":22.66500399999495,"compileMs":552.8812500000058,"computeMs":575.5462540000008,"serializationMs":2.03872599999886,"bytes":447265,"fullComputeMs":2651.589730000007,"changed":132,"comparison":{"equal":true,"mismatchCount":0,"examples":[]}}
|
||||
{"summary":[{"depth":0,"roads":12,"allDeltasEqual":true,"computeAndSerializationMs":{"min":326.93354199999885,"median":338.41248500000074,"p95":448.4877190000043,"max":482.24995900000795},"fullComputeMs":{"min":2111.5045450000016,"median":2191.8486420000045,"p95":2601.729800000001,"max":2651.589730000007},"bytes":{"min":416605,"median":436166,"p95":443410,"max":443410}},{"depth":1,"roads":32,"allDeltasEqual":true,"computeAndSerializationMs":{"min":433.60419700000057,"median":452.84976400001324,"p95":520.5839480000141,"max":576.4013079999859},"fullComputeMs":{"min":2111.5045450000016,"median":2191.8486420000045,"p95":2601.729800000001,"max":2651.589730000007},"bytes":{"min":418680,"median":438241,"p95":445485,"max":445485}},{"depth":2,"roads":56,"allDeltasEqual":true,"computeAndSerializationMs":{"min":570.2131849999987,"median":592.1880450000026,"p95":653.3203900000008,"max":853.1348129999824},"fullComputeMs":{"min":2111.5045450000016,"median":2191.8486420000045,"p95":2601.729800000001,"max":2651.589730000007},"bytes":{"min":420460,"median":440021,"p95":447265,"max":447265}}]}
|
||||
@@ -0,0 +1,31 @@
|
||||
# 小范围预览优化(2026-09-14)
|
||||
|
||||
用户取消 300ms 硬门槛,要求明显提速、任务简洁、避免大改;正式修改前必须完成内部试验。
|
||||
|
||||
## 本次边界
|
||||
|
||||
先试验两处等价优化:
|
||||
- direct-edit-solver.js:cluster selection 不构造最终必然被过滤掉的 road/junction/lane 手柄,所有约束仍完整求解。
|
||||
- native-road.js:trimLineBeforeFirstControl 每条线建立按 minX 排序的碰撞候选包围盒,仍使用原精确 ringsOverlap、原采样步长和原裁切回退。
|
||||
|
||||
不接入子路网裁剪,不增加接口/客户端协议、跨请求缓存、版本失效机制或新依赖。模型缓存节省远小于标线裁切,本轮先减少扫描和无用派生计算,避免扩大状态管理风险。源数据、保存与正式编译契约保持原样。
|
||||
|
||||
验收:真实四节点/21m工作区,新旧完整 resolution 与 compiled 深比较;多类非空编辑确实 applied;现有几何与编辑回归;记录整接口计算和序列化耗时。若通过,可作为独立提交候选,用户复核后提交。
|
||||
|
||||
## 前序子路网试验
|
||||
|
||||
318条道路缩到12/32/56条,20次宽度调整的图层多重集合增删变化均一致。12条方案计算+序列化中位数338ms,样本P95 448ms;32条453ms;56条592ms。比较不包含非图层元数据,耗时不含增量提取与浏览器显示,尚不足以发布通用局部编译。因此仅保留研究,不纳入这次产品修改。
|
||||
|
||||
## 结果与正式实现
|
||||
|
||||
隔离原型完成 3 轮 × 7 场景,共 21 次新旧深比较:空文档、宽度、过渡长度、方向、位置、圆角、停止线。全部完整 resolution(含 Map、手柄、状态、诊断)与 compiled(全部图层及非图层产物)一致;所有非空编辑确实 applied。旧计算中位数 2199.3ms,新原型 1198.2ms。当前真实样本未发布 cluster-crossing-inset 手柄,未冒称该编辑参与此差分试验;已有设施回归另行通过。
|
||||
|
||||
试验通过后仅修改两个生产文件,增加一个完整求解结果不受手柄筛选影响的回归。生产实现与原型算法相同,只作格式和局部变量整理。
|
||||
|
||||
真实 editPreview 接口复测(独立运行,没有与测试并发):原先两次热运行计算+JSON序列化 2552/2512ms;优化后 1623/1556ms,平均下降约37%。模型解析仍68–71ms;resolver从306–313ms降至7–10ms;全量几何从1951–1997ms降至1303–1368ms。响应仍24,185,780字节。本报告不是浏览器输入到绘制完成延迟,未测网络和地图更新;3次接口样本不报告P95。
|
||||
|
||||
检查:新增求解器回归通过;npm test 前序全部代码、几何、编辑API、导入编译检查通过,最后 test/fixtures.js 仍是已有快照差异,未更新基线。首次沙箱内监听8899失败,取得工具批准后在沙箱外重跑得到上述结果。npm run test:client、npm run format:check、git diff --check 通过。无客户端改动,未重复E2E。
|
||||
|
||||
原始数据:preview-prototype-results.jsonl、preview-optimized-api.jsonl、preview-scope-results.jsonl。重跑差分:BASELINE_ROOT 指向6a8f026检出及其依赖,从当前仓库运行 node .trellis/tasks/09-08-junction-reference-fidelity/research/preview-equivalence-experiment.cjs。
|
||||
|
||||
本轮未提交。优化单元完成;父任务保持进行中。后续是否进一步缩短传输和渲染等待,应先测浏览器,不直接扩展本轮范围。
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "junction-reference-fidelity",
|
||||
"name": "junction-reference-fidelity",
|
||||
"title": "复杂路口通用构建:结构约束与连续边界",
|
||||
"description": "以三组对照暴露的结构表达问题为线索,建立共享拓扑、接入断面与边界的通用复杂路口构建方案;禁止针对样本专用适配。",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": "junction",
|
||||
"package": null,
|
||||
"priority": "P1",
|
||||
"creator": "dingkang",
|
||||
"assignee": "dingkang",
|
||||
"createdAt": "2026-09-08",
|
||||
"completedAt": "2026-09-17",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "用户修正方向:三组图片用于发现问题,不是适配目标。保持 planning,待最新方案审阅后再实施。",
|
||||
"meta": {}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# Junction Reference Fidelity Validation
|
||||
|
||||
日期:2026-09-11
|
||||
任务:`09-08-junction-reference-fidelity`
|
||||
|
||||
## 结论
|
||||
|
||||
首期支持边界内的通用构建、局部校正和保存闭环已通过自动质量门。真实 OSM 外部验证使用未参与调参的 `test/fixtures/fengshu-er-road.osm`;其 5 臂、9 车行道分隔结构被识别并保留独立来源身份。由于该数据包含无法确认中心通行关系的并行车行道,中心核心面按契约拒绝闭合,保留各进口道路面并发布对象级诊断。这是支持矩阵中的明确拒绝,不计作完整核心区域通过。
|
||||
|
||||
## A1-A8 证据
|
||||
|
||||
| 项 | 结果 | 证据 |
|
||||
| --- | --- | --- |
|
||||
| A1 | 通过(支持矩阵) | `test/junction-build-plan-counterexamples.js` 覆盖 3/4/5/6 臂、T/十字、偏置和分隔组合;无样本 ID 分支。 |
|
||||
| A2 | 通过 | 拓扑测试覆盖输入重排、平移、旋转及跨 0°;`test/junction-projection.js` 验证稳定键和 fingerprint。 |
|
||||
| A3 | 通过(可行结构);分隔核心按规则拒绝 | 入口环有限、闭合、正面积、无自交;必要连接、孔洞和排除区回归;共享接缝实测误差 ≤1 cm,并覆盖人为 2 m 损坏检测。 |
|
||||
| A4 | 通过 | `test/e2e/workbench.spec.ts` 的 12 项浏览器回归覆盖三臂结构和真实五臂工作台的位姿、方向、左右边界、过渡长度、撤销、保存、重编译、刷新。 |
|
||||
| A5 | 通过 | solver/manifest 共用可行域;越界、来源长度不足、拓扑变化和 409 均返回明确诊断或重检状态,不静默截断。 |
|
||||
| A6 | 通过 | 复杂路口仅在匹配的 OSM crossing 节点提供来源证据时生成斑马线,并保留来源 provenance;无来源时省略复杂斑马线,停止线独立保留并标记 `unknown-no-crossing-source`。简单路口继续使用原有设施路径。已知排除区和步行连接保留 provenance。 |
|
||||
| A7 | 通过 | 工作台 API/E2E 验证预览、保存、409 重试、撤销重做、刷新回放和版本保护。 |
|
||||
| A8 | 用户初步视觉通过,待最终确认 | 用户按人工清单检查 7 项结构,反馈“基本没有问题”;未调参真实 OSM 的纯效果和调试效果已刷新,原始三组图片只作定性观察,未配准不作为几何真值。 |
|
||||
|
||||
## 真实 OSM 产物
|
||||
|
||||
- 输入:`test/fixtures/fengshu-er-road.osm`
|
||||
- cluster:`cluster-8005332807`
|
||||
- 结构:5 臂,9 条独立车行道
|
||||
- 控件:宽度 9、过渡长度 9、收口 9、位置 9、方向 9、左右边界 18、角部半径 5、停止线偏移 5
|
||||
- 纯效果:[references/current-pure.png](references/current-pure.png)
|
||||
- 调试效果:[references/current-debug.png](references/current-debug.png)
|
||||
- 指标与诊断:[references/current-metrics.json](references/current-metrics.json)
|
||||
|
||||
## 明确限制
|
||||
|
||||
当前不承诺无法从来源确认通行关系的多区域核心自动重求解、任意曲线的全局切向优化、导流岛自由编辑或独立右转通道创建。此类输入保留可验证的进口结构,输出对象级拒绝原因。
|
||||
|
||||
## 验证命令
|
||||
|
||||
`npm test`、`npm run test:client`、`npm run test:client:unit`(191 tests)、`npm run test:e2e`(12 tests)、`npm run format:check`、`git diff --check`。
|
||||
@@ -0,0 +1,67 @@
|
||||
# 复杂路口人工验收清单
|
||||
|
||||
这份清单只验证真实工作台的可见结果。每一步只需要记录“通过”或“失败”,失败时截一张图并写下步骤编号。
|
||||
|
||||
## 1. 启动与进入样例
|
||||
|
||||
在项目根目录执行:
|
||||
|
||||
```bash
|
||||
npm run road:workbench
|
||||
```
|
||||
|
||||
浏览器打开 <http://127.0.0.1:8899/>。等待地图和“道路编译工作台”出现。
|
||||
|
||||
在地图或路口列表中打开一个标记为复杂路口的 3~6 臂路口;优先使用四臂样例。进入“路口编辑工作区”后,确认页面没有红色错误提示。
|
||||
|
||||
## 2. 只看图的结构验收
|
||||
|
||||
开启“自研道路与路口面”“斑马线/停止线”“人行道与导流岛”“转向路径”图层,放大到路口中心。
|
||||
|
||||
逐项检查:
|
||||
|
||||
1. 每个有效角部都有一个三角形安全岛;四臂路口应看到 4 个。
|
||||
2. 每个安全岛都有 3 组斑马线接触:两组组成直角边,第三组贴着弧形长边。
|
||||
3. 斑马线之间没有四角正方形重叠;白条方向统一、长度和间隔看起来一致。
|
||||
4. 安全岛三个角是圆角;岛体显示为绿色六点区域,绿色区域没有跑到岛体外。
|
||||
5. 停止线与对应斑马线之间有清晰空隙,没有压在斑马线上。
|
||||
6. 路口中心铺装连续,没有明显的空洞、尖角或悬空道路面。
|
||||
7. 转向路径从入口车道连续进入出口车道,没有明显断裂、自交或穿过安全岛。
|
||||
|
||||
通过标准:以上 7 项全部通过。任何一项失败都只需记录编号和截图,不要先尝试拖动修复。
|
||||
|
||||
当前记录:用户已反馈这 7 项“基本没有问题”,记为初步视觉通过;若没有需要修改的具体编号,可将 A8 视为通过候选。
|
||||
|
||||
## 3. 最小编辑闭环
|
||||
|
||||
开启编辑模式,在同一个复杂路口依次只改一个字段,每次等待地图完成预览:
|
||||
|
||||
1. 进口宽度:增加约 0.5 m。
|
||||
2. 进口方向:增加约 5°。
|
||||
3. 左边界或右边界:向外拖约 0.5 m。
|
||||
4. 过渡长度:增加约 1 m。
|
||||
|
||||
每次修改检查:
|
||||
|
||||
- 地图在约 2 秒内有变化,没有白屏;
|
||||
- 安全岛仍为三角形,3 组斑马线仍完整接触;
|
||||
- 没有新增红色诊断;
|
||||
- 点击“撤销”后恢复上一个状态,点击“重做”后回到修改状态。
|
||||
|
||||
最后点击“保存并重新生成”,等待“已保存并重新生成”,刷新页面,确认最后一次修改仍存在。
|
||||
|
||||
## 4. 来源治理验收
|
||||
|
||||
再打开一个没有匹配 OSM crossing 来源的探出分支或普通复杂候选:
|
||||
|
||||
- 不应凭空出现复杂斑马线;
|
||||
- 停止线可以保留;
|
||||
- 问题列表应出现 `complex-junction-crossing-source-missing` 或对应中文诊断。
|
||||
|
||||
## 5. 需要用户做决定的项目
|
||||
|
||||
以下项目不在本清单的“通过”范围内,需要单独决定产品规则:
|
||||
|
||||
- 复杂排除区域是否必须自动绕行;
|
||||
- 多个机动车通行区域是否必须自动规划连通;
|
||||
- 车辆轨迹是否需要车辆宽度、扫掠范围和最小转弯半径保证。
|
||||