Opened 7 years ago

Last modified 7 years ago

#1720 closed defect

Petascope_Throw proper exeception with condenser over a clip Polygon — at Initial Version

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 9.6
Component: petascope Version: development
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

This WCPS query is invalid because clip Polygon returns an MDD instead of a scalar value

for c in (OCCCI_V3_1_chlor_a_monthly)

return

encode (



coverage clipped 

over $ansi ansi(0:12)

values

(

clip(c[ansi($ansi)].chlor_a * 100, 
POLYGON ((57.5 -11.5,56.5 -11.5,55.5 -11.5,54.5 -11.5,53.5 -11.5,52.5 -11.5,51.5 -11.5,50.5 -11.5,49.5 -11.5,49.5 -10.5,49.5 -9.5,49.5 -8.5,49.5 -7.5,48.5 -7.5,47.5 -7.5,47.5 -6.5,47.5 -5.5,46.5 -5.5,45.5 -5.5,45.5 -4.5,45.5 -3.5,45.5 -2.5,44.5 -2.5,44.5 -3.5,44.5 -4.5,44.5 -5.5,44.5 -6.5,44.5 -7.5,44.5 -8.5,44.5 -9.5,43.5 -9.5,43.5 -10.5,43.5 -11.5,43.5 -12.5,43.5 -13.5,43.5 -14.5,43.5 -15.5,43.5 -16.5,43.5 -17.5,43.5 -18.5,43.5 -19.5,43.5 -20.5,43.5 -21.5,43.5 -22.5,43.5 -23.5,43.5 -24.5,43.5 -25.5,43.5 -26.5,43.5 -27.5,43.5 -28.5,43.5 -29.5,43.5 -30.5,43.5 -31.5,43.5 -32.5,43.5 -33.5,43.5 -34.5,43.5 -35.5,43.5 -36.5,43.5 -37.5,43.5 -38.5,43.5 -39.5,43.5 -40.5,43.5 -41.5,43.5 -42.5,43.5 -43.5,44.5 -43.5,45.5 -43.5,46.5 -43.5,47.5 -43.5,48.5 -43.5,49.5 -43.5,50.5 -43.5,51.5 -43.5,52.5 -43.5,53.5 -43.5,54.5 -43.5,55.5 -43.5,55.5 -42.5,55.5 -41.5,55.5 -40.5,55.5 -39.5,55.5 -38.5,55.5 -37.5,55.5 -36.5,55.5 -35.5,55.5 -34.5,55.5 -33.5,55.5 -32.5,55.5 -31.5,55.5 -30.5,55.5 -29.5,55.5 -28.5,55.5 -27.5,55.5 -26.5,55.5 -25.5,55.5 -24.5,55.5 -23.5,56.5 -23.5,57.5 -23.5,57.5 -22.5,57.5 -21.5,57.5 -20.5,57.5 -19.5,57.5 -18.5,57.5 -17.5,57.5 -16.5,57.5 -15.5,57.5 -14.5,57.5 -13.5,57.5 -12.5,57.5 -11.5)) )

)

, "netcdf" 

It returns stack trace for NullException which needs to have proper error message.

Caused by: java.lang.NullPointerException

  at petascope.wcps.encodeparameters.service.ExtraMetadataService.removeMetadataSlices(ExtraMetadataService.java:95)

  at petascope.wcps.encodeparameters.service.ExtraMetadataService.deserializeCoverageMetadata(ExtraMetadataService.java:64)

  at petascope.wcps.parameters.netcdf.service.NetCDFParametersService.buildDimensionVariables(NetCDFParametersService.java:129)

  at petascope.wcps.parameters.netcdf.service.NetCDFParametersService.buildVariables(NetCDFParametersService.java:191)

  at petascope.wcps.parameters.netcdf.service.NetCDFParametersService.buildParameters(NetCDFParametersService.java:85)

  at petascope.wcps.handler.EncodeCoverageHandler.getExtraParams(EncodeCoverageHandler.java:139)

  at petascope.wcps.handler.EncodeCoverageHandler.handle(EncodeCoverageHandler.java:98)

  at petascope.wcps.parser.WcpsEvaluator.visitEncodedCoverageExpressionLabel(WcpsEvaluator.java:329)

  at petascope.wcps.parser.WcpsEvaluator.visitEncodedCoverageExpressionLabel(WcpsEvaluator.java:131)

  at petascope.wcps.parser.wcpsParser$EncodedCoverageExpressionLabelContext.accept(wcpsParser.java:2448)

  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:68)

  at petascope.wcps.parser.wcpsBaseVisitor.visitProcessingExpression(wcpsBaseVisitor.java:229)

  at petascope.wcps.parser.wcpsParser$ProcessingExpressionContext.accept(wcpsParser.java:544)

  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44)

  at petascope.wcps.parser.WcpsEvaluator.visitReturnClauseLabel(WcpsEvaluator.java:302)

  at petascope.wcps.parser.WcpsEvaluator.visitReturnClauseLabel(WcpsEvaluator.java:131)

  at petascope.wcps.parser.wcpsParser$ReturnClauseLabelContext.accept(wcpsParser.java:442)

  at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:44)

Change History (0)

Note: See TracTickets for help on using tickets.