[postgis-tickets] [PostGIS] #2263: [raster] Audit usage of serialize/deserialize vs wkb/hexwkb
PostGIS
trac at osgeo.org
Mon Feb 19 10:11:00 PST 2018
#2263: [raster] Audit usage of serialize/deserialize vs wkb/hexwkb
--------------------------+---------------------------
Reporter: Bborie Park | Owner: Bborie Park
Type: task | Status: assigned
Priority: high | Milestone: PostGIS 2.5.0
Component: raster | Version: trunk
Resolution: | Keywords:
--------------------------+---------------------------
Comment (by Bborie Park):
Raster Inputs
{{{
-- expects input to be WKB
CREATE OR REPLACE FUNCTION st_rastfromwkb(bytea)
RETURNS raster
AS 'MODULE_PATHNAME', 'RASTER_fromWKB'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- expectes input to be Hex WKB
CREATE OR REPLACE FUNCTION st_rastfromhexwkb(text)
RETURNS raster
AS 'MODULE_PATHNAME', 'RASTER_fromHexWKB'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
}}}
Raster Outputs
{{{
-- Availability: 2.5.0
-- expects output to be WKB
-- ST_AsWKB() is functionally identitical to bytea()
-- kept separate as bytea(raster) is for casting
CREATE OR REPLACE FUNCTION st_aswkb(raster, outasin boolean DEFAULT FALSE)
RETURNS bytea
AS 'MODULE_PATHNAME', 'RASTER_asWKB'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- Changed: 2.5.0 change logic to use ST_AsWKB. Deprecate in 2.6.0
-- expects output to be WKB
CREATE OR REPLACE FUNCTION st_asbinary(raster, outasin boolean DEFAULT
FALSE)
RETURNS bytea
AS $$ SELECT @extschema at .ST_AsWKB($1, $2) $$
LANGUAGE 'sql' IMMUTABLE STRICT _PARALLEL;
-- Availability: 2.5.0
-- TODO: does not exist yet
-- expect output to be Hex WKB
CREATE OR REPLACE FUNCTION st_ashexwkb(raster, outasin boolean DEFAULT
FALSE)
RETURNS text
AS 'MODULE_PATHNAME', 'RASTER_asHexWKB'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
-- used to cast raster -> bytea
CREATE OR REPLACE FUNCTION bytea(raster)
RETURNS bytea
AS 'MODULE_PATHNAME', 'RASTER_to_bytea'
LANGUAGE 'c' IMMUTABLE STRICT _PARALLEL;
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/2263#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list