Skip to content

a very simple geoserver plugin which allows to redirect uploaded resources via the REST interface under /mnt/geoserver_geodata

Notifications You must be signed in to change notification settings

camptocamp/geoserver-custom-restpathmapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

About

This repository contains the code to implement a Rest PAthMapper which saves uploaded resources under /mnt/geoserver_geodata instead of <geoserver datadir>/data.

As we consider the geoserver datadir as a configuration directory, storing raw (binary) data is not relevant and we want to use a dedicated directory for this purpose instead.

Usage

Just compile the module using:

$ mvn clean package

then copy the JAR file generated under target/ directly into your GeoServer classpath (e.g. WEB-INF/lib).

Test

You can runtime test using the docker composition provided under src/docker:

With a zipped shapefile:

$ cd src/docker
$ docker compose up -d
[...]
$ curl -u admin:geoserver --data-binary @armoires.zip -X PUT \
    'http://localhost:8080/geoserver/rest/workspaces/cite/datastores/armoires/file.shp?update=overwrite' \
    -H 'Content-Type: application/zip'

With a geotiff:

% curl -u admin:geoserver --data-binary @sample.tif -X PUT \
    'http://localhost:8080/geoserver/rest/workspaces/cite/coveragestores/tiff/file.geotiff?update=overwrite' \
    -H 'Content-Type: image/geotiff

About

a very simple geoserver plugin which allows to redirect uploaded resources via the REST interface under /mnt/geoserver_geodata

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages