[postgis-users] PostGIS Raster: Spec. for WKT and WKB?

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Wed Oct 13 07:13:08 PDT 2010


Hi Stefan,

>I'm aware of WKT and WKB in vector knowing OGC Simple Feature Spec.
>I'm now wondering about the usage of the notion Well Known Text (WKT)
>and Well Known Binary (WKB) for raster.

There is no WKT, WKB standards for raster and there is no standard (that I know of) to store raster in a database. WKT raster borrowed the WKT, WKB concepts to provide a way to directly create and read raster stored in the database.

You will find the specification for our WKB format in this document: http://trac.osgeo.org/postgis/browser/trunk/raster/doc/RFC2-WellKnownBinaryFormat

No specifications for WKT have been defined yet even if it was planned originally and it gave WKT raster its names. Note that we renamed the type "PostGIS Raster".

WCS defines ways to query coverage data in general (raster, vector, point cloud, etc...) but in no way tells you what should be a raster and how to store it. It should not be too complicated to implement WCS as SQL functions over WKT Raster.

>What I understand from the PostGIS Raster project home page
>(http://trac.osgeo.org/postgis/wiki/WKTRaster) that JPEG and TIFF
>formats are supported.

PostGIS Raster does not "supports" other raster formats. It is a format (or better a "type") in itself. We have a Python "converter" (or a "loader" in DB terminology) that convert (or load) raster from any raster format supported by GDAL (in read mode) to PostGIS Raster. In this sence, it "supports" all those raster formats.

>=> Do you mean by WKB that these formats are specified in public
>accessible specs.?

As I said: no. They are not specified in public. I wish there would have been a public spec to tell me how to store raster but there is not.

>=> How about the spec. of WKT raster?

You will find the best description of PostGIS Raster in those pages:

http://trac.osgeo.org/postgis/wiki/WKTRaster/Documentation01

Hope this help.

Pierre



More information about the postgis-users mailing list