Issue Details (XML | Word | Printable)

Key: BEAM-986
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Norman Fomferra
Reporter: Luis Veci
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
BEAM

ProductSubsetBuilder to use virtual bands as real bands for GPF

Created: 17/Apr/09 07:34 PM   Updated: 04/Jun/09 09:07 AM
Component/s: General
Affects Version/s: 4.5.2
Fix Version/s: None


 Description  « Hide
When using the ProductSubsetBuilder within an Operator, it's useful to optionally have the ProductSubset build treat virtual bands as real bands so that target products have real bands without any dependencies to bands that may not exist anymore.

In addBandsToProduct()

                boolean treatVirtualBandsAsRealBands = false;
                if(getSubsetDef() != null && getSubsetDef().treatVirtualBandsAsRealBands())
                    treatVirtualBandsAsRealBands = true;

                //@todo 1 se/se - extract copy of a band or virtual band to create deep clone of band and virtual band
                if (!treatVirtualBandsAsRealBands && sourceBand instanceof VirtualBand) {
                    VirtualBand virtualSource = (VirtualBand) sourceBand;
                    VirtualBand virtualBand = new VirtualBand(bandName,
                                                              sourceBand.getDataType(),
                                                              getSceneRasterWidth(),
                                                              getSceneRasterHeight(),
                                                              virtualSource.getExpression());
                    virtualBand.setCheckInvalids(virtualSource.getCheckInvalids());
                    destBand = virtualBand;
                } else {
                    destBand = new Band(bandName,
                                        sourceBand.getDataType(),
                                        getSceneRasterWidth(),
                                        getSceneRasterHeight());
                }

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.