public ImageLayer(LayerManager lm, GravurGIS.MapPanelBindings.ImageLayerInfo info, string name, string path) { this.Description = "Rasterbild"; this._layerType = LayerType.Image; this.Visible = true; this.Changed = true; this.layerID = info.id; this._boundingBox = new GravurGIS.Topology.WorldBoundingBoxD(info.minBX, info.maxBY, info.maxBX, info.minBY); this.LayerName = name; this.layerInfo = new LayerInfo(path + "\\" + name); this.layermanager = lm; this.resolution = new double[2]; this.resolution[0] = info.resolutionX; this.resolution[1] = info.resolutionY; }
public GravurGIS.MapPanelBindings.ImageLayerInfo GDALAddImageToContainer(string filename) { IntPtr id = MapPanelBindings.AddFileToGDALContainer(cGDALContainer, filename); GravurGIS.MapPanelBindings.ImageLayerInfo ilinfo = new GravurGIS.MapPanelBindings.ImageLayerInfo(); Marshal.PtrToStructure(id, ilinfo); if (ilinfo.id == -1) MessageBox.Show("Fehler 0x4001: Konnte dem GDALContainer die Datei \"" + filename + "\" nicht hinzufügen!"); return ilinfo; }