# yy_prf_pipe **Repository Path**: wangfengdev/yy_prf_pipe ## Basic Information - **Project Name**: yy_prf_pipe - **Description**: 输入线廓线数据,生成管子多边形数据。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-28 - **Last Updated**: 2026-06-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 将ECEF坐标的廓线数据Geojson,转为管子(pipe)的多边形数据,保存为json格式。 -------------- ## 2026/6/16 v1.1 每个vertex增加颜色属性,颜色来源为廓线的属性值与预定义的ColorBar。 调用方式: 无颜色模式: yy_prf_pipe.exe radius segcnt /dir/in/ecef.geojson /out/put/pipe.json 有颜色模式: yy_prf_pipe.exe radius segcnt pptyIndex color.json /dir/in/ecef.geojson /out/put/pipe.json ### 输入 json数据文件中,每个Feature的coordinates 字段中每个点前三个值表示xyz坐标,后面都是属性值。 样例如下 属性编号从0开始(x),依次类推,那么第一个属性对应 属性索引值为3。 ~~~ { "type": "FeatureCollection", "name": "w:pres-q-temp;d:bend-pres-ref-temp", "crs": { "type": "name", "properties": { "name": "ECEF" } }, "features": [ { "type": "Feature", "properties": { "sat": "Y020", "dt": "2025-12-20T00:00:00Z" }, "geometry": { "type": "LineString", "coordinates": [ [ -4923708, // x - 属性0 -2505318, // y - 属性1 -3295088, // z - 属性2 1.16177e-05, //属性3 0.249726, //属性4 0.0787409, //属性5 -27.0518 //属性6 ], [ -4914877, -2505666, -3290352, 1.42486e-05, 0.763544, 0.211357, 7.17566 ], ... ... } }, { "type": "Feature", ... ... }, { "type": "Feature", ... ... }, ] } ~~~ ### 配色文件 使用json格式,采用OEE的样式: ~~~ {"type":"linear", "bands":[0], "nodatacolor":{"val":0,"r":0,"g":0,"b":0,"a":0,"lbl":"NoData"}, "vranges":[{"minval":0,"maxval":1000}], "belowMinTransparent":true, "aboveMaxTransparent":true, "colors":[ {"val":0,"r":255,"g":255,"b":255,"a":0,"lbl":" 0"} ,{"val":100,"r":1,"g":160,"b":246,"a":255,"lbl":" 10"} ,{"val":150,"r":0,"g":236,"b":236,"a":255,"lbl":" 15"} ,{"val":200,"r":0,"g":216,"b":0,"a":255,"lbl":" 20"} ,{"val":250,"r":1,"g":144,"b":0,"a":255,"lbl":" 25"} ,{"val":300,"r":254,"g":254,"b":0,"a":255,"lbl":" 30"} ,{"val":350,"r":231,"g":192,"b":0,"a":255,"lbl":" 35"} ,{"val":400,"r":255,"g":144,"b":0,"a":255,"lbl":" 40"} ,{"val":450,"r":255,"g":0,"b":0,"a":255,"lbl":" 45"} ,{"val":500,"r":214,"g":0,"b":0,"a":255,"lbl":" 50"} ,{"val":550,"r":192,"g":0,"b":0,"a":255,"lbl":" 55"} ,{"val":600,"r":255,"g":0,"b":240,"a":255,"lbl":" 60"} ,{"val":650,"r":150,"g":0,"b":180,"a":255,"lbl":" 65"} ,{"val":700,"r":173,"g":144,"b":240,"a":255,"lbl":" 70"} ,{"val":990,"r":173,"g":144,"b":240,"a":255,"lbl":" 990"} ]} ~~~ ### 输出结果 json格式如下,顶点颜色采用三个Byte整形数字表示。 ~~~ { "nver":1000, "nind":3000, "ntri":1000, "verts":[ [492.0 , 250.0 , 329.5 ] , ... ...], "indis":[ 0,1,2, 0,2,3, ... ... ], "colrs":[ [255,0,0] , ... ... ] //数量与verts一致 } ~~~