Opened 5 years ago

Closed 5 years ago

#143 closed defect (fixed)

WCPS abstract syntax. Error with scale operation

Reported by: barboni@… Owned by: dmisev
Priority: major Milestone: 8.4
Component: petascope Version: 8.3
Keywords: scale, scaling Cc: piero.campa@…
Complexity:

Description

With WCPS there is a problem using the "scale" function.
The problem is related to the abstract syntax and the braces.

Writing a query following the standard [1], petascope returns an error page.

Without the braces, a query similar to [2] works*.

[1]
scale(
C, { x ( lox : hix ) , y ( loy : hiy ) },
{ red ( cubic , full ), nir ( linear, half ) }
)

[2]
scale(
C, x ( lox : hix ) , y ( loy : hiy )
)

*Thanks to Piero that wrote the query [2] that temporarily fix the problem

Ciao

Damiano

Change History (3)

comment:1 Changed 5 years ago by pcampalani

Patch is pending for this fix.
Now the correct syntax is accepted, e.g.:

scale(C, {
    x:"CRS:1"(0:100),
    y:"CRS:1"(0:200)
})

comment:2 Changed 5 years ago by pcampalani

Patch is pending for this fix.
Now the correct syntax is accepted, e.g.:

scale(C, {
    x:"CRS:1"(0:100),
    y:"CRS:1"(0:200)
})

comment:3 Changed 5 years ago by pcampalani

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

However, I realized that omitting the braces (or even just one..), or generally omitting any kind of parenthesis in a WCPS expression, is observed by the WCPS parser, but no exception is thrown.

I will open an other ticket for this minor problem.

Note: See TracTickets for help on using tickets.