#1133 closed defect (fixed)

inserting mulitband file with > 128 bands causes validation error

Reported by: vmerticariu Owned by: vmerticariu
Priority: major Milestone:
Component: undecided Version: development
Keywords: Cc:
Complexity: Medium


There are 2 requests sent, one that establishes the coverage, containing 1 point, that succeeds. The second one updates the coverage with the actual data, and it fails.
The problem is in the validator, before making any changes to the coverage it makes sure that the metadata (which includes the number of fields, or bands) stays the same.

Looking into the code I see that this is done using this line:

check if the coverages have the same number of bands
if(currentCoverage.getNumberOfBands() != inputCoverage.getNumberOfBands()){

The method return boxed ints, aka Integer objects, so equality of the 2 objects is never met with "==" (it works for Integers smaller than 128 because java automatically casts them to int).

Change History (2)

comment:1 Changed 15 months ago by bphamhuu

An exception from wcst_import will help for understanding also

Error Text: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ows:ExceptionReport version="2.0.0"
    xsd:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"
    xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
    <ows:Exception exceptionCode="InconsistentChange">
        <ows:ExceptionText>The number of bands (swe:field elements) of target coverage (found 128) and input coverage (found 128) don't match.</ows:ExceptionText>


comment:2 Changed 15 months ago by bphamhuu

  • Resolution set to fixed
  • Status changed from new to closed

Vlad: your patch was accepted, so I will close ticket here.

Note: See TracTickets for help on using tickets.