|
@@ -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");
|