private void exportSelectedFeatureLayerToSpatialiteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IFeatureLayer mLyr = ExtFunctions.GetSelectedFeatureLayer(theMap);

            if (mLyr == null)
            {
                return;
            }

            string mOPFn = SelectOutputFilename(null, mLyr.LegendText + ".sqlite", "Spatialite|*.sqlite");

            if (mOPFn == null)
            {
                return;
            }

            var mDSCOpts = new List <string>();

            mDSCOpts.Add("SPATIALITE=YES");

            var mLCOpts = new List <string>();

            mLCOpts.Add("SPATIAL_INDEX=YES");

            var mReturnValue = ExtFunctions.ExportFeatureLayerToOGR(
                "SQLite",
                mLyr,
                mOPFn,
                theMap.Projection,
                ExtFunctions.GetProjByEPSG(4326),
                false,
                null,
                null,
                mLCOpts,
                mDSCOpts);

            SetFunctionExecutionStatus(mReturnValue);
            return;
        }