I used vcpkg. I used the instructions from the web site:

https://proj.org/install.html

It did take me awhile to get it working because I needed to customize the process. But now that the DLL is built by default, that's less necessary.

I only use a handful of functions and there are some that I didn't know how to convert to C#. Here's an example of one import that I use.

private const String ProjDLL = "proj.dll";

// PJ *proj_create_crs_to_crs(PJ_CONTEXT *ctx, const char *source_crs, const char *target_crs, PJ_AREA *area)
[DllImport(ProjDLL, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)]
private static extern IntPtr proj_create_crs_to_crs(IntPtr ctx, String source_crs, String target_crs, IntPtr area);

_______________________________________________
PROJ mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/proj

Reply via email to