ArcGIS Server Banner

ST_MPointFromWKB

ST_MPointFromWKB

Release 9.3 E-mail This TopicPrintable VersionGive Us feedback
Note: This topic was updated for 9.3.1.

Definition

ST_MPointFromWKB creates an ST_MultiPoint from a well-known binary (WKB) representation of type ST_MultiPoint and a spatial reference ID.

Syntax

Oracle

sde.st_mpointfromwkb (wkb blob, srid integer)

PostgreSQL

st_mpointfromwkb (wkb bytea, srid integer)

Return type

ST_MultiPoint

Example

In the following example, the lines of results have been reformatted for readability. The spacing in your results will vary according to your online display. This example illustrates how ST_MPointFromWKB can be used to create a multipoint from its well-known binary representation. The geometry is a multipoint in spatial reference system 1. In this example, the multipoint gets stored with ID = 10 in the GEOMETRY column of the SAMPLE_MPOINTS table, then the WKB column is updated with its well-known binary representation (using the ST_AsBinary function). Finally, the ST_MPointFromWKB function is used to return the multipoint from the WKB column. The x- and y-coordinates for this geometry are (44, 14) (35, 16) (24, 13). The SAMPLE_MPOINTS table has a GEOMETRY column, where the multipoint is stored, and a WKB column, where the multipoint's well-known binary representation is stored.

Oracle

CREATE TABLE sample_mpoints (id integer, geometry sde.st_geometry, wkb blob);

INSERT INTO sample_mpoints (id, geometry) VALUES (
10,
sde.st_multipoint ('multipoint (4 14, 35 16, 24 13)', 0)
);

UPDATE sample_mpoints
SET wkb = sde.st_asbinary (geometry)
WHERE id = 10;

PostgreSQL

CREATE TABLE sample_mpoints (id integer, geometry st_geometry, wkb bytea);

INSERT INTO sample_mpoints (id, geometry) VALUES (
10,
st_multipoint ('multipoint (4 14, 35 16, 24 13)', 0)
);

UPDATE sample_mpoints
SET wkb = st_asbinary (geometry)
WHERE id = 10;

In the following SELECT statement, the ST_MPointFromWKB function is used to retrieve the multipoint from the WKB column.

Oracle

SELECT id, sde.st_astext (sde.st_mpointfromwkb (wkb,0)) MULTI_POINT
FROM sample_mpoints
WHERE id = 10;


ID 	  MULTI_POINT 

10         MULTIPOINT (4.00000000 14.00000000, 35.00000000 16.00000000 24.00000000 13.00000000)

PostgreSQL

SELECT id, st_astext (st_mpointfromwkb (wkb,0)) AS "MULTI_POINT"
FROM sample_mpoints
WHERE id = 10;


id 	  MULTI_POINT 

10         MULTIPOINT (4 14, 35 16, 24 13)

See Also

  • An overview of SQL functions used with ST_Geometry types