/// <summary> /// 建立图层 /// </summary> /// <returns></returns> public Layer Build() { int index = 0; List <Point> lonLats = new List <Point>(); foreach (var item in _results.ToArray()) { index++; if (index > start) { var single = item; var geoCoord = Geo.Coordinates.CoordTransformer.XyzToGeoCoord(item.Value.Value); var pt = new Point(geoCoord, index.ToString(), item.Name); lonLats.Add(pt); } } Layer layer = LayerFactory.CreatePointLayer(lonLats); foreach (var item in dicData) { CreatePtFeature(layer, item.Value, item.Key); } layer.FeatureSource.BuildIndexing(); layer.UseLayerStyle = false; return(layer); }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.param != null) { double time = 0; OrbitParamCaculator caculator = new OrbitParamCaculator(); List <XYZ> xyzs = new List <XYZ>(); for (int i = 0; i < 500; i++) { time = i * 10000; XYZ xyz = caculator.GetSatPos(param, time); xyzs.Add(xyz); } List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); int j = 0; foreach (var item in xyzs) { GeoCoord geoCoord = CoordTransformer.XyzToGeoCoord(item); lonlats.Add(new AnyInfo.Geometries.Point(geoCoord, j + "")); j++; } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { List <NamedXyz> coordsB = this.ShowCoordsA; if (ShowLayer != null && coordsB != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); int i = 1; foreach (var g in coordsB) { var find = this.ShowCoordsB.Find(m => String.Equals(m.Name, g.Name, StringComparison.CurrentCultureIgnoreCase)); if (find == null) { continue; } var geoCoord = Geo.Coordinates.CoordTransformer.XyzToGeoCoord(g.Value); var name = find.Name;// + "," + find.Value.ToString(); lonlats.Add(new AnyInfo.Geometries.Point(geoCoord, (i++) + "", name)); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } else { MessageBox.Show("请先读取!"); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && lonLats.Count != 0) { Layer layer = LayerFactory.CreatePointLayer(lonLats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (showPointLayer != null && points != null) { Layer layer = LayerFactory.CreatePointLayer(points); showPointLayer(layer); } }
private void button_drawOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && Headers != null) { List <AnyInfo.Geometries.Point> lonlats = GetPoints(Headers); Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.lonlats != null) { if (ShowLayer != null) { Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.bindingSource_clk.DataSource != null) { List <LonLat> lonlats = new List <LonLat>(); foreach (ClockSolnStation item in _clockFile.Header.ClockSolnStations) { lonlats.Add(item.GeoCoord); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && oldCrdFile != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); foreach (CrdItem item in oldCrdFile.Items) { lonlats.Add(new AnyInfo.Geometries.Point(item.GeoCoord, item.StationName)); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && sathelper != null && this.sathelper.LonLats.Count != 0) { List <AnyInfo.Geometries.Point> pts = new List <AnyInfo.Geometries.Point>(); foreach (var item in this.sathelper.LonLats) { pts.Add(new AnyInfo.Geometries.Point(item[0], item[1], item.Tag.ToString())); } Layer layer = LayerFactory.CreatePointLayer(pts); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.bindingSource1.DataSource != null) { List <Ephemeris> fitedResult = this.bindingSource1.DataSource as List <Ephemeris>; List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); foreach (Ephemeris item in fitedResult) { lonlats.Add(new AnyInfo.Geometries.Point(item.GeoCoord, item.Prn + " " + item.Time.ToString())); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { List <ISingleSiteObsStream> obsDataSources = RinexFileObsDataSource.LoadObsData(this.textBox_obsPath.Lines); List <AnyInfo.Geometries.Point> pts = new List <AnyInfo.Geometries.Point>(); foreach (var item in obsDataSources) { pts.Add(new AnyInfo.Geometries.Point(item.SiteInfo.ApproxGeoCoord, null, item.SiteInfo.SiteName)); } if (ShowLayer != null && pts.Count != 0) { ShowLayer(LayerFactory.CreatePointLayer(pts)); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && adjust != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); List <SolutionEstimateGroup> group = SolutionEstimateGroup.GetGroups(adjust.ResultSinexFile.SolutionEstimateBlock.Items); foreach (SolutionEstimateGroup g in group) { lonlats.Add(new AnyInfo.Geometries.Point(g.GeoCoord, g.Items[0].SiteCode)); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.xyzs.Count > 0) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); int j = 0; foreach (var item in xyzs) { GeoCoord geoCoord = CoordTransformer.XyzToGeoCoord(item.Position); lonlats.Add(new AnyInfo.Geometries.Point(geoCoord, j + "")); j++; } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showMap_Click(object sender, EventArgs e) { if (moonGeo != null && sunGeo != null && ShowLayer != null) { AnyInfo.Geometries.Point sunpt = new AnyInfo.Geometries.Point(sunGeo, "1", "太阳"); AnyInfo.Geometries.Point moonpt = new AnyInfo.Geometries.Point(moonGeo, "2", "月亮"); List <AnyInfo.Geometries.Point> lonLats = new List <AnyInfo.Geometries.Point>() { sunpt, moonpt }; Layer layer = LayerFactory.CreatePointLayer(lonLats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && files != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); List <SolutionEstimateGroup> groups = new List <SolutionEstimateGroup>(); foreach (var item in files) { List <SolutionEstimateGroup> group = SolutionEstimateGroup.GetGroups(item.SolutionEstimateBlock.Items); foreach (SolutionEstimateGroup g in group) { lonlats.Add(new AnyInfo.Geometries.Point(g.GeoCoord, g.Items[0].SiteCode + "(" + item.Name + ")")); } groups.AddRange(group); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.bindingSource1.DataSource != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); int i = 0; foreach (ClockSolnStation item in _clockFile.Header.ClockSolnStations) { var pt = new AnyInfo.Geometries.Point(item.GeoCoord, i + "", item.Name); lonlats.Add(pt); i++; } if (lonlats.Count == 0) { return; } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { GeoCoords = new System.Collections.Generic.List <GeoCoord>(); foreach (var item in AllPointsApproXyz) { var geoCoord = CoordTransformer.XyzToGeoCoord(item.Value); GeoCoords.Add(geoCoord); } if (showPointLayer != null && GeoCoords != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); foreach (GeoCoord g in GeoCoords) { lonlats.Add(new AnyInfo.Geometries.Point(g, "1")); } Layer layer = LayerFactory.CreatePointLayer(lonlats); showPointLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && fileA != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); List <SolutionEstimateGroup> group = SolutionEstimateGroup.GetGroups(fileA.SolutionEstimateBlock.Items); foreach (SolutionEstimateGroup g in group) { lonlats.Add(new AnyInfo.Geometries.Point(g.GeoCoord, g.Items[0].SiteCode)); } //foreach (SiteId text in fileA.SiteIdBlock.Items) //{ // lonlats.Add(new AnyInfo.Geometries.Point(text.GeoCoord, text.SiteCode)); //} Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
/// <summary> /// open one OpenFileDialog to select rinex O files, and create one anyinfo point layer; /// </summary> /// <param name="t"></param> /// <returns></returns> public static Layer OpenAndShowOFileOnMap(string title) { Layer layer = null; OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = Setting.RinexOFileFilter; openFileDialog.Multiselect = true; if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string[] files = openFileDialog.FileNames; List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); Geo.IO.InputFileManager inputFileManager = new Geo.IO.InputFileManager(Setting.TempDirectory); foreach (var item in files) { var local = inputFileManager.GetLocalFilePath(item, "*.*O;*.rnx", "*.*"); Data.Rinex.RinexObsFileHeader header = new Data.Rinex.RinexObsFileReader(local).GetHeader(); if (header.ApproxXyz == null) { continue; } Geo.Coordinates.GeoCoord lonlat = Geo.Coordinates.CoordTransformer.XyzToGeoCoord(header.ApproxXyz); lonlats.Add(new AnyInfo.Geometries.Point(lonlat, Path.GetFileNameWithoutExtension(item).Substring(0, 4)) { Name = header.MarkerName }); header = null;//释放资源。 } layer = LayerFactory.CreatePointLayer(lonlats, title); } return(layer); }