Opened 13 years ago

Closed 10 years ago

#1318 closed enhancement (fixed)

[raster] Provide some predefined common usage userfunc for ST_MapAlgebraFctNgb

Reported by: pracine Owned by: pracine
Priority: medium Milestone: PostGIS 2.2.0
Component: raster Version: master
Keywords: Cc:

Description

Now that we have ST_MapAlgebraFctNgb we might want to provide some predefined user functions like ST_Max, ST_Min, ST_Sum, ST_Distinct, ST_Mean, ST_StdDev, ST_Range, ST_Quantile, ST_Median, ST_Majority, ST_Minority, ST_Slope, ST_Aspect…

We might want to systematically change the prefix or add a suffix (I would suggest '4MA' i.e. 'for MapAlgebra') to the function names so we know were written to be used with ST_MapAlgebraFctNgb. e.g. ST_Slope4MA()

Change History (8)

in reply to:  description comment:1 by dzwarg, 13 years ago

Owner: changed from pracine to dzwarg
Status: newassigned

Replying to pracine:

Now that we have ST_MapAlgebraFctNgb we might want to provide some predefined user functions like ST_Max, ST_Min, ST_Sum, ST_Distinct, ST_Mean, ST_StdDev, ST_Range, ST_Quantile, ST_Median, ST_Majority, ST_Minority, ST_Slope, ST_Aspect…

We might want to systematically change the prefix or add a suffix (I would suggest '4MA' i.e. 'for MapAlgebra') to the function names so we know were written to be used with ST_MapAlgebraFctNgb. e.g. ST_Slope4MA()

It may make sense for ST_Slope and ST_Aspect to be their own functions that wrap ST_MapAlgebraFctNgb, since the neighborhood is fixed at 3x3.

comment:2 by dzwarg, 13 years ago

Added in r8262:

  • ST_Max4ma
  • ST_Min4ma
  • ST_Sum4ma
  • ST_Mean4ma
  • ST_Range4ma

Added in r8264:

  • ST_Slope

Added in r8265:

  • ST_Aspect

Added in r8274:

  • ST_Hillshade

in reply to:  description comment:3 by dzwarg, 13 years ago

pracine:

Can you elaborate on ST_Quantile? I'm not familiar with what kind of neighborhood operation that would be.

comment:4 by pracine, 13 years ago

Bborie is the true reference for quantiles. You can look at the examples in wikipedia: http://en.wikipedia.org/wiki/Quantile

I would make it low priority as the other ones are more common: ST_Distinct, ST_StdDev, ST_Median, ST_Majority, ST_Minority…

comment:5 by dustymugs, 13 years ago

Agree with making it a low priority to 2.1.

comment:6 by pracine, 13 years ago

Milestone: PostGIS 2.0.0PostGIS 2.1.0
Owner: changed from dzwarg to pracine
Status: assignednew

I postpone it to 2.1 since only ST_Quantile, ST_Median, ST_Majority and ST_Minority are missing and are of lower priority.

comment:7 by dustymugs, 12 years ago

Milestone: PostGIS 2.1.0PostGIS Future

comment:8 by strk, 10 years ago

Milestone: PostGIS FuturePostGIS 2.2.0
Resolution: fixed
Status: newclosed

This seems to be done, reading http://postgis.net/docs/RT_reference.html#Raster_Processing_MapAlgebra_Callbacks

Feel free to reopen (maybe even a new one) for specific new enhancements

Note: See TracTickets for help on using tickets.