| pktools 2.6.7 Processing Kernel for geospatial data

installation_windows

# Installation on Windows machines

## Dependencies: OSGeo4W and Visual Studio redistributables

Download and install the ​32bit or ​64bit (preferred) version of OSGeo4W. The basic installation with GDAL contains most dependencies that are required for pktools.

Download and install the ​redistributables for Visual Studio 2015.

Please make sure the latest version of pktools is always installed. Changes with respect to the previous versions can be checked in the text file Changelog. Older versions of pktools were installed with a setup exe file. They should be uninstalled first via Programs and Features in Control Panel.

## Binary packages of pktools

Binary packages of pktools are available for Windows on the ftp server. Latest versions are only available for 64bit architectures. Older versions of pktools are also available for 32 bit architectures

Unzip the archives to your local hard drive. Then copy the pktools folder in the OSGeo apps directory (e.g., "C:\OSGeoW64\apps")

## Manual installation via cmake

If you prefer to compile pktools yourself, the easiest way is to use CMake. First, install CMake on your machine (version 3.0 or higher). These dependency packages must also be pre-installed: Armadillo and NLOpt (for the utility pkoptsvm only).

Set the source directory in CMake to the pktools directory. Build out-of-source by setting a "build" directory, where binaries will be created.

Specify the generator for building the pktools (e.g., Visual Studio 14 2015 Win64 for 64 bit architectures). You can leave the default native compilers checked.

Add the OSGeoW64 and armadillo paths to the CMAKE_INSTALL_PREFIX (via the button "add Entry"). Other paths for dependencies on FANN and NLOPT should also be added here.

Click on the "Configure" button.

Under "BUILD" you can now select extra utilities based on FANN, LIBLAS and NLOPT. Click again on "Configure". Make sure all dependencies are resolved.

Then press "Generate".

A Visual Studio project (PKTOOLS.sln) will be created in the build directory. Open the project in Visual Studio and build the solution.

## How to run pktools in Windows

The pktools utilities can be run from the command line using the OSGEo4W Shell. A selection of them can also be run from within QGIS, via the Processing Toolbox.

To run the pktools utilities from a simple Windows cmd shell, you first have to set some environment variables. This can be done by executing the batch file o4w_env.bat, located in OSGeo4W64\bin from within the cmd shell.