Ticket #1520 (closed defect: fixed)

Opened 16 months ago

Last modified 16 months ago

[raster] ST_MapAlgebraExpr : do not convert expression to uppercase

Reported by: strk Owned by: dzwarg
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: trunk
Keywords: Cc:

Description

Converting the expression to uppercase breaks it. I'm trying to execute reprojections within the expression, and proj4 doesn't accept '+PROJ=LATLON' nicely...

Change History

Changed 16 months ago by pracine

Probably we can search for 'rast' in a non case sensitive way instead of converting the expression to uppercase.

Changed 16 months ago by dustymugs

I've made the appropriate changes for 2-raster ST_MapAlgebraExpr to be case-sensitive. So the keywords are now RAST1 and RAST2. Committed is r8999.

Changed 16 months ago by pracine

So if I write 'rast2 + rast1' it does not work anymore?

Changed 16 months ago by dustymugs

Correct. We could support both upper and lower case.

Changed 16 months ago by strk

Since things are moving, could we also protect the keywords a bit more ? So that it is less likely that your expression wants to use the "rast" substring in the name of a function or a table or a column ?

Also, since I added "rast.x" and "rast.y", could the current "rast" also become "rast.val" and unify the set of keywords in both 1-raster and 2-raster versions ? Like for 2-rasters could be "rast.x", "rast.y", "rast.val1", "rast.val2"

Changed 16 months ago by dustymugs

I wish you hadn't added "rast.x" and "rast.y" before everyone had a chance to agree to the keywords to be added and their definitions.

Changed 16 months ago by pracine

And it would not be "rast.val1", "rast.val2" but "rast1.val", "rast2.val"...

And if the two rasters are not aligned there is no reason that rast1.x is equal to rast2.x so we would need the two names.

Changed 16 months ago by strk

@dustymugs, nothing is set in stones, 2.0 isn't out yet. @pracine: I wasn't thinking about the unalignment, so right, could be the index is always in the rast part.

Changed 16 months ago by dustymugs

Since we're changing and adding the keywords used, we might as well create another ticket to decide on the keywords and leave this ticket exclusively for preventing the conversion of the expressions to upper-case.

Changed 16 months ago by dustymugs

  • owner changed from pracine to dzwarg

Changed 16 months ago by strk

  • status changed from new to closed
  • resolution set to fixed

Fixed in r9031

Note: See TracTickets for help on using tickets.