TransWikia.com

Replacing NetCDF file under the hood in GeoServer

Geographic Information Systems Asked by sempervent on March 21, 2021

I’m receiving NetCDF files hourly, and would like to update them and then refresh them (as the time steps and values change).

Within the API, I’m not sure which endpoint would be useful after reading the documentation: https://docs.geoserver.org/latest/en/user/rest/index.html

Looking through the documentation I’m unsure of the proper endpoint to call.

My end goal is the replacement of the file on the filesystem followed by a call to refresh the layer with the existing parameters.

One Answer

The geoserver requires a few steps to do this:

  1. Manage the actual file on the remote location with end point

    /resource/{pathToResource}

  2. You will need to create a CoverageStore using the end point

    /workspaces/{workspace}/coveragestores

  3. Add the coverages for each variable in your netcdf from the coverage store using the end point

    workspaces/{workspace}/coveragestores/{store}/coverages

I was never able to update them so instead I checked whether all these steps already existed, if so deleted them and restart the process. resource.

If you are familiar with python, then you might find a project I did a couple years ago useful. It was used for exactly this. In this case we had a layer called latest we updated daily.

https://github.com/USDA-ARS-NWRC/guds

Answered by Micah Johnson on March 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP