Пример #1
0
        static Proj4()
        {
            // init proj delegates
            var basePath = (IntPtr.Size == 8) ? "x64" : "x86";
            var path     = System.IO.Path.Combine(Common.AbsolutePath(basePath), "proj.dll");

            _pj_init_plus  = (pj_init_plus_delegate)FunctionLoader.LoadFunction <pj_init_plus_delegate>(path, "pj_init_plus");
            _pj_free       = (pj_free_delegate)FunctionLoader.LoadFunction <pj_free_delegate>(path, "pj_free");
            _pj_transform  = (pj_transform_delegate)FunctionLoader.LoadFunction <pj_transform_delegate>(path, "pj_transform");
            _pj_is_latlong = (pj_is_latlong_delegate)FunctionLoader.LoadFunction <pj_is_latlong_delegate>(path, "pj_is_latlong");
        }
Пример #2
0
        static Proj4()
        {
            // init proj delegates
            var basePath = (IntPtr.Size == 8) ? "x64" : "x86";
            var path     = basePath + "/" + "proj.dll";

            path = Path.GetFullPath(path);

            _pj_init_plus  = (pj_init_plus_delegate)FunctionLoader.LoadFunction <pj_init_plus_delegate>(path, "pj_init_plus");
            _pj_free       = (pj_free_delegate)FunctionLoader.LoadFunction <pj_free_delegate>(path, "pj_free");
            _pj_transform  = (pj_transform_delegate)FunctionLoader.LoadFunction <pj_transform_delegate>(path, "pj_transform");
            _pj_is_latlong = (pj_is_latlong_delegate)FunctionLoader.LoadFunction <pj_is_latlong_delegate>(path, "pj_is_latlong");
        }