2

I have a problem when I try to get a value from my group of layers.

I have some NetCDFs in geoserver that update every 6 hours.

In my code, I get the data from them with getGetFeatureInfoUrl. I use the parameter time to specify which value I want.

http://server/geoserver/trafikoa/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=trafikoa%3Aval_met&tiled=false&STYLES=&LAYERS=trafikoa%3Aval_met&tilesOrigin=-11.997193701565266%2C35.905838049948215&INFO_FORMAT=text%2Fjavascript&FEATURE_COUNT=50&X=117&Y=65&WIDTH=256&HEIGHT=256&SRS=EPSG%3A3857&BBOX=-303302.12823557854%2C5283327.395071384%2C-298410.1584253273%2C5288219.364881635&time=2017-02-17T00:00:00.000Z

The first time I get the value, it returns OK, but when I update the NetCDF, it returns the value from 06:00:00 and not 00:00:00.

I think, somehow it's cached or something because if I remove the layer from geoserver and create again, it works fine.

How do I have to set up Geoserver?

1

NetCDF files are associated with a index file containing information about available times and the like in a sidecar directory. I believe you should be remove that, and then hit "reset" in the GeoServer UI status panel (or do the equivalent with the REST API)

  • It worked, thanks! I made a code in php and used REALOAD of the Rest Api – Raúl Ruiz Canas Feb 27 '17 at 9:44
0

You should set time zone before doing that.

-Duser.timezone=GMT

See this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.