1

I'm using org.geotools.process.raster.AddCoveragesProcess class, to add two raster's with same resolution and buonding box.

I get the following exception

java.lang.IllegalArgumentException: Range [-∞ .. -∞] is not valid.

when the process runs.

I'm using the following code:

    GridCoverage2D coverageA = ...;
    GridCoverage2D coverageB = ...;
    AddCoveragesProcess pr = new AddCoveragesProcess();
    GridCoverage2D res = pr.execute(coverageA, coverageB, null);

What is the reason for this exception?

gdalinfo of the first input raster is:

Driver: GTiff/GeoTIFF
Files: //indchange/C/tomcat/webapps/geoserver/data/data/datasets_cibio/Incendios
/Recorrencia/FireRecurrence_1990_2013.tif
       //indchange/C/tomcat/webapps/geoserver/data/data/datasets_cibio/Incendios
/Recorrencia/FireRecurrence_1990_2013.tif.aux.xml
Size is 464, 324
Coordinate System is:
PROJCS["WGS 84 / UTM zone 29N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32629"]]
Origin = (506000.000000000000000,4671000.000000000000000)
Pixel Size = (500.000000000000000,-500.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  506000.000, 4671000.000) (  8d55'38.40"W, 42d11'28.07"N)
Lower Left  (  506000.000, 4509000.000) (  8d55'44.20"W, 40d43'54.89"N)
Upper Right (  738000.000, 4671000.000) (  6d 7' 9.61"W, 42d 9'17.90"N)
Lower Right (  738000.000, 4509000.000) (  6d10'59.15"W, 40d41'51.19"N)
Center      (  622000.000, 4590000.000) (  7d32'21.70"W, 41d27' 8.34"N)
Band 1 Block=464x2 Type=Float64, ColorInterp=Gray
  Min=0.000 Max=10.000
  Minimum=0.000, Maximum=10.000, Mean=0.564, StdDev=1.033
  NoData Value=-1.6999999999999999e+308
  Metadata:
    STATISTICS_MAXIMUM=10
    STATISTICS_MEAN=0.56351577016252
    STATISTICS_MINIMUM=0
    STATISTICS_STDDEV=1.0328440532185

gdalinfo of the second input raster is:

Driver: GTiff/GeoTIFF
Files: //indchange/C/tomcat/webapps/geoserver/data/data/datasets_cibio/Atributos
_funcionais_EO/Produtividade_relativa/RelativePrimaryProductivity_2001_2010.tif
Size is 464, 324
Coordinate System is:
PROJCS["WGS 84 / UTM zone 29N",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-9],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","32629"]]
Origin = (506000.000000000000000,4671000.000000000000000)
Pixel Size = (500.000000000000000,-500.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  506000.000, 4671000.000) (  8d55'38.40"W, 42d11'28.07"N)
Lower Left  (  506000.000, 4509000.000) (  8d55'44.20"W, 40d43'54.89"N)
Upper Right (  738000.000, 4671000.000) (  6d 7' 9.61"W, 42d 9'17.90"N)
Lower Right (  738000.000, 4509000.000) (  6d10'59.15"W, 40d41'51.19"N)
Center      (  622000.000, 4590000.000) (  7d32'21.70"W, 41d27' 8.34"N)
Band 1 Block=464x2 Type=Float64, ColorInterp=Gray
  Min=-0.017 Max=0.273
  Minimum=-0.017, Maximum=0.273, Mean=1.000, StdDev=1.000
  NoData Value=-1.6999999999999999e+308
  Metadata:
    STATISTICS_MAXIMUM=0.27271457413343
    STATISTICS_MEAN=1.#SNAN
    STATISTICS_MINIMUM=-0.017239777866394
    STATISTICS_STDDEV=1.#SNAN

entire stracktrace is:

java.lang.IllegalArgumentException: Range [-∞ .. -∞] is not valid.
    at org.geotools.coverage.Category.<init>(Category.java:364)
    at org.geotools.coverage.Category.<init>(Category.java:325)
    at org.geotools.coverage.processing.OperationJAI.deriveCategory(OperationJAI.java:849)
    at org.geotools.coverage.processing.OperationJAI.deriveSampleDimension(OperationJAI.java:800)
    at org.geotools.coverage.processing.OperationJAI.deriveGridCoverage(OperationJAI.java:580)
    at org.geotools.coverage.processing.OperationJAI.doOperation(OperationJAI.java:314)
    at org.geotools.coverage.processing.CoverageProcessor.doOperation(CoverageProcessor.java:601)
    at org.geotools.coverage.processing.CoverageProcessor.doOperation(CoverageProcessor.java:623)
    at org.geotools.process.raster.AddCoveragesProcess.execute(AddCoveragesProcess.java:68)
    at indchange.shared.process.raster.ProcessRasterAdd.getResult(ProcessRasterAdd.java:40)
    at indchange.shared.process.raster.AbstractRasterProcess.getProperties(AbstractRasterProcess.java:48)
    at indchange.server.ProcessServiceImpl.getProcessProperties(ProcessServiceImpl.java:146)
    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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:68)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Unknown Source)
  • 1
    Can you share the gdalinfo on the input data as well as an entire stracktrace? – simogeo Sep 23 '15 at 0:15

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.