= WKT Raster = '''IMPORTANT''': ''This is a raw port of the [http://postgis.refractions.net/support/wiki/index.php?WKTRasterHomePage old Wiki page]. This content needs to be structured while porting to the Trac. It is suggested to created all WKT Raster pages under common URL prefix '''/WKTRaster/''', for instance: http://trac.osgeo.org/postgis/wiki/WKTRaster/Specification'' Welcome to the '''WKT Raster''' project home page! [wiki:WKTRaster WKT Raster] is an ongoing project aiming at developing '''raster support in PostGIS'''. It is a new project very different from the previous PGRaster project and also very different from [http://en.wikipedia.org/wiki/GeoRaster Oracle Spatial GeoRaster]. The goal of [wiki:WKTRaster WKT Raster] is to implement the RASTER type '''as much as possible like the GEOMETRY type''' is implemented in PostGIS and to offer '''a single set of overlay SQL functions''' (like ST_Intersects) operating '''seamlessly''' on vector and raster coverages. == Specification == * [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRasterSpecifications Working Specification] * [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRasterDocumentation Working Documentation] (very preliminary) * Original Project Presentation - rationale, examples and preliminary specifications: [http://www.cef-cfr.ca/uploads/Membres/WKTRasterSpecifications1.0.ppt PPT], [http://www.cef-cfr.ca/uploads/Membres/WKTRasterSpecifications1.0.pdf PDF] (v1.0) For more details and examples of application: * Search for "WKT Raster" in the [http://postgis.refractions.net/pipermail/postgis-users/ PostGIS mailing list archive] or in [http://www.nabble.com/forum/Search.jtp?forum=1221&local=y&query=%22wkt+raster%22 Nabble] * Write to [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacine Pierre Racine] == Overview == The [wiki:WKTRaster WKT Raster] extension... '''is as simple as PostGIS...''' * one table = one raster coverage (like a vector coverage) * one row = one tile or one raster object (like a vector coverage where one row = one geometry) * only one new type: RASTER (like the PostGIS GEOMETRY type) * each raster tile has a pixel size, a width and a height, a variable number of band, a pixel type per band and a nodata value per band. Everything essential to do base raster GIS operations. '''is an extension of PostGIS to be installed separately''' * merge with PostGIS might occur in the future... '''has an import/export mechanism similar to shp2pgsql''' * raster2pgsql and pgsql2raster utilities allowing import/export of a single raster or a batch of raster into a tiled coverage. '''allows easy conversion from/to geometry/raster...''' * RT_AsPolygon(raster) -> geometry * RT_AsRaster(geometry, pixelsize) -> raster '''implements base GIS raster operations available in most GIS...''' * RT_Resample(raster, pixelsize, method) -> raster * RT_Clip(raster|geometry,geometry) -> same type as first argument * RT_Reclass(raster|geometry,string) -> same type as first argument * RT_MapAlgebra(raster|geometry, raster), mathematical expression, "raster"|"geometry") -> raster/geometry * etc...) '''introduces raster/geometry seamless geometry constructors...''' * so you don't have to bother whether the layers are in raster or vector form when using analysis functions. * RT_Intersection(raster|geometry, raster|geometry, "raster"|"geometry") -> raster/geometry * RT_Union(raster|geometry, raster|geometry, "raster"|"geometry") -> raster/geometry * RT_Accum(raster set|geometry set, "raster"|"geometry") -> raster/geometry * RT_Transform(raster|geometry, SRID) -> same type as input * etc... '''and seamless geometry operators...''' * RT_Intersects(raster|geometry, raster|geometry) -> boolean * RT_Contains(raster|geometry A, raster|geometry B) -> boolean * etc... '''allows raster storage INSIDE the database''' (as WKB) for efficient overlay analysis operations between vector and raster layers... '''or OUTSIDE the database''' (as JPEG or TIFF) so desktop and web applications can quickly access and load raster tiles and nevertheless benefits from the powerful PostGIS GiST spatial index. Every WKT Raster SQL functions working with in-the-db raster tiles work seamlessly with out-the-db raster tiles. '''introduces the concept of raster objects...''' * geographic features are stored as variable size raster tiles instead of polygons. * allows vector to raster conversion without lost of information. '''is much more simple than PGRaster and Oracle GeoRaster''' as WKT Raster supports... * only one type (instead of two: SDO_GEORASTER & SDO_RASTER). In WKT Raster there is no differences between a raster and a tile: a tile is a raster and a raster is a tile. A coverage is a table of tiles * no metadata (like PostGIS) * no masks (you can build a mask as a band) * no multiple dimensions (only two: x, y) * no pyramids (reduced resolution coverages can be stored as a separate layer) == What do people think about WKT Raster? == [http://www.cleverelephant.ca/cv.html Paul Ramsey]: ''This proposal is better than any I have seen, addresses solving problems that if solved will provide actual new functionality and benefit to users, and clearly you've thought this through over some time'' [http://www.paragoncorporation.com/Team.aspx Regina Obe]: ''The functions WKT Raster proposes look pretty cool actually and my vision of the benefits of storing raster in the database are covered in it'' == Planning and Funding == [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRaster Development of PostGIS WKT Raster] has started! [http://foo.keybit.net/~strk/ Sandro Santilli], member of the core team who developed PostGIS, could set the base of WKT Raster so other developers can build over this and continue the development. We are still looking for fund to pay for Sandro services for at least six months. Planning, schedule and responsibilities are described in [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacineWKTRaster this page]. If you need support for raster in PostgreSQL or you have to do raster/vector operations, help us develop WKT Raster! WKT Raster developement is a work in progress. Each slice of 2000$ will bring new functions in! The approximate cost of the whole project is about 60 000$US. If 30 groups each give 2000$US, we will have the best seamless raster/vector set of SQL functions available by the end of 2009! PostGIS WKT Raster ~~will be~~ participated at the [http://wiki.osgeo.org/wiki/Toronto_Code_Sprint_2009 Toronto Code Sprint 2009] == Source Code == The WKT Raster code is available from the OSGeo Subversion repository at: {{{ svn checkout https://svn.osgeo.org/postgis/spike/wktraster wktraster }}}