[postgis-devel] [raster] ST_Binary semantic

Mateusz Loskot mateusz at loskot.net
Thu Feb 28 04:35:52 PST 2013


Currently (SVN trunk), ST_Binary manifests dual nature, depending on
in-db or out-db storage of raster data.

For in-db,
ST_Binary returns complete blob with raster data in WKB format [1]
For out-db,
ST_Binary returns the WKB header followed by local file path.

Assuming the WKB format [1] is canonical representation, this ST_Binary
manifests valid behaviour.

However, in the out-db case and from usability point of view,
transporting local filesystem path does not make much sense.

I would argue, that canonical representation of WKB doesn't
necessarily have to match ST_AsBinary output.

Quick discussion with Sandro and Even on IRC confirms this
argument is valid and common sense would suggest to most users that
ST_Binary should output the same raster data, regardless storage mode
on the server side.

Am I not seeing important factors behind dualism of the current behaviour?
Shall we unify the output?

[1] http://svn.osgeo.org/postgis/spike/wktraster/doc/RFC2-WellKnownBinaryFormat

Best regards,
Mateusz Loskot, http://mateusz.loskot.net

More information about the postgis-devel mailing list