Opened 12 years ago

Closed 12 years ago

#143 closed defect (fixed)

WCPS abstract syntax. Error with scale operation

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

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 by Piero Campalani, 12 years ago

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 by Piero Campalani, 12 years ago

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 by Piero Campalani, 12 years ago

Resolution: fixed
Status: newclosed

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.