Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.86 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.86 KB

Geopackage Optimizer

This utility uses NGA's Geopackage Optimizer in order to pre-optimize Geopackages for use on the web (MAGE).

Setup

Prerequisites

You will need to have a somewhat recent version of Node.js installed; you can download and install the appropriate version for your operating system, from the official download page.

Getting the Utility

  1. download this utility, as a ZIP file
  2. extract the ZIP to a location of your choosing
  3. move to the location where you extracted the zip: e.g. cd /home/jim/desktop
  4. in a terminal, run npm i to install the required dependencies

Usage

Pre-process every geopackage before you upload it using the instructions below.

  1. open a terminal and navigate to the location where you extracted the ZIP, e.g. cd /home/jim/desktop/gpkg-optimizer
  2. execute the optimize.sh script, giving two arguments: the input GPKG path and the output GPKG path
./optimize.sh 'input_gpkg_path' 'output_gpkg_path'
  1. this may take a lot of time depending on the complexity of the Geopackage you are processing -- be patient
  2. once complete, locate the output GPKG and use this when uploading a new layer within MAGE

Example

Given:

  • you have extracted the ZIP to /home/jim/desktop/gpkg-optimizer
  • you have a Geopackage you'd like to process and it is stored at /home/jim/desktop/my_geopackage.gpkg

Execute the following commands within your terminal:

  1. move to the location where you extracted the zip: cd /home/jim/desktop/gpkg-optimizer
  2. optimize the Geopackage: ./optimize.sh '/home/jim/desktop/my_geopackage.gpkg' '/home/jim/desktop/my_geopackage_optimized.gpkg'
  3. upload /home/jim/desktop/my_geopackage_optimized.gpkg to MAGE