Пример #1
0
        /// <summary>
        /// Method to ensure the static constructor is being called.
        /// </summary>
        /// <remarks>Be sure to call this function before using Gdal/Ogr/Osr</remarks>
        public static void ConfigureGdal()
        {
            if (_configuredGdal) return;

            // Register drivers
            Gdal.AllRegister();
            _configuredGdal = true;

            PrintDriversGdal();
        }
Пример #2
0
        /// <summary>
        /// Method to ensure the static constructor is being called.
        /// </summary>
        /// <remarks>Be sure to call this function before using Gdal/Ogr/Osr</remarks>
        public static void ConfigureGdal()
        {
            if (_configuredGdal)
            {
                return;
            }

            // Register drivers
            try
            {
                Gdal.AllRegister();
                _configuredGdal = true;
            }
            catch (Exception e) {
                Debug.WriteLine(e.Message);
                _configuredGdal = false;
            }

            PrintDriversGdal();
        }