Adding a (gpkg) Vector LayerΒΆ

In this section you will publish a GeoPackage vector layer in GeoServer.

  1. Open the GeoServer UI:

    http://localhost:8083/geoserver/web
    
  2. From the Data > Stores page click the Add new Store button

    ../_images/add-new-store.png
  3. Select the GeoPackage format from the Vector section:

    ../_images/gpkg-vec-store.png
  4. Define the store properties:

    Data Source Name: gpkg-countries

    Connection parameters: browse the filesystem to identify the GPKG database:

    (Linux)
    cd ${TRAINING_ROOT}/data/user_data/countries.gpkg
    
    or
    
    (Windows)
    cd %TRAINING_ROOT%\data\user_data directory\countries.gpkg
    
    ../_images/gpkg-new-store-1.png
  5. Click “Save”.

  6. Publish the layer:

    ../_images/gpkg-vec-layer-pub.png
    ../_images/gpkg-vec-layer-edit-0.png

    Click “compute from native bounds”:

    ../_images/gpkg-vec-layer-edit-1.png
  7. Click “Save”.

  8. Preview the layer:

    ../_images/gpkg-vec-layer-preview-0.png
    ../_images/gpkg-vec-layer-preview-1.png