1

Currently, I have included the NetCDF plugin into GeoServer v.2.10.1 to add data store, which works pretty fine for me to add .nc and .nc4 files including publishing the layer without any error.

Next I would like to see if I can GetCoverage for the NetCDF data store / layer. I was able to get coverage name using GetCapabilities using WCS v.1.1.0 and also using DescribeCoverage operation I was able to get bounding box and CRS details along with supported formats.

<?xml version="1.0"?>
<CoverageDescriptions schemaLocation="http://www.opengis.net/wcs/1.1.1 http://localhost:8080/geoserver/schemas/wcs/1.1.1/wcsDescribeCoverage.xsd">
<CoverageDescription>
    <Title>SRTMTestNC3</Title>
    <Abstract>Generated from NetCDF</Abstract>
    <Keywords>
        <Keyword>WCS</Keyword>
        <Keyword>NetCDF</Keyword>
        <Keyword>Band1</Keyword>
    </Keywords>
    <Identifier>SRTM:SRTMTestNC3</Identifier>
    <Domain>
        <SpatialDomain>
            <BoundingBox crs="urn:ogc:def:crs:OGC:1.3:CRS84" dimensions="2">
                <LowerCorner>5.9998611111111115 -1.388888888889E-4</LowerCorner>
                <UpperCorner>7.000138888888889 1.000138888888889</UpperCorner>
            </BoundingBox>
            <BoundingBox crs="urn:ogc:def:crs:EPSG::4326" dimensions="2">
                <LowerCorner>-1.388888888889E-4 5.9998611111111115</LowerCorner>
                <UpperCorner>1.000138888888889 7.000138888888889</UpperCorner>
            </BoundingBox>
            <GridCRS>
                <GridBaseCRS>urn:ogc:def:crs:EPSG::4326</GridBaseCRS>
                <GridType>urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs</GridType>
                <GridOrigin>6.0 1.0</GridOrigin>
                <GridOffsets>2.777777777777778E-4 0.0 0.0 -2.777777777777778E-4</GridOffsets>
                <GridCS>urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS</GridCS>
            </GridCRS>
        </SpatialDomain>
    </Domain>
    <Range>
        <Field>
            <Identifier>contents</Identifier>
            <Definition>
                <AllowedValues>
                    <Range>
                        <MinimumValue>0.0</MinimumValue>
                        <MaximumValue>0.0</MaximumValue>
                    </Range>
                </AllowedValues>
            </Definition>
            <NullValue>0.0</NullValue>
            <InterpolationMethods>
                <InterpolationMethod>nearest</InterpolationMethod>
                <InterpolationMethod>linear</InterpolationMethod>
                <InterpolationMethod>cubic</InterpolationMethod>
                <Default>nearest neighbor</Default>
            </InterpolationMethods>
            <Axis identifier="Bands">
                <AvailableKeys>
                    <Key>Source</Key>
                </AvailableKeys>
            </Axis>
        </Field>
    </Range>
    <SupportedCRS>urn:ogc:def:crs:EPSG::4326</SupportedCRS>
    <SupportedCRS>EPSG:4326</SupportedCRS>
    <SupportedFormat>image/tiff</SupportedFormat>
    <SupportedFormat>text/plain</SupportedFormat>
    <SupportedFormat>application/x-netcdf</SupportedFormat>
    <SupportedFormat>image/png</SupportedFormat>
    <SupportedFormat>image/jpeg</SupportedFormat>
</CoverageDescription>
</CoverageDescriptions>

I tried getting coverage using GetCoverage operation of WCS v.1.1.0 but there is some strange error I am getting for that request. (I have tested GetCoverage operation for GeoTIFF's and other data stores / layers, it works fine, problem with only NetCDF).

<?xml version="1.0"?>
<ExceptionReport version="1.1.0" schemaLocation="http://www.opengis.net/ows/1.1 http://localhost:8080/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<Exception exceptionCode="NoApplicableCode">
    <ExceptionText>java.lang.IllegalArgumentException: The input argument(s) may not be null.
    The input argument(s) may not be null.</ExceptionText>
</Exception>
</ExceptionReport>

I am using following request.

http://localhost:8080/geoserver/ows?service=WCS&version=1.1.0&request=GetCoverage&identifier=SRTM:SRTMTestNC3&BOUNDINGBOX=5.9998611111111115,-0.0001388888888889,7.000138888888889,1.000138888888889,urn:ogc:def:crs:OGC:1.3:CRS84&FORMAT=image/tiff&store=true

There is not much I can find in logs of GeoServer which input argument is missing, here are the logs.

org.vfny.geoserver.wcs.WcsException: java.lang.IllegalArgumentException: The input argument(s) may not be null.
    at org.geoserver.wcs.DefaultWebCoverageService111.getCoverage(DefaultWebCoverageService111.java:565)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.geoserver.ows.util.RequestObjectLogger.invoke(RequestObjectLogger.java:55)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy61.getCoverage(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.geoserver.ows.Dispatcher.execute(Dispatcher.java:850)
    at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:268)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:859)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
    at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
    at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
    at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
    at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:152)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: The input argument(s) may not be null.
    at javax.media.jai.PlanarImage.wrapRenderedImage(PlanarImage.java:576)
    at org.geotools.coverage.io.netcdf.NetCDFResponse.prepareCoverage(NetCDFResponse.java:487)
    at org.geotools.coverage.io.netcdf.NetCDFResponse.processRequest(NetCDFResponse.java:277)
    at org.geotools.coverage.io.netcdf.NetCDFResponse.createResponse(NetCDFResponse.java:142)
    at org.geotools.coverage.io.netcdf.NetCDFSource.read(NetCDFSource.java:65)
    at org.geotools.coverage.io.netcdf.NetCDFReader.read(NetCDFReader.java:487)
    at org.geoserver.catalog.SingleGridCoverage2DReader.read(SingleGridCoverage2DReader.java:151)
    at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:232)
    at org.geoserver.catalog.CoverageDimensionCustomizerReader.read(CoverageDimensionCustomizerReader.java:222)
    at org.geoserver.wcs.DefaultWebCoverageService111.getCoverage(DefaultWebCoverageService111.java:358)
    ... 100 more

I already have NetCDF output plugin installed in GeoServer, and also able to view the same layer using WMS request (using OpenLayers) for GeoServer.

Are there any extra configuration needed to get Coverage for NetCDF files / output?

Your Answer

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

Browse other questions tagged or ask your own question.