[mapguide-commits] r5601 - in sandbox/maestro-3.0: Maestro.Editors Maestro.Editors/FeatureSource/Providers Maestro.Editors/FeatureSource/Providers/Gdal OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/ObjectModels OSGeo.MapGuide.MaestroAPI/SchemaOverrides

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Mar 6 06:20:43 EST 2011


Author: jng
Date: 2011-03-06 03:20:43 -0800 (Sun, 06 Mar 2011)
New Revision: 5601

Added:
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.resx
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.resx
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.Designer.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.cs
   sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.resx
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalRasterItem.cs
Modified:
   sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml
   sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/IFdoSpatialContext.cs
   sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalConfigurationDocument.cs
Log:
Submit current work on GDAL raster feature source editor

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.Designer.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.Designer.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,156 @@
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    partial class CompositeFileCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CompositeFileCtrl));
+            this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+            this.btnAdd = new System.Windows.Forms.ToolStripSplitButton();
+            this.btnDelete = new System.Windows.Forms.ToolStripButton();
+            this.btnRefresh = new System.Windows.Forms.ToolStripButton();
+            this.lstView = new System.Windows.Forms.ListView();
+            this.imgList = new System.Windows.Forms.ImageList(this.components);
+            this.label1 = new System.Windows.Forms.Label();
+            this.btnRebuild = new System.Windows.Forms.Button();
+            this.toolStrip1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // toolStrip1
+            // 
+            this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.btnAdd,
+            this.btnDelete,
+            this.btnRefresh});
+            this.toolStrip1.Location = new System.Drawing.Point(0, 0);
+            this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Size = new System.Drawing.Size(504, 25);
+            this.toolStrip1.TabIndex = 0;
+            this.toolStrip1.Text = "toolStrip1";
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.Image = global::Maestro.Editors.Properties.Resources.plus_circle;
+            this.btnAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(61, 22);
+            this.btnAdd.Text = "Add";
+            // 
+            // btnDelete
+            // 
+            this.btnDelete.Enabled = false;
+            this.btnDelete.Image = global::Maestro.Editors.Properties.Resources.cross;
+            this.btnDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Size = new System.Drawing.Size(60, 22);
+            this.btnDelete.Text = "Delete";
+            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.Image = global::Maestro.Editors.Properties.Resources.arrow_circle_135;
+            this.btnRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(122, 22);
+            this.btnRefresh.Text = "Refresh Mappings";
+            this.btnRefresh.ToolTipText = "Refresh the mapping data for the selected items";
+            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
+            // 
+            // lstView
+            // 
+            this.lstView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.lstView.LargeImageList = this.imgList;
+            this.lstView.Location = new System.Drawing.Point(0, 25);
+            this.lstView.Name = "lstView";
+            this.lstView.Size = new System.Drawing.Size(504, 127);
+            this.lstView.SmallImageList = this.imgList;
+            this.lstView.TabIndex = 1;
+            this.lstView.UseCompatibleStateImageBehavior = false;
+            this.lstView.View = System.Windows.Forms.View.List;
+            this.lstView.SelectedIndexChanged += new System.EventHandler(this.lstView_SelectedIndexChanged);
+            // 
+            // imgList
+            // 
+            this.imgList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgList.ImageStream")));
+            this.imgList.TransparentColor = System.Drawing.Color.Transparent;
+            this.imgList.Images.SetKeyName(0, "image.png");
+            // 
+            // label1
+            // 
+            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
+            this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.label1.Location = new System.Drawing.Point(3, 155);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(383, 32);
+            this.label1.TabIndex = 2;
+            this.label1.Text = "Note that all paths are as seen by the MapGuide server, not Maestro";
+            // 
+            // btnRebuild
+            // 
+            this.btnRebuild.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnRebuild.Location = new System.Drawing.Point(392, 158);
+            this.btnRebuild.Name = "btnRebuild";
+            this.btnRebuild.Size = new System.Drawing.Size(109, 29);
+            this.btnRebuild.TabIndex = 3;
+            this.btnRebuild.Text = "Rebuild All";
+            this.btnRebuild.UseVisualStyleBackColor = true;
+            this.btnRebuild.Click += new System.EventHandler(this.btnRebuild_Click);
+            // 
+            // CompositeFileCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.btnRebuild);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.lstView);
+            this.Controls.Add(this.toolStrip1);
+            this.Name = "CompositeFileCtrl";
+            this.Size = new System.Drawing.Size(504, 193);
+            this.toolStrip1.ResumeLayout(false);
+            this.toolStrip1.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ToolStrip toolStrip1;
+        private System.Windows.Forms.ListView lstView;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button btnRebuild;
+        private System.Windows.Forms.ToolStripSplitButton btnAdd;
+        private System.Windows.Forms.ToolStripButton btnDelete;
+        private System.Windows.Forms.ToolStripButton btnRefresh;
+        private System.Windows.Forms.ImageList imgList;
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,157 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+using OSGeo.MapGuide.MaestroAPI.SchemaOverrides;
+using System.Xml;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+using System.IO;
+
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    internal partial class CompositeFileCtrl : EditorBase
+    {
+        internal CompositeFileCtrl()
+        {
+            InitializeComponent();
+        }
+
+        private IFeatureSource _fs;
+        private GdalConfigurationDocument _conf;
+        private IEditorService _service;
+
+        public override void Bind(IEditorService service)
+        {
+            _service = service;
+            _fs = (IFeatureSource)_service.GetEditedResource();
+            string xml = _fs.GetConfigurationContent();
+            if (!string.IsNullOrEmpty(xml))
+            {
+                try
+                {
+                    _conf = (GdalConfigurationDocument)ConfigurationDocument.LoadXml(xml);
+                }
+                catch
+                {
+                    BuildDefaultDocument();
+                }
+
+                lstView.Items.Clear();
+                List<string> files = new List<string>();
+                foreach (var loc in _conf.RasterLocations)
+                {
+                    foreach (var item in loc.Items)
+                    {
+                        ListViewItem lvi = new ListViewItem();
+                        lvi.Name = Path.Combine(loc.Location, item.FileName);
+                        lvi.Text = lvi.Name;
+                        lvi.Tag = item;
+                        lvi.ImageIndex = 0;
+
+                        lstView.Items.Add(lvi);
+                    }
+                }
+            }
+        }
+
+        private void BuildDefaultDocument()
+        {
+            _conf = new GdalConfigurationDocument();
+            var xmlDoc = new XmlDocument();
+            XmlNamespaceManager mgr = new XmlNamespaceManager(xmlDoc.NameTable);
+            mgr.AddNamespace("xs", XmlNamespaces.XS);
+            mgr.AddNamespace("xsi", XmlNamespaces.XSI);
+            mgr.AddNamespace("fdo", XmlNamespaces.FDO);
+            mgr.AddNamespace("gml", XmlNamespaces.GML);
+            mgr.AddNamespace("xlink", XmlNamespaces.XLINK);
+            mgr.AddNamespace("fds", XmlNamespaces.FDS);
+
+            var desc = _fs.Describe();
+            _conf.AddSchema(desc.Schemas[0]); //Only one schema is supported by Gdal so this is ok
+
+            var scList = _fs.GetSpatialInfo(false);
+            foreach (var sc in scList.SpatialContext)
+            {
+                _conf.AddSpatialContext(sc);
+            }
+        }
+
+        private void btnDelete_Click(object sender, EventArgs e)
+        {
+            foreach (ListViewItem item in lstView.SelectedItems)
+            {
+                string dir = Path.GetDirectoryName(item.Text);
+
+                GdalRasterLocationItem loc = null;
+                foreach (var locItem in _conf.RasterLocations)
+                {
+                    if (locItem.Location == dir)
+                    {
+                        loc = locItem;
+                        break;
+                    }
+                }
+
+                //Remove raster item
+                if (loc != null)
+                {
+                    loc.RemoveItem((GdalRasterItem)item.Tag);
+
+                    //Remove if empty
+                    if (loc.Items.Length == 0)
+                    {
+                        _conf.RemoveLocation(loc);
+                    }
+                }
+            }
+            _fs.SetConfigurationContent(_conf.ToXml());
+            OnResourceChanged();
+        }
+
+        private void btnRefresh_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void lstView_SelectedIndexChanged(object sender, EventArgs e)
+        {
+            btnRefresh.Enabled = btnDelete.Enabled = (lstView.SelectedItems.Count > 0);
+        }
+
+        private void btnRebuild_Click(object sender, EventArgs e)
+        {
+            BuildDefaultDocument();
+            foreach (ListViewItem item in lstView.Items)
+            {
+                string dir = Path.GetDirectoryName(item.Text);
+                var loc = _conf.AddLocation(dir);
+                GdalRasterItem raster = (GdalRasterItem)item.Tag;
+                loc.AddItem(raster);
+            }
+            OnResourceChanged();
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.resx	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/CompositeFileCtrl.resx	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="imgList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>122, 17</value>
+  </metadata>
+  <data name="imgList.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
+        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
+        ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADQ
+        BwAAAk1TRnQBSQFMAwEBAAEYAQABGAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
+        AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
+        AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
+        AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
+        AwABmQMAAcwCAAEzAwACMwIAATMBZgIAATMBmQIAATMBzAIAATMB/wIAAWYDAAFmATMCAAJmAgABZgGZ
+        AgABZgHMAgABZgH/AgABmQMAAZkBMwIAAZkBZgIAApkCAAGZAcwCAAGZAf8CAAHMAwABzAEzAgABzAFm
+        AgABzAGZAgACzAIAAcwB/wIAAf8BZgIAAf8BmQIAAf8BzAEAATMB/wIAAf8BAAEzAQABMwEAAWYBAAEz
+        AQABmQEAATMBAAHMAQABMwEAAf8BAAH/ATMCAAMzAQACMwFmAQACMwGZAQACMwHMAQACMwH/AQABMwFm
+        AgABMwFmATMBAAEzAmYBAAEzAWYBmQEAATMBZgHMAQABMwFmAf8BAAEzAZkCAAEzAZkBMwEAATMBmQFm
+        AQABMwKZAQABMwGZAcwBAAEzAZkB/wEAATMBzAIAATMBzAEzAQABMwHMAWYBAAEzAcwBmQEAATMCzAEA
+        ATMBzAH/AQABMwH/ATMBAAEzAf8BZgEAATMB/wGZAQABMwH/AcwBAAEzAv8BAAFmAwABZgEAATMBAAFm
+        AQABZgEAAWYBAAGZAQABZgEAAcwBAAFmAQAB/wEAAWYBMwIAAWYCMwEAAWYBMwFmAQABZgEzAZkBAAFm
+        ATMBzAEAAWYBMwH/AQACZgIAAmYBMwEAA2YBAAJmAZkBAAJmAcwBAAFmAZkCAAFmAZkBMwEAAWYBmQFm
+        AQABZgKZAQABZgGZAcwBAAFmAZkB/wEAAWYBzAIAAWYBzAEzAQABZgHMAZkBAAFmAswBAAFmAcwB/wEA
+        AWYB/wIAAWYB/wEzAQABZgH/AZkBAAFmAf8BzAEAAcwBAAH/AQAB/wEAAcwBAAKZAgABmQEzAZkBAAGZ
+        AQABmQEAAZkBAAHMAQABmQMAAZkCMwEAAZkBAAFmAQABmQEzAcwBAAGZAQAB/wEAAZkBZgIAAZkBZgEz
+        AQABmQEzAWYBAAGZAWYBmQEAAZkBZgHMAQABmQEzAf8BAAKZATMBAAKZAWYBAAOZAQACmQHMAQACmQH/
+        AQABmQHMAgABmQHMATMBAAFmAcwBZgEAAZkBzAGZAQABmQLMAQABmQHMAf8BAAGZAf8CAAGZAf8BMwEA
+        AZkBzAFmAQABmQH/AZkBAAGZAf8BzAEAAZkC/wEAAcwDAAGZAQABMwEAAcwBAAFmAQABzAEAAZkBAAHM
+        AQABzAEAAZkBMwIAAcwCMwEAAcwBMwFmAQABzAEzAZkBAAHMATMBzAEAAcwBMwH/AQABzAFmAgABzAFm
+        ATMBAAGZAmYBAAHMAWYBmQEAAcwBZgHMAQABmQFmAf8BAAHMAZkCAAHMAZkBMwEAAcwBmQFmAQABzAKZ
+        AQABzAGZAcwBAAHMAZkB/wEAAswCAALMATMBAALMAWYBAALMAZkBAAPMAQACzAH/AQABzAH/AgABzAH/
+        ATMBAAGZAf8BZgEAAcwB/wGZAQABzAH/AcwBAAHMAv8BAAHMAQABMwEAAf8BAAFmAQAB/wEAAZkBAAHM
+        ATMCAAH/AjMBAAH/ATMBZgEAAf8BMwGZAQAB/wEzAcwBAAH/ATMB/wEAAf8BZgIAAf8BZgEzAQABzAJm
+        AQAB/wFmAZkBAAH/AWYBzAEAAcwBZgH/AQAB/wGZAgAB/wGZATMBAAH/AZkBZgEAAf8CmQEAAf8BmQHM
+        AQAB/wGZAf8BAAH/AcwCAAH/AcwBMwEAAf8BzAFmAQAB/wHMAZkBAAH/AswBAAH/AcwB/wEAAv8BMwEA
+        AcwB/wFmAQAC/wGZAQAC/wHMAQACZgH/AQABZgH/AWYBAAFmAv8BAAH/AmYBAAH/AWYB/wEAAv8BZgEA
+        ASEBAAGlAQADXwEAA3cBAAOGAQADlgEAA8sBAAOyAQAD1wEAA90BAAPjAQAD6gEAA/EBAAP4AQAB8AH7
+        Af8BAAGkAqABAAOAAwAB/wIAAf8DAAL/AQAB/wMAAf8BAAH/AQAC/wIAA/9BABD/MAABvA4HAbwwAAEH
+        Af8M9AH/AQcwAAG8AfQDiwGtBLQBugPcAfQBvDAAAbwB9AOLAa0DtAG7AQkB3AIZAfQBvDAAAbwB9AFl
+        AWsDbAGLA5EBtAG7AQkB9AG8MAABvAH/AkkBbAGSAbsBvAIZA/QC/wG8MAAB8AH/AnEBuwUZAfQBGQL0
+        Af8B8DAAAfAB/wG7AQkD3QEZAd0CCQIZAfQB/wHwMAAB8AH/AtUB2wHcAdsE3AEJAhkB/wHwMAAB8AH/
+        B9QC1QHcAQkB3AH/AfAwAAHwDv8B8DAAAfMO8QHzsAABQgFNAT4HAAE+AwABKAMAAUADAAEQAwABAQEA
+        AQEFAAGAFwAD/wEAAv9uAAL/BgAC/wYACw==
+</value>
+  </data>
+</root>
\ No newline at end of file

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.Designer.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.Designer.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,112 @@
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    partial class GdalProviderCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GdalProviderCtrl));
+            this.rdSingle = new System.Windows.Forms.RadioButton();
+            this.rdComposite = new System.Windows.Forms.RadioButton();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.btnTest = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.txtStatus = new System.Windows.Forms.TextBox();
+            this.contentPanel.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // contentPanel
+            // 
+            this.contentPanel.Controls.Add(this.txtStatus);
+            this.contentPanel.Controls.Add(this.label1);
+            this.contentPanel.Controls.Add(this.btnTest);
+            this.contentPanel.Controls.Add(this.panel1);
+            this.contentPanel.Controls.Add(this.rdComposite);
+            this.contentPanel.Controls.Add(this.rdSingle);
+            resources.ApplyResources(this.contentPanel, "contentPanel");
+            // 
+            // rdSingle
+            // 
+            resources.ApplyResources(this.rdSingle, "rdSingle");
+            this.rdSingle.Checked = true;
+            this.rdSingle.Name = "rdSingle";
+            this.rdSingle.TabStop = true;
+            this.rdSingle.UseVisualStyleBackColor = true;
+            this.rdSingle.CheckedChanged += new System.EventHandler(this.OnTypeCheckedChanged);
+            // 
+            // rdComposite
+            // 
+            resources.ApplyResources(this.rdComposite, "rdComposite");
+            this.rdComposite.Name = "rdComposite";
+            this.rdComposite.TabStop = true;
+            this.rdComposite.UseVisualStyleBackColor = true;
+            this.rdComposite.CheckedChanged += new System.EventHandler(this.OnTypeCheckedChanged);
+            // 
+            // panel1
+            // 
+            resources.ApplyResources(this.panel1, "panel1");
+            this.panel1.Name = "panel1";
+            // 
+            // btnTest
+            // 
+            resources.ApplyResources(this.btnTest, "btnTest");
+            this.btnTest.Name = "btnTest";
+            this.btnTest.UseVisualStyleBackColor = true;
+            this.btnTest.Click += new System.EventHandler(this.btnTest_Click);
+            // 
+            // label1
+            // 
+            resources.ApplyResources(this.label1, "label1");
+            this.label1.Name = "label1";
+            // 
+            // txtStatus
+            // 
+            resources.ApplyResources(this.txtStatus, "txtStatus");
+            this.txtStatus.Name = "txtStatus";
+            this.txtStatus.ReadOnly = true;
+            // 
+            // GdalProviderCtrl
+            // 
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+            this.HeaderText = "GDAL Feature Source";
+            this.Name = "GdalProviderCtrl";
+            resources.ApplyResources(this, "$this");
+            this.contentPanel.ResumeLayout(false);
+            this.contentPanel.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.RadioButton rdComposite;
+        private System.Windows.Forms.RadioButton rdSingle;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Button btnTest;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox txtStatus;
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,83 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using Maestro.Editors.Common;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    public partial class GdalProviderCtrl : EditorBindableCollapsiblePanel
+    {
+        public GdalProviderCtrl()
+        {
+            InitializeComponent();
+            _comp = new CompositeFileCtrl();
+            _sing = new SingleFileCtrl();
+            _comp.Dock = DockStyle.Fill;
+            _sing.Dock = DockStyle.Fill;
+        }
+
+        private IEditorService _service;
+        private IFeatureSource _fs;
+
+        private CompositeFileCtrl _comp;
+        private SingleFileCtrl _sing;
+
+        public override void Bind(IEditorService service)
+        {
+            _service = service;
+            _fs = (IFeatureSource)_service.GetEditedResource();
+            _sing.Bind(service);
+            _comp.Bind(service);
+            if (!string.IsNullOrEmpty(_fs.GetConfigurationContent()))
+                rdComposite.Checked = true;
+            else
+                rdSingle.Checked = true;
+        }
+
+        private void OnTypeCheckedChanged(object sender, EventArgs e)
+        {
+            if (rdSingle.Checked)
+            {
+                panel1.Controls.Clear();
+                panel1.Controls.Add(_sing);
+            }
+            else if (rdComposite.Checked)
+            {
+                panel1.Controls.Clear();
+                panel1.Controls.Add(_comp);
+            }
+        }
+
+        private void btnTest_Click(object sender, EventArgs e)
+        {
+            //Flush back to session before testing
+            _service.SyncSessionCopy();
+            string result = _fs.TestConnection();
+            txtStatus.Text = string.Format(Properties.Resources.FdoConnectionStatus, result);
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.resx	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/GdalProviderCtrl.resx	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="txtStatus.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Bottom, Left, Right</value>
+  </data>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="txtStatus.Location" type="System.Drawing.Point, System.Drawing">
+    <value>125, 209</value>
+  </data>
+  <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="txtStatus.Multiline" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="txtStatus.Size" type="System.Drawing.Size, System.Drawing">
+    <value>310, 23</value>
+  </data>
+  <data name="txtStatus.TabIndex" type="System.Int32, mscorlib">
+    <value>5</value>
+  </data>
+  <data name="&gt;&gt;txtStatus.Name" xml:space="preserve">
+    <value>txtStatus</value>
+  </data>
+  <data name="&gt;&gt;txtStatus.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;txtStatus.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;txtStatus.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="label1.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="label1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>9, 17</value>
+  </data>
+  <data name="label1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>31, 13</value>
+  </data>
+  <data name="label1.TabIndex" type="System.Int32, mscorlib">
+    <value>4</value>
+  </data>
+  <data name="label1.Text" xml:space="preserve">
+    <value>Type</value>
+  </data>
+  <data name="&gt;&gt;label1.Name" xml:space="preserve">
+    <value>label1</value>
+  </data>
+  <data name="&gt;&gt;label1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label1.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="btnTest.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Bottom, Left</value>
+  </data>
+  <data name="btnTest.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 209</value>
+  </data>
+  <data name="btnTest.Size" type="System.Drawing.Size, System.Drawing">
+    <value>107, 23</value>
+  </data>
+  <data name="btnTest.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="btnTest.Text" xml:space="preserve">
+    <value>Test Connection</value>
+  </data>
+  <data name="&gt;&gt;btnTest.Name" xml:space="preserve">
+    <value>btnTest</value>
+  </data>
+  <data name="&gt;&gt;btnTest.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;btnTest.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;btnTest.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="panel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
+    <value>Top, Bottom, Left, Right</value>
+  </data>
+  <data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>12, 38</value>
+  </data>
+  <data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>423, 165</value>
+  </data>
+  <data name="panel1.TabIndex" type="System.Int32, mscorlib">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;panel1.Name" xml:space="preserve">
+    <value>panel1</value>
+  </data>
+  <data name="&gt;&gt;panel1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;panel1.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="rdComposite.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="rdComposite.Location" type="System.Drawing.Point, System.Drawing">
+    <value>125, 15</value>
+  </data>
+  <data name="rdComposite.Size" type="System.Drawing.Size, System.Drawing">
+    <value>74, 17</value>
+  </data>
+  <data name="rdComposite.TabIndex" type="System.Int32, mscorlib">
+    <value>1</value>
+  </data>
+  <data name="rdComposite.Text" xml:space="preserve">
+    <value>Composite</value>
+  </data>
+  <data name="&gt;&gt;rdComposite.Name" xml:space="preserve">
+    <value>rdComposite</value>
+  </data>
+  <data name="&gt;&gt;rdComposite.Type" xml:space="preserve">
+    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;rdComposite.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;rdComposite.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="rdSingle.AutoSize" type="System.Boolean, mscorlib">
+    <value>True</value>
+  </data>
+  <data name="rdSingle.Location" type="System.Drawing.Point, System.Drawing">
+    <value>65, 15</value>
+  </data>
+  <data name="rdSingle.Size" type="System.Drawing.Size, System.Drawing">
+    <value>54, 17</value>
+  </data>
+  <data name="rdSingle.TabIndex" type="System.Int32, mscorlib">
+    <value>0</value>
+  </data>
+  <data name="rdSingle.Text" xml:space="preserve">
+    <value>Single</value>
+  </data>
+  <data name="&gt;&gt;rdSingle.Name" xml:space="preserve">
+    <value>rdSingle</value>
+  </data>
+  <data name="&gt;&gt;rdSingle.Type" xml:space="preserve">
+    <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;rdSingle.Parent" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;rdSingle.ZOrder" xml:space="preserve">
+    <value>5</value>
+  </data>
+  <data name="contentPanel.Size" type="System.Drawing.Size, System.Drawing">
+    <value>449, 250</value>
+  </data>
+  <data name="&gt;&gt;contentPanel.Name" xml:space="preserve">
+    <value>contentPanel</value>
+  </data>
+  <data name="&gt;&gt;contentPanel.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;contentPanel.Parent" xml:space="preserve">
+    <value>$this</value>
+  </data>
+  <data name="&gt;&gt;contentPanel.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <data name="$this.Size" type="System.Drawing.Size, System.Drawing">
+    <value>449, 277</value>
+  </data>
+  <data name="&gt;&gt;$this.Name" xml:space="preserve">
+    <value>GdalProviderCtrl</value>
+  </data>
+  <data name="&gt;&gt;$this.Type" xml:space="preserve">
+    <value>Maestro.Editors.Common.EditorBindableCollapsiblePanel, Maestro.Editors, Version=3.0.0.5475, Culture=neutral, PublicKeyToken=null</value>
+  </data>
+</root>
\ No newline at end of file

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.Designer.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.Designer.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.Designer.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,165 @@
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    partial class SingleFileCtrl
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.txtPath = new System.Windows.Forms.TextBox();
+            this.btnBrowseFile = new System.Windows.Forms.Button();
+            this.btnBrowseDir = new System.Windows.Forms.Button();
+            this.btnBrowseAliasDir = new System.Windows.Forms.Button();
+            this.btnBrowseAliasFile = new System.Windows.Forms.Button();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.groupBox1.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(17, 17);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(91, 13);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "File or Folder path";
+            // 
+            // label2
+            // 
+            this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
+            this.label2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.label2.Location = new System.Drawing.Point(17, 202);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(479, 32);
+            this.label2.TabIndex = 3;
+            this.label2.Text = "Note that all paths are as seen by the MapGuide server, not Maestro";
+            // 
+            // txtPath
+            // 
+            this.txtPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.txtPath.Location = new System.Drawing.Point(20, 33);
+            this.txtPath.Name = "txtPath";
+            this.txtPath.Size = new System.Drawing.Size(316, 20);
+            this.txtPath.TabIndex = 4;
+            this.txtPath.TextChanged += new System.EventHandler(this.txtPath_TextChanged);
+            // 
+            // btnBrowseFile
+            // 
+            this.btnBrowseFile.Location = new System.Drawing.Point(7, 15);
+            this.btnBrowseFile.Name = "btnBrowseFile";
+            this.btnBrowseFile.Size = new System.Drawing.Size(27, 23);
+            this.btnBrowseFile.TabIndex = 5;
+            this.btnBrowseFile.Text = "...";
+            this.btnBrowseFile.UseVisualStyleBackColor = true;
+            // 
+            // btnBrowseDir
+            // 
+            this.btnBrowseDir.Image = global::Maestro.Editors.Properties.Resources.folder_horizontal;
+            this.btnBrowseDir.Location = new System.Drawing.Point(40, 15);
+            this.btnBrowseDir.Name = "btnBrowseDir";
+            this.btnBrowseDir.Size = new System.Drawing.Size(27, 23);
+            this.btnBrowseDir.TabIndex = 6;
+            this.btnBrowseDir.UseVisualStyleBackColor = true;
+            // 
+            // btnBrowseAliasDir
+            // 
+            this.btnBrowseAliasDir.Image = global::Maestro.Editors.Properties.Resources.folder_horizontal;
+            this.btnBrowseAliasDir.Location = new System.Drawing.Point(39, 15);
+            this.btnBrowseAliasDir.Name = "btnBrowseAliasDir";
+            this.btnBrowseAliasDir.Size = new System.Drawing.Size(27, 23);
+            this.btnBrowseAliasDir.TabIndex = 8;
+            this.btnBrowseAliasDir.UseVisualStyleBackColor = true;
+            // 
+            // btnBrowseAliasFile
+            // 
+            this.btnBrowseAliasFile.Location = new System.Drawing.Point(6, 15);
+            this.btnBrowseAliasFile.Name = "btnBrowseAliasFile";
+            this.btnBrowseAliasFile.Size = new System.Drawing.Size(27, 23);
+            this.btnBrowseAliasFile.TabIndex = 7;
+            this.btnBrowseAliasFile.Text = "...";
+            this.btnBrowseAliasFile.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox1.Controls.Add(this.btnBrowseFile);
+            this.groupBox1.Controls.Add(this.btnBrowseDir);
+            this.groupBox1.Location = new System.Drawing.Point(342, 17);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(76, 44);
+            this.groupBox1.TabIndex = 9;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "File System";
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.groupBox2.Controls.Add(this.btnBrowseAliasFile);
+            this.groupBox2.Controls.Add(this.btnBrowseAliasDir);
+            this.groupBox2.Location = new System.Drawing.Point(424, 17);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(75, 44);
+            this.groupBox2.TabIndex = 10;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "Alias";
+            // 
+            // SingleFileCtrl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.groupBox2);
+            this.Controls.Add(this.groupBox1);
+            this.Controls.Add(this.txtPath);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Name = "SingleFileCtrl";
+            this.Size = new System.Drawing.Size(515, 255);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox2.ResumeLayout(false);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox txtPath;
+        private System.Windows.Forms.Button btnBrowseFile;
+        private System.Windows.Forms.Button btnBrowseDir;
+        private System.Windows.Forms.Button btnBrowseAliasDir;
+        private System.Windows.Forms.Button btnBrowseAliasFile;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.GroupBox groupBox2;
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.cs
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.cs	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,51 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using OSGeo.MapGuide.ObjectModels.FeatureSource;
+
+namespace Maestro.Editors.FeatureSource.Providers.Gdal
+{
+    public partial class SingleFileCtrl : EditorBase
+    {
+        public SingleFileCtrl()
+        {
+            InitializeComponent();
+        }
+
+        private IFeatureSource _fs;
+
+        public override void Bind(IEditorService service)
+        {
+            service.RegisterCustomNotifier(this);
+            _fs = (IFeatureSource)service.GetEditedResource();
+        }
+
+        private void txtPath_TextChanged(object sender, EventArgs e)
+        {
+            _fs.SetConnectionProperty("DefaultRasterFileLocation", txtPath.Text);
+        }
+    }
+}

Added: sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.resx
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.resx	                        (rev 0)
+++ sandbox/maestro-3.0/Maestro.Editors/FeatureSource/Providers/Gdal/SingleFileCtrl.resx	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file

Modified: sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml	2011-03-04 10:28:32 UTC (rev 5600)
+++ sandbox/maestro-3.0/Maestro.Editors/FsEditorMap.xml	2011-03-06 11:20:43 UTC (rev 5601)
@@ -6,6 +6,7 @@
 generic editor will be used
 -->
 <FeatureSourceEditorMap>
+    <Editor provider="OSGeo.Gdal" type="Maestro.Editors.FeatureSource.Providers.Gdal.GdalProviderCtrl" />
     <Editor provider="OSGeo.ODBC" type="Maestro.Editors.FeatureSource.Providers.Odbc.OdbcProviderCtrl" />
     <Editor provider="OSGeo.SDF" type="Maestro.Editors.FeatureSource.Providers.Sdf.SdfFileCtrl" />
     <Editor provider="OSGeo.SQLite" type="Maestro.Editors.FeatureSource.Providers.SQLite.SQLiteFileCtrl" />

Modified: sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj
===================================================================
--- sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj	2011-03-04 10:28:32 UTC (rev 5600)
+++ sandbox/maestro-3.0/Maestro.Editors/Maestro.Editors.csproj	2011-03-06 11:20:43 UTC (rev 5601)
@@ -208,6 +208,24 @@
     <Compile Include="FeatureSource\Providers\FileBasedCtrl.Designer.cs">
       <DependentUpon>FileBasedCtrl.cs</DependentUpon>
     </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\CompositeFileCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\CompositeFileCtrl.Designer.cs">
+      <DependentUpon>CompositeFileCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\GdalProviderCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\GdalProviderCtrl.Designer.cs">
+      <DependentUpon>GdalProviderCtrl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\SingleFileCtrl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="FeatureSource\Providers\Gdal\SingleFileCtrl.Designer.cs">
+      <DependentUpon>SingleFileCtrl.cs</DependentUpon>
+    </Compile>
     <Compile Include="FeatureSource\Providers\GenericCtrl.cs">
       <SubType>UserControl</SubType>
     </Compile>
@@ -975,6 +993,15 @@
       <DependentUpon>FileBasedCtrl.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\Gdal\CompositeFileCtrl.resx">
+      <DependentUpon>CompositeFileCtrl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\Gdal\GdalProviderCtrl.resx">
+      <DependentUpon>GdalProviderCtrl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="FeatureSource\Providers\Gdal\SingleFileCtrl.resx">
+      <DependentUpon>SingleFileCtrl.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FeatureSource\Providers\GenericCtrl.resx">
       <DependentUpon>GenericCtrl.cs</DependentUpon>
       <SubType>Designer</SubType>

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2011-03-04 10:28:32 UTC (rev 5600)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/OSGeo.MapGuide.MaestroAPI.csproj	2011-03-06 11:20:43 UTC (rev 5601)
@@ -208,6 +208,7 @@
     <Compile Include="Feature\RecordBase.cs" />
     <Compile Include="ObjectModels\IFdoSpatialContext.cs" />
     <Compile Include="SchemaOverrides\GdalConfigurationDocument.cs" />
+    <Compile Include="SchemaOverrides\GdalRasterItem.cs" />
     <Compile Include="SchemaOverrides\OdbcTableItem.cs" />
     <Compile Include="SchemaOverrides\WmsConfigurationDocument.cs" />
     <Compile Include="Schema\ClassDefinition.cs" />

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/IFdoSpatialContext.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/IFdoSpatialContext.cs	2011-03-04 10:28:32 UTC (rev 5600)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/ObjectModels/IFdoSpatialContext.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -184,13 +184,13 @@
 
             var meta = node["gml:metaDataProperty"];
             var remarks = node["gml:remarks"];
-            var srsName = node.Attributes["id"];
+            var srsName = node["gml:srsName"];
             var ext = node["gml:validArea"];
             var baseCrs = node["gml:baseCRS"];
 
             //Anything we read in *must* be static!
             this.ExtentType = FdoSpatialContextListSpatialContextExtentType.Static;
-            this.Name = srsName.Value;
+            this.Name = srsName.InnerText;
             this.Description = remarks.InnerText;
 
             var bbox = ext["gml:boundingBox"];

Modified: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalConfigurationDocument.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalConfigurationDocument.cs	2011-03-04 10:28:32 UTC (rev 5600)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalConfigurationDocument.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -24,8 +24,34 @@
 
 namespace OSGeo.MapGuide.MaestroAPI.SchemaOverrides
 {
-    public class GdalConfigurationDocument : RasterConfigurationDocumentBase<RasterFileItem>
+    public class GdalConfigurationDocument : ConfigurationDocument
     {
+        private Dictionary<string, GdalRasterLocationItem> _items = new Dictionary<string, GdalRasterLocationItem>();
+
+        public GdalRasterLocationItem AddLocation(GdalRasterLocationItem item)
+        {
+            if (!_items.ContainsKey(item.Location))
+            {
+                _items.Add(item.Location, item);
+            }
+            return _items[item.Location];
+        }
+
+        public bool RemoveLocation(GdalRasterLocationItem item)
+        {
+            return _items.Remove(item.Location);
+        }
+
+        public GdalRasterLocationItem AddLocation(string directory)
+        {
+            if (_items.ContainsKey(directory))
+                return _items[directory];
+
+            return AddLocation(new GdalRasterLocationItem() { Location = directory });
+        }
+
+        public GdalRasterLocationItem[] RasterLocations { get { return new List<GdalRasterLocationItem>(_items.Values).ToArray(); } }
+
         protected override void WriteSchemaMappings(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
         {
             foreach (var schema in base._schemas)
@@ -34,18 +60,32 @@
                 map.SetAttribute("provider", "OSGeo.Gdal.3.2");
                 map.SetAttribute("xmlns", "http://fdogrfp.osgeo.org/schemas");
                 map.SetAttribute("name", schema.Name);
-
-                foreach (var item in _rasterItems)
                 {
-                    if (!string.IsNullOrEmpty(item.FeatureClassName))
+                    var ctype = doc.CreateElement("complexType");
+                    var ctypeName = doc.CreateAttribute("name");
+                    ctypeName.Value = schema.Name + "Type";
+                    ctype.Attributes.Append(ctypeName);
                     {
-                        if (item.FeatureClassName.StartsWith(schema.Name))
+                        var rasType = doc.CreateElement("complexType");
+                        var rasTypeName = doc.CreateAttribute("name");
+                        rasTypeName.Value = "RasterTypeType";
+                        rasType.Attributes.Append(rasTypeName);
                         {
-                            item.WriteXml(doc, map);
+                            var rasDef = doc.CreateElement("RasterDefinition");
+                            var rasDefName = doc.CreateAttribute("name");
+                            rasDefName.Value = "images";
+                            rasDef.Attributes.Append(rasDefName);
+
+                            foreach (var loc in _items.Values)
+                            {
+                                loc.WriteXml(doc, rasDef);
+                            }
+                            rasType.AppendChild(rasDef);
                         }
+                        ctype.AppendChild(rasType);
                     }
+                    map.AppendChild(ctype);
                 }
-
                 currentNode.AppendChild(map);
             }
         }
@@ -70,32 +110,44 @@
                     continue;
 
                 //XmlNodeList list = map.SelectNodes("complexType");
-                foreach (XmlNode clsMap in map.ChildNodes)
+                foreach (XmlNode schemaMap in map.ChildNodes)
                 {
-                    if (clsMap.Name != "complexType")
+                    if (schemaMap.Name != "complexType")
                         continue;
 
-                    var cn = clsMap.Attributes["name"];
-                    if (cn == null)
-                        throw new Exception("Bad document. Expected attribute: name"); //LOCALIZEME
+                    var schemaName = schemaMap.Attributes["name"].Value;
+                    schemaName = schemaName.Substring(0, schemaName.Length - 4);
+                    if (!SchemaExists(schemaName))
+                        continue;
 
-                    string className = sn.Value + ":" + cn.Value.Substring(0, cn.Value.Length - "Type".Length);
+                    var rasterType = schemaMap.FirstChild;
+                    var rasterDef = rasterType.FirstChild;
 
-                    var img = clsMap.SelectSingleNode("RasterDefinition/Location/Feature/Image");
-                    if (img == null)
-                        throw new Exception("Bad document. Expected element: Image"); //LOCALIZEME
+                    if (rasterType.Name != "complexType")
+                        throw new Exception("Bad document. Expected element: complexType");
 
-                    var imgName = img.Attributes["name"];
-                    if (imgName == null)
-                        throw new Exception("Bad document. Expected attribute: name"); //LOCALIZEME
+                    if (rasterDef.Name != "RasterDefinition")
+                        throw new Exception("Bad document. Expected element: RasterDefinition");
 
-                    RasterItem item = new RasterFileItem(imgName.Value);
+                    foreach (XmlNode loc in rasterDef.ChildNodes)
+                    {
+                        var location = new GdalRasterLocationItem();
+                        location.ReadXml(loc, mgr);
 
-                    item.Parent = this;
-
-                    item.ReadXml(clsMap, mgr);
+                        AddLocation(location);
+                    }
                 }
             }
         }
+
+        private bool SchemaExists(string schemaName)
+        {
+            foreach (var schema in _schemas)
+            {
+                if (schema.Name == schemaName)
+                    return true;
+            }
+            return false;
+        }
     }
 }

Added: sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalRasterItem.cs
===================================================================
--- sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalRasterItem.cs	                        (rev 0)
+++ sandbox/maestro-3.0/OSGeo.MapGuide.MaestroAPI/SchemaOverrides/GdalRasterItem.cs	2011-03-06 11:20:43 UTC (rev 5601)
@@ -0,0 +1,166 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using OSGeo.MapGuide.MaestroAPI.Schema;
+using System.IO;
+
+namespace OSGeo.MapGuide.MaestroAPI.SchemaOverrides
+{
+    public class GdalRasterLocationItem : IFdoSerializable
+    {
+        private List<GdalRasterItem> _items = new List<GdalRasterItem>();
+
+        public string Location { get; set; }
+
+        public void AddItem(GdalRasterItem item) { _items.Add(item); }
+
+        public void RemoveItem(GdalRasterItem item) { _items.Remove(item); }
+
+        public GdalRasterItem[] Items { get { return _items.ToArray(); } }
+
+        public void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
+        {
+            var loc = doc.CreateElement("Location");
+            var locName = doc.CreateAttribute("name");
+            locName.Value = this.Location;
+            loc.Attributes.Append(locName);
+
+            foreach (var item in _items)
+            {
+                item.WriteXml(doc, loc);   
+            }
+        }
+
+        public void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
+        {
+            if (node.Name != "Location")
+                throw new Exception("Bad document. Expected element: Location");
+
+            var loc = node.Attributes["name"];
+            this.Location = loc.Value;
+
+            foreach (System.Xml.XmlNode item in node.ChildNodes)
+            {
+                var raster = new GdalRasterItem();
+                raster.ReadXml(item, mgr);
+
+                AddItem(raster);
+            }
+        }
+    }
+
+    public class GdalRasterItem : IFdoSerializable
+    {
+        public string FileName { get; set; }
+
+        public double MinX { get; set; }
+
+        public double MinY { get; set; }
+
+        public double MaxX { get; set; }
+
+        public double MaxY { get; set; }
+
+        public void WriteXml(System.Xml.XmlDocument doc, System.Xml.XmlNode currentNode)
+        {
+            var feat = doc.CreateElement("Feature");
+
+            var featName = doc.CreateAttribute("name");
+            featName.Value = Path.GetFileNameWithoutExtension(this.FileName);
+
+            feat.Attributes.Append(featName);
+            {
+                var band = doc.CreateElement("Band");
+                var bandName = doc.CreateAttribute("name");
+                bandName.Value = "RGB";
+                var bandNo = doc.CreateAttribute("number");
+                bandNo.Value = "1";
+
+                band.Attributes.Append(bandName);
+                band.Attributes.Append(bandNo);
+                {
+                    var img = doc.CreateElement("Image");
+                    var imgFrame = doc.CreateAttribute("frame");
+                    imgFrame.Value = "1";
+                    var imgName = doc.CreateAttribute("name");
+                    imgName.Value = this.FileName;
+
+                    img.Attributes.Append(imgFrame);
+                    img.Attributes.Append(imgName);
+                    {
+                        var bounds = doc.CreateElement("Bounds");
+                        bounds.InnerXml = string.Format("<MinX>{0}</MinX><MinY>{1}</MinY><MaxX>{2}</MaxX><MaxY>{3}</MaxY>", this.MinX, this.MinY, this.MaxX, this.MaxY);
+
+                        img.AppendChild(bounds);
+                    }
+                    band.AppendChild(img);
+                }
+                feat.AppendChild(band);
+            }
+            currentNode.AppendChild(feat);
+        }
+
+        public void ReadXml(System.Xml.XmlNode node, System.Xml.XmlNamespaceManager mgr)
+        {
+            if (node.Name != "Feature")
+                throw new Exception("Bad document. Expected element: Feature");
+
+            var band = node.FirstChild;
+            var image = band.FirstChild;
+            var bounds = image.FirstChild;
+
+            if (band.Name != "Band")
+                throw new Exception("Bad document. Expected element: Band");
+
+            if (image.Name != "Image")
+                throw new Exception("Bad document. Expected element: Image");
+
+            if (bounds.Name != "Bounds")
+                throw new Exception("Bad document. Expected element: Bounds");
+
+            var fileName = image.Attributes["name"];
+            this.FileName = fileName.Value;
+
+            var minx = bounds.ChildNodes[0];
+            var miny = bounds.ChildNodes[1];
+            var maxx = bounds.ChildNodes[2];
+            var maxy = bounds.ChildNodes[3];
+
+            if (minx.Name != "MinX")
+                throw new Exception("Bad document. Expected element: MinX");
+
+            if (miny.Name != "MinY")
+                throw new Exception("Bad document. Expected element: MinY");
+
+            if (maxx.Name != "MaxX")
+                throw new Exception("Bad document. Expected element: MaxX");
+
+            if (maxy.Name != "MaxY")
+                throw new Exception("Bad document. Expected element: MaxY");
+
+            this.MinX = Convert.ToDouble(minx.InnerText);
+            this.MinY = Convert.ToDouble(miny.InnerText);
+            this.MaxX = Convert.ToDouble(maxx.InnerText);
+            this.MaxY = Convert.ToDouble(maxy.InnerText);
+        }
+    }
+}



More information about the mapguide-commits mailing list