= PostGIS Raster Home Page (formerly WKT Raster) = {{{ #!html
Quick Links
What's new about PostGIS Raster?

February 14, 2011
Two plugins to display PostGIS rasters!

September 15, 2010
WKT Raster becomes THE new PostGIS raster type!

August 11, 2010
PostGIS WKT Raster at FOSS4G

June 11, 2010
A tutorial and a book!

February 22, 2010
A third company join the WKT Raster team!

December 10, 2009

December 4, 2009
Jorge Arevalo full time on WKT Raster!


Welcome (back) Jorge!

October 16, 2009
PostGIS WKT Raster at Geomatique 2009 in Montréal!

June 04, 2009
A prototype GDAL driver to WKT Raster implemented this summer!
}}} Welcome to the '''PostGIS Raster''' project home page! '''PostGIS 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 '''PostGIS 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. == Installation == * '''Linux -''' You will have to compile PostGIS Raster following the instructions in the Development Info section below. * '''Windows Binaries - ''' If you are running PostGIS on Windows, you can find fairly recent binaries of PostGIS Raster in the [http://www.postgis.org/download/windows/experimental.php Windows Experimental Builds section] along with binaries of the most recent PostGIS. These are for PostgreSQL 8.3, 8.4, upcoming 9.0. Note that development on the standalone wktraster project deployable on PostGIS 1.3-1.5 has stopped and all future versions and bug fixes of raster support will be packaged in the PostGIS 2.0 builds. * '''Mac OSX Binaries - ''' If you are running PostGIS on Mac OSX leopard or Snow Leopard, you can find fairly recent binaries of PostGIS and PostGIS Raster at [http://www.kyngchaos.com/software/postgres KyngChaos PostgreSQL GIS] packages include PostgreSQL 8.4, PostGIS 1.5, PostGIS Raster, and pgRouting. * '''GDAL WKT Raster driver - ''' A [http://trac.osgeo.org/gdal/wiki/frmts_wtkraster.html GDAL WKT Raster driver] was developed following a [http://socghop.appspot.com/ Google Summer of Code 2009] grant obtained by [http://gis4free.wordpress.com/ Jorge Arevalo]. == Documentation == * '''Documentation - ''' [wiki:WKTRaster/Documentation01 PostGIS Raster Documentation] is under development. * '''Function Reference - ''' You will find every raster function documented [http://postgis.refractions.net/documentation/manual-svn/RT_reference.html as a chapter of the svn PostGIS documentation]. Find also some more useful functions [wiki:WKTRasterUsefulFunctions in this page]. * '''Tutorials - ''' [wiki:WKTRasterTutorial01 This tutorial] will show you how to load a huge raster coverage and intersect it with a vector coverage. Jorge has a whole series on PostGIS Raster and comparing activities you do in Oracle GeoRaster vs. how you would do them with PostGIS Raster. Check out [http://gis4free.wordpress.com/category/postgis-raster/ Jorge's PostGIS Raster Tutorial Series]. * '''Book - ''' [http://www.postgis.us/chapter_13 PostGIS in Action] has a full chapter dedicated to PostGIS Raster. * '''Presentations'''[[BR]][[BR]] * Introducing PostGIS WKT Raster: Seamless !Raster/Vector Operations in a Spatial Database - FOSS4G 2010, Barcelona, Spain, September 2010. [attachment:FOSS4G2010_Pierre.pdf PDF] * PostGIS WKT Raster. An Open Source alternative to Oracle !GeoRaster - FOSS4G 2010, Barcelona, Spain, September 2010. [attachment:FOSS4G2010_Jorge.pdf PDF] * Introduction to WKT Raster - Geomatique 2009, Montréal, October 2009. [attachment:WKTRasterIntro-Geomatique2009.pdf PDF] * 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) == Development Info == * '''Planning'''[[BR]][[BR]] * With PostGIS 2.0: Spring 2011. * Look [wiki:WKTRaster/PlanningAndFunding at the planning page] for a detailed schedule and to know how to contribute. * '''Specifications -''' To know more about or contribute your ideas about the design of PostGIS Raster consult [wiki:WKTRaster/SpecificationWorking01 the working specification page]. Accepted specifications are aggregates into the [wiki:WKTRaster/SpecificationFinal01 final specification page]. * '''Source Code, API and Bug report'''[[BR]][[BR]] * PostGIS Raster source code is available from the OSGeo Subversion repository {{{ svn checkout https://svn.osgeo.org/postgis/spike/wktraster wktraster }}} * You can also download the latest development snapshot from: http://www.postgis.org/download/ [[BR]][[BR]] * Compilation instructions are availables in the [wiki:WKTRaster/Documentation01 Documentation].[[BR]][[BR]] * API reference is available on [http://postgis.refractions.net/documentation/raster-doxygen/ PostGIS Raster Doxygen] pages.[[BR]][[BR]] * See report with [report:17 All tickets reported to PostGIS Raster] == Displaying PostGIS rasters == There are some options to display rasters stored in PostGIS. * '''!OpenJump''' - !OpenJump will not display raster directly but a vectorization of the raster. Use a query like the following in the "Layer->Execute Query" dialog: {{{ SELECT ST_AsBinary((ST_DumpAsPolygons(rast)).geom), (ST_DumpAsPolygons(rast)).val FROM rastertable }}} * '''QGIS''' - There is now a plugin for QGIS displaying PostGIS rasters. See [http://www.mail-archive.com/qgis-user@lists.osgeo.org/msg07761.html the original thread], [http://mapeandoobrasil.blogspot.com/2010/12/postgis-raster-plugin-para-qgis.html Mapeando o Brasil] and [http://pyqgis.org/repo/contributed the QGIS plugin page]. For more info on the status of the plugin, contact Maurício de Paulo (mauricio.dev@gmail.com). * '''gvSIG''' - There is also a plugin for gvSIG, the popular spanish open source GIS. See [http://www.slideshare.net/nbrodin/postgisrastergvsig the presentation], [http://forge.osor.eu/docman/view.php/313/560/PostGISRaster-0.1-man-en.pdf the documentation] and [http://www.osor.eu/projects/gvsig-postgisra the project page]. The plugin should be integrated into gvSIG 1.11. For more info on the status of the plugin, contact Nacho Brodin (ibrodin@prodevelop.es). == More Info == For more details and examples of application using PostGIS Raster: * 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] * PostGIS Raster has been designed following a thorough analysis of the numerous discussions about raster integration in PostGIS over the recent years. You can find most of the post to the PostGIS-users group related to raster integration [http://trac.osgeo.org/postgis/wiki/UsersWikiRasterNotes in this page]. * Write to [http://www.cef-cfr.ca/index.php?n=Membres.PierreRacine Pierre Racine] == Overview of Planned PostGIS Raster Features == '''PostGIS Raster...''' '''...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...''' * ST_DumpToPolygons(raster) -> geometry set * ST_AsRaster(geometry, pixelsize) -> raster '''...implements base GIS raster operations available in most GIS...''' * ST_Resample(raster, pixelsize, method) -> raster * ST_Clip(raster|geometry,geometry) -> same type as first argument * ST_Reclass(raster|geometry,string) -> same type as first argument * ST_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. * ST_Intersection(raster|geometry, raster|geometry, "raster"|"geometry") -> raster/geometry * ST_Union(raster|geometry, raster|geometry, "raster"|"geometry") -> raster/geometry * ST_Accum(raster set|geometry set, "raster"|"geometry") -> raster/geometry * ST_Transform(raster|geometry, SRID) -> same type as input * etc... '''...and seamless geometry operators...''' * ST_Intersects(raster|geometry, raster|geometry) -> boolean * ST_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 PostGIS Raster SQL functions working with in-db raster tiles work seamlessly with out-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! PostGIS Raster supports...''' * only one type (instead of two in Oracle Spatial: SDO_GEORASTER & SDO_RASTER). In PostGIS Raster there are no differences between rasters and tiles: a tile is a raster and a raster is a tile. i.e. one row = one tile = one raster; one table = one raster coverage. * no metadata (like PostGIS) * no masks (you can create a mask as a band) * no multiple dimensions (only two: x, y). Not to be confused with bands; PostGIS Raster DO supports multiband raster... * no pyramids (reduced resolution coverages can be stored as a separate layer) == What do people think about PostGIS Raster? == [http://www.cleverelephant.ca/cv.html Paul Ramsey] (founder of PostGIS): ''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] (coauthor of [http://www.manning.com/obe/ PostGIS in Action]): ''The functions PostGIS WKT Raster proposes look pretty cool actually and my vision of the benefits of storing raster in the database are covered in it'' = Open Tickets = [[TicketQuery(status=new|assigned|reopened&component~=wktraster&order=priority)]]