[Note] Install GeoServer PGRaster community module

Note lại để tìm hiểu tiếp =))

Previous setup

We already have srtm_1arc_v3.tif raster on the postgis_raster database, in the rasters.dem table. The import was done using:

[Note] Querying PostGIS Raster Data in PosstgreSQL

Install GeoServer PGRaster community module

We will need the GeoServer PGRaster community module.

Download and install the version for your current GeoServer installation.

Restart Geoserver.

Configure ImageMosaicJDBC store

Step 1: configuration files

We need some configuration files for the ImageMosaicJDBC plugin.

Put these files in our GEOSERVER_DATA_DIR/data.

File connect.pgraster.xml.inc

File mapping.pgraster.xml.inc

File mosaicpgraster.pgraster.xml

Step 2: Supporting tables and data

We need one additional table on our postgis_raster database to store simple mosaic metadata.

Add our raster to this mosaic metadata table, assigning the name mosaicpgraster:

Step 3: Create a new datastore

Create a new ImageMosaicJDBC store.

For the URL, use the file we created: file:data/mosaicpgraster.pgraster.xml.

Add data store

Save it.

Step 4: Create a new layer from the store

Step 5: Preview the layer

Layer preview

https://github.com/lcalisto/workshop-postgis-raster/blob/master/doc/geoserver.md