Exemple #1
0
        public static DataSource OpenShared(string utf8_path, int update)
        {
            IntPtr     cPtr = OgrPINVOKE.OpenShared(Ogr.StringToUtf8Bytes(utf8_path), update);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Exemple #2
0
        public DataSource CreateDataSource(string utf8_path, string[] options)
        {
            IntPtr     cPtr = OgrPINVOKE.Driver_CreateDataSource(swigCPtr, Ogr.StringToUtf8Bytes(utf8_path), (options != null)? new OgrPINVOKE.StringListMarshal(options)._ar : null);
            DataSource ret  = (cPtr == IntPtr.Zero) ? null : new DataSource(cPtr, true, ThisOwn_true());

            if (OgrPINVOKE.SWIGPendingException.Pending)
            {
                throw OgrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }