/// <summary> /// Appends a data set to an existing data set. /// </summary> /// <param name="data">Data set to append</param> public void Append(SpatialDataSet data) { if (data != null) { BoundingBox = data.BoundingBox.Join(BoundingBox); Geometries.AddRange(data.Geometries); if (data.Styles != null && data.Styles.Count > 0) { if (Styles == null) { Styles = data.Styles; } else { foreach (var key in data.Styles.Keys) { if (!Styles.ContainsKey(key)) { Styles.Add(key, data.Styles[key]); } } } } if (!Metadata.HasMetadata()) { Metadata = data.Metadata; } if (!string.IsNullOrEmpty(data.Error)) { if (string.IsNullOrEmpty(Error)) { Error = data.Error; } else { Error += "\r\n" + data.Error; } } } }
/// <summary>Конструктор из списка</summary> /// <param name="nPolygons"></param> public TMultiPolygon(List <TPolygon> nPolygons) //: base((List<TGeometry>)nPolygons.Cast<TGeometry>()) { Geometries.AddRange(nPolygons.GetRange(0, nPolygons.Count)); }