Skip to content
Snippets Groups Projects
Commit dd2e75c1 authored by Debolskiy Andrey's avatar Debolskiy Andrey 🚴🏿
Browse files

New test files

parent 069e623e
Branches
No related tags found
No related merge requests found
Showing
with 31 additions and 9 deletions
File added
File added
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",3857]]
\ No newline at end of file
File added
<MapWinGIS OcxVersion="4.8" FileType="LayerFile" FileVersion="0" Description="">
<Layer LayerType="Shapefile" LayerName="__point" LayerVisible="1" LayerKey="" Filename="">
<ShapefileClass>
<DefaultDrawingOptions FillColor="8665938" LineColor="9868950" />
<ShapefileCategoriesClass />
<LabelsClass Alignment="5" Generated="0" AvoidCollisions="0" Positioning="0" TextRenderingHint="5" />
<ChartsClass ValuesFontName="" />
</ShapefileClass>
</Layer>
</MapWinGIS>
File added
......@@ -132,7 +132,7 @@ namespace MES_Wind
return points;
}
public IFeatureSet main_layer_function(IMapLineLayer pwlines, IFeatureSet pwlineSet, IMapRasterLayer u_raster,
IMapRasterLayer v_raster, IMapRasterLayer clim10_raster, IMapRasterLayer clim5_raster)
IMapRasterLayer v_raster, IMapRasterLayer clim15_raster, IMapRasterLayer clim10_raster, IMapRasterLayer clim5_raster)
{
IFeatureSet result_layer = new FeatureSet(FeatureType.Line);
List<CheckPoint> fullCheckList = new List<CheckPoint>();
......@@ -141,9 +141,9 @@ namespace MES_Wind
List<CheckPoint> lineCheckList = new List<CheckPoint>();
//get associated attributes
DataRow featureData = feature.DataRow;
int id = int.Parse(featureData["PW_ID"].ToString());
int id = int.Parse(featureData["Shape_ID"].ToString());
int year = int.Parse(featureData["Year"].ToString());
double height = double.Parse(featureData["height_m"].ToString());
double height = double.Parse(featureData["HeightOffs"].ToString());
int power = int.Parse(featureData["Power"].ToString());
LineString linestr = feature.BasicGeometry as LineString;
if (linestr != null)
......@@ -166,8 +166,15 @@ namespace MES_Wind
}
else
{
segmentCheckList = CalcBrkPoint(x1, y1, x2, y2, distThreshold, u_raster, v_raster, clim5_raster, height);
}
if (power < 5)
{
segmentCheckList = CalcBrkPoint(x1, y1, x2, y2, distThreshold, u_raster, v_raster, clim5_raster, height);
}
else
{
segmentCheckList = CalcBrkPoint(x1, y1, x2, y2, distThreshold, u_raster, v_raster, clim15_raster, height);
}
}
lineCheckList.AddRange(segmentCheckList);
}
bool linechek = false;
......@@ -284,15 +291,16 @@ namespace MES_Wind
private void btnLoadWindY_Click(object sender, EventArgs e)
{
string curDir = Environment.CurrentDirectory;
string path_to_tests = "\\MES_test\\";
string path_to_tests = "\\MES_test_new\\";
string file_path = curDir + path_to_tests;
map1.AddLayer(file_path+"u_test.asc");
map1.AddLayer(file_path + "v_test.asc");
map1.AddLayer(file_path + "clim5_test.asc");
map1.AddLayer(file_path + "clim10_test.asc");
map1.AddLayer(file_path + "powerlines.shp");
map1.AddLayer(file_path + "powerstations.shp");
map1.AddLayer(file_path + "clim15_test.asc");
map1.AddLayer(file_path + "ЛЭП_polyline.shp");
map1.AddLayer(file_path + "Подстанции_точки_point.shp");
map1.ZoomToMaxExtent();
}
......@@ -338,6 +346,7 @@ namespace MES_Wind
IMapRasterLayer v_rasterLayer = default(IMapRasterLayer);
IMapRasterLayer clim5_rasterLayer = default(IMapRasterLayer);
IMapRasterLayer clim10_rasterLayer = default(IMapRasterLayer);
IMapRasterLayer clim15_rasterLayer = default(IMapRasterLayer);
if (map1.GetRasterLayers().Count() == 1)
{
......@@ -350,6 +359,7 @@ namespace MES_Wind
v_rasterLayer = map1.GetRasterLayers()[1];
clim5_rasterLayer = map1.GetRasterLayers()[2];
clim10_rasterLayer = map1.GetRasterLayers()[3];
clim15_rasterLayer = map1.GetRasterLayers()[4];
//get the powerline line layer
IMapLineLayer pwlLayer = default(IMapLineLayer);
......@@ -369,7 +379,7 @@ namespace MES_Wind
//IFeatureSet brklineSet = new FeatureSet(FeatureType.Line);
//DataTable dt = pwlineSet.DataTable;
IFeatureSet brk_info = new FeatureSet(FeatureType.Line);
brk_info = main_layer_function(pwlLayer, pwlineSet, u_rasterLayer, v_rasterLayer, clim10_rasterLayer, clim5_rasterLayer);
brk_info = main_layer_function(pwlLayer, pwlineSet, u_rasterLayer, v_rasterLayer, clim15_rasterLayer, clim10_rasterLayer, clim5_rasterLayer);
IMapLineLayer brk_info_layer = (MapLineLayer)map1.Layers.Add(brk_info);
LineSymbolizer symbol = new LineSymbolizer(Color.Red, 3);
......
No preview for this file type
No preview for this file type
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment