[postgis-tickets] [PostGIS] #2312: [raster] st_circle
PostGIS
trac at osgeo.org
Sat May 18 11:39:54 PDT 2013
#2312: [raster] st_circle
-------------------------+--------------------------------------------------
Reporter: nclay | Owner: dustymugs
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS Future
Component: raster | Version: trunk
Keywords: |
-------------------------+--------------------------------------------------
Comment(by nclay):
I've implemented st_circle in plpgsql and I am not impressed with its
speed.
So I am considering modifying nMapAlgebra to accept a mask argument. A
mask would have the following properties: height,width, and weighted. If
weighted is marked the mask is used to weight the pixel values as: pixval
* mask. If it is not marked then the pixel values are returned where the
mask is not null.
To this end, I think it would be best to modify nMapAlgebra by replacing
rt_band_get_pixel with rt_band_mask_get_pixel this function would consider
the mask when returning pixel values. Do you (dustymugs) have any
suggestions or objections? Should I open another ticket for this?
{{{
struct rt_mask_t {
uint16_t width;
uint16_t height;
bool weighted;
void** data;
};
/**
* Get Pixel from band with consideration of a masked extent returning
nodata value
* if mask position is null.
*@param band : the band to get the pixel value from
*@param mask : the mask to mask the band with
*@param extent : array of values containing the bounds of the mask.
*@param x : the x coordinate of the band to be sampled
*@param y : the y coordinate of the band to be sampled
*@param pixval : the value of the band to be returned
*@param nodata : flag to indicate that the value is nodata or masked
*
*@return ES_ERROR on error
*/
int rt_band_mask_get_pixel(rt_band band,
rt_mask mask,
int** extent,
int x,
int y,
double *pixval,
int* nodata
)
}}}
Thanks,
Nathan
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2312#comment:12>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list