Hello,
I don't think it's a openlayers problem, i'm making a little leaflet apps
to show the geoserver data and it's the same. If i look at the result of
the WMS query it's an empty png.
Here the curls i use :
****************************************************
*** DELETE LAYER ****
****************************************************
Removing layergroup
=============
curl -u login:password -XDELETE "
http://ip:8080/geoserver/rest/workspaces/TEST/layergroups/waves_201603.xml"
Removing a NetCDF table
================
curl -u login:password -XDELETE "
http://ip:8080/geoserver/rest/workspaces/TEST/coveragestores/waves?recurse=true&purge=all
"
Removing styles
==========
curl -u login:password -XDELETE "
http://ip:8080/geoserver/rest/styles/raster_waves.sld"
Reload geoserver
===========
curl -v -u login:password -XPOST http://ip:8080/geoserver/rest/reload
****************************************************
*** ADD LAYER ****
****************************************************
Adding a netcdf store
==============
curl -u login:password -v -POST -H "Content-type:text/xml" -d
"<coverageStore><name>waves</name><workspace>TEST</workspace><enabled>true</enabled><type>NetCDF</type><url>file:workspaces/TEST/waves.netcdf</url></coverageStore>"
"http://ip:8080/geoserver/rest/workspaces/TEST/coveragestores?configure=all"
Adding a raster layer
=============
curl -u login:password -XPUT -H "Content-type:application/netcdf"
--data-binary @//home/local/TEST_WAVES_GIS.nc
http://ip:8080/geoserver/rest/workspaces/TEST/coveragestores/waves/file.netcdf
Change layer name
============
curl -u login:password -XPUT -H "Content-type:text/xml" -d
"<coverage><name>waves_hs</name><enabled>true</enabled></coverage>" "
http://ip:8080/geoserver/rest/workspaces/TEST/coveragestores/waves/coverages/magnitude
"
Adding a SLD (Styled Layer Description) for layers
===============================
curl -u login:password -XPUT -H "Content-type:text/xml" -d
"<layer><defaultStyle><name>raster_waves</name></defaultStyle><enabled>true</enabled></layer>"
http://ip:8080/geoserver/rest/layers/waves_hs'
Adding time dimension and interpolation methods
===============================
curl -u login:password -XPUT -H "Content-type:text/xml" -d
"<coverage><name>waves_hs</name><enabled>true</enabled><defaultInterpolationMethod>bilinear</defaultInterpolationMethod><metadata><entry
key='time'><dimensionInfo><enabled>true</enabled><presentation>LIST</presentation><units>ISO8601</units></dimensionInfo></entry></metadata></coverage>"
"
http://ip:8080/geoserver/rest/workspaces/TEST/coveragestores/waves/coverages/waves_hs
"
Create layer group : waves_201603.xml
============
<layerGroup>
<name>waves_201603</name>
<layers>
<layer>waves_dp</layer>
<layer>waves_tp</layer>
<layer>waves_hs</layer>
<layer>waves_direction_vector</layer>
</layers>
<styles>
<style>raster_invisible</style>
<style>raster_invisible</style>
<style>raster_waves</style>
<style>direction_arrow</style>
</styles>
</layerGroup>
Adding a layer group
=============
curl -u login:password -XPOST -d @//home/local/waves_201603.xml -H
"Content-type: text/xml"
http://ip:8080/geoserver/rest/workspaces/TEST/layergroups
Reload geoserver
===========
curl -v -u login:password -XPOST http://ip:8080/geoserver/rest/reload
Regards
2017-03-22 23:08 GMT+01:00 P O'Toole <[email protected]>:
> Thomas -
>
> >current netcdf become unavailable to see. It is created and enable in
> >geoserver storage, layers and group also but when going to layer preview
> >there is nothing.
>
> I have not had great experience with Geoserver's layer-previews reliably
> working in general. Sometimes it seems they refuse to work, even though the
> services themselves are perfectly fine. If you can provide the essential
> REST-config commands you're sending to Geoserver to add a new
> layer/store/etc. and share a (sample) netcdf-file that fails to preview
> after adding it that way, that may be useful to maintainers so that they
> can make fixes.
>
> In the meantime if it's difficult to know in your script if layer-previews
> aren't going to work, you might just have the same scripts that create the
> netcdf-files issue a series of WMS-requests after creating the new services
> in Geoserver, and save PNG-images or something so they can be examined by a
> human.
>
> - Patrick O'Toole
>
> Application Developer
> Wyoming Natural Diversity Database
> UW Berry Biodiversity Conservation Center
> Department 3381, 1000 E. University Av.
> Laramie, WY 82071
> P: 307-766-3018
>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users