Pyproj

PROJ is a library for performing conversions between cartographic projections.

Pyproj is basically a wrapper around it, for interacting with it from the python runtime.

There are currently no binary wheels for PyPROJ available on ARM64 Windows, so we need to build it from scratch. To do this, we need to build the underlying project, PROJ.

Compile PROJ

Open an x64 → ARM64 cross-compilation terminal (this was tested with VS2022, but should work with other versions also).

Clone the PROJ repository from GitHub - OSGeo/PROJ: PROJ - Cartographic Projections and Coordinate Transformations Library - note, currently you will need to pull the latest master, however a backport should soon go out with a release.

Clone the VCPKG repository from GitHub - microsoft/vcpkg: C++ Library Manager for Windows, Linux, and MacOS, and then switch to that directory - note, the README in that repository contains a few tips in the event of issues. Then execute the following commands:

.\bootstrap-vcpkg.bat vcpkg install sqlite3[core,tool]:arm64-windows vcpkg install tiff:arm64-windows vcpkg install curl:arm64-windows

Then, CD to the directory you cloned PROJ into, and execute the following commands (it is assumed that VCPKG is located in C:\vcpkg for the purposes of this example):

set VCPKG_INSTALLED=c:\vcpkg\installed\arm64-windows set PATH=%VCPKG_INSTALLED%\bin;%VCPKG_INSTALLED%\tools;%PATH% set PROJ_BUILD=%CD%\build mkdir %PROJ_BUILD% set PROJ_DIR=%CD%\proj_dir mkdir %PROJ_DIR% cd %PROJ_BUILD% cmake -DCMAKE_GENERATOR=Ninja -DCMAKE_BUILD_TYPE="RELEASE" -DBUILD_SHARED_LIBS="ON" -DCMAKE_C_FLAGS="/WX" -DCMAKE_CXX_FLAGS="/WX" -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_INSTALL_PREFIX="%PROJ_DIR%" .. ninja -v ninja install

It is then possible to install pyproj via the command:

pip install pyproj