Create a GeoPackage, add a layer and append rows
All vector examples · Vector Raster plugin
Create a GeoPackage from the supplied sites, then distinguish adding a new layer from appending more features to an existing layer.
Before you begin
Download and set up the example project. This walkthrough uses Apache Hop 2.19.0, distribution 0.2.1-SNAPSHOT.build.35761791293.1, with the local run configuration. Keep the supplied input unchanged and use a writable output directory.
Download geopackage.hpl · Complete project ZIP
The individual pipeline requires the data and project configuration from the complete ZIP.
Read the source
- Open
geopackage.hplfrom the example project. - Click Read vector and choose Edit. The file is
${PROJECT_HOME}/data/sites.gpkg, formatAUTO, layersites, and geometry output fieldgeometry. - Use the source schema/preview controls to inspect the fields. Expect
site_id,name,height_mand a geometry field. The source contains three point features in EPSG:2056. - Close the reader dialog with OK, then click the writer and choose Edit.
Configure the writer
| Setting | Value |
|---|---|
| Format | GEOPACKAGE |
| Output file | ${PROJECT_HOME}/output/sites.gpkg |
| Layer | sites |
| Geometry field | geometry |
| Assign CRS | EPSG:2056 |
| Write mode (Schreibmodus) | Neue Datei erstellen (CREATE_FILE) |
| Create spatial index | On |
Run and check the result
Run geopackage.hpl once. Expect a new GeoPackage with a sites layer containing three points.
Add a second layer
Open geopackage-add-layer.hpl. It uses the same input and output file, but the writer’s layer is sites_copy and its mode is Neuen Layer hinzufügen (ADD_LAYER). Run once: the file now contains two layers, each with three features. The original sites layer remains intact.
Append to an existing layer
Open geopackage-append.hpl. The writer targets sites with Features hinzufügen (APPEND_FEATURES). Run once: sites now has six features, while sites_copy still has three. Each original site_id occurs twice in sites; this example intentionally appends duplicates. It is not an update or upsert.
Use Vector Reader to open the output GeoPackage and explicitly select each layer when inspecting the result.
Things to watch out for
CREATE_FILErequires a new file;ADD_LAYERrequires a new layer name;APPEND_FEATURESrequires a compatible existing target layer.- GeoPackage uses its own write modes. The generic overwrite checkbox does not replace an existing GeoPackage.
- Every repeat of the append pipeline adds another three rows. Start from a fresh output file when reproducing the stated counts.
- This plugin’s GeoPackage vector output is XY. Do not silently discard Z/M from real source data.
- Geometry inference needs a non-NULL geometry. Check empty or entirely NULL source streams separately.
The CRS controls assign a coordinate reference system; they do not reproject coordinates. All coordinates in this example already use EPSG:2056.



