Skip to content

GEOSERVER WIKI

Dinasoa edited this page Oct 29, 2024 · 1 revision

How to Add the GDAL Plugin Extension to Windows GeoServer

Reference Document: GeoServer GDAL Plugin Documentation

Follow these steps to successfully add the GDAL plugin extension to your GeoServer installation.

1. Download and Install the GDAL Plugin Extension

  1. Download the GDAL plugin extension compatible with your GeoServer version (in this case, version 2.20.2).

  2. Download the GDAL and MapServer package archive.

2. Unzip and Organize the Files

After downloading the two packages:

  • Unzip both packages.

  • Move the contents of the first package (GeoServer GDAL plugin) to:

    C:\GeoServer\webapps\geoserver\WEB-INF\lib
    
    • Make sure to remove the gdal-2.2.0.jar file if it exists.
  • Create a new folder for GDAL within the GeoServer structure:

    C:\GeoServer\webapps\GDAL
    
  • Place the contents of the second package (GDAL and MapServer package) into the GDAL folder you just created. This directory should contain:

    • A /bin folder with executable binaries and DLL files.
    • A /doc folder with necessary documentation.

3. Transfer Required DLL Files

  • Copy the gdal.jar file from:
    C:\GeoServer\webapps\GDAL\bin\gdal\java
    
    • Place it in:
    C:\GeoServer\webapps\geoserver\WEB-INF\lib
    

4. Configure System Environment Variables

To ensure proper GDAL functionality, configure the following environment variables on your system:

set PATH=%PATH%;C:\<unzipped_package>\bin;C:\<unzipped_package>\bin\gdal\java
set GDAL_DRIVER_PATH=C:\<unzipped_package>\bin\gdal\plugins
set GDAL_DATA=C:\<unzipped_package>\bin\gdal-data
  • For optional additional drivers, you may also add these paths:
    C:\<unzipped_package>\bin\gdal\plugins-extra
    C:\<unzipped_package>\bin\gdal\plugins-optional
    
    • Including these paths in GDAL_DRIVER_PATH enables extra format support.

5. Restart GeoServer

After setting up and configuring the environment, restart the GeoServer to apply changes. The GDAL plugin should now be correctly installed and functional.