= '''PostGIS WKT Raster Beta 03 (and up) Working Specifications''' = {{{ #!html
}}} '''Quick Links''' * [wiki:WKTRaster WKT Raster Home Page] * [wiki:WKTRaster/PlanningAndFunding Planning & Funding] * [wiki:WKTRaster/SpecificationWorking01 Working Specifications for Beta 0.1.6] * [wiki:WKTRaster/SpecificationWorking02 Working Specifications for Beta 0.2.4] {{{ #!html
}}} ---- == '''Objective B03a - Being able to set all the properties of a raster.''' == '''ST_SetSRID(raster|geometry, integer)'''[[BR]] '''ST_SetPixelType(raster, band, string)'''[[BR]] '''ST_SetPixelSize(raster)'''[[BR]] '''ST_SetNoDataValue(raster, band, value)'''[[BR]] '''ST_SetGeoReference(raster, string)''' ---- == '''Objective B03b - Being able to reproject a raster.''' == '''ST_Transform(raster|geometry, SRID) -> same type as input''' ---- == '''Objective B03c - Being able to do some base raster operations.''' == '''ST_Area(raster|geometry) -> double'''[[BR]] '''ST_Count(raster, value) -> integer'''[[BR]] '''ST_Resample(raster, pixelsize, method) -> raster'''[[BR]] '''ST_SelectByValue(raster|geometry, ‘expression’) -> same type as first argument'''[[BR]] '''ST_Reclass(raster|geometry,string) -> same type as first argument'''[[BR]] '''ST_MapAlgebra(raster|geometry, [raster|geometry,…], ‘mathematical expression’, ‘raster’ |’geometry’) -> raster/geometry'''[[BR]] '''ST_Clip(raster|geometry,geometry) -> same type as first argument'''[[BR]] '''ST_Flip(raster|geometry, ’vertical’|’horizontal’) -> same type as first argument''' ---- == '''Objective B03d - Being able to quickly get raster statistics.''' == '''Add cached basic raster statistic to the base raster WKB format. ---- == '''Objective B03e - Being able to refer to band by textual name.''' == '''Add 8 digit string to each band in the base raster WKB format.[[BR]] '''Adjust gdal2wktraster.py to be able to give names to each band when importing.[[BR]] '''Adjust/overlaod every function to be able to refer to raster band by name. ---- == '''PostGIS WKT Raster Beta 0.4''' == ---- == '''Objective B04a - Being able to convert a raster to standards formats.''' == '''ST_AsKML(raster|geometry) -> string'''[[BR]] '''ST_AsSVG(raster|geometry) -> string''' ---- == '''Objective B04b - Being able to control the validity of a raster.''' == '''ST_IsEmpty(raster|geometry) -> boolean'''[[BR]] '''ST_mem_size(raster|geometry) -> integer'''[[BR]] '''ST_isvalid(raster|geometry) -> boolean''' ---- == '''Objective B04c - Being able to use other major topological operators''' == '''ST_Within(raster|geometry A, raster|geometry B)'''[[BR]] '''ST_Contains(raster|geometry A, raster|geometry B)'''[[BR]] '''ST_Overlaps(raster|geometry, raster|geometry)''' ---- == '''PostGIS WKT Raster Beta 0.5''' == ---- == '''Objective B05a - Being able to derive a raster layer from vector layer.''' == '''ST_Interpolate(points, pixelsize, method) -> raster''' ---- == '''Objective B05b - Being able to do on rasters most operations available on geometries''' == '''ST_Centroid(raster|geometry) -> point geometry'''[[BR]] '''ST_PointOnSurface(raster|geometry) -> point geometry'''[[BR]] '''ST_Buffer(raster|geometry, double) -> same type as first arg.'''[[BR]] '''ST_ConvexHull(raster|geometry) -> same type as input'''[[BR]] '''ST_Difference(raster|geometry A, raster|geometry B) -> same type as first argument'''[[BR]] '''ST_SymDifference(raster|geometry,raster|geometry,‘raster’|’geometry’) -> raster/geometry''' ---- == '''PostGIS WKT Raster Beta 0.6''' == ---- == '''Objective B06a - Being able to use all the other topological operators''' == '''ST_Equals(raster|geometry, raster|geometry)'''[[BR]] '''ST_Disjoint(raster|geometry, raster|geometry)'''[[BR]] '''ST_Touches(raster|geometry, raster|geometry)'''[[BR]] '''ST_Crosses(raster|geometry, raster|geometry)'''[[BR]] '''ST_Covers(raster|geometry A, raster|geometry B)'''[[BR]] '''ST_IsCoveredBy(raster|geometry A, raster|geometry B)'''[[BR]] '''ST_Relate(raster|geometry, raster|geometry, intersectionPatternMatrix )''' ---- == '''Objective B07b - Being able to edit a raster''' == '''ST_Value(raster, band, x, y) -> value'''[[BR]] Return value of a single pixel. Pixel location is specified by 1-based index of Nth band of raster and X,Y coordinates.[[BR]] The X coordinate is expected to be in range of [1, ST_Width(raster)] and Y coordinate in range of [1, ST_Height(raster))]. Return value is of type of 64-bit float-point number.[[BR]] '''TODO''': mloskot: Should we return NUMERIC instead of FLOAT8? '''ST_SetValue(raster, band, x, y, value)'''[[BR]] '''ST_Affine(raster|geometry,…) -> same type as input'''[[BR]] '''ST_Translate(raster|geometry,…) -> same type as input'''[[BR]] '''ST_Scale(raster|geometry,…) -> same type as input'''[[BR]] '''ST_TransScale(raster|geometry,…) -> same type as input'''[[BR]] '''ST_RotateZ,Y,Z(raster|geometry, float8) -> same type as input''' '''Other functions''' '''ST_AsBinary(raster, compression)'''[[BR]] '''ST_RasterFromWKB(raster, [])'''[[BR]] '''ST_RasterFromText(string, [])'''[[BR]] '''ST_AsText(raster)''' ----