Opened 6 years ago

Closed 6 years ago

#1806 closed defect (fixed)

clip operations with general expressions in the point lists

Reported by: bbell Owned by: bbell
Priority: critical Milestone: 9.7
Component: qlparser Version: development
Keywords: qlparser, clipping, general expression, marray Cc: Dimitar Misev, Vlad Merticariu, Bang Pham Huu, Peter Baumann
Complexity: Medium

Description

In the point list operand of a clip operation, e.g. LineString(0 0, 1 3, -9 19), the values are presently treated as integers and not general expressions, preventing the use of clipping in the marray constructor. For example,

LineString(0-1 0, 1 3 * average_cells(m[0:9,0:3]), -9 19)

is not possible with the current implementation; however, reaching this point is fairly straightforward, as it only requires updating the parser and moving a few lines of code from the constructor of QtMShapeOp to the evaluate method.

Tests are needed, and further error checking may be required.

Change History (5)

comment:1 by bbell, 6 years ago

Component: undecidedqlparser
Priority: majorcritical

comment:2 by bbell, 6 years ago

There is a bit of ambiguity to sort out. At present, the WKT format is enforced, so (0 -1 0) will be interpreted as the vector (0, -1, 0). The problem with this is that the general expression might see 0 -1 as {-1} instead of a pair of distinct points. This ambiguity should be resolved, and test cases should be established to prove consistency.

comment:3 by Dimitar Misev, 6 years ago

the values are presently treated as integers and not general expressions, preventing the use of clipping in the marray constructor

Is there any use case for general expressions in the LineString? It's unclear to me how this "prevents the use of clipping in the marray constructor".

comment:4 by bbell, 6 years ago

A use case where one could vary the coordinates of the operand? What if you have a slice translating through n-D? This would allow a clipping on each slice where the coordinates of the clipping operation may be shifted. In particular, it would allow a sort of "discrete" version of corridors using just a polygon clipping and the marray methods.

comment:5 by bbell, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.