Opened 6 years ago

Last modified 2 years ago

#2557 new defect

[raster]: ST_MapAlgebra doco page needs lots of work

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS Fund Me
Component: documentation Version: 2.1.x
Keywords: Cc:

Description

In reading thru:

http://postgis.net/docs/manual-dev/RT_ST_MapAlgebra.html

The page is very inconsistent.

1) It presents a callbackfunction example which uses the keyword position (unquoted).

2) The callbackfunction says the position should be 2-dimensions position integer[][]

but then later it says

position integer[]

3) The last example of Variant 1 is borken - has an invalid CTE and probalby invalid other things as well like use of a non-existent call back function that doesn't even agree with the definition of what the call back function is described to contain.

My guess is this page wasn't fully done to confirm to whent eh regproc signature changed to support both ngb and non-ngb map algebra callback functions

Change History (5)

comment:1 Changed 6 years ago by robe

I take back doesn't agree with definition of callback regprocedure. I think we need to clarify somewhere that arrays like pos[][] in PostgreSQL mind are just same as pos[] though we choose to define it as pos[][] for clarity.

comment:2 Changed 6 years ago by Bborie Park

Looking at that page, it does look like it could use some work.

  1. "position" is a keyword for PostgreSQL? I only find a string function by that name.
  1. I agree regarding the mixing of position[][] and position[] as that is confusing to the user but not PostgreSQL.
  1. Wow, I don't remember how I could have written that example as I do remember testing a query like that and copying it into the example (bad copy?). It looks like the "WITH foo" just needs to be replaced with ", foo".

My guess (especially since I wrote that page) is that I never reviewed the page after I wrote it. The function does support ngb and non-ngb callbacks though...

comment:3 Changed 6 years ago by robe

Milestone: PostGIS 2.1.2PostGIS 2.2.0

comment:4 Changed 4 years ago by robe

Milestone: PostGIS 2.2.0PostGIS Future

comment:5 Changed 2 years ago by robe

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.