public OGRLayer(GravurGIS.MapPanelBindings.VectorLayerInfo info, IntPtr container) { this.Description = "OGR Layer"; this._layerType = LayerType.OGRLayer; this.Visible = true; this.Changed = true; this.layerID = info.id; this.container = container; this._boundingBox = new GravurGIS.Topology.WorldBoundingBoxD(info.minBX, info.maxBY, info.maxBX, info.minBY); }
public GravurGIS.MapPanelBindings.VectorLayerInfo OGRAddLayerToContainer(string filename, string SpatialReference) { IntPtr id = MapPanelBindings.AddFileToOGRContainer(cOGRContainer, filename, SpatialReference); GravurGIS.MapPanelBindings.VectorLayerInfo vlinfo = new GravurGIS.MapPanelBindings.VectorLayerInfo(); Marshal.PtrToStructure(id, vlinfo); if (vlinfo.id == -1) MessageBox.Show("Fehler 0x4001: Konnte dem OGRContainer die Datei \"" + filename + "\" nicht hinzufügen!"); return vlinfo; }