浏览代码

参数调整

gushoubang 1 年之前
父节点
当前提交
0d4d297399
共有 4 个文件被更改,包括 767 次插入300 次删除
  1. 202 101
      data/guanxian/污水_L1.geojson
  2. 336 84
      data/guanxian/污水_P1.geojson
  3. 202 101
      data/guanxian/污水_P1_line.geojson
  4. 27 14
      index/guanxian.js

文件差异内容过多而无法显示
+ 202 - 101
data/guanxian/污水_L1.geojson


文件差异内容过多而无法显示
+ 336 - 84
data/guanxian/污水_P1.geojson


文件差异内容过多而无法显示
+ 202 - 101
data/guanxian/污水_P1_line.geojson


+ 27 - 14
index/guanxian.js

@@ -17,14 +17,17 @@ function readLineFile(inFilePath, outFilePath) {
                 geojson.features[i].properties["符号风格"] = 130
                 geojson.features[i].properties["符号颜色"] = "#717f82"
                 let ll = geojson.features[i].properties["断面尺"].split("×")
-                geojson.features[i].properties["宽度"] = Number(ll[0]) / 1000
+                geojson.features[i].properties["x长"] = Number(ll[0]) / 1000
+                geojson.features[i].properties["x宽"] = Number(ll[1]) / 1000
             } else {
                 // 圆管
                 geojson.features[i].properties["符号风格"] = 129
                 geojson.features[i].properties["符号颜色"] = "#717f82"
-                geojson.features[i].properties["宽度"] = Number(geojson.features[i].properties["断面尺"]) / 2 / 1000
+                geojson.features[i].properties["x长"] = Number(geojson.features[i].properties["断面尺"]) / 2 / 1000
+                geojson.features[i].properties["x宽"] = Number(geojson.features[i].properties["断面尺"]) / 2 / 1000
             }
         }
+        // geojson.features = geojson.features.slice(0, 5000)
 
         // 同步写入GeoJSON文件
         fs.writeFileSync(outFilePath, JSON.stringify(geojson, null, 2));
@@ -74,20 +77,26 @@ function readPointFile(inFilePath, outFilePath) {
                 if (gui !== null) {
                     if (gui.includes("×")) {
                         let ll = gui.split("×")
-                        geojson.features[i].properties["符号风格"] = 54440
+                        geojson.features[i].properties["符号风格"] = 100
                         geojson.features[i].properties["符号颜色"] = "#717f82"
-                        geojson.features[i].properties["宽度"] = Number(ll[0])
+                        geojson.features[i].properties["sf"] = 0.003
                     } else {
-                        geojson.features[i].properties["符号风格"] = 54440
+                        geojson.features[i].properties["符号风格"] = 99
                         geojson.features[i].properties["符号颜色"] = "#717f82"
-                        geojson.features[i].properties["宽度"] = Number(gui) / 2
+                        // geojson.features[i].properties["x长"] = Number(gui) / 2/100
+                        // geojson.features[i].properties["x宽"] = Number(gui) / 2/100
+                        geojson.features[i].properties["sf"] = 0.01
                     }
                 }
             } else {
-                geojson.features[i].properties["符号风格"] = 54440
-                geojson.features[i].properties["符号颜色"] = "#FFFFFF"
+                geojson.features[i].properties["符号风格"] = 99
+                geojson.features[i].properties["符号颜色"] = "#717f82"
+                // geojson.features[i].properties["x长"] = Number(gui) / 2/100
+                // geojson.features[i].properties["x宽"] = Number(gui) / 2/100
+                geojson.features[i].properties["sf"] = 0.01
             }
         }
+        // geojson.features = geojson.features.slice(0, 5000)
 
         // 同步写入GeoJSON文件
         fs.writeFileSync(outFilePath, JSON.stringify(geojson, null, 2));
@@ -133,23 +142,27 @@ function getJingLine(inFilePath, outFilePath) {
                         let ll = gui.split("×")
                         geojson.features[i].properties["符号风格"] = 130
                         geojson.features[i].properties["符号颜色"] = "#717f82"
-                        geojson.features[i].properties["宽度"] = Number(ll[0])
+                        geojson.features[i].properties["x长"] = Number(ll[0])
+                        geojson.features[i].properties["x宽"] = Number(ll[0])
                     } else {
                         geojson.features[i].properties["符号风格"] = 129
                         geojson.features[i].properties["符号颜色"] = "#717f82"
-                        geojson.features[i].properties["宽度"] = Number(gui) / 2
+                        geojson.features[i].properties["x长"] = Number(gui) / 2
+                        geojson.features[i].properties["x宽"] = Number(gui) / 2
                     }
                 }
             } else {
+                geojson.features[i].properties["x长"] = 0.7
+                geojson.features[i].properties["x宽"] = 0.7
                 geojson.features[i].properties["符号风格"] = 129
                 geojson.features[i].properties["符号颜色"] = "#717f82"
             }
 
-            console.log("");
+            // console.log("");
 
         }
 
-        // geojson.features = geojson.features.slice(0,2000)
+        // geojson.features = geojson.features.slice(0, 5000)
 
 
         // 同步写入GeoJSON文件
@@ -161,5 +174,5 @@ function getJingLine(inFilePath, outFilePath) {
 }
 
 // readLineFile("./data/guanxian/污水_L.geojson", "./data/guanxian/污水_L1.geojson");
-// readPointFile("./data/guanxian/污水_P.geojson", "./data/guanxian/污水_P1.geojson");
-getJingLine("./data/guanxian/污水_P.geojson", "./data/guanxian/污水_P1_line.geojson");
+readPointFile("./data/guanxian/污水_P.geojson", "./data/guanxian/污水_P1.geojson");
+// getJingLine("./data/guanxian/污水_P.geojson", "./data/guanxian/污水_P1_line.geojson");

部分文件因为文件数量过多而无法显示