使用js/java合并3dtiles

news2024/11/18 17:23:53

目录

前言:

需合并的json目录

aa/tileset.json

bb/tileset.json

cc/tileset.json

dd/tileset.json

ee/tileset.json

js源码:

运行命令:

生成结果:

java源码:

Matrix.java

ThreeDTilesJoin2.java

pom文件

运行程序:

生成合成文件

遇到的问题:

求矩阵运算的jar包:Apache Commons Math

计算代数余子式

计算行列式

转置矩阵

计算逆矩阵

矩阵相乘

需要注意


前言:

需要简单了解3dtile基本结构

需合并的json目录

aa/tileset.json
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 740.579323830987,
    "root": {
        "boundingVolume": {
            "box": [-3675.8994140625, 545.641296386719, 11.9535970687866, 272.260009765625, 0, 0, 0, 249.891235351563, 0, 0, 0, 23.3086099624634]
        },
        "children": [{
            "boundingVolume": {
                "box": [-3675.8994140625, 545.641296386719, 11.9535970687866, 272.260009765625, 0, 0, 0, 249.891235351563, 0, 0, 0, 23.3086099624634]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-3935.02001953125, 574.504516601563, 15.7210890054703, 13.139404296875, 0, 0, 0, 25.2759399414063, 0, 0, 0, 11.8160890340805]
                },
                "content": {
                    "uri": "Tile_+002_+029/Tile_+002_+029.json"
                },
                "geometricError": 30.8405098086856
            }, {
                "boundingVolume": {
                    "box": [-3931.19152832031, 630.064575195313, 5.76587748527527, 9.6800537109375, 0, 0, 0, 30.9617309570313, 0, 0, 0, 1.63892340660095]
                },
                "content": {
                    "uri": "Tile_+002_+030/Tile_+002_+030.json"
                },
                "geometricError": 32.4810451438208
            }, {
                "boundingVolume": {
                    "box": [-3872.32775878906, 566.557830810547, 15.5438475459814, 50.4261474609375, 0, 0, 0, 33.1085510253906, 0, 0, 0, 15.1476407200098]
                },
                "content": {
                    "uri": "Tile_+003_+029/Tile_+003_+029.json"
                },
                "geometricError": 62.1966519849389
            }, {
                "boundingVolume": {
                    "box": [-3872.03454589844, 628.938293457031, 18.1283311843872, 50.4095458984375, 0, 0, 0, 30.4552612304688, 0, 0, 0, 14.090537071228]
                },
                "content": {
                    "uri": "Tile_+003_+030/Tile_+003_+030.json"
                },
                "geometricError": 60.5573157368986
            }, {
                "boundingVolume": {
                    "box": [-3749.26013183594, 352.109008789063, 19.1447021961212, 26.1177978515625, 0, 0, 0, 46.5369567871094, 0, 0, 0, 15.1629683971405]
                },
                "content": {
                    "uri": "Tile_+004_+027/Tile_+004_+027.json"
                },
                "geometricError": 55.4774127211521
            }, {
                "boundingVolume": {
                    "box": [-3740.12866210938, 448.188674926758, 9.04387199878693, 17.607421875, 0, 0, 0, 50.3167572021484, 0, 0, 0, 5.57954967021942]
                },
                "content": {
                    "uri": "Tile_+004_+028/Tile_+004_+028.json"
                },
                "geometricError": 53.5997083475893
            }, {
                "boundingVolume": {
                    "box": [-3772.3740234375, 548.456268310547, 19.1229840517044, 50.480712890625, 0, 0, 0, 50.5904846191406, 0, 0, 0, 15.4035738706589]
                },
                "content": {
                    "uri": "Tile_+004_+029/Tile_+004_+029.json"
                },
                "geometricError": 73.1092989703366
            }, {
                "boundingVolume": {
                    "box": [-3772.05346679688, 619.552154541016, 18.2076432704926, 50.41162109375, 0, 0, 0, 21.6935119628906, 0, 0, 0, 14.1500952243805]
                },
                "content": {
                    "uri": "Tile_+004_+030/Tile_+004_+030.json"
                },
                "geometricError": 56.6759666652712
            }, {
                "boundingVolume": {
                    "box": [-3689.02783203125, 297.003692626953, 10.0964844226837, 5.725341796875, 0, 0, 0, 1.25363159179688, 0, 0, 0, 4.35963416099548]
                },
                "content": {
                    "uri": "Tile_+005_+026/Tile_+005_+026.json"
                },
                "geometricError": 7.30462462257396
            }, {
                "boundingVolume": {
                    "box": [-3673.70959472656, 348.031799316406, 12.3951093554497, 50.5650634765625, 0, 0, 0, 50.4035339355469, 0, 0, 0, 10.4135625958443]
                },
                "content": {
                    "uri": "Tile_+005_+027/Tile_+005_+027.json"
                },
                "geometricError": 72.1511203206034
            }, {
                "boundingVolume": {
                    "box": [-3673.11413574219, 447.839309692383, 6.34941649436951, 50.5919189453125, 0, 0, 0, 50.5899505615234, 0, 0, 0, 10.5448610782623]
                },
                "content": {
                    "uri": "Tile_+005_+028/Tile_+005_+028.json"
                },
                "geometricError": 72.3192882676973
            }, {
                "boundingVolume": {
                    "box": [-3672.49230957031, 547.832534790039, 18.5858655571938, 50.5924072265625, 0, 0, 0, 50.5895843505859, 0, 0, 0, 16.6763414740562]
                },
                "content": {
                    "uri": "Tile_+005_+029/Tile_+005_+029.json"
                },
                "geometricError": 73.4642639567206
            }, {
                "boundingVolume": {
                    "box": [-3671.8740234375, 647.7919921875, 11.636326789856, 50.582763671875, 0, 0, 0, 50.5528564453125, 0, 0, 0, 21.4873533248901]
                },
                "content": {
                    "uri": "Tile_+005_+030/Tile_+005_+030.json"
                },
                "geometricError": 74.6720404728155
            }, {
                "boundingVolume": {
                    "box": [-3665.76831054688, 730.397674560547, 12.528514623642, 44.778076171875, 0, 0, 0, 33.1688537597656, 0, 0, 0, 19.6651880741119]
                },
                "content": {
                    "uri": "Tile_+005_+031/Tile_+005_+031.json"
                },
                "geometricError": 59.0928810211615
            }, {
                "boundingVolume": {
                    "box": [-3622.38244628906, 395.646423339844, 5.87387609481812, 1.3489990234375, 0, 0, 0, 2.1663818359375, 0, 0, 0, 0.234408378601074]
                },
                "content": {
                    "uri": "Tile_+006_+027/Tile_+006_+027.json"
                },
                "geometricError": 2.56280235528877
            }, {
                "boundingVolume": {
                    "box": [-3591.23608398438, 447.522384643555, 11.8303036689758, 32.471923828125, 0, 0, 0, 50.2840118408203, 0, 0, 0, 7.67854261398315]
                },
                "content": {
                    "uri": "Tile_+006_+028/Tile_+006_+028.json"
                },
                "geometricError": 60.3478889488445
            }, {
                "boundingVolume": {
                    "box": [-3572.49584960938, 547.324279785156, 11.0218200683594, 50.58984375, 0, 0, 0, 50.475830078125, 0, 0, 0, 21.2449989318848]
                },
                "content": {
                    "uri": "Tile_+006_+029/Tile_+006_+029.json"
                },
                "geometricError": 74.5552928526268
            }, {
                "boundingVolume": {
                    "box": [-3571.88171386719, 647.205322265625, 10.7785501480103, 50.5970458984375, 0, 0, 0, 50.5909423828125, 0, 0, 0, 22.133563041687]
                },
                "content": {
                    "uri": "Tile_+006_+030/Tile_+006_+030.json"
                },
                "geometricError": 74.8959219033318
            }, {
                "boundingVolume": {
                    "box": [-3571.29382324219, 746.071563720703, 18.3907251358032, 50.5609130859375, 0, 0, 0, 49.4609680175781, 0, 0, 0, 14.5039548873901]
                },
                "content": {
                    "uri": "Tile_+006_+031/Tile_+006_+031.json"
                },
                "geometricError": 72.2022021595952
            }, {
                "boundingVolume": {
                    "box": [-3509.61206054688, 576.114654541016, 6.37169981002808, 13.11669921875, 0, 0, 0, 21.0632019042969, 0, 0, 0, 1.91424798965454]
                },
                "content": {
                    "uri": "Tile_+007_+029/Tile_+007_+029.json"
                },
                "geometricError": 24.8871576967365
            }, {
                "boundingVolume": {
                    "box": [-3478.34790039063, 646.816314697266, 16.745255947113, 44.12158203125, 0, 0, 0, 50.3578186035156, 0, 0, 0, 12.6729989051819]
                },
                "content": {
                    "uri": "Tile_+007_+030/Tile_+007_+030.json"
                },
                "geometricError": 68.1412415259338
            }, {
                "boundingVolume": {
                    "box": [-3471.40478515625, 741.000762939453, 17.6509721279144, 50.4560546875, 0, 0, 0, 44.9321594238281, 0, 0, 0, 13.3580210208893]
                },
                "content": {
                    "uri": "Tile_+007_+031/Tile_+007_+031.json"
                },
                "geometricError": 68.8705243969495
            }, {
                "boundingVolume": {
                    "box": [-3412.68273925781, 734.155242919922, 10.6947717666626, 9.0433349609375, 0, 0, 0, 17.5325012207031, 0, 0, 0, 5.41533184051514]
                },
                "content": {
                    "uri": "Tile_+008_+031/Tile_+008_+031.json"
                },
                "geometricError": 20.4571827291191
            }],
            "geometricError": 740.579323830987
        }],
        "geometricError": 740.579323830987,
        "transform": [-0.860048066843865, -0.510213017001851, 0.0, 0.0, 0.268197168561964, -0.452090496848062, 0.850696456695934, 0.0, -0.434036405723617, 0.731639843052264, 0.525657244376012, 0.0, -2770907.60361716, 4670821.10507043, 3333353.96012987, 1.0]
    }
}
bb/tileset.json
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 700.379674431607,
    "root": {
        "boundingVolume": {
            "box": [1678.00695800781, -167.3508644104, 14.9421647787094, 237.2333984375, 0, 0, 0, 257.251705169678, 0, 0, 0, 13.2210794687271]
        },
        "children": [{
            "boundingVolume": {
                "box": [1678.00695800781, -167.3508644104, 14.9421647787094, 237.2333984375, 0, 0, 0, 257.251705169678, 0, 0, 0, 13.2210794687271]
            },
            "children": [{
                "boundingVolume": {
                    "box": [1456.77575683594, -283.401695251465, 9.57817316055298, 16.002197265625, 0, 0, 0, 49.5448379516602, 0, 0, 0, 5.28457307815552]
                },
                "content": {
                    "uri": "Tile_+056_+021/Tile_+056_+021.json"
                },
                "geometricError": 52.3324755539293
            }, {
                "boundingVolume": {
                    "box": [1471.31585693359, -229.578811645508, 4.45599508285522, 1.51898193359375, 0, 0, 0, 4.85548400878906, 0, 0, 0, 0.0174999237060547]
                },
                "content": {
                    "uri": "Tile_+056_+022/Tile_+056_+022.json"
                },
                "geometricError": 5.08756693533562
            }, {
                "boundingVolume": {
                    "box": [1531.82299804688, -348.998123168945, 10.2060108184814, 40.3277587890625, 0, 0, 0, 14.9526214599609, 0, 0, 0, 6.00887680053711]
                },
                "content": {
                    "uri": "Tile_+057_+020/Tile_+057_+020.json"
                },
                "geometricError": 43.4282813138826
            }, {
                "boundingVolume": {
                    "box": [1522.18682861328, -284.460159301758, 9.90673196315765, 50.5840454101563, 0, 0, 0, 50.5893402099609, 0, 0, 0, 8.18564665317535]
                },
                "content": {
                    "uri": "Tile_+057_+021/Tile_+057_+021.json"
                },
                "geometricError": 72.0071649495143
            }, {
                "boundingVolume": {
                    "box": [1522.80364990234, -184.549896240234, 9.43511211872101, 50.5891723632813, 0, 0, 0, 50.506591796875, 0, 0, 0, 5.92474162578583]
                },
                "content": {
                    "uri": "Tile_+057_+022/Tile_+057_+022.json"
                },
                "geometricError": 71.7306262252761
            }, {
                "boundingVolume": {
                    "box": [1536.63287353516, -84.6287059783936, 10.7433174848557, 37.3843383789063, 0, 0, 0, 50.4350147247314, 0, 0, 0, 7.403111577034]
                },
                "content": {
                    "uri": "Tile_+057_+023/Tile_+057_+023.json"
                },
                "geometricError": 63.2145990047746
            }, {
                "boundingVolume": {
                    "box": [1548.78259277344, 15.3128070831299, 11.0693670511246, 25.8543701171875, 0, 0, 0, 50.38356590271, 0, 0, 0, 7.47109162807465]
                },
                "content": {
                    "uri": "Tile_+057_+024/Tile_+057_+024.json"
                },
                "geometricError": 57.120656310518
            }, {
                "boundingVolume": {
                    "box": [1557.44226074219, 77.4114685058594, 8.79704344272614, 17.3408203125, 0, 0, 0, 12.489372253418, 0, 0, 0, 5.12078511714935]
                },
                "content": {
                    "uri": "Tile_+057_+025/Tile_+057_+025.json"
                },
                "geometricError": 21.9752339830746
            }, {
                "boundingVolume": {
                    "box": [1621.77416992188, -364.557540893555, 10.4570751190186, 50.3675537109375, 0, 0, 0, 30.0714874267578, 0, 0, 0, 6.32948684692383]
                },
                "content": {
                    "uri": "Tile_+058_+020/Tile_+058_+020.json"
                },
                "geometricError": 59.0020951037097
            }, {
                "boundingVolume": {
                    "box": [1622.17553710938, -285.081962585449, 12.8714859485626, 50.5882568359375, 0, 0, 0, 50.5891189575195, 0, 0, 0, 8.59081149101257]
                },
                "content": {
                    "uri": "Tile_+058_+021/Tile_+058_+021.json"
                },
                "geometricError": 72.0571490462324
            }, {
                "boundingVolume": {
                    "box": [1622.79650878906, -185.08927154541, 13.1854486465454, 50.589111328125, 0, 0, 0, 50.5890426635742, 0, 0, 0, 8.58977794647217]
                },
                "content": {
                    "uri": "Tile_+058_+022/Tile_+058_+022.json"
                },
                "geometricError": 72.057572175005
            }, {
                "boundingVolume": {
                    "box": [1623.42102050781, -85.0964012145996, 10.2867512702942, 50.5892333984375, 0, 0, 0, 50.5891151428223, 0, 0, 0, 5.54497861862183]
                },
                "content": {
                    "uri": "Tile_+058_+023/Tile_+058_+023.json"
                },
                "geometricError": 71.7584552136979
            }, {
                "boundingVolume": {
                    "box": [1624.04296875, 14.8963890075684, 10.8929178714752, 50.5892333984375, 0, 0, 0, 50.5891761779785, 0, 0, 0, 6.47345900535583]
                },
                "content": {
                    "uri": "Tile_+058_+024/Tile_+058_+024.json"
                },
                "geometricError": 71.8362092102733
            }, {
                "boundingVolume": {
                    "box": [1624.42224121094, 76.6347541809082, 9.87600064277649, 50.348876953125, 0, 0, 0, 12.3346061706543, 0, 0, 0, 5.74333453178406]
                },
                "content": {
                    "uri": "Tile_+058_+025/Tile_+058_+025.json"
                },
                "geometricError": 52.1549404310852
            }, {
                "boundingVolume": {
                    "box": [1721.67340087891, -379.611175537109, 16.0873470306396, 50.4609985351563, 0, 0, 0, 44.5035400390625, 0, 0, 0, 12.0758972167969]
                },
                "content": {
                    "uri": "Tile_+059_+020/Tile_+059_+020.json"
                },
                "geometricError": 68.3571850119951
            }, {
                "boundingVolume": {
                    "box": [1722.16735839844, -285.70393371582, 5.40806865692139, 50.589111328125, 0, 0, 0, 50.5890960693359, 0, 0, 0, 0.90021276473999]
                },
                "content": {
                    "uri": "Tile_+059_+021/Tile_+059_+021.json"
                },
                "geometricError": 71.5494598798882
            }, {
                "boundingVolume": {
                    "box": [1722.79113769531, -185.71117401123, 12.7560157775879, 50.5909423828125, 0, 0, 0, 50.5891342163086, 0, 0, 0, 8.14298439025879]
                },
                "content": {
                    "uri": "Tile_+059_+022/Tile_+059_+022.json"
                },
                "geometricError": 72.0070284535943
            }, {
                "boundingVolume": {
                    "box": [1723.41357421875, -85.7185573577881, 12.8922352790833, 50.5914306640625, 0, 0, 0, 50.5892429351807, 0, 0, 0, 8.30024099349976]
                },
                "content": {
                    "uri": "Tile_+059_+023/Tile_+059_+023.json"
                },
                "geometricError": 72.025400782929
            }, {
                "boundingVolume": {
                    "box": [1724.03527832031, 14.2743854522705, 13.8084480762482, 50.5885009765625, 0, 0, 0, 50.5892391204834, 0, 0, 0, 9.1709201335907]
                },
                "content": {
                    "uri": "Tile_+059_+024/Tile_+059_+024.json"
                },
                "geometricError": 72.1288660796897
            }, {
                "boundingVolume": {
                    "box": [1724.40911865234, 75.4231605529785, 11.6732699871063, 50.3403930664063, 0, 0, 0, 11.7451057434082, 0, 0, 0, 7.08151745796204]
                },
                "content": {
                    "uri": "Tile_+059_+025/Tile_+059_+025.json"
                },
                "geometricError": 52.1751911593196
            }, {
                "boundingVolume": {
                    "box": [1797.44390869141, -380.166076660156, 13.3256312608719, 26.4188842773438, 0, 0, 0, 44.4364929199219, 0, 0, 0, 9.40558898448944]
                },
                "content": {
                    "uri": "Tile_+060_+020/Tile_+060_+020.json"
                },
                "geometricError": 52.5454513124314
            }, {
                "boundingVolume": {
                    "box": [1812.28704833984, -286.175262451172, 11.5870990753174, 40.7161254882813, 0, 0, 0, 50.4384155273438, 0, 0, 0, 7.63290023803711]
                },
                "content": {
                    "uri": "Tile_+060_+021/Tile_+060_+021.json"
                },
                "geometricError": 65.2694247081303
            }, {
                "boundingVolume": {
                    "box": [1822.78210449219, -186.271453857422, 15.3006939888, 50.5889892578125, 0, 0, 0, 50.5271301269531, 0, 0, 0, 11.2427039146423]
                },
                "content": {
                    "uri": "Tile_+060_+022/Tile_+060_+022.json"
                },
                "geometricError": 72.3784160113043
            }, {
                "boundingVolume": {
                    "box": [1823.40588378906, -86.3404502868652, 12.5961084365845, 50.58740234375, 0, 0, 0, 50.5890693664551, 0, 0, 0, 8.5899076461792]
                },
                "content": {
                    "uri": "Tile_+060_+023/Tile_+060_+023.json"
                },
                "geometricError": 72.0564065758371
            }, {
                "boundingVolume": {
                    "box": [1824.02978515625, 13.6523685455322, 15.3824796676636, 50.5882568359375, 0, 0, 0, 50.5891551971436, 0, 0, 0, 11.0295190811157]
                },
                "content": {
                    "uri": "Tile_+060_+024/Tile_+060_+024.json"
                },
                "geometricError": 72.3884289401293
            }, {
                "boundingVolume": {
                    "box": [1824.38507080078, 73.7163772583008, 9.60402154922485, 50.3248901367188, 0, 0, 0, 10.6603164672852, 0, 0, 0, 5.04884958267212]
                },
                "content": {
                    "uri": "Tile_+060_+025/Tile_+060_+025.json"
                },
                "geometricError": 51.6887588994351
            }, {
                "boundingVolume": {
                    "box": [1873.77648925781, -141.348236083984, 4.44181227684021, 1.0274658203125, 0, 0, 0, 4.982177734375, 0, 0, 0, 0.262368440628052]
                },
                "content": {
                    "uri": "Tile_+061_+022/Tile_+061_+022.json"
                },
                "geometricError": 5.09378230664111
            }, {
                "boundingVolume": {
                    "box": [1883.65350341797, -86.6555309295654, 9.82255268096924, 10.8458862304688, 0, 0, 0, 50.2822132110596, 0, 0, 0, 5.70098972320557]
                },
                "content": {
                    "uri": "Tile_+061_+023/Tile_+061_+023.json"
                },
                "geometricError": 51.7536037136625
            }, {
                "boundingVolume": {
                    "box": [1893.34643554688, 13.2779121398926, 10.3329606056213, 19.9166259765625, 0, 0, 0, 50.3416175842285, 0, 0, 0, 6.1720118522644]
                },
                "content": {
                    "uri": "Tile_+061_+024/Tile_+061_+024.json"
                },
                "geometricError": 54.4889363228122
            }, {
                "boundingVolume": {
                    "box": [1894.64739990234, 70.7054080963135, 9.54776215553284, 20.5929565429688, 0, 0, 0, 7.8891658782959, 0, 0, 0, 5.28816103935242]
                },
                "content": {
                    "uri": "Tile_+061_+025/Tile_+061_+025.json"
                },
                "geometricError": 22.6775978581064
            }],
            "geometricError": 700.379674431607
        }],
        "geometricError": 700.379674431607,
        "transform": [-0.860048066843865, -0.510213017001851, 0.0, 0.0, 0.268197168561964, -0.452090496848062, 0.850696456695934, 0.0, -0.434036405723617, 0.731639843052264, 0.525657244376012, 0.0, -2770907.60361716, 4670821.10507043, 3333353.96012987, 1.0]
    }
}
cc/tileset.json
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 440.204868379572,
    "root": {
        "boundingVolume": {
            "box": [1399.13610839844, -98.4928131103516, 17.3625670671463, 113.360473632813, 0, 0, 0, 188.134658813477, 0, 0, 0, 14.1362904310226]
        },
        "children": [{
            "boundingVolume": {
                "box": [1399.13610839844, -98.4928131103516, 17.3625670671463, 113.360473632813, 0, 0, 0, 188.134658813477, 0, 0, 0, 14.1362904310226]
            },
            "children": [{
                "boundingVolume": {
                    "box": [1329.28283691406, -251.359550476074, 16.0720038414001, 43.5072021484375, 0, 0, 0, 18.6329727172852, 0, 0, 0, 11.7183384895325]
                },
                "content": {
                    "uri": "Tile_+055_+021/Tile_+055_+021.json"
                },
                "geometricError": 48.7584225341977
            }, {
                "boundingVolume": {
                    "box": [1330.76959228516, -183.34806060791, 17.4266179800034, 42.6410522460938, 0, 0, 0, 50.4650802612305, 0, 0, 0, 14.0722395181656]
                },
                "content": {
                    "uri": "Tile_+055_+022/Tile_+055_+022.json"
                },
                "geometricError": 67.5500672648307
            }, {
                "boundingVolume": {
                    "box": [1343.38549804688, -83.4295806884766, 13.3076241016388, 30.647216796875, 0, 0, 0, 50.3902435302734, 0, 0, 0, 8.86118960380554]
                },
                "content": {
                    "uri": "Tile_+055_+023/Tile_+055_+023.json"
                },
                "geometricError": 59.6401645003559
            }, {
                "boundingVolume": {
                    "box": [1355.99951171875, 16.4887676239014, 12.5251359939575, 18.6517333984375, 0, 0, 0, 50.3155078887939, 0, 0, 0, 8.38973331451416]
                },
                "content": {
                    "uri": "Tile_+055_+024/Tile_+055_+024.json"
                },
                "geometricError": 54.3132131065945
            }, {
                "boundingVolume": {
                    "box": [1368.37573242188, 77.9040107727051, 6.60480356216431, 6.41845703125, 0, 0, 0, 11.7378349304199, 0, 0, 0, 2.24518442153931]
                },
                "content": {
                    "uri": "Tile_+055_+025/Tile_+055_+025.json"
                },
                "geometricError": 13.5651838396135
            }, {
                "boundingVolume": {
                    "box": [1407.76196289063, -259.938575744629, 15.907214641571, 35.7642822265625, 0, 0, 0, 26.6888961791992, 0, 0, 0, 11.5050873756409]
                },
                "content": {
                    "uri": "Tile_+056_+021/Tile_+056_+021.json"
                },
                "geometricError": 46.0841415018922
            }, {
                "boundingVolume": {
                    "box": [1421.63781738281, -183.753875732422, 17.1668101549149, 49.4112548828125, 0, 0, 0, 50.4975280761719, 0, 0, 0, 13.9405335187912]
                },
                "content": {
                    "uri": "Tile_+056_+022/Tile_+056_+022.json"
                },
                "geometricError": 72.0125747747334
            }, {
                "boundingVolume": {
                    "box": [1423.4345703125, -83.8446617126465, 13.146103978157, 50.58740234375, 0, 0, 0, 50.5813941955566, 0, 0, 0, 9.23278701305389]
                },
                "content": {
                    "uri": "Tile_+056_+023/Tile_+056_+023.json"
                },
                "geometricError": 72.1304864165157
            }, {
                "boundingVolume": {
                    "box": [1424.056640625, 16.1404838562012, 14.5895075798035, 50.58740234375, 0, 0, 0, 50.5891609191895, 0, 0, 0, 10.2280697822571]
                },
                "content": {
                    "uri": "Tile_+056_+024/Tile_+056_+024.json"
                },
                "geometricError": 72.2700621963674
            }, {
                "boundingVolume": {
                    "box": [1424.43774414063, 77.5803565979004, 13.805157661438, 50.35009765625, 0, 0, 0, 12.0362205505371, 0, 0, 0, 9.49176692962646]
                },
                "content": {
                    "uri": "Tile_+056_+025/Tile_+056_+025.json"
                },
                "geometricError": 52.6317069700521
            }, {
                "boundingVolume": {
                    "box": [1482.11926269531, -79.1935214996338, 5.75612854957581, 9.2208251953125, 0, 0, 0, 45.3083171844482, 0, 0, 0, 1.68560910224915]
                },
                "content": {
                    "uri": "Tile_+057_+023/Tile_+057_+023.json"
                },
                "geometricError": 46.2677911879815
            }, {
                "boundingVolume": {
                    "box": [1490.83251953125, 15.7759399414063, 12.0768136978149, 17.3740234375, 0, 0, 0, 50.3316650390625, 0, 0, 0, 8.07517910003662]
                },
                "content": {
                    "uri": "Tile_+057_+024/Tile_+057_+024.json"
                },
                "geometricError": 53.8548207081674
            }, {
                "boundingVolume": {
                    "box": [1493.28857421875, 77.2821998596191, 9.15342235565186, 19.2080078125, 0, 0, 0, 11.946231842041, 0, 0, 0, 4.94451904296875]
                },
                "content": {
                    "uri": "Tile_+057_+025/Tile_+057_+025.json"
                },
                "geometricError": 23.1540123502415
            }],
            "geometricError": 440.204868379572
        }],
        "geometricError": 440.204868379572,
        "transform": [-0.860048066843865, -0.510213017001851, 0.0, 0.0, 0.268197168561964, -0.452090496848062, 0.850696456695934, 0.0, -0.434036405723617, 0.731639843052264, 0.525657244376012, 0.0, -2770907.60361716, 4670821.10507043, 3333353.96012987, 1.0]
    }
}
dd/tileset.json
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 371.970268249901,
    "root": {
        "boundingVolume": {
            "box": [-1300.84271240234, -886.116760253906, -6.17444896697998, 139.575012207031, 0, 0, 0, 116.933471679688, 0, 0, 0, 37.8926019668579]
        },
        "children": [{
            "boundingVolume": {
                "box": [-1300.84271240234, -886.116760253906, -6.17444896697998, 139.575012207031, 0, 0, 0, 116.933471679688, 0, 0, 0, 37.8926019668579]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-1391.99407958984, -933.559753417969, 14.0356489419937, 48.4236450195313, 0, 0, 0, 48.149169921875, 0, 0, 0, 11.1117585897446]
                },
                "content": {
                    "uri": "Tile_+025_+004/Tile_+025_+004.json"
                },
                "geometricError": 69.1857148557412
            }, {
                "boundingVolume": {
                    "box": [-1369.02563476563, -852.159057617188, 2.13443279266357, 25.9090576171875, 0, 0, 0, 34.1532592773438, 0, 0, 0, 21.7199869155884]
                },
                "content": {
                    "uri": "Tile_+025_+005/Tile_+025_+005.json"
                },
                "geometricError": 48.0570725022815
            }, {
                "boundingVolume": {
                    "box": [-1299.24267578125, -994.438171386719, 9.6319876909256, 32.385498046875, 0, 0, 0, 8.612060546875, 0, 0, 0, 5.9280823469162]
                },
                "content": {
                    "uri": "Tile_+026_+003/Tile_+026_+003.json"
                },
                "geometricError": 34.0313125065579
            }, {
                "boundingVolume": {
                    "box": [-1294.17193603516, -936.282165527344, 16.2041157484055, 50.5923461914063, 0, 0, 0, 50.5336303710938, 0, 0, 0, 12.6391478776932]
                },
                "content": {
                    "uri": "Tile_+026_+004/Tile_+026_+004.json"
                },
                "geometricError": 72.6152969470457
            }, {
                "boundingVolume": {
                    "box": [-1293.55456542969, -836.444793701172, 6.14014911651611, 50.57958984375, 0, 0, 0, 50.5338439941406, 0, 0, 0, 25.3308382034302]
                },
                "content": {
                    "uri": "Tile_+026_+005/Tile_+026_+005.json"
                },
                "geometricError": 75.852591660895
            }, {
                "boundingVolume": {
                    "box": [-1292.90478515625, -778.007720947266, 15.3367151618004, 27.361083984375, 0, 0, 0, 8.82443237304688, 0, 0, 0, 13.8531003594398]
                },
                "content": {
                    "uri": "Tile_+026_+006/Tile_+026_+006.json"
                },
                "geometricError": 31.9125040238965
            }, {
                "boundingVolume": {
                    "box": [-1219.70953369141, -920.958221435547, 15.8824429512024, 24.8853149414063, 0, 0, 0, 34.5433654785156, 0, 0, 0, 12.3139815330505]
                },
                "content": {
                    "uri": "Tile_+027_+004/Tile_+027_+004.json"
                },
                "geometricError": 44.3188124785806
            }, {
                "boundingVolume": {
                    "box": [-1202.70550537109, -841.645172119141, -6.17444896697998, 41.4378051757813, 0, 0, 0, 45.6526794433594, 0, 0, 0, 37.8926019668579]
                },
                "content": {
                    "uri": "Tile_+027_+005/Tile_+027_+005.json"
                },
                "geometricError": 72.3678666395718
            }],
            "geometricError": 371.970268249901
        }],
        "geometricError": 371.970268249901,
        "transform": [-0.859624213482753, -0.510926816280138, 0.0, 0.0, 0.268445326760204, -0.451653926798071, 0.850850067255383, 0.0, -0.434722115994534, 0.731411319856156, 0.525408567737061, 0.0, -2775282.77578321, 4669358.11021673, 3331774.10493865, 1.0]
    }
}
ee/tileset.json
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 221.861093368121,
    "root": {
        "boundingVolume": {
            "box": [24.9149742126465, 458.556976318359, 5.52865505218506, 97.6052131652832, 0, 0, 0, 49.4085388183594, 0, 0, 0, 18.3740262985229]
        },
        "children": [{
            "boundingVolume": {
                "box": [24.9149742126465, 458.556976318359, 5.52865505218506, 97.6052131652832, 0, 0, 0, 49.4085388183594, 0, 0, 0, 18.3740262985229]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-53.5235767364502, 460.995025634766, 4.8595757484436, 19.1666622161865, 0, 0, 0, 44.6980590820313, 0, 0, 0, 17.1172251701355]
                },
                "content": {
                    "uri": "Tile_+038_+018/Tile_+038_+018.json"
                },
                "geometricError": 51.5584796491835
            }, {
                "boundingVolume": {
                    "box": [-49.5933418273926, 506.448089599609, 3.60871529579163, 15.2364234924316, 0, 0, 0, 1.51742553710938, 0, 0, 0, 0.110045909881592]
                },
                "content": {
                    "uri": "Tile_+038_+019/Tile_+038_+019.json"
                },
                "geometricError": 15.3121941995155
            }, {
                "boundingVolume": {
                    "box": [15.0548553466797, 457.191497802734, 5.52865505218506, 50.5630187988281, 0, 0, 0, 48.0430603027344, 0, 0, 0, 18.3740262985229]
                },
                "content": {
                    "uri": "Tile_+039_+018/Tile_+039_+018.json"
                },
                "geometricError": 72.1273828425906
            }, {
                "boundingVolume": {
                    "box": [-33.1613292694092, 505.072769165039, 3.53735184669495, 1.75724983215332, 0, 0, 0, 0.161758422851563, 0, 0, 0, 0.157356977462769]
                },
                "content": {
                    "uri": "Tile_+039_+019/Tile_+039_+019.json"
                },
                "geometricError": 1.77168111643222
            }, {
                "boundingVolume": {
                    "box": [93.4946136474609, 456.362838745117, 5.13061237335205, 29.0255737304688, 0, 0, 0, 45.5960540771484, 0, 0, 0, 17.7045965194702]
                },
                "content": {
                    "uri": "Tile_+040_+018/Tile_+040_+018.json"
                },
                "geometricError": 56.8765049533316
            }],
            "geometricError": 221.861093368121
        }],
        "geometricError": 221.861093368121,
        "transform": [-0.859624213482753, -0.510926816280138, 0.0, 0.0, 0.268445326760204, -0.451653926798071, 0.850850067255383, 0.0, -0.434722115994534, 0.731411319856156, 0.525408567737061, 0.0, -2775282.77578321, 4669358.11021673, 3331774.10493865, 1.0]
    }
}
js源码:
// *****************************************************
// 功能:合并多个三维瓦片图层。
// +文件系统:
// -+合并图层目录
// --源图层目录符号链接...
// -+入口文件:tileset.json
// --+配置对象
// ----asset:预设对象
// ----geometricError:几何误差
// ---+root:场景根对象
// ----+boundingVolume:边界框对象
// ------box:包围盒数组
// ----+children:子对象数组
// -----+源图层子对象...
// ------+boundingVolume:子对象边界框对象
// --------box:子对象包围盒数组
// ------+content:子对象内容
// --------uri:子对象json|b3dm文件路径
// -------geometricError:子对象几何误差
// -------transform:子对象转换矩阵数组
// -----geometricError:几何误差
// -----transform:转换矩阵数组
// 算法:
// / 1: 判断合并图层目录是否存在,非追加时如已存在则在确认后清空,如不确认则退出,如不存在则创建。
// / 2:依次合并源图层目录。
// / 2.1:在合并图层目录下创建各源图层目录的符号链接。
// / 2.2:依次合并各图层的tileset文件。
// / 2.2.1:首次新建或读取图层配置对象。
// / 2.2.2:非追加合并:取首个源图层配置对象中的转换矩阵为全局转换矩阵。
// / 2.2.3:计算源图层配置对象中子对象的转换矩阵:全局转换矩阵的逆矩阵 x源图层配置对象的转换矩阵。
// / 2.2.4:将源图层配置对象中的子对象放入,并修改uri属性和符号链接对应。
// / 2.2.5:计算图层配置对象的外围框属性值:外围框坐标:(最大坐标+最小坐标)/2,外围框半长:(最大坐标-最小坐标)/2。
// / 2.2.6:计算图层配置对象的外围框几何误差值:外围框外包圆的直径。
// / 2.3:保存tileset文件。
// 用法:node 3DTileJoin <是否追加合并:1|0> <合并图层目录> <源图层目录>,...
// 输出:
// / 开始合并<合并图层目录>...
// / <源图层目录>已合并。
// *****************************************************

// 导入模块
const $m=
{
  fs: require( "fs"),
  path: require( "path"),
  readline: require( "readline")
};
$m.matrix= new Matrix();

// 执行主函数
main();

// ******************* 【函数:主函数】 *********************
function main()
{
  // ================== 取命令行参数 =================
  var argIdx= 2; // 初始化参数索引
  // 取参数:是否追加合并
  var isAppend= process.argv[ argIdx++];
  if( !isAppend)
    return argErr( "缺少是否追加合并参数!");
  isAppend= isAppend== 1? true: isAppend== 0? false: null;
  if( isAppend== null)
    return argErr( "是否追加合并参数错误!");
  // 取参数:合并图层目录
  var joinLayerPath= process.argv[ argIdx++];
  if( !joinLayerPath)
    return argErr( "缺少合并图层目录参数!");
  joinLayerPath= $m.path.resolve( joinLayerPath); // 合并图层目录转绝对路径
  // 取参数:源图层目录
  var srcLayerPaths= delBlk( ( process.argv[ argIdx++]|| "").split( ",")); // 删除空值
  if( !srcLayerPaths.length)
    return argErr( "缺少源图层目录参数!");
  // 源图层目录转绝对路径
  for( var i= 0; i< srcLayerPaths.length; i++)
    srcLayerPaths[ i]= $m.path.resolve( srcLayerPaths[ i]);
  // 检测:源图层目录是否存在、源图层目录是否重复
  for( var i= 0, srcLayerPathm= {}; i< srcLayerPaths.length; i++)
  {
    var srcLayerPath= srcLayerPaths[ i];
    if( !$m.fs.existsSync( srcLayerPath))
      return stdout( "源图层目录不存在:"+ srcLayerPath);
    else if( srcLayerPathm[ srcLayerPath])
      return stdout( "源图层目录重复:"+ srcLayerPath);
    else
      srcLayerPathm[ srcLayerPath]= 1;
  }

  // ================== 新建合并图层目录 ==================
  // 合并图层目录已存在且非追加:确认后清空
  var isExit= $m.fs.existsSync( joinLayerPath);
  if( isExit&& !isAppend)
  {
    // 创建读行器
    var rl= $m.readline.createInterface(
    {
      input: process.stdin,
      output: process.stdout
    });
    // 输入参数:是否删除目录
    rl.question( "请确认是否需要清空此目录:"+ joinLayerPath+ "?(Y/N)  ", function( answer)
    {
      rl.close(), answer= answer.toUpperCase();
      answer== "Y"? ( emptyDir( joinLayerPath), joinLayer()) // 确认:清空
      : answer== "N"? stdout( "未确认!退出。") //
      : stdout( "输入错误!退出。"); // 不确认:退出
    });
  }
  // 合并图层目录不存在:创建
  else
    !isExit&& $m.fs.mkdirSync( joinLayerPath), isAppend= false, joinLayer(); // 创建目录,强制为非追加

  // 函数:合并图层
  function joinLayer()
  {
    var joinCfgo, joinTrsfInv; // 定义合并图层配置对象、合并图层转换矩阵的逆矩阵
    stdout( "开始合并"+ joinLayerPath+ "..."); // 输出:开始合并图层目录...
    // 依次合并源图层目录
    for( var i= 0; i< srcLayerPaths.length; i++)
    {
      var srcLayerPath= srcLayerPaths[ i], srcLayerNm= $m.path.parse( srcLayerPath).name; // 源图层路径、源图层目录名
      var joinLinkPath= $m.path.join( joinLayerPath, srcLayerNm); // 合并图层链接路径(合并图层链接/源图层目录名)
      // 创建源图层符号链接
      isSymLinkSync( joinLinkPath)&& $m.fs.unlinkSync( joinLinkPath); // 源图层已存在:删除原先的符号链接
      $m.fs.symlinkSync( srcLayerPath, joinLinkPath);
      // 读取源图层的配置文件
      var srcCfgo= readJsonFile( $m.path.join( srcLayerPath, "tileset.json"));
      if( !srcCfgo)
        continue; // 读取失败:继续下一个
      // 首次:生成合并图层配置对象、取合并图层转换矩阵的逆矩阵
      !i&& ( joinCfgo= !isAppend? // 非追加:初始化配置对象
        {
          "asset": srcCfgo.asset,
          "geometricError": 0.0,
          "root":
          {
            "boundingVolume":
            {
              "box": []
            },
            "children": [],
            "geometricError": 0.0,
            "transform": srcCfgo.root.transform
          }
        }
        : readJsonFile( $m.path.join( joinLayerPath, "tileset.json")) // 追加:从合并图层中读取
        , joinTrsfInv= $m.matrix.inv( $m.matrix.dConver( joinCfgo.root.transform))); // 取合并图层转换矩阵的逆矩阵
      // 计算子对象的转换矩阵
      var srcTrsf= $m.matrix.dConver( $m.matrix.mul( joinTrsfInv, $m.matrix.dConver( srcCfgo.root.transform)));
      // 设置源图层子对象的转换矩阵
      var srcRtChos= srcCfgo.root.children;
      for( var l= 0; l< srcRtChos.length; l++)
      {
        var srcRtCho= srcRtChos[ l];
        srcRtCho[ "transform"]= srcTrsf;
        // 替换uri开头为源图层目录名
        srcRtCho.content&& ( srcRtCho.content.uri= srcLayerNm+ "/"+ srcRtCho.content.uri);
        for( var j= 0; j< ( srcRtCho.children|| []).length; j++)
          srcRtCho.children[ j].content.uri= srcLayerNm+ "/"+ srcRtCho.children[ j].content.uri;
        // 合并源图层子对象
        for( var j= 0, chIdx= -1; j< joinCfgo.root.children.length&& chIdx== -1; j++)
        {
          var joinRtCh= joinCfgo.root.children[ j];
          // 子对象无内层对象
          if( joinRtCh.content&& srcRtCho.content&& joinRtCh.content.uri== srcRtCho.content.uri)
          {
            chIdx= j;
            continue;
          }
          // 子对象有内存对象
          else if( joinRtCh.children&& srcRtCho.children)
          {
            for( var k= 0, found= false; k< joinRtCh.children.length&& !found; k++)
              joinRtCh.children[ k].content.uri!= srcRtCho.children[ k].content.uri&& ( found= true);
            !found&& ( chIdx= j);
          }
        }
        isAppend&& chIdx>= 0&& joinCfgo.root.children.splice( chIdx, 1); // 追加合并已存在源图层:覆盖
        joinCfgo.root.children.push( srcRtCho);
      }
      // 输出:源图层目录已合并
      stdout( srcLayerPath+ "已合并。");
    }
    // 计算合并图层配置对象外围框属性数值
    var joinRtChs= joinCfgo.root.children;
    // 最大的x坐标、最小的x坐标、最大的y坐标、最小的y坐标、最大的z坐标、最小的z坐标、最大的z轴半长
    var maxX= null, minX= null, maxY= null, minY= null, maxZ= null, minZ= null;
    for( var i= 0; i< joinRtChs.length; i++)
    {
      var joinRtCh= joinRtChs[ i];
      var o= [ joinRtCh.boundingVolume.box[ 0]+ joinRtCh.transform[ 12], joinRtCh.boundingVolume.box[ 1]+ joinRtCh.transform[ 13], joinRtCh.boundingVolume.box[ 2]+ joinRtCh.transform[ 14]];
      var r= [ joinRtCh.boundingVolume.box[ 3], joinRtCh.boundingVolume.box[ 7], joinRtCh.boundingVolume.box[ 11]];
      var xa= [ o[ 0]- r[ 0], o[ 0]+ r[ 0]], ya= [ o[ 1]- r[ 1], o[ 1]+ r[ 1]], za= [ o[ 2]- r[ 2], o[ 2]+ r[ 2]];
      minX= !i? xa[ 0]: Math.min( xa[ 0], minX), maxX= !i? xa[ 1]: Math.max( xa[ 1], maxX);
      minY= !i? ya[ 0]: Math.min( ya[ 0], minY), maxY= !i? ya[ 1]: Math.max( ya[ 1], maxY);
      minZ= !i? za[ 0]: Math.min( za[ 0], minZ), maxZ= !i? za[ 1]: Math.max( za[ 1], maxZ);
    }
    // 计算:最外层包围盒x轴坐标、最外层包围盒y轴坐标、最外层包围盒z轴坐标
    var boxs= [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
    boxs[ 0]= ( maxX+ minX)/ 2, boxs[ 1]= ( maxY+ minY)/ 2, boxs[ 2]= ( maxZ+ minZ)/ 2;
    // 计算:最外层包围盒x轴半长、最外层包围盒y轴半长、最外层包围盒z轴半长
    boxs[ 3]= ( maxX- minX)/ 2, boxs[ 7]= ( maxY- minY)/ 2, boxs[ 11]= ( maxZ- minZ)/ 2;
    joinCfgo.root.boundingVolume.box= boxs;
    // 计算:最外层包围盒几何误差值
    var geometricError= Math.sqrt( Math.pow( boxs[ 3], 2)+ Math.pow( boxs[ 7], 2))* 2;
    joinCfgo.geometricError= geometricError, joinCfgo.root.geometricError= geometricError;
    // 保存tileset文件
    try
    {
      $m.fs.writeFileSync( $m.path.join( joinLayerPath, "tileset.json"), JSON.stringify( joinCfgo));
    }catch( e)
    {
      stdout( e);
    }
    // 提示完成
    stdout( "图层合并完成。");
  }

  // 函数:参数错误
  function argErr( err)
  {
    var msg= err+ "\n用法:node 3DTileJoin <是否追加合并:1|0> <合并图层目录> <源图层目录>,...";
    stdout( msg);
  }

  // 函数:删除数组空元素
  function delBlk( items)
  {
    for( var i= 0; i< items.length; i++)
      !items[ i].trim()&& items.splice( i--, 1);
    return items;
  }

  // 函数:判断文件是否为符号链接(考虑文件不存在的情况)
  function isSymLinkSync( path)
  {
    var isSymLink= false;
    try
    {
      isSymLink= $m.fs.lstatSync( path).isSymbolicLink();
    }catch( e)
    {
      return false;
    }
    return isSymLink;
  }
}

// *********************【函数:标准输出】 ************************
function stdout( msg)
{
  console.log( msg);
}

// *********************【函数:读取单个json文件内容】 ************************
function readJsonFile( path)
{
  try
  {
    var jsono= $m.fs.readFileSync( path), jsono= JSON.parse( jsono.toString());
    return jsono;
  }catch( e)
  {
    stdout( e);
    stdout( "无法打开输入文件:"+ path);
  }
}

// *********************【函数:清空目标目录】 ************************
function emptyDir( tarPath)
{
  var sons= $m.fs.readdirSync( tarPath);
  for( var i= 0; i< sons.length; i++)
  {
    var son= sons[ i], sonPath= $m.path.join( tarPath, son);
    if( $m.fs.lstatSync( sonPath).isSymbolicLink()|| !$m.fs.statSync( sonPath).isDirectory())
      $m.fs.unlinkSync( sonPath);
    else
      emptyDir( sonPath), $m.fs.rmdirSync( sonPath);
  }
}

// 类:矩阵
function Matrix()
{
  var to= this;
  // ***********************【行列式】 ************************
  this.det= function( ms)
  {
    // 矩阵阶数
    var n= ms.length, detVal= 0;
    // n阶矩阵求行列式
    if( n> 3)
    {
      for( var column= 0; column< n; column++) // 去掉第 0行第column列的矩阵
      {
        var matrix= new Array( n- 1).fill( 0).map( function()
        {
          return new Array( n- 1).fill( 0);
        });
        for( var i= 0; i< n- 1; i++)
        {
          for( var j= 0; j< n- 1; j++)
            j< column? matrix[ i][ j]= ms[ i+ 1][ j]: matrix[ i][ j]= ms[ i+ 1][ j+ 1];
        }
        detVal+= ms[ 0][ column]* Math.pow( -1, 0+ column)* to.det( matrix);
      }
    }
    // 3阶矩阵求行列式
    else if( n== 3)
      detVal= ms[ 0][ 0]* ms[ 1][ 1]* ms[ 2][ 2]+ ms[ 0][ 1]* ms[ 1][ 2]* ms[ 2][ 0] //
        + ms[ 0][ 2]* ms[ 1][ 0]* ms[ 2][ 1]- ms[ 0][ 2]* ms[ 1][ 1]* ms[ 2][ 0] //
        - ms[ 0][ 1]* ms[ 1][ 0]* ms[ 2][ 2]- ms[ 0][ 0]* ms[ 1][ 2]* ms[ 2][ 1];
    // 2阶矩阵求行列式
    else if( n== 2)
      detVal= ms[ 0][ 0]* ms[ 1][ 1]- ms[ 0][ 1]* ms[ 1][ 0];
    // 1阶矩阵求行列式
    else if( n== 1)
      detVal= ms[ 0][ 0];
    return detVal;
  }

  // ************************* 【伴随矩阵】 *************************
  this.adjoint= function( ms)
  {
    // 初始化二维矩阵(置零)
    var adjM= new Array( ms.length).fill( 0).map( function()
    {
      return new Array( ms.length).fill( 0);
    });
    // 求各位置的代数余子式
    for( var row= 0; row< ms.length; row++)
    {
      for( var column= 0; column< ms.length; column++) // 去掉第 row 行第 column 列的矩阵
      {
        // 求各位置的余子式
        for( var i= 0, matrix= []; i< ms.length; i++)
        {
          if( i!= row)
          {
            for( var j= 0, arr= []; j< ms.length; j++)
              j!= column&& arr.push( ms[ i][ j]);
            matrix.push( arr);
          }
        }
        // 求代数余子式
        adjM[ row][ column]= Math.pow( -1, row+ column)* to.det( matrix);
      }
    }
    // 转置后返回
    return to.transpose( adjM);
  }

  // *********************** 【转置矩阵】 ************************
  this.transpose= function( ms)
  {
    var transM= new Array( ms.length).fill( 0).map( function()
    {
      return new Array( ms[ 0].length).fill( 0);
    });
    for( var i= 0; i< transM.length; i++)
    {
      for( var j= 0; j< transM[ 0].length; j++)
        transM[ i][ j]= ms[ j][ i];
    }
    return transM;
  }

  // *********************** 【逆矩阵】 ************************
  this.inv= function( ms)
  {
    var detVal= to.det( ms), invM= to.adjoint( ms);
    for( var i= 0; i< invM.length; i++)
    {
      for( var j= 0; j< invM.length; j++)
        invM[ i][ j]/= detVal;
    }
    return invM;
  }

  // ********************** 【矩阵相乘】 **********************
  this.mul= function( m1, m2)
  {
    var m3= [];
    // 求m1的列数
    for( var i= 0, cn1= 0; i< m1.length; i++)
      cn1= Math.max( cn1, m1[ i].length);
    // 求m2的列数
    for( var i= 0, cn2= 0; i< m2.length; i++)
      cn2= Math.max( cn2, m2[ i].length);
    // 乘
    for( var i= 0; i< m1.length; i++)
    {
      var l1= m1[ i], l3= m3[ i]= [];
      for( var j= 0; j< cn2; j++)
      {
        l3[ j]= 0;
        for( var l= 0; l< cn1; l++)
          l3[ j]+= ( l1[ l]|| 0)* ( m2[ l][ j]|| 0);
      }
    }
    return m3;
  };

  // ********************** 【矩阵数组维度转换】 **********************
  // 一维矩阵数组转二维数组/二维矩阵数组转一维数组
  this.dConver= function( ms)
  {
    var matrix, is2D= ms.every( function( item)
    {
      return Array.isArray( item);
    });
    // 二维转一维
    if( is2D)
    {
      matrix= new Array( Math.pow( ms.length, 2)).fill( 0);
      for( var i= 0; i< ms.length; i++)
      {
        var rows= ms[ i];
        for( var j= 0; j< rows.length; j++)
          matrix[ i+ j* rows.length]= rows[ j];
      }
    }
    // 一维转二维
    else
    {
      var n= Math.sqrt( ms.length); // 矩阵阶数
      matrix= new Array( n).fill( 0).map( function()
      {
        return new Array( n).fill( 0);
      });
      for( var i= 0; i< ms.length; i++)
        matrix[ i% n][ parseInt( i/ n)]= ms[ i];
    }
    return matrix;
  }
}
运行命令:

node D:\JAVA\3dtiles\js\3DTileJoin2_test 0 D:\JAVA\3dtiles\js_test_success D:\JAVA\3dtiles\data\aa,D:\JAVA\3dtiles\data\bb,D:\JAVA\3dtiles\data\cc,D:\JAVA\3dtiles\data\dd,D:\JAVA\3dtiles\data\ee

生成结果:
{
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    },
    "geometricError": 9325.869057604898,
    "root": {
        "boundingVolume": {
            "box": [341.8290726169498, -1031.7488150345162, -5.334247002843764, 4289.988496445352, 0, 0, 0, 1827.2813467730307, 0, 0, 0, 40.59645403409377]
        },
        "children": [{
            "boundingVolume": {
                "box": [-3675.8994140625, 545.641296386719, 11.9535970687866, 272.260009765625, 0, 0, 0, 249.891235351563, 0, 0, 0, 23.3086099624634]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-3935.02001953125, 574.504516601563, 15.7210890054703, 13.139404296875, 0, 0, 0, 25.2759399414063, 0, 0, 0, 11.8160890340805]
                },
                "content": {
                    "uri": "aa/Tile_+002_+029/Tile_+002_+029.json"
                },
                "geometricError": 30.8405098086856
            }, {
                "boundingVolume": {
                    "box": [-3931.19152832031, 630.064575195313, 5.76587748527527, 9.6800537109375, 0, 0, 0, 30.9617309570313, 0, 0, 0, 1.63892340660095]
                },
                "content": {
                    "uri": "aa/Tile_+002_+030/Tile_+002_+030.json"
                },
                "geometricError": 32.4810451438208
            }, {
                "boundingVolume": {
                    "box": [-3872.32775878906, 566.557830810547, 15.5438475459814, 50.4261474609375, 0, 0, 0, 33.1085510253906, 0, 0, 0, 15.1476407200098]
                },
                "content": {
                    "uri": "aa/Tile_+003_+029/Tile_+003_+029.json"
                },
                "geometricError": 62.1966519849389
            }, {
                "boundingVolume": {
                    "box": [-3872.03454589844, 628.938293457031, 18.1283311843872, 50.4095458984375, 0, 0, 0, 30.4552612304688, 0, 0, 0, 14.090537071228]
                },
                "content": {
                    "uri": "aa/Tile_+003_+030/Tile_+003_+030.json"
                },
                "geometricError": 60.5573157368986
            }, {
                "boundingVolume": {
                    "box": [-3749.26013183594, 352.109008789063, 19.1447021961212, 26.1177978515625, 0, 0, 0, 46.5369567871094, 0, 0, 0, 15.1629683971405]
                },
                "content": {
                    "uri": "aa/Tile_+004_+027/Tile_+004_+027.json"
                },
                "geometricError": 55.4774127211521
            }, {
                "boundingVolume": {
                    "box": [-3740.12866210938, 448.188674926758, 9.04387199878693, 17.607421875, 0, 0, 0, 50.3167572021484, 0, 0, 0, 5.57954967021942]
                },
                "content": {
                    "uri": "aa/Tile_+004_+028/Tile_+004_+028.json"
                },
                "geometricError": 53.5997083475893
            }, {
                "boundingVolume": {
                    "box": [-3772.3740234375, 548.456268310547, 19.1229840517044, 50.480712890625, 0, 0, 0, 50.5904846191406, 0, 0, 0, 15.4035738706589]
                },
                "content": {
                    "uri": "aa/Tile_+004_+029/Tile_+004_+029.json"
                },
                "geometricError": 73.1092989703366
            }, {
                "boundingVolume": {
                    "box": [-3772.05346679688, 619.552154541016, 18.2076432704926, 50.41162109375, 0, 0, 0, 21.6935119628906, 0, 0, 0, 14.1500952243805]
                },
                "content": {
                    "uri": "aa/Tile_+004_+030/Tile_+004_+030.json"
                },
                "geometricError": 56.6759666652712
            }, {
                "boundingVolume": {
                    "box": [-3689.02783203125, 297.003692626953, 10.0964844226837, 5.725341796875, 0, 0, 0, 1.25363159179688, 0, 0, 0, 4.35963416099548]
                },
                "content": {
                    "uri": "aa/Tile_+005_+026/Tile_+005_+026.json"
                },
                "geometricError": 7.30462462257396
            }, {
                "boundingVolume": {
                    "box": [-3673.70959472656, 348.031799316406, 12.3951093554497, 50.5650634765625, 0, 0, 0, 50.4035339355469, 0, 0, 0, 10.4135625958443]
                },
                "content": {
                    "uri": "aa/Tile_+005_+027/Tile_+005_+027.json"
                },
                "geometricError": 72.1511203206034
            }, {
                "boundingVolume": {
                    "box": [-3673.11413574219, 447.839309692383, 6.34941649436951, 50.5919189453125, 0, 0, 0, 50.5899505615234, 0, 0, 0, 10.5448610782623]
                },
                "content": {
                    "uri": "aa/Tile_+005_+028/Tile_+005_+028.json"
                },
                "geometricError": 72.3192882676973
            }, {
                "boundingVolume": {
                    "box": [-3672.49230957031, 547.832534790039, 18.5858655571938, 50.5924072265625, 0, 0, 0, 50.5895843505859, 0, 0, 0, 16.6763414740562]
                },
                "content": {
                    "uri": "aa/Tile_+005_+029/Tile_+005_+029.json"
                },
                "geometricError": 73.4642639567206
            }, {
                "boundingVolume": {
                    "box": [-3671.8740234375, 647.7919921875, 11.636326789856, 50.582763671875, 0, 0, 0, 50.5528564453125, 0, 0, 0, 21.4873533248901]
                },
                "content": {
                    "uri": "aa/Tile_+005_+030/Tile_+005_+030.json"
                },
                "geometricError": 74.6720404728155
            }, {
                "boundingVolume": {
                    "box": [-3665.76831054688, 730.397674560547, 12.528514623642, 44.778076171875, 0, 0, 0, 33.1688537597656, 0, 0, 0, 19.6651880741119]
                },
                "content": {
                    "uri": "aa/Tile_+005_+031/Tile_+005_+031.json"
                },
                "geometricError": 59.0928810211615
            }, {
                "boundingVolume": {
                    "box": [-3622.38244628906, 395.646423339844, 5.87387609481812, 1.3489990234375, 0, 0, 0, 2.1663818359375, 0, 0, 0, 0.234408378601074]
                },
                "content": {
                    "uri": "aa/Tile_+006_+027/Tile_+006_+027.json"
                },
                "geometricError": 2.56280235528877
            }, {
                "boundingVolume": {
                    "box": [-3591.23608398438, 447.522384643555, 11.8303036689758, 32.471923828125, 0, 0, 0, 50.2840118408203, 0, 0, 0, 7.67854261398315]
                },
                "content": {
                    "uri": "aa/Tile_+006_+028/Tile_+006_+028.json"
                },
                "geometricError": 60.3478889488445
            }, {
                "boundingVolume": {
                    "box": [-3572.49584960938, 547.324279785156, 11.0218200683594, 50.58984375, 0, 0, 0, 50.475830078125, 0, 0, 0, 21.2449989318848]
                },
                "content": {
                    "uri": "aa/Tile_+006_+029/Tile_+006_+029.json"
                },
                "geometricError": 74.5552928526268
            }, {
                "boundingVolume": {
                    "box": [-3571.88171386719, 647.205322265625, 10.7785501480103, 50.5970458984375, 0, 0, 0, 50.5909423828125, 0, 0, 0, 22.133563041687]
                },
                "content": {
                    "uri": "aa/Tile_+006_+030/Tile_+006_+030.json"
                },
                "geometricError": 74.8959219033318
            }, {
                "boundingVolume": {
                    "box": [-3571.29382324219, 746.071563720703, 18.3907251358032, 50.5609130859375, 0, 0, 0, 49.4609680175781, 0, 0, 0, 14.5039548873901]
                },
                "content": {
                    "uri": "aa/Tile_+006_+031/Tile_+006_+031.json"
                },
                "geometricError": 72.2022021595952
            }, {
                "boundingVolume": {
                    "box": [-3509.61206054688, 576.114654541016, 6.37169981002808, 13.11669921875, 0, 0, 0, 21.0632019042969, 0, 0, 0, 1.91424798965454]
                },
                "content": {
                    "uri": "aa/Tile_+007_+029/Tile_+007_+029.json"
                },
                "geometricError": 24.8871576967365
            }, {
                "boundingVolume": {
                    "box": [-3478.34790039063, 646.816314697266, 16.745255947113, 44.12158203125, 0, 0, 0, 50.3578186035156, 0, 0, 0, 12.6729989051819]
                },
                "content": {
                    "uri": "aa/Tile_+007_+030/Tile_+007_+030.json"
                },
                "geometricError": 68.1412415259338
            }, {
                "boundingVolume": {
                    "box": [-3471.40478515625, 741.000762939453, 17.6509721279144, 50.4560546875, 0, 0, 0, 44.9321594238281, 0, 0, 0, 13.3580210208893]
                },
                "content": {
                    "uri": "aa/Tile_+007_+031/Tile_+007_+031.json"
                },
                "geometricError": 68.8705243969495
            }, {
                "boundingVolume": {
                    "box": [-3412.68273925781, 734.155242919922, 10.6947717666626, 9.0433349609375, 0, 0, 0, 17.5325012207031, 0, 0, 0, 5.41533184051514]
                },
                "content": {
                    "uri": "aa/Tile_+008_+031/Tile_+008_+031.json"
                },
                "geometricError": 20.4571827291191
            }],
            "geometricError": 740.579323830987,
            "transform": [1, 0, 0, 0, 1.2432017357571995e-17, 1, -5.551115123125783e-17, 0, 1.1741393048713246e-17, 5.551115123125783e-17, 0.9999999999999998, 0, -2.7755747368212224e-10, 2.3283064365386963e-10, 0, 1]
        }, {
            "boundingVolume": {
                "box": [1678.00695800781, -167.3508644104, 14.9421647787094, 237.2333984375, 0, 0, 0, 257.251705169678, 0, 0, 0, 13.2210794687271]
            },
            "children": [{
                "boundingVolume": {
                    "box": [1456.77575683594, -283.401695251465, 9.57817316055298, 16.002197265625, 0, 0, 0, 49.5448379516602, 0, 0, 0, 5.28457307815552]
                },
                "content": {
                    "uri": "bb/Tile_+056_+021/Tile_+056_+021.json"
                },
                "geometricError": 52.3324755539293
            }, {
                "boundingVolume": {
                    "box": [1471.31585693359, -229.578811645508, 4.45599508285522, 1.51898193359375, 0, 0, 0, 4.85548400878906, 0, 0, 0, 0.0174999237060547]
                },
                "content": {
                    "uri": "bb/Tile_+056_+022/Tile_+056_+022.json"
                },
                "geometricError": 5.08756693533562
            }, {
                "boundingVolume": {
                    "box": [1531.82299804688, -348.998123168945, 10.2060108184814, 40.3277587890625, 0, 0, 0, 14.9526214599609, 0, 0, 0, 6.00887680053711]
                },
                "content": {
                    "uri": "bb/Tile_+057_+020/Tile_+057_+020.json"
                },
                "geometricError": 43.4282813138826
            }, {
                "boundingVolume": {
                    "box": [1522.18682861328, -284.460159301758, 9.90673196315765, 50.5840454101563, 0, 0, 0, 50.5893402099609, 0, 0, 0, 8.18564665317535]
                },
                "content": {
                    "uri": "bb/Tile_+057_+021/Tile_+057_+021.json"
                },
                "geometricError": 72.0071649495143
            }, {
                "boundingVolume": {
                    "box": [1522.80364990234, -184.549896240234, 9.43511211872101, 50.5891723632813, 0, 0, 0, 50.506591796875, 0, 0, 0, 5.92474162578583]
                },
                "content": {
                    "uri": "bb/Tile_+057_+022/Tile_+057_+022.json"
                },
                "geometricError": 71.7306262252761
            }, {
                "boundingVolume": {
                    "box": [1536.63287353516, -84.6287059783936, 10.7433174848557, 37.3843383789063, 0, 0, 0, 50.4350147247314, 0, 0, 0, 7.403111577034]
                },
                "content": {
                    "uri": "bb/Tile_+057_+023/Tile_+057_+023.json"
                },
                "geometricError": 63.2145990047746
            }, {
                "boundingVolume": {
                    "box": [1548.78259277344, 15.3128070831299, 11.0693670511246, 25.8543701171875, 0, 0, 0, 50.38356590271, 0, 0, 0, 7.47109162807465]
                },
                "content": {
                    "uri": "bb/Tile_+057_+024/Tile_+057_+024.json"
                },
                "geometricError": 57.120656310518
            }, {
                "boundingVolume": {
                    "box": [1557.44226074219, 77.4114685058594, 8.79704344272614, 17.3408203125, 0, 0, 0, 12.489372253418, 0, 0, 0, 5.12078511714935]
                },
                "content": {
                    "uri": "bb/Tile_+057_+025/Tile_+057_+025.json"
                },
                "geometricError": 21.9752339830746
            }, {
                "boundingVolume": {
                    "box": [1621.77416992188, -364.557540893555, 10.4570751190186, 50.3675537109375, 0, 0, 0, 30.0714874267578, 0, 0, 0, 6.32948684692383]
                },
                "content": {
                    "uri": "bb/Tile_+058_+020/Tile_+058_+020.json"
                },
                "geometricError": 59.0020951037097
            }, {
                "boundingVolume": {
                    "box": [1622.17553710938, -285.081962585449, 12.8714859485626, 50.5882568359375, 0, 0, 0, 50.5891189575195, 0, 0, 0, 8.59081149101257]
                },
                "content": {
                    "uri": "bb/Tile_+058_+021/Tile_+058_+021.json"
                },
                "geometricError": 72.0571490462324
            }, {
                "boundingVolume": {
                    "box": [1622.79650878906, -185.08927154541, 13.1854486465454, 50.589111328125, 0, 0, 0, 50.5890426635742, 0, 0, 0, 8.58977794647217]
                },
                "content": {
                    "uri": "bb/Tile_+058_+022/Tile_+058_+022.json"
                },
                "geometricError": 72.057572175005
            }, {
                "boundingVolume": {
                    "box": [1623.42102050781, -85.0964012145996, 10.2867512702942, 50.5892333984375, 0, 0, 0, 50.5891151428223, 0, 0, 0, 5.54497861862183]
                },
                "content": {
                    "uri": "bb/Tile_+058_+023/Tile_+058_+023.json"
                },
                "geometricError": 71.7584552136979
            }, {
                "boundingVolume": {
                    "box": [1624.04296875, 14.8963890075684, 10.8929178714752, 50.5892333984375, 0, 0, 0, 50.5891761779785, 0, 0, 0, 6.47345900535583]
                },
                "content": {
                    "uri": "bb/Tile_+058_+024/Tile_+058_+024.json"
                },
                "geometricError": 71.8362092102733
            }, {
                "boundingVolume": {
                    "box": [1624.42224121094, 76.6347541809082, 9.87600064277649, 50.348876953125, 0, 0, 0, 12.3346061706543, 0, 0, 0, 5.74333453178406]
                },
                "content": {
                    "uri": "bb/Tile_+058_+025/Tile_+058_+025.json"
                },
                "geometricError": 52.1549404310852
            }, {
                "boundingVolume": {
                    "box": [1721.67340087891, -379.611175537109, 16.0873470306396, 50.4609985351563, 0, 0, 0, 44.5035400390625, 0, 0, 0, 12.0758972167969]
                },
                "content": {
                    "uri": "bb/Tile_+059_+020/Tile_+059_+020.json"
                },
                "geometricError": 68.3571850119951
            }, {
                "boundingVolume": {
                    "box": [1722.16735839844, -285.70393371582, 5.40806865692139, 50.589111328125, 0, 0, 0, 50.5890960693359, 0, 0, 0, 0.90021276473999]
                },
                "content": {
                    "uri": "bb/Tile_+059_+021/Tile_+059_+021.json"
                },
                "geometricError": 71.5494598798882
            }, {
                "boundingVolume": {
                    "box": [1722.79113769531, -185.71117401123, 12.7560157775879, 50.5909423828125, 0, 0, 0, 50.5891342163086, 0, 0, 0, 8.14298439025879]
                },
                "content": {
                    "uri": "bb/Tile_+059_+022/Tile_+059_+022.json"
                },
                "geometricError": 72.0070284535943
            }, {
                "boundingVolume": {
                    "box": [1723.41357421875, -85.7185573577881, 12.8922352790833, 50.5914306640625, 0, 0, 0, 50.5892429351807, 0, 0, 0, 8.30024099349976]
                },
                "content": {
                    "uri": "bb/Tile_+059_+023/Tile_+059_+023.json"
                },
                "geometricError": 72.025400782929
            }, {
                "boundingVolume": {
                    "box": [1724.03527832031, 14.2743854522705, 13.8084480762482, 50.5885009765625, 0, 0, 0, 50.5892391204834, 0, 0, 0, 9.1709201335907]
                },
                "content": {
                    "uri": "bb/Tile_+059_+024/Tile_+059_+024.json"
                },
                "geometricError": 72.1288660796897
            }, {
                "boundingVolume": {
                    "box": [1724.40911865234, 75.4231605529785, 11.6732699871063, 50.3403930664063, 0, 0, 0, 11.7451057434082, 0, 0, 0, 7.08151745796204]
                },
                "content": {
                    "uri": "bb/Tile_+059_+025/Tile_+059_+025.json"
                },
                "geometricError": 52.1751911593196
            }, {
                "boundingVolume": {
                    "box": [1797.44390869141, -380.166076660156, 13.3256312608719, 26.4188842773438, 0, 0, 0, 44.4364929199219, 0, 0, 0, 9.40558898448944]
                },
                "content": {
                    "uri": "bb/Tile_+060_+020/Tile_+060_+020.json"
                },
                "geometricError": 52.5454513124314
            }, {
                "boundingVolume": {
                    "box": [1812.28704833984, -286.175262451172, 11.5870990753174, 40.7161254882813, 0, 0, 0, 50.4384155273438, 0, 0, 0, 7.63290023803711]
                },
                "content": {
                    "uri": "bb/Tile_+060_+021/Tile_+060_+021.json"
                },
                "geometricError": 65.2694247081303
            }, {
                "boundingVolume": {
                    "box": [1822.78210449219, -186.271453857422, 15.3006939888, 50.5889892578125, 0, 0, 0, 50.5271301269531, 0, 0, 0, 11.2427039146423]
                },
                "content": {
                    "uri": "bb/Tile_+060_+022/Tile_+060_+022.json"
                },
                "geometricError": 72.3784160113043
            }, {
                "boundingVolume": {
                    "box": [1823.40588378906, -86.3404502868652, 12.5961084365845, 50.58740234375, 0, 0, 0, 50.5890693664551, 0, 0, 0, 8.5899076461792]
                },
                "content": {
                    "uri": "bb/Tile_+060_+023/Tile_+060_+023.json"
                },
                "geometricError": 72.0564065758371
            }, {
                "boundingVolume": {
                    "box": [1824.02978515625, 13.6523685455322, 15.3824796676636, 50.5882568359375, 0, 0, 0, 50.5891551971436, 0, 0, 0, 11.0295190811157]
                },
                "content": {
                    "uri": "bb/Tile_+060_+024/Tile_+060_+024.json"
                },
                "geometricError": 72.3884289401293
            }, {
                "boundingVolume": {
                    "box": [1824.38507080078, 73.7163772583008, 9.60402154922485, 50.3248901367188, 0, 0, 0, 10.6603164672852, 0, 0, 0, 5.04884958267212]
                },
                "content": {
                    "uri": "bb/Tile_+060_+025/Tile_+060_+025.json"
                },
                "geometricError": 51.6887588994351
            }, {
                "boundingVolume": {
                    "box": [1873.77648925781, -141.348236083984, 4.44181227684021, 1.0274658203125, 0, 0, 0, 4.982177734375, 0, 0, 0, 0.262368440628052]
                },
                "content": {
                    "uri": "bb/Tile_+061_+022/Tile_+061_+022.json"
                },
                "geometricError": 5.09378230664111
            }, {
                "boundingVolume": {
                    "box": [1883.65350341797, -86.6555309295654, 9.82255268096924, 10.8458862304688, 0, 0, 0, 50.2822132110596, 0, 0, 0, 5.70098972320557]
                },
                "content": {
                    "uri": "bb/Tile_+061_+023/Tile_+061_+023.json"
                },
                "geometricError": 51.7536037136625
            }, {
                "boundingVolume": {
                    "box": [1893.34643554688, 13.2779121398926, 10.3329606056213, 19.9166259765625, 0, 0, 0, 50.3416175842285, 0, 0, 0, 6.1720118522644]
                },
                "content": {
                    "uri": "bb/Tile_+061_+024/Tile_+061_+024.json"
                },
                "geometricError": 54.4889363228122
            }, {
                "boundingVolume": {
                    "box": [1894.64739990234, 70.7054080963135, 9.54776215553284, 20.5929565429688, 0, 0, 0, 7.8891658782959, 0, 0, 0, 5.28816103935242]
                },
                "content": {
                    "uri": "bb/Tile_+061_+025/Tile_+061_+025.json"
                },
                "geometricError": 22.6775978581064
            }],
            "geometricError": 700.379674431607,
            "transform": [1, 0, 0, 0, 1.2432017357571995e-17, 1, -5.551115123125783e-17, 0, 1.1741393048713246e-17, 5.551115123125783e-17, 0.9999999999999998, 0, -2.7755747368212224e-10, 2.3283064365386963e-10, 0, 1]
        }, {
            "boundingVolume": {
                "box": [1399.13610839844, -98.4928131103516, 17.3625670671463, 113.360473632813, 0, 0, 0, 188.134658813477, 0, 0, 0, 14.1362904310226]
            },
            "children": [{
                "boundingVolume": {
                    "box": [1329.28283691406, -251.359550476074, 16.0720038414001, 43.5072021484375, 0, 0, 0, 18.6329727172852, 0, 0, 0, 11.7183384895325]
                },
                "content": {
                    "uri": "cc/Tile_+055_+021/Tile_+055_+021.json"
                },
                "geometricError": 48.7584225341977
            }, {
                "boundingVolume": {
                    "box": [1330.76959228516, -183.34806060791, 17.4266179800034, 42.6410522460938, 0, 0, 0, 50.4650802612305, 0, 0, 0, 14.0722395181656]
                },
                "content": {
                    "uri": "cc/Tile_+055_+022/Tile_+055_+022.json"
                },
                "geometricError": 67.5500672648307
            }, {
                "boundingVolume": {
                    "box": [1343.38549804688, -83.4295806884766, 13.3076241016388, 30.647216796875, 0, 0, 0, 50.3902435302734, 0, 0, 0, 8.86118960380554]
                },
                "content": {
                    "uri": "cc/Tile_+055_+023/Tile_+055_+023.json"
                },
                "geometricError": 59.6401645003559
            }, {
                "boundingVolume": {
                    "box": [1355.99951171875, 16.4887676239014, 12.5251359939575, 18.6517333984375, 0, 0, 0, 50.3155078887939, 0, 0, 0, 8.38973331451416]
                },
                "content": {
                    "uri": "cc/Tile_+055_+024/Tile_+055_+024.json"
                },
                "geometricError": 54.3132131065945
            }, {
                "boundingVolume": {
                    "box": [1368.37573242188, 77.9040107727051, 6.60480356216431, 6.41845703125, 0, 0, 0, 11.7378349304199, 0, 0, 0, 2.24518442153931]
                },
                "content": {
                    "uri": "cc/Tile_+055_+025/Tile_+055_+025.json"
                },
                "geometricError": 13.5651838396135
            }, {
                "boundingVolume": {
                    "box": [1407.76196289063, -259.938575744629, 15.907214641571, 35.7642822265625, 0, 0, 0, 26.6888961791992, 0, 0, 0, 11.5050873756409]
                },
                "content": {
                    "uri": "cc/Tile_+056_+021/Tile_+056_+021.json"
                },
                "geometricError": 46.0841415018922
            }, {
                "boundingVolume": {
                    "box": [1421.63781738281, -183.753875732422, 17.1668101549149, 49.4112548828125, 0, 0, 0, 50.4975280761719, 0, 0, 0, 13.9405335187912]
                },
                "content": {
                    "uri": "cc/Tile_+056_+022/Tile_+056_+022.json"
                },
                "geometricError": 72.0125747747334
            }, {
                "boundingVolume": {
                    "box": [1423.4345703125, -83.8446617126465, 13.146103978157, 50.58740234375, 0, 0, 0, 50.5813941955566, 0, 0, 0, 9.23278701305389]
                },
                "content": {
                    "uri": "cc/Tile_+056_+023/Tile_+056_+023.json"
                },
                "geometricError": 72.1304864165157
            }, {
                "boundingVolume": {
                    "box": [1424.056640625, 16.1404838562012, 14.5895075798035, 50.58740234375, 0, 0, 0, 50.5891609191895, 0, 0, 0, 10.2280697822571]
                },
                "content": {
                    "uri": "cc/Tile_+056_+024/Tile_+056_+024.json"
                },
                "geometricError": 72.2700621963674
            }, {
                "boundingVolume": {
                    "box": [1424.43774414063, 77.5803565979004, 13.805157661438, 50.35009765625, 0, 0, 0, 12.0362205505371, 0, 0, 0, 9.49176692962646]
                },
                "content": {
                    "uri": "cc/Tile_+056_+025/Tile_+056_+025.json"
                },
                "geometricError": 52.6317069700521
            }, {
                "boundingVolume": {
                    "box": [1482.11926269531, -79.1935214996338, 5.75612854957581, 9.2208251953125, 0, 0, 0, 45.3083171844482, 0, 0, 0, 1.68560910224915]
                },
                "content": {
                    "uri": "cc/Tile_+057_+023/Tile_+057_+023.json"
                },
                "geometricError": 46.2677911879815
            }, {
                "boundingVolume": {
                    "box": [1490.83251953125, 15.7759399414063, 12.0768136978149, 17.3740234375, 0, 0, 0, 50.3316650390625, 0, 0, 0, 8.07517910003662]
                },
                "content": {
                    "uri": "cc/Tile_+057_+024/Tile_+057_+024.json"
                },
                "geometricError": 53.8548207081674
            }, {
                "boundingVolume": {
                    "box": [1493.28857421875, 77.2821998596191, 9.15342235565186, 19.2080078125, 0, 0, 0, 11.946231842041, 0, 0, 0, 4.94451904296875]
                },
                "content": {
                    "uri": "cc/Tile_+057_+025/Tile_+057_+025.json"
                },
                "geometricError": 23.1540123502415
            }],
            "geometricError": 440.204868379572,
            "transform": [1, 0, 0, 0, 1.2432017357571995e-17, 1, -5.551115123125783e-17, 0, 1.1741393048713246e-17, 5.551115123125783e-17, 0.9999999999999998, 0, -2.7755747368212224e-10, 2.3283064365386963e-10, 0, 1]
        }, {
            "boundingVolume": {
                "box": [-1300.84271240234, -886.116760253906, -6.17444896697998, 139.575012207031, 0, 0, 0, 116.933471679688, 0, 0, 0, 37.8926019668579]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-1391.99407958984, -933.559753417969, 14.0356489419937, 48.4236450195313, 0, 0, 0, 48.149169921875, 0, 0, 0, 11.1117585897446]
                },
                "content": {
                    "uri": "dd/Tile_+025_+004/Tile_+025_+004.json"
                },
                "geometricError": 69.1857148557412
            }, {
                "boundingVolume": {
                    "box": [-1369.02563476563, -852.159057617188, 2.13443279266357, 25.9090576171875, 0, 0, 0, 34.1532592773438, 0, 0, 0, 21.7199869155884]
                },
                "content": {
                    "uri": "dd/Tile_+025_+005/Tile_+025_+005.json"
                },
                "geometricError": 48.0570725022815
            }, {
                "boundingVolume": {
                    "box": [-1299.24267578125, -994.438171386719, 9.6319876909256, 32.385498046875, 0, 0, 0, 8.612060546875, 0, 0, 0, 5.9280823469162]
                },
                "content": {
                    "uri": "dd/Tile_+026_+003/Tile_+026_+003.json"
                },
                "geometricError": 34.0313125065579
            }, {
                "boundingVolume": {
                    "box": [-1294.17193603516, -936.282165527344, 16.2041157484055, 50.5923461914063, 0, 0, 0, 50.5336303710938, 0, 0, 0, 12.6391478776932]
                },
                "content": {
                    "uri": "dd/Tile_+026_+004/Tile_+026_+004.json"
                },
                "geometricError": 72.6152969470457
            }, {
                "boundingVolume": {
                    "box": [-1293.55456542969, -836.444793701172, 6.14014911651611, 50.57958984375, 0, 0, 0, 50.5338439941406, 0, 0, 0, 25.3308382034302]
                },
                "content": {
                    "uri": "dd/Tile_+026_+005/Tile_+026_+005.json"
                },
                "geometricError": 75.852591660895
            }, {
                "boundingVolume": {
                    "box": [-1292.90478515625, -778.007720947266, 15.3367151618004, 27.361083984375, 0, 0, 0, 8.82443237304688, 0, 0, 0, 13.8531003594398]
                },
                "content": {
                    "uri": "dd/Tile_+026_+006/Tile_+026_+006.json"
                },
                "geometricError": 31.9125040238965
            }, {
                "boundingVolume": {
                    "box": [-1219.70953369141, -920.958221435547, 15.8824429512024, 24.8853149414063, 0, 0, 0, 34.5433654785156, 0, 0, 0, 12.3139815330505]
                },
                "content": {
                    "uri": "dd/Tile_+027_+004/Tile_+027_+004.json"
                },
                "geometricError": 44.3188124785806
            }, {
                "boundingVolume": {
                    "box": [-1202.70550537109, -841.645172119141, -6.17444896697998, 41.4378051757813, 0, 0, 0, 45.6526794433594, 0, 0, 0, 37.8926019668579]
                },
                "content": {
                    "uri": "dd/Tile_+027_+005/Tile_+027_+005.json"
                },
                "geometricError": 72.3678666395718
            }],
            "geometricError": 371.970268249901,
            "transform": [0.9999996554194588, 0.0004363781417063284, -0.0007062117813477209, 0, -0.0004361717010063091, 0.9999998621139483, 0.0002924488538288972, 0, 0.000706339302258286, -0.00029214072346267494, 0.9999997078692504, 0, 4509.297381684372, -1855.9799298739526, -1.8636501030996442, 1]
        }, {
            "boundingVolume": {
                "box": [24.9149742126465, 458.556976318359, 5.52865505218506, 97.6052131652832, 0, 0, 0, 49.4085388183594, 0, 0, 0, 18.3740262985229]
            },
            "children": [{
                "boundingVolume": {
                    "box": [-53.5235767364502, 460.995025634766, 4.8595757484436, 19.1666622161865, 0, 0, 0, 44.6980590820313, 0, 0, 0, 17.1172251701355]
                },
                "content": {
                    "uri": "ee/Tile_+038_+018/Tile_+038_+018.json"
                },
                "geometricError": 51.5584796491835
            }, {
                "boundingVolume": {
                    "box": [-49.5933418273926, 506.448089599609, 3.60871529579163, 15.2364234924316, 0, 0, 0, 1.51742553710938, 0, 0, 0, 0.110045909881592]
                },
                "content": {
                    "uri": "ee/Tile_+038_+019/Tile_+038_+019.json"
                },
                "geometricError": 15.3121941995155
            }, {
                "boundingVolume": {
                    "box": [15.0548553466797, 457.191497802734, 5.52865505218506, 50.5630187988281, 0, 0, 0, 48.0430603027344, 0, 0, 0, 18.3740262985229]
                },
                "content": {
                    "uri": "ee/Tile_+039_+018/Tile_+039_+018.json"
                },
                "geometricError": 72.1273828425906
            }, {
                "boundingVolume": {
                    "box": [-33.1613292694092, 505.072769165039, 3.53735184669495, 1.75724983215332, 0, 0, 0, 0.161758422851563, 0, 0, 0, 0.157356977462769]
                },
                "content": {
                    "uri": "ee/Tile_+039_+019/Tile_+039_+019.json"
                },
                "geometricError": 1.77168111643222
            }, {
                "boundingVolume": {
                    "box": [93.4946136474609, 456.362838745117, 5.13061237335205, 29.0255737304688, 0, 0, 0, 45.5960540771484, 0, 0, 0, 17.7045965194702]
                },
                "content": {
                    "uri": "ee/Tile_+040_+018/Tile_+040_+018.json"
                },
                "geometricError": 56.8765049533316
            }],
            "geometricError": 221.861093368121,
            "transform": [0.9999996554194588, 0.0004363781417063284, -0.0007062117813477209, 0, -0.0004361717010063091, 0.9999998621139483, 0.0002924488538288972, 0, 0.000706339302258286, -0.00029214072346267494, 0.9999997078692504, 0, 4509.297381684372, -1855.9799298739526, -1.8636501030996442, 1]
        }],
        "geometricError": 9325.869057604898,
        "transform": [-0.860048066843865, -0.510213017001851, 0, 0, 0.268197168561964, -0.452090496848062, 0.850696456695934, 0, -0.434036405723617, 0.731639843052264, 0.525657244376012, 0, -2770907.60361716, 4670821.10507043, 3333353.96012987, 1]
    }
}
java源码:
Matrix.java
package org.example.threedtiles;

import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.RealMatrix;

import java.util.ArrayList;

public class Matrix {
    /**
     * 一维转二维
     *
     * @param ms
     * @return
     */
    public static double[][] dConver(double[] ms) {
        double[][] matrix;
        int n = (int) Math.sqrt(ms.length);
        matrix = new double[n][n];
        for (int i = 0; i < ms.length; i++) {
            int row = i % n;
            int col = (int) Math.floor(i / n);
            matrix[row][col] = ms[i];
        }
        return matrix;
    }

    /**
     * 二维转一维
     *
     * @param
     * @return
     */
    public static double[] converttwotoone(double[][] ms) {
        // 计算二维数组的元素个数
        int totalElements = 0;
        for (double[] row : ms) {
            totalElements += row.length;
        }
        double matrix[] = new double[totalElements];
        for (int i = 0; i < ms.length; i++) {
            double[] rows = ms[i];
            for (int j = 0; j < rows.length; j++)
                matrix[i + j * rows.length] = rows[j];
        }
        return matrix;
    }

    static double det(double[][] ms) {
        // 矩阵阶数
        int n = ms.length;
        double detVal = 0;
        // n阶矩阵求行列式
        if (n > 3) {
            for (int column = 0; column < n; column++) // 去掉第 0行第column列的矩阵
            {
                double[][] matrix = new double[n - 1][n - 1];
                for (int i = 0; i < n - 1; i++) {
                    for (int j = 0; j < n - 1; j++) {
                        if (j < column) {
                            matrix[i][j] = ms[i + 1][j];
                        } else {
                            matrix[i][j] = ms[i + 1][j + 1];
                        }
                    }
                }
                detVal += ms[0][column] * Math.pow(-1, 0 + column) * det(matrix);
            }
        }
        // 3阶矩阵求行列式
        else if (n == 3)
            detVal = ms[0][0] * ms[1][1] * ms[2][2] + ms[0][1] * ms[1][2] * ms[2][0] //
                    + ms[0][2] * ms[1][0] * ms[2][1] - ms[0][2] * ms[1][1] * ms[2][0] //
                    - ms[0][1] * ms[1][0] * ms[2][2] - ms[0][0] * ms[1][2] * ms[2][1];
            // 2阶矩阵求行列式
        else if (n == 2)
            detVal = ms[0][0] * ms[1][1] - ms[0][1] * ms[1][0];
            // 1阶矩阵求行列式
        else if (n == 1)
            detVal = ms[0][0];
        return detVal;
    }

    /**
     * 伴随矩阵
     *
     * @param
     * @return
     */


    public static double[][] adjoint(double[][] ms) {

        double[][] adjM = new double[ms.length][ms.length];


        for (int row = 0; row < ms.length; row++) {
            for (int column = 0; column < ms.length; column++) { // 去掉第 row 行第 column 列的矩阵
                ArrayList matrix = new ArrayList();
                for (int i = 0; i < ms.length; i++) {
                    if (i != row) {
                        //double[] arr = new double[ms.length];
                        ArrayList arr = new ArrayList();
                        for (int j = 0; j < ms.length; j++) {
                            if (j != column) {
                                arr.add(ms[i][j]);
                            }
                        }
                        matrix.add(arr);
                    }
                }
                // 将arraylist转化为二维矩阵
                double[][] matrix2 = new double[ms.length - 1][ms.length - 1];
                matrix2 = convertArrayToTwo(matrix);
                double a = Matrix.det(matrix2);
                adjM[row][column] = (Math.pow(-1, row + column) * Matrix.det(matrix2));
            }
        }

        // 转置并返回结果
        return Matrix.transpose(adjM);
    }

    public static double[][] transpose(double[][] ms) {
        double[][] transM = new double[ms.length][ms[0].length];
        for (int i = 0; i < transM.length; i++) {
            for (int j = 0; j < transM[0].length; j++) {
                transM[i][j] = ms[j][i];
            }
        }
        return transM;
    }

    /**
     * 逆矩阵
     *
     * @param ms
     * @return
     */
    public static double[][] inv(double[][] ms) {
        System.out.println("进入inv方法---");
        RealMatrix a = new Array2DRowRealMatrix(ms);
        double detVal = (int) (Matrix.det(a.getData()) + 0.5);
        double[][] invM = Matrix.adjoint(ms);
        for (int i = 0; i < invM.length; i++) {
            for (int j = 0; j < invM.length; j++)
                invM[i][j] /= detVal;
        }
        System.out.println("inv方法结束---");
        return invM;

    }

    /**
     * // ********************** 【矩阵相乘】 **********************
     *
     * @param m1
     * @param m2
     * @return
     */
    public static double[][] mul(double[][] m1, double[][] m2) {
        RealMatrix a = new Array2DRowRealMatrix(m1);
        RealMatrix b = new Array2DRowRealMatrix(m2);
        RealMatrix actual = a.multiply(b);
        return actual.getData();
    }
    private static double[][] convertArrayToTwo(ArrayList matrix) {
        // 将arraylist转化为一维数组
        double tra[][] = new double[matrix.size()][((ArrayList) matrix.get(0)).size()];
        for (int i = 0; i < matrix.size(); i++) {
            for (int j = 0; j < ((ArrayList) matrix.get(0)).size(); j++) {
                tra[i][j] = (double) ((ArrayList) matrix.get(i)).get(j);
            }
        }
        return tra;
    }

}
ThreeDTilesJoin2.java
package org.example.threedtiles;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Scanner;

public class ThreeDTilesJoin2 {

    public static void main(String[] args) throws IOException {
        // 取参数:是否追加合并
        Scanner scanner = new Scanner(System.in); // 创建Scanner对象

        // System.out.println("请输入追加合并参数0/1:");
        //int isAppendInt = scanner.nextInt(); // 接受用户输入的一行文本
        int isAppendInt = 0; // 接受用户输入的一行文本


        Boolean isAppend = isAppendInt == 1 ? true : isAppendInt == 0 ? false : null;
        // 取参数:合并图层目录
        System.out.println("请输入合并图层目标目录(绝对目录):");
        // String joinLayerPath = scanner.next();
        String joinLayerPath = "D:\\JAVA\\3dtiles\\java_test";
        // 取参数:源图层目录
        System.out.println("请输入源图层目录(多个目录用‘,’隔开):");
//        String srcLayerPaths = scanner.next();
        String srcLayerPaths = "D:\\JAVA\\3dtiles\\data\\aa,D:\\JAVA\\3dtiles\\data\\bb,D:\\JAVA\\3dtiles\\data\\cc,D:\\JAVA\\3dtiles\\data\\dd,D:\\JAVA\\3dtiles\\data\\ee";


        // ================== 新建合并图层目录 ==================
        // 合并图层目录已存在且非追加:确认后清空
        File joinLayerFile = new File(joinLayerPath);
        if (joinLayerFile.exists() && !isAppend) {
            joinLayer(joinLayerPath, srcLayerPaths.split(","), isAppend);
        } else {
            // 合并图层目录不存在:创建
            if (!joinLayerFile.exists()) {
                joinLayerFile.mkdirs();
            }

            isAppend = Boolean.FALSE;
            joinLayer(joinLayerPath, srcLayerPaths.split(","), isAppend);
        }
        scanner.close(); // 关闭scanner对象
    }


    public static JSONObject readJsonFile(String path) throws IOException {
        String jsonString = "";
        jsonString = new String(Files.readAllBytes(Paths.get(path)));
        return JSON.parseObject(jsonString);
    }



    // 将jsonarray转化为一维数组
    public static double[] converttoone(JSONArray jsonArray) {
        // 将arraylist转化为一维数组
        double tra[] = new double[jsonArray.size()];
        for (int i = 0; i < jsonArray.size(); i++) {
            tra[i] = jsonArray.getDoubleValue(i);
        }
        return tra;
    }




    // 函数:合并图层
    public static void joinLayer(String joinLayerPath, String[] srcLayerPaths, Boolean isAppend) throws IOException {
        JSONObject joinCfgo = new JSONObject();
        double[][] joinTrsfInv = new double[4][4];
        System.out.println("开始合并..." + joinLayerPath);
        // 依次合并源图层目录
        ArrayList srcRtChoList = new ArrayList();
        for (int i = 0; i < srcLayerPaths.length; i++) {
            String srcLayerPath = srcLayerPaths[i];
            System.out.println("开始合并目录" + srcLayerPath);
            // 读取源图层的配置文件
            JSONObject srcCfgo = readJsonFile(srcLayerPath + "\\" + "tileset.json");
            if (srcCfgo == null) {
                continue; // 读取失败:继续下一个
            }
            // 首次:生成合并图层配置对象、取合并图层转换矩阵的逆矩阵
            if (i == 0) {

                JSONObject asset = new JSONObject();
                asset.put("asset", srcCfgo.get("asset"));
                asset.put("geometricError", 0.0);
                JSONObject root = new JSONObject();
                JSONObject boundingVolume = new JSONObject();
                boundingVolume.put("box", new JSONArray());
                root.put("boundingVolume", boundingVolume);
                root.put("children", new JSONArray());
                root.put("geometricError", 0.0);
                root.put("transform", srcCfgo.getJSONObject("root").getJSONArray("transform"));

                asset.put("root", root);
                joinCfgo = !isAppend ? // 非追加:初始化配置对象
                        asset
                        : readJsonFile(joinLayerPath + "\\" + "tileset.json"); // 追加:从合并图层中读取
                // 取合并图层转换矩阵的逆矩阵
                double[] a = converttoone(joinCfgo.getJSONObject("root").getJSONArray("transform"));
                double[][] a2 = Matrix.dConver(a);
                joinTrsfInv = Matrix.inv(a2); // 取合并图层转换矩阵的逆矩阵
            }
            // 计算子对象的转换矩阵
            double[] b = converttoone(srcCfgo.getJSONObject("root").getJSONArray("transform"));
            double[] srcTrsf = Matrix.converttwotoone(Matrix.mul(joinTrsfInv, Matrix.dConver(b)));
            // 设置源图层子对象的转换矩阵
            JSONArray srcRtChos = srcCfgo.getJSONObject("root").getJSONArray("children");

            for (int l = 0; l < srcRtChos.size(); l++) {
                JSONObject srcRtCho = srcRtChos.getJSONObject(l);
                //JSONObject srcRtCho = new JSONObject();
                srcRtCho.put("transform", srcTrsf);
                // 替换uri开头为源图层目录名
                if (srcRtCho.getString("content") != null) {
                    srcRtCho.getJSONObject("content").put("uri", srcLayerPath + "/" + srcRtCho.getJSONObject("content").getString("uri"));
                }
                for (int j = 0; j < srcRtCho.getJSONArray("children").size(); j++) {
                    srcRtCho.getJSONArray("children").getJSONObject(j).getJSONObject("content").put("uri", srcLayerPath + "/" + srcRtCho.getJSONArray("children").getJSONObject(j).getJSONObject("content").getString("uri"));
                }
                // 合并源图层子对象
                int chIdx = -1;
                for (int j = 0; j < joinCfgo.getJSONObject("root").getJSONArray("children").size() && chIdx == -1; j++) {
                    JSONObject joinRtCh = joinCfgo.getJSONObject("root").getJSONArray("children").getJSONObject(j);
                    // 子对象无内层对象
                    if (joinRtCh.getJSONObject("content") != null && srcRtCho.getJSONObject("content") != null && joinRtCh.getJSONObject("content").getString("uri").equals(srcRtCho.getJSONObject("content").getString("uri"))) {
                        chIdx = j;
                        continue;
                    }
                    // 子对象有内存对象
                    if (joinRtCh.getJSONArray("children") != null && srcRtCho.getJSONArray("children") != null) {
                        Boolean found = false;

                        for (int k = 0; k < joinRtCh.getJSONArray("children").size() && !found; k++) {
                            if (!joinRtCh.getJSONArray("children").getJSONObject(k).getJSONObject("content").getString("uri").equals(srcRtCho.getJSONArray("children").getJSONObject(k).getJSONObject("content").getString("uri"))) {
                                found = true;
                            }
                        }
                        if (!found) {
                            chIdx = j;
                        }
                    }


                }
                if (isAppend && chIdx >= 0) {
                    joinCfgo.getJSONObject("root").getJSONArray("children").get(chIdx); // 追加合并已存在源图层:覆盖
                }

                srcRtChoList.add(srcRtCho);

            }

            System.out.println(srcLayerPath + " 已合并。");
        }
        joinCfgo.getJSONObject("root").put("children", srcRtChoList);
        System.out.println("全部已合并。");
        // 计算合并图层配置对象外围框属性数值
        JSONArray joinRtChs = joinCfgo.getJSONObject("root").getJSONArray("children");
        // 最大的x坐标、最小的x坐标、最大的y坐标、最小的y坐标、最大的z坐标、最小的z坐标、最大的z轴半长
        double maxX = 0.0, minX = 0.0, maxY = 0.0, minY = 0.0, maxZ = 0.0, minZ = 0.0;
        for (int i = 0; i < joinRtChs.size(); i++) {
            JSONObject joinRtCh = joinRtChs.getJSONObject(i);
            double[] o = new double[]{
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(0)).doubleValue() +
                            ((double) (joinRtCh.getJSONArray("transform").get(12))),
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(1)).doubleValue() +
                            ((double) (joinRtCh.getJSONArray("transform").get(13))),
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(2)).doubleValue()
                            + ((double) joinRtCh.getJSONArray("transform").get(14))
            };
            double[] r = new double[]{
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(3)).doubleValue(),
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(7)).doubleValue(),
                    ((BigDecimal) joinRtCh.getJSONObject("boundingVolume").getJSONArray("box").get(11)).doubleValue()
            };
            double[] xa = new double[]{o[0] - r[0], o[0] + r[0]};
            double[] ya = new double[]{o[1] - r[1], o[1] + r[1]};
            double[] za = new double[]{o[2] - r[2], o[2] + r[2]};
            if (i == 0) {
                minX = xa[0];
                maxX = xa[1];
                minY = ya[0];
                maxY = ya[1];
                minZ = za[0];
                maxZ = za[1];
            } else {
                minX = Math.min(xa[0], minX);
                maxX = Math.max(xa[1], maxX);
                minY = Math.min(ya[0], minY);
                maxY = Math.max(ya[1], maxY);
                minZ = Math.min(za[0], minZ);
                maxZ = Math.max(za[1], maxZ);
            }
        }
        // 计算:最外层包围盒x轴坐标、最外层包围盒y轴坐标、最外层包围盒z轴坐标
        double[] boxs = new double[]{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
        boxs[0] = (maxX + minX) / 2;
        boxs[1] = (maxY + minY) / 2;
        boxs[2] = (maxZ + minZ) / 2;

        // 计算:最外层包围盒x轴半长、最外层包围盒y轴半长、最外层包围盒z轴半长
        boxs[3] = (maxX - minX) / 2;
        boxs[7] = (maxY - minY) / 2;
        boxs[11] = (maxZ - minZ) / 2;

        joinCfgo.getJSONObject("root").getJSONObject("boundingVolume").put("box", boxs);

        // 计算:最外层包围盒几何误差值
        double geometricError = (double) Math.sqrt(Math.pow(boxs[3], 2) + Math.pow(boxs[7], 2)) * 2;
        joinCfgo.put("geometricError", geometricError);
        joinCfgo.getJSONObject("root").put("geometricError", geometricError);

        // 保存tileset文件
        try (FileWriter writer = new FileWriter(joinLayerPath + "\\" + "tileset.json")) {
            if (new File(joinLayerPath + "\\" + "tileset.json").exists()) {
                new File(joinLayerPath + "\\" + "tileset.json").delete();
            }
            writer.write(String.valueOf(joinCfgo));
        } catch (IOException e) {
            e.printStackTrace();
        }

        // 提示完成
        System.out.println("图层合并完成。");
    }
}
pom文件
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-math3</artifactId>
    <version>3.6.1</version>
</dependency>
运行程序:

D:\JAVA\3dtiles\java_test

D:\JAVA\3dtiles\data\aa,D:\JAVA\3dtiles\data\bb,D:\JAVA\3dtiles\data\cc,D:\JAVA\3dtiles\data\dd,D:\JAVA\3dtiles\data\ee

生成合成文件
{
    "geometricError": 9325.869057604898,
    "root": {
        "geometricError": 9325.869057604898,
        "transform": [-0.860048066843865, -0.510213017001851, 0.0, 0.0, 0.268197168561964, -0.452090496848062, 0.850696456695934, 0.0, -0.434036405723617, 0.731639843052264, 0.525657244376012, 0.0, -2770907.60361716, 4670821.10507043, 3333353.96012987, 1.0],
        "children": [{
            "geometricError": 740.579323830987,
            "transform": [1.0, 0.0, 0.0, 0.0, 1.2432017357571995E-17, 1.0, -5.551115123125783E-17, 0.0, 1.1741393048713246E-17, 5.551115123125783E-17, 0.9999999999999998, 0.0, -2.7755747368212224E-10, 2.3283064365386963E-10, 0.0, 1.0],
            "children": [{
                "geometricError": 30.8405098086856,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+002_+029/Tile_+002_+029.json"
                },
                "boundingVolume": {
                    "box": [-3935.02001953125, 574.504516601563, 15.7210890054703, 13.139404296875, 0, 0, 0, 25.2759399414063, 0, 0, 0, 11.8160890340805]
                }
            }, {
                "geometricError": 32.4810451438208,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+002_+030/Tile_+002_+030.json"
                },
                "boundingVolume": {
                    "box": [-3931.19152832031, 630.064575195313, 5.76587748527527, 9.6800537109375, 0, 0, 0, 30.9617309570313, 0, 0, 0, 1.63892340660095]
                }
            }, {
                "geometricError": 62.1966519849389,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+003_+029/Tile_+003_+029.json"
                },
                "boundingVolume": {
                    "box": [-3872.32775878906, 566.557830810547, 15.5438475459814, 50.4261474609375, 0, 0, 0, 33.1085510253906, 0, 0, 0, 15.1476407200098]
                }
            }, {
                "geometricError": 60.5573157368986,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+003_+030/Tile_+003_+030.json"
                },
                "boundingVolume": {
                    "box": [-3872.03454589844, 628.938293457031, 18.1283311843872, 50.4095458984375, 0, 0, 0, 30.4552612304688, 0, 0, 0, 14.090537071228]
                }
            }, {
                "geometricError": 55.4774127211521,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+004_+027/Tile_+004_+027.json"
                },
                "boundingVolume": {
                    "box": [-3749.26013183594, 352.109008789063, 19.1447021961212, 26.1177978515625, 0, 0, 0, 46.5369567871094, 0, 0, 0, 15.1629683971405]
                }
            }, {
                "geometricError": 53.5997083475893,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+004_+028/Tile_+004_+028.json"
                },
                "boundingVolume": {
                    "box": [-3740.12866210938, 448.188674926758, 9.04387199878693, 17.607421875, 0, 0, 0, 50.3167572021484, 0, 0, 0, 5.57954967021942]
                }
            }, {
                "geometricError": 73.1092989703366,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+004_+029/Tile_+004_+029.json"
                },
                "boundingVolume": {
                    "box": [-3772.3740234375, 548.456268310547, 19.1229840517044, 50.480712890625, 0, 0, 0, 50.5904846191406, 0, 0, 0, 15.4035738706589]
                }
            }, {
                "geometricError": 56.6759666652712,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+004_+030/Tile_+004_+030.json"
                },
                "boundingVolume": {
                    "box": [-3772.05346679688, 619.552154541016, 18.2076432704926, 50.41162109375, 0, 0, 0, 21.6935119628906, 0, 0, 0, 14.1500952243805]
                }
            }, {
                "geometricError": 7.30462462257396,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+026/Tile_+005_+026.json"
                },
                "boundingVolume": {
                    "box": [-3689.02783203125, 297.003692626953, 10.0964844226837, 5.725341796875, 0, 0, 0, 1.25363159179688, 0, 0, 0, 4.35963416099548]
                }
            }, {
                "geometricError": 72.1511203206034,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+027/Tile_+005_+027.json"
                },
                "boundingVolume": {
                    "box": [-3673.70959472656, 348.031799316406, 12.3951093554497, 50.5650634765625, 0, 0, 0, 50.4035339355469, 0, 0, 0, 10.4135625958443]
                }
            }, {
                "geometricError": 72.3192882676973,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+028/Tile_+005_+028.json"
                },
                "boundingVolume": {
                    "box": [-3673.11413574219, 447.839309692383, 6.34941649436951, 50.5919189453125, 0, 0, 0, 50.5899505615234, 0, 0, 0, 10.5448610782623]
                }
            }, {
                "geometricError": 73.4642639567206,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+029/Tile_+005_+029.json"
                },
                "boundingVolume": {
                    "box": [-3672.49230957031, 547.832534790039, 18.5858655571938, 50.5924072265625, 0, 0, 0, 50.5895843505859, 0, 0, 0, 16.6763414740562]
                }
            }, {
                "geometricError": 74.6720404728155,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+030/Tile_+005_+030.json"
                },
                "boundingVolume": {
                    "box": [-3671.8740234375, 647.7919921875, 11.636326789856, 50.582763671875, 0, 0, 0, 50.5528564453125, 0, 0, 0, 21.4873533248901]
                }
            }, {
                "geometricError": 59.0928810211615,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+005_+031/Tile_+005_+031.json"
                },
                "boundingVolume": {
                    "box": [-3665.76831054688, 730.397674560547, 12.528514623642, 44.778076171875, 0, 0, 0, 33.1688537597656, 0, 0, 0, 19.6651880741119]
                }
            }, {
                "geometricError": 2.56280235528877,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+006_+027/Tile_+006_+027.json"
                },
                "boundingVolume": {
                    "box": [-3622.38244628906, 395.646423339844, 5.87387609481812, 1.3489990234375, 0, 0, 0, 2.1663818359375, 0, 0, 0, 0.234408378601074]
                }
            }, {
                "geometricError": 60.3478889488445,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+006_+028/Tile_+006_+028.json"
                },
                "boundingVolume": {
                    "box": [-3591.23608398438, 447.522384643555, 11.8303036689758, 32.471923828125, 0, 0, 0, 50.2840118408203, 0, 0, 0, 7.67854261398315]
                }
            }, {
                "geometricError": 74.5552928526268,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+006_+029/Tile_+006_+029.json"
                },
                "boundingVolume": {
                    "box": [-3572.49584960938, 547.324279785156, 11.0218200683594, 50.58984375, 0, 0, 0, 50.475830078125, 0, 0, 0, 21.2449989318848]
                }
            }, {
                "geometricError": 74.8959219033318,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+006_+030/Tile_+006_+030.json"
                },
                "boundingVolume": {
                    "box": [-3571.88171386719, 647.205322265625, 10.7785501480103, 50.5970458984375, 0, 0, 0, 50.5909423828125, 0, 0, 0, 22.133563041687]
                }
            }, {
                "geometricError": 72.2022021595952,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+006_+031/Tile_+006_+031.json"
                },
                "boundingVolume": {
                    "box": [-3571.29382324219, 746.071563720703, 18.3907251358032, 50.5609130859375, 0, 0, 0, 49.4609680175781, 0, 0, 0, 14.5039548873901]
                }
            }, {
                "geometricError": 24.8871576967365,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+007_+029/Tile_+007_+029.json"
                },
                "boundingVolume": {
                    "box": [-3509.61206054688, 576.114654541016, 6.37169981002808, 13.11669921875, 0, 0, 0, 21.0632019042969, 0, 0, 0, 1.91424798965454]
                }
            }, {
                "geometricError": 68.1412415259338,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+007_+030/Tile_+007_+030.json"
                },
                "boundingVolume": {
                    "box": [-3478.34790039063, 646.816314697266, 16.745255947113, 44.12158203125, 0, 0, 0, 50.3578186035156, 0, 0, 0, 12.6729989051819]
                }
            }, {
                "geometricError": 68.8705243969495,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+007_+031/Tile_+007_+031.json"
                },
                "boundingVolume": {
                    "box": [-3471.40478515625, 741.000762939453, 17.6509721279144, 50.4560546875, 0, 0, 0, 44.9321594238281, 0, 0, 0, 13.3580210208893]
                }
            }, {
                "geometricError": 20.4571827291191,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\aa/Tile_+008_+031/Tile_+008_+031.json"
                },
                "boundingVolume": {
                    "box": [-3412.68273925781, 734.155242919922, 10.6947717666626, 9.0433349609375, 0, 0, 0, 17.5325012207031, 0, 0, 0, 5.41533184051514]
                }
            }],
            "boundingVolume": {
                "box": [-3675.8994140625, 545.641296386719, 11.9535970687866, 272.260009765625, 0, 0, 0, 249.891235351563, 0, 0, 0, 23.3086099624634]
            }
        }, {
            "geometricError": 700.379674431607,
            "transform": [1.0, 0.0, 0.0, 0.0, 1.2432017357571995E-17, 1.0, -5.551115123125783E-17, 0.0, 1.1741393048713246E-17, 5.551115123125783E-17, 0.9999999999999998, 0.0, -2.7755747368212224E-10, 2.3283064365386963E-10, 0.0, 1.0],
            "children": [{
                "geometricError": 52.3324755539293,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+056_+021/Tile_+056_+021.json"
                },
                "boundingVolume": {
                    "box": [1456.77575683594, -283.401695251465, 9.57817316055298, 16.002197265625, 0, 0, 0, 49.5448379516602, 0, 0, 0, 5.28457307815552]
                }
            }, {
                "geometricError": 5.08756693533562,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+056_+022/Tile_+056_+022.json"
                },
                "boundingVolume": {
                    "box": [1471.31585693359, -229.578811645508, 4.45599508285522, 1.51898193359375, 0, 0, 0, 4.85548400878906, 0, 0, 0, 0.0174999237060547]
                }
            }, {
                "geometricError": 43.4282813138826,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+020/Tile_+057_+020.json"
                },
                "boundingVolume": {
                    "box": [1531.82299804688, -348.998123168945, 10.2060108184814, 40.3277587890625, 0, 0, 0, 14.9526214599609, 0, 0, 0, 6.00887680053711]
                }
            }, {
                "geometricError": 72.0071649495143,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+021/Tile_+057_+021.json"
                },
                "boundingVolume": {
                    "box": [1522.18682861328, -284.460159301758, 9.90673196315765, 50.5840454101563, 0, 0, 0, 50.5893402099609, 0, 0, 0, 8.18564665317535]
                }
            }, {
                "geometricError": 71.7306262252761,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+022/Tile_+057_+022.json"
                },
                "boundingVolume": {
                    "box": [1522.80364990234, -184.549896240234, 9.43511211872101, 50.5891723632813, 0, 0, 0, 50.506591796875, 0, 0, 0, 5.92474162578583]
                }
            }, {
                "geometricError": 63.2145990047746,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+023/Tile_+057_+023.json"
                },
                "boundingVolume": {
                    "box": [1536.63287353516, -84.6287059783936, 10.7433174848557, 37.3843383789063, 0, 0, 0, 50.4350147247314, 0, 0, 0, 7.403111577034]
                }
            }, {
                "geometricError": 57.120656310518,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+024/Tile_+057_+024.json"
                },
                "boundingVolume": {
                    "box": [1548.78259277344, 15.3128070831299, 11.0693670511246, 25.8543701171875, 0, 0, 0, 50.38356590271, 0, 0, 0, 7.47109162807465]
                }
            }, {
                "geometricError": 21.9752339830746,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+057_+025/Tile_+057_+025.json"
                },
                "boundingVolume": {
                    "box": [1557.44226074219, 77.4114685058594, 8.79704344272614, 17.3408203125, 0, 0, 0, 12.489372253418, 0, 0, 0, 5.12078511714935]
                }
            }, {
                "geometricError": 59.0020951037097,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+020/Tile_+058_+020.json"
                },
                "boundingVolume": {
                    "box": [1621.77416992188, -364.557540893555, 10.4570751190186, 50.3675537109375, 0, 0, 0, 30.0714874267578, 0, 0, 0, 6.32948684692383]
                }
            }, {
                "geometricError": 72.0571490462324,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+021/Tile_+058_+021.json"
                },
                "boundingVolume": {
                    "box": [1622.17553710938, -285.081962585449, 12.8714859485626, 50.5882568359375, 0, 0, 0, 50.5891189575195, 0, 0, 0, 8.59081149101257]
                }
            }, {
                "geometricError": 72.057572175005,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+022/Tile_+058_+022.json"
                },
                "boundingVolume": {
                    "box": [1622.79650878906, -185.08927154541, 13.1854486465454, 50.589111328125, 0, 0, 0, 50.5890426635742, 0, 0, 0, 8.58977794647217]
                }
            }, {
                "geometricError": 71.7584552136979,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+023/Tile_+058_+023.json"
                },
                "boundingVolume": {
                    "box": [1623.42102050781, -85.0964012145996, 10.2867512702942, 50.5892333984375, 0, 0, 0, 50.5891151428223, 0, 0, 0, 5.54497861862183]
                }
            }, {
                "geometricError": 71.8362092102733,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+024/Tile_+058_+024.json"
                },
                "boundingVolume": {
                    "box": [1624.04296875, 14.8963890075684, 10.8929178714752, 50.5892333984375, 0, 0, 0, 50.5891761779785, 0, 0, 0, 6.47345900535583]
                }
            }, {
                "geometricError": 52.1549404310852,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+058_+025/Tile_+058_+025.json"
                },
                "boundingVolume": {
                    "box": [1624.42224121094, 76.6347541809082, 9.87600064277649, 50.348876953125, 0, 0, 0, 12.3346061706543, 0, 0, 0, 5.74333453178406]
                }
            }, {
                "geometricError": 68.3571850119951,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+020/Tile_+059_+020.json"
                },
                "boundingVolume": {
                    "box": [1721.67340087891, -379.611175537109, 16.0873470306396, 50.4609985351563, 0, 0, 0, 44.5035400390625, 0, 0, 0, 12.0758972167969]
                }
            }, {
                "geometricError": 71.5494598798882,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+021/Tile_+059_+021.json"
                },
                "boundingVolume": {
                    "box": [1722.16735839844, -285.70393371582, 5.40806865692139, 50.589111328125, 0, 0, 0, 50.5890960693359, 0, 0, 0, 0.90021276473999]
                }
            }, {
                "geometricError": 72.0070284535943,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+022/Tile_+059_+022.json"
                },
                "boundingVolume": {
                    "box": [1722.79113769531, -185.71117401123, 12.7560157775879, 50.5909423828125, 0, 0, 0, 50.5891342163086, 0, 0, 0, 8.14298439025879]
                }
            }, {
                "geometricError": 72.025400782929,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+023/Tile_+059_+023.json"
                },
                "boundingVolume": {
                    "box": [1723.41357421875, -85.7185573577881, 12.8922352790833, 50.5914306640625, 0, 0, 0, 50.5892429351807, 0, 0, 0, 8.30024099349976]
                }
            }, {
                "geometricError": 72.1288660796897,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+024/Tile_+059_+024.json"
                },
                "boundingVolume": {
                    "box": [1724.03527832031, 14.2743854522705, 13.8084480762482, 50.5885009765625, 0, 0, 0, 50.5892391204834, 0, 0, 0, 9.1709201335907]
                }
            }, {
                "geometricError": 52.1751911593196,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+059_+025/Tile_+059_+025.json"
                },
                "boundingVolume": {
                    "box": [1724.40911865234, 75.4231605529785, 11.6732699871063, 50.3403930664063, 0, 0, 0, 11.7451057434082, 0, 0, 0, 7.08151745796204]
                }
            }, {
                "geometricError": 52.5454513124314,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+020/Tile_+060_+020.json"
                },
                "boundingVolume": {
                    "box": [1797.44390869141, -380.166076660156, 13.3256312608719, 26.4188842773438, 0, 0, 0, 44.4364929199219, 0, 0, 0, 9.40558898448944]
                }
            }, {
                "geometricError": 65.2694247081303,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+021/Tile_+060_+021.json"
                },
                "boundingVolume": {
                    "box": [1812.28704833984, -286.175262451172, 11.5870990753174, 40.7161254882813, 0, 0, 0, 50.4384155273438, 0, 0, 0, 7.63290023803711]
                }
            }, {
                "geometricError": 72.3784160113043,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+022/Tile_+060_+022.json"
                },
                "boundingVolume": {
                    "box": [1822.78210449219, -186.271453857422, 15.3006939888, 50.5889892578125, 0, 0, 0, 50.5271301269531, 0, 0, 0, 11.2427039146423]
                }
            }, {
                "geometricError": 72.0564065758371,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+023/Tile_+060_+023.json"
                },
                "boundingVolume": {
                    "box": [1823.40588378906, -86.3404502868652, 12.5961084365845, 50.58740234375, 0, 0, 0, 50.5890693664551, 0, 0, 0, 8.5899076461792]
                }
            }, {
                "geometricError": 72.3884289401293,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+024/Tile_+060_+024.json"
                },
                "boundingVolume": {
                    "box": [1824.02978515625, 13.6523685455322, 15.3824796676636, 50.5882568359375, 0, 0, 0, 50.5891551971436, 0, 0, 0, 11.0295190811157]
                }
            }, {
                "geometricError": 51.6887588994351,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+060_+025/Tile_+060_+025.json"
                },
                "boundingVolume": {
                    "box": [1824.38507080078, 73.7163772583008, 9.60402154922485, 50.3248901367188, 0, 0, 0, 10.6603164672852, 0, 0, 0, 5.04884958267212]
                }
            }, {
                "geometricError": 5.09378230664111,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+061_+022/Tile_+061_+022.json"
                },
                "boundingVolume": {
                    "box": [1873.77648925781, -141.348236083984, 4.44181227684021, 1.0274658203125, 0, 0, 0, 4.982177734375, 0, 0, 0, 0.262368440628052]
                }
            }, {
                "geometricError": 51.7536037136625,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+061_+023/Tile_+061_+023.json"
                },
                "boundingVolume": {
                    "box": [1883.65350341797, -86.6555309295654, 9.82255268096924, 10.8458862304688, 0, 0, 0, 50.2822132110596, 0, 0, 0, 5.70098972320557]
                }
            }, {
                "geometricError": 54.4889363228122,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+061_+024/Tile_+061_+024.json"
                },
                "boundingVolume": {
                    "box": [1893.34643554688, 13.2779121398926, 10.3329606056213, 19.9166259765625, 0, 0, 0, 50.3416175842285, 0, 0, 0, 6.1720118522644]
                }
            }, {
                "geometricError": 22.6775978581064,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\bb/Tile_+061_+025/Tile_+061_+025.json"
                },
                "boundingVolume": {
                    "box": [1894.64739990234, 70.7054080963135, 9.54776215553284, 20.5929565429688, 0, 0, 0, 7.8891658782959, 0, 0, 0, 5.28816103935242]
                }
            }],
            "boundingVolume": {
                "box": [1678.00695800781, -167.3508644104, 14.9421647787094, 237.2333984375, 0, 0, 0, 257.251705169678, 0, 0, 0, 13.2210794687271]
            }
        }, {
            "geometricError": 440.204868379572,
            "transform": [1.0, 0.0, 0.0, 0.0, 1.2432017357571995E-17, 1.0, -5.551115123125783E-17, 0.0, 1.1741393048713246E-17, 5.551115123125783E-17, 0.9999999999999998, 0.0, -2.7755747368212224E-10, 2.3283064365386963E-10, 0.0, 1.0],
            "children": [{
                "geometricError": 48.7584225341977,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+055_+021/Tile_+055_+021.json"
                },
                "boundingVolume": {
                    "box": [1329.28283691406, -251.359550476074, 16.0720038414001, 43.5072021484375, 0, 0, 0, 18.6329727172852, 0, 0, 0, 11.7183384895325]
                }
            }, {
                "geometricError": 67.5500672648307,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+055_+022/Tile_+055_+022.json"
                },
                "boundingVolume": {
                    "box": [1330.76959228516, -183.34806060791, 17.4266179800034, 42.6410522460938, 0, 0, 0, 50.4650802612305, 0, 0, 0, 14.0722395181656]
                }
            }, {
                "geometricError": 59.6401645003559,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+055_+023/Tile_+055_+023.json"
                },
                "boundingVolume": {
                    "box": [1343.38549804688, -83.4295806884766, 13.3076241016388, 30.647216796875, 0, 0, 0, 50.3902435302734, 0, 0, 0, 8.86118960380554]
                }
            }, {
                "geometricError": 54.3132131065945,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+055_+024/Tile_+055_+024.json"
                },
                "boundingVolume": {
                    "box": [1355.99951171875, 16.4887676239014, 12.5251359939575, 18.6517333984375, 0, 0, 0, 50.3155078887939, 0, 0, 0, 8.38973331451416]
                }
            }, {
                "geometricError": 13.5651838396135,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+055_+025/Tile_+055_+025.json"
                },
                "boundingVolume": {
                    "box": [1368.37573242188, 77.9040107727051, 6.60480356216431, 6.41845703125, 0, 0, 0, 11.7378349304199, 0, 0, 0, 2.24518442153931]
                }
            }, {
                "geometricError": 46.0841415018922,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+056_+021/Tile_+056_+021.json"
                },
                "boundingVolume": {
                    "box": [1407.76196289063, -259.938575744629, 15.907214641571, 35.7642822265625, 0, 0, 0, 26.6888961791992, 0, 0, 0, 11.5050873756409]
                }
            }, {
                "geometricError": 72.0125747747334,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+056_+022/Tile_+056_+022.json"
                },
                "boundingVolume": {
                    "box": [1421.63781738281, -183.753875732422, 17.1668101549149, 49.4112548828125, 0, 0, 0, 50.4975280761719, 0, 0, 0, 13.9405335187912]
                }
            }, {
                "geometricError": 72.1304864165157,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+056_+023/Tile_+056_+023.json"
                },
                "boundingVolume": {
                    "box": [1423.4345703125, -83.8446617126465, 13.146103978157, 50.58740234375, 0, 0, 0, 50.5813941955566, 0, 0, 0, 9.23278701305389]
                }
            }, {
                "geometricError": 72.2700621963674,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+056_+024/Tile_+056_+024.json"
                },
                "boundingVolume": {
                    "box": [1424.056640625, 16.1404838562012, 14.5895075798035, 50.58740234375, 0, 0, 0, 50.5891609191895, 0, 0, 0, 10.2280697822571]
                }
            }, {
                "geometricError": 52.6317069700521,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+056_+025/Tile_+056_+025.json"
                },
                "boundingVolume": {
                    "box": [1424.43774414063, 77.5803565979004, 13.805157661438, 50.35009765625, 0, 0, 0, 12.0362205505371, 0, 0, 0, 9.49176692962646]
                }
            }, {
                "geometricError": 46.2677911879815,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+057_+023/Tile_+057_+023.json"
                },
                "boundingVolume": {
                    "box": [1482.11926269531, -79.1935214996338, 5.75612854957581, 9.2208251953125, 0, 0, 0, 45.3083171844482, 0, 0, 0, 1.68560910224915]
                }
            }, {
                "geometricError": 53.8548207081674,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+057_+024/Tile_+057_+024.json"
                },
                "boundingVolume": {
                    "box": [1490.83251953125, 15.7759399414063, 12.0768136978149, 17.3740234375, 0, 0, 0, 50.3316650390625, 0, 0, 0, 8.07517910003662]
                }
            }, {
                "geometricError": 23.1540123502415,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\cc/Tile_+057_+025/Tile_+057_+025.json"
                },
                "boundingVolume": {
                    "box": [1493.28857421875, 77.2821998596191, 9.15342235565186, 19.2080078125, 0, 0, 0, 11.946231842041, 0, 0, 0, 4.94451904296875]
                }
            }],
            "boundingVolume": {
                "box": [1399.13610839844, -98.4928131103516, 17.3625670671463, 113.360473632813, 0, 0, 0, 188.134658813477, 0, 0, 0, 14.1362904310226]
            }
        }, {
            "geometricError": 371.970268249901,
            "transform": [0.9999996554194588, 4.363781417063284E-4, -7.062117813477209E-4, 0.0, -4.361717010063091E-4, 0.9999998621139483, 2.924488538288972E-4, 0.0, 7.06339302258286E-4, -2.9214072346267494E-4, 0.9999997078692504, 0.0, 4509.297381684372, -1855.9799298739526, -1.8636501030996442, 1.0],
            "children": [{
                "geometricError": 69.1857148557412,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+025_+004/Tile_+025_+004.json"
                },
                "boundingVolume": {
                    "box": [-1391.99407958984, -933.559753417969, 14.0356489419937, 48.4236450195313, 0, 0, 0, 48.149169921875, 0, 0, 0, 11.1117585897446]
                }
            }, {
                "geometricError": 48.0570725022815,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+025_+005/Tile_+025_+005.json"
                },
                "boundingVolume": {
                    "box": [-1369.02563476563, -852.159057617188, 2.13443279266357, 25.9090576171875, 0, 0, 0, 34.1532592773438, 0, 0, 0, 21.7199869155884]
                }
            }, {
                "geometricError": 34.0313125065579,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+026_+003/Tile_+026_+003.json"
                },
                "boundingVolume": {
                    "box": [-1299.24267578125, -994.438171386719, 9.6319876909256, 32.385498046875, 0, 0, 0, 8.612060546875, 0, 0, 0, 5.9280823469162]
                }
            }, {
                "geometricError": 72.6152969470457,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+026_+004/Tile_+026_+004.json"
                },
                "boundingVolume": {
                    "box": [-1294.17193603516, -936.282165527344, 16.2041157484055, 50.5923461914063, 0, 0, 0, 50.5336303710938, 0, 0, 0, 12.6391478776932]
                }
            }, {
                "geometricError": 75.852591660895,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+026_+005/Tile_+026_+005.json"
                },
                "boundingVolume": {
                    "box": [-1293.55456542969, -836.444793701172, 6.14014911651611, 50.57958984375, 0, 0, 0, 50.5338439941406, 0, 0, 0, 25.3308382034302]
                }
            }, {
                "geometricError": 31.9125040238965,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+026_+006/Tile_+026_+006.json"
                },
                "boundingVolume": {
                    "box": [-1292.90478515625, -778.007720947266, 15.3367151618004, 27.361083984375, 0, 0, 0, 8.82443237304688, 0, 0, 0, 13.8531003594398]
                }
            }, {
                "geometricError": 44.3188124785806,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+027_+004/Tile_+027_+004.json"
                },
                "boundingVolume": {
                    "box": [-1219.70953369141, -920.958221435547, 15.8824429512024, 24.8853149414063, 0, 0, 0, 34.5433654785156, 0, 0, 0, 12.3139815330505]
                }
            }, {
                "geometricError": 72.3678666395718,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\dd/Tile_+027_+005/Tile_+027_+005.json"
                },
                "boundingVolume": {
                    "box": [-1202.70550537109, -841.645172119141, -6.17444896697998, 41.4378051757813, 0, 0, 0, 45.6526794433594, 0, 0, 0, 37.8926019668579]
                }
            }],
            "boundingVolume": {
                "box": [-1300.84271240234, -886.116760253906, -6.17444896697998, 139.575012207031, 0, 0, 0, 116.933471679688, 0, 0, 0, 37.8926019668579]
            }
        }, {
            "geometricError": 221.861093368121,
            "transform": [0.9999996554194588, 4.363781417063284E-4, -7.062117813477209E-4, 0.0, -4.361717010063091E-4, 0.9999998621139483, 2.924488538288972E-4, 0.0, 7.06339302258286E-4, -2.9214072346267494E-4, 0.9999997078692504, 0.0, 4509.297381684372, -1855.9799298739526, -1.8636501030996442, 1.0],
            "children": [{
                "geometricError": 51.5584796491835,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\ee/Tile_+038_+018/Tile_+038_+018.json"
                },
                "boundingVolume": {
                    "box": [-53.5235767364502, 460.995025634766, 4.8595757484436, 19.1666622161865, 0, 0, 0, 44.6980590820313, 0, 0, 0, 17.1172251701355]
                }
            }, {
                "geometricError": 15.3121941995155,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\ee/Tile_+038_+019/Tile_+038_+019.json"
                },
                "boundingVolume": {
                    "box": [-49.5933418273926, 506.448089599609, 3.60871529579163, 15.2364234924316, 0, 0, 0, 1.51742553710938, 0, 0, 0, 0.110045909881592]
                }
            }, {
                "geometricError": 72.1273828425906,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\ee/Tile_+039_+018/Tile_+039_+018.json"
                },
                "boundingVolume": {
                    "box": [15.0548553466797, 457.191497802734, 5.52865505218506, 50.5630187988281, 0, 0, 0, 48.0430603027344, 0, 0, 0, 18.3740262985229]
                }
            }, {
                "geometricError": 1.77168111643222,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\ee/Tile_+039_+019/Tile_+039_+019.json"
                },
                "boundingVolume": {
                    "box": [-33.1613292694092, 505.072769165039, 3.53735184669495, 1.75724983215332, 0, 0, 0, 0.161758422851563, 0, 0, 0, 0.157356977462769]
                }
            }, {
                "geometricError": 56.8765049533316,
                "content": {
                    "uri": "D:\\JAVA\\3dtiles\\data\\ee/Tile_+040_+018/Tile_+040_+018.json"
                },
                "boundingVolume": {
                    "box": [93.4946136474609, 456.362838745117, 5.13061237335205, 29.0255737304688, 0, 0, 0, 45.5960540771484, 0, 0, 0, 17.7045965194702]
                }
            }],
            "boundingVolume": {
                "box": [24.9149742126465, 458.556976318359, 5.52865505218506, 97.6052131652832, 0, 0, 0, 49.4085388183594, 0, 0, 0, 18.3740262985229]
            }
        }],
        "boundingVolume": {
            "box": [341.8290726169498, -1031.7488150345162, -5.334247002843764, 4289.988496445352, 0.0, 0.0, 0.0, 1827.2813467730307, 0.0, 0.0, 0.0, 40.59645403409377]
        }
    },
    "asset": {
        "generatetool": "cesiumlab2@www.cesiumlab.com/osgb2tiles3",
        "version": "1.0"
    }
}
遇到的问题:

求矩阵行列式时,使用工具包LUDecomposition计算时,以下矩阵结果为0,和js中相同矩阵计算结果(-8.326672684688674e-17)不同,原矩阵:0.268197168561964,-0.434036405723617,-2770907.60361716,

-0.452090496848062,0.731639843052264,4670821.10507043,

0,0,1

    static double det(double[][] ms) {
        RealMatrix matrix = new Array2DRowRealMatrix(ms);
        LUDecomposition lu1 = new LUDecomposition(matrix);
        System.out.println("det方法结束");
    }

求矩阵运算的jar包:Apache Commons Math
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-math3</artifactId>
    <version>3.6.1</version>
</dependency>
计算代数余子式
import org.apache.commons.math3.linear.MatrixUtils;
import org.apache.commons.math3.linear.RealMatrix;
import org.apache.commons.math3.linear.SingularValueDecomposition;

public class MatrixExample {

    public static void main(String[] args) {
        double[][] matrixData = {
            {1, 2, 3},
            {4, 5, 6},
            {7, 8, 9}
        };
        
        RealMatrix matrix = MatrixUtils.createRealMatrix(matrixData);
        
        // 获取子矩阵
        RealMatrix subMatrix = matrix.getSubMatrix(0, 1, 0, 1);
        
        // 计算子矩阵的行列式值
        double minorDeterminant = subMatrix.getDeterminant();
        
        System.out.println("代数余子式的行列式值为: " + minorDeterminant);
    }
}
计算行列式
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.LUDecomposition;
import org.apache.commons.math3.linear.RealMatrix;

public class Main {
    public static void main(String[] args) {
        // 创建一个二维数组表示矩阵
        double[][] matrixData = {
                {1, 2, 3},
                {4, 5, 6},
                {7, 8, 9}
        };

        // 将二维数组转换为实数矩阵对象
        RealMatrix matrix = new Array2DRowRealMatrix(matrixData);

        // 创建LUDecomposition对象
        LUDecomposition luDecomposition = new LUDecomposition(matrix);

        // 获取行列式的值
        double determinant = luDecomposition.getDeterminant();

        // 打印行列式的值
        System.out.println("Determinant of the matrix: " + determinant);
    }
}
转置矩阵
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.RealMatrix;

public class Main {
    public static void main(String[] args) {
        // 创建一个二维数组表示矩阵
        double[][] matrixData = {
                {1, 2, 3},
                {4, 5, 6},
                {7, 8, 9}
        };

        // 将二维数组转换为实数矩阵对象
        RealMatrix matrix = new Array2DRowRealMatrix(matrixData);

        // 计算矩阵的转置
        RealMatrix transposedMatrix = matrix.transpose();

        // 打印转置后的矩阵
        System.out.println("Original Matrix:");
        printMatrix(matrix);
        System.out.println("\nTransposed Matrix:");
        printMatrix(transposedMatrix);
    }

    // 辅助方法:打印矩阵
    public static void printMatrix(RealMatrix matrix) {
        int rows = matrix.getRowDimension();
        int columns = matrix.getColumnDimension();

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < columns; j++) {
                System.out.print(matrix.getEntry(i, j) + "\t");
            }
            System.out.println();
        }
    }
}
计算逆矩阵
import org.apache.commons.math3.linear.Array2DRowRealMatrix;
import org.apache.commons.math3.linear.DecompositionSolver;
import org.apache.commons.math3.linear.LUDecomposition;
import org.apache.commons.math3.linear.RealMatrix;

public class Main {
    public static void main(String[] args) {
        // 创建一个二维数组表示矩阵
        double[][] matrixData = {
                {1, 2, 3},
                {4, 5, 6},
                {7, 8, 9}
        };

        // 将二维数组转换为实数矩阵对象
        RealMatrix matrix = new Array2DRowRealMatrix(matrixData);

        // 创建LUDecomposition对象
        LUDecomposition luDecomposition = new LUDecomposition(matrix);

        // 获取分解求解器
        DecompositionSolver solver = luDecomposition.getSolver();

        // 计算逆矩阵
        RealMatrix inverseMatrix = solver.getInverse();

        // 打印逆矩阵
        System.out.println("Original Matrix:");
        printMatrix(matrix);
        System.out.println("\nInverse Matrix:");
        printMatrix(inverseMatrix);
    }

    // 辅助方法:打印矩阵
    public static void printMatrix(RealMatrix matrix) {
        int rows = matrix.getRowDimension();
        int columns = matrix.getColumnDimension();

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < columns; j++) {
                System.out.print(matrix.getEntry(i, j) + "\t");
            }
            System.out.println();
        }
    }
}
矩阵相乘
public static double[][] mul(double[][] m1, double[][] m2) {
    RealMatrix a = new Array2DRowRealMatrix(m1);
    RealMatrix b = new Array2DRowRealMatrix(m2);
    RealMatrix actual = a.multiply(b);
    return actual.getData();
}
需要注意

这个uri需要是相对目录,需要能从当前合并后的tileset目录下,找到top目录下的某个json,所以如果要直接使用上述java代码,还需要修改下uri的赋值

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1655667.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

微服务拆分

目录 前言&#xff1a; 逻辑视图架构风格 一、分层式架构风格 二、六边形架构 如何定义微服务架构 微服务的拆分 业务能力进行服务拆分 子域进行服务拆分 拆分的原则 单一职责 闭包原则 前言&#xff1a; 我们在软件开发的时候一直在谈论架构&#xff0c;那么什么是…

最全计算机毕业设计、大作业项目推荐(毕设源码+论文+PPT)

文章目录 1.毕设源码1.1 JAVA类源码模板1.2 PYTHON类源码模板1.3 C#类源码模板1.4 PHP类源码模板1.5 HTML类源码模板1.6 VUE类源码模板 2.毕设论文3.酷炫PPT 作者&#xff1a;xcLeigh 文章地址&#xff1a;https://blog.csdn.net/weixin_43151418/article/details/138598621 最…

短剧新纪元:引领潮流的短剧小程序开发,一触即达精彩世界

在信息爆炸的时代&#xff0c;短视频以其短小精悍、内容丰富的特点迅速崛起&#xff0c;成为人们日常生活中不可或缺的一部分。然而&#xff0c;短视频的短暂与碎片化&#xff0c;有时难以满足观众对完整故事的需求。为此&#xff0c;我们倾力打造了一款短剧小程序&#xff0c;…

某音扫码,短时间掉线问题,已解决

关于字节系抖音扫码掉线问题&#xff0c;已经困扰挺多人了&#xff0c;基本上你拿之前的逻辑去扫的话&#xff0c;估计几个小时或者一两天就掉线&#xff0c;这个问题呢&#xff0c;目前已经解决短时间掉线问题。抖音的cookie默认是大概60天左右的有效期

羊大师:羊奶营养守护孩子每一步

羊大师&#xff1a;羊奶营养守护孩子每一步 羊奶确实是一种营养丰富、具有多种健康益处的饮品&#xff0c;羊大师发现羊奶对于孩子的成长发育具有积极的促进作用。以下是一些关于羊奶对孩子成长的具体好处&#xff1a; 优质蛋白质&#xff1a;羊奶中的蛋白质含量高&#xff0c…

解决windows中的WSL Ubuntu子系统忘记root密码和用户密码问题

1、以管理员身份运行PowerShell 2、在powershell中执行wsl.exe --user root wsl.exe --user root如果出现了上面的报错&#xff0c;则需要运行步骤3、4&#xff0c;然后在执行步骤5改密码&#xff0c;如果没有出错&#xff0c;请直接跳到第5步改密码操作&#xff01;&#xff…

【设计模式】之观察者模式

系列文章目录 【设计模式】之装饰器模式【设计模式】之工厂模式&#xff08;三种&#xff09;【设计模式】之工厂模式&#xff08;三种&#xff09; 前言 今天给大家介绍另一种设计模式--观察者模式&#xff0c;有了解webscoket实现原理的小伙伴应该对这个设计模式不陌生。不清…

2024年人工智能威胁态势报告:有关AI系统及AI应用的安全风险与安全防护全景

HiddenLayer公司最新发布的《2024年AI威胁场景报告》中&#xff0c;研究人员阐明了AI相关漏洞及其对组织的影响&#xff0c;并为应对这些挑战的IT安全和数据科学领导者提供了指导建议。最后&#xff0c;报告还揭示了各种形式的AI安全控制的前沿进展。 关键数据 平均而言&#x…

FMEA如何在设计活动中有效应用?——FMEA软件

免费试用FMEA软件-免费版-SunFMEA 在现代产品设计和开发过程中&#xff0c;FMEA&#xff08;失效模式与影响分析&#xff09;已经成为了一种不可或缺的工具。它的核心目标是在产品或过程设计的早期阶段&#xff0c;通过识别和分析潜在的失效模式&#xff0c;预防和控制可能出现…

react路由的简单demo

1.结构 2.router的index.js代码 import Home from "../pages/home/index";const routes [{path: "/",element: <Home />,},{path: "home",element: <Home />,}, ];export default routes;3.app.js代码 import "./App.css&qu…

Android 开机启动扫描SD卡apk流程源码分析

在开机的时候&#xff0c;装在SD卡的apk和装在系统盘的apk扫描过程不一样&#xff0c;系统盘apk在系统启动过程中扫描&#xff0c;而SD卡上的就不是&#xff0c;等系统启动好了才挂载、扫描&#xff0c;下面就说下SD扫描的流程&#xff1a; 在SystemServer启动MountService&am…

概念解析 | 威胁建模与DREAD评估:构建安全的系统防线

注1:本文系"概念解析"系列之一,致力于简洁清晰地解释、辨析复杂而专业的概念。本次辨析的概念是:威胁建模和DREAD模型 概念解析 | 威胁建模与DREAD评估:构建安全的系统防线 What Is Threat Modeling? Definition, Process, Examples, and Best Practices - Spic…

关于zabbix简介及zabbix服务端的部署

文章目录 一、zabbix概念1、zabbix简介2、zabbix主要特点3、zabbix运行机制4、zabbix应用场景5、zabbix监控原理6、zabbix的子程序7、zabbix监控的架构模式7.1 server-client架构7.2 server-proxy-client架构7.3 master-node-client 二、部署zabbix1、服务器配置2、服务器环境3…

Netty简单聊天室的实现(详细注释)

目录 说明交互逻辑ClientServer 代码实现运行 说明 Netty 的入门练习&#xff0c;使用 Netty 模拟多人聊天室的功能&#xff0c;不考虑高并发&#xff0c;只实现基础聊天功能和提示上下线。 交互逻辑 Client 连接服务端成功后&#xff0c;打印本客户端信息Ip:Port读取用户客…

链表的经典面试题(数据结构详解)+顺序表和链表之间区别+计算机存储体系

前言 首先这里已经正式步入数据结构的知识&#xff0c;之前我们已经讲解了链表的使用&#xff0c;接下来我们需要的就是大量的练习&#xff0c;熟练掌握数据结构。下面的题型我们选择的都是链表的经典题型&#xff0c;面试题型&#xff0c;包含快慢指针&#xff0c;数形结合&am…

Github的使用教程(下载项目、寻找开源项目和上传项目)

根据『教程』一看就懂&#xff01;Github基础教程_哔哩哔哩_bilibili 整理。 1.项目下载 1&#xff09;直接登录到源码链接页或者通过如下图的搜索 通过编程语言对搜索结果进一步筛选。 如何去找开源项目&#xff1a;(Github 新手够用指南 | 全程演示&个人找项目技巧放…

# 从浅入深 学习 SpringCloud 微服务架构(十二)网关限流算法和 SCG 网关 filter 限流。

从浅入深 学习 SpringCloud 微服务架构&#xff08;十二&#xff09;网关限流算法和 SCG 网关 filter 限流。 一、网关限流算法&#xff1a; 1、网关限流算法&#xff1a;常见的限流算法 网关限流算法&#xff1a;计数器算法网关限流算法&#xff1a;漏桶算法网关限流算法&am…

QT ERROR: Unknown module(s) in QT: xlsx怎么办

现象描述 QT编译c代码的时候&#xff0c;报这种QT ERROR: Unknown module(s) in QT: xlsx&#xff0c;应该如何解决&#xff1f; 这里&#xff0c;我简单记录一下自己的解决问题过程。有可能&#xff0c;对遇到同样的问题的你&#xff0c;也有所帮助 第一步 检查perl是否安装…

墨刀原型工具-小白入门篇

1.引言 作为一个小白&#xff0c;要怎么在短时间内快速学会原型设计&#xff1f; “时间紧&#xff0c;任务重”&#xff0c;如何在短时间内理解、掌握一个原型设计工具的使用&#xff1f;据同事们的推荐&#xff0c;选择了入手“墨刀”这个软件&#xff01; 2.软件介绍 墨…

Colab/PyTorch - 001 PyTorch Basics

Colab/PyTorch - 001 PyTorch Basics 1. 源由2. PyTorch库概览3. 处理过程2.1 数据加载与处理2.2 构建神经网络2.3 模型推断2.4 兼容性 3. 张量介绍3.1 构建张量3.2 访问张量元素3.3 张量元素类型3.4 张量转换&#xff08;NumPy Array&#xff09;3.5 张量运算3.6 CPU v/s GPU …