-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[GEOS-11595] CoverageRATs check for PAM Resource is failing when checking CoverageViews #8025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GEOS-11595] CoverageRATs check for PAM Resource is failing when checking CoverageViews #8025
Conversation
3d8470b
to
7f7b328
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks overall good, see comments below
return null; | ||
} | ||
|
||
private ResourceInfo createResourceInfoFromView() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically a one liner, can be in-lined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
return resourceInfo; | ||
} | ||
|
||
private ResourceInfo createPAMResourceInfoFromView( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
/** A ResourceInfo wrapper for CoverageViews */ | ||
public class CoverageViewResourceInfo extends DefaultResourceInfo { | ||
|
||
public CoverageViewResourceInfo(CoverageView coverageView) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this subclass, just return DefaultResourceInfo, it can be instantiated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
return inputAlphaNonNull; | ||
} | ||
|
||
public static class InputAlphaNonNullCoverages { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a better name... maybe ViewInputs? Also, does not seem like it needs to be public, package private should be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed and made package private.
for (CoverageView.CoverageBand band : info.getBands()) { | ||
for (CoverageView.InputCoverageBand inputCoverageBand : band.getInputCoverageBands()) { | ||
// get the reader for the coverage associated with this input coverage band | ||
GridCoverageReader reader1 = readers.get(inputCoverageBand.getCoverageName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see the need for the "1" suffix.
GridCoverageReader reader1 = readers.get(inputCoverageBand.getCoverageName()); | |
GridCoverageReader reader = readers.get(inputCoverageBand.getCoverageName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
* | ||
* @param inputAlphaNonNullCoverages input alpha non-null coverages | ||
*/ | ||
public CoverageViewPamResourceInfo( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not need like you need the coverages to build the "info" object, so I'd avoid collecting them, reading the raster can allocate actual memory for nothing, depending on the data source (e.g., GeoTIFF does delayed loading, but NetCDF does not).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coverages instantiation made optional
@@ -0,0 +1,126 @@ | |||
package org.geoserver.rat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright header missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
…king CoverageViews pieces in place fixed indexing issue cleanup added test transitioning to creating ResourceInfo more cleanup cleanup cleanup pmd missing copyright cleanup style PR Changes
7f7b328
to
6a66bbf
Compare
pieces in place
fixed indexing issue
cleanup
added test
Checklist
main
branch (backports managed later; ignore for branch specific issues).For core and extension modules:
[GEOS-XYZWV] Title of the Jira ticket
.