ST_GeomFromEWKB — Gibt einen geometrischen Datentyp (ST_Geometry) aus einer Well-known-Binary (WKB) Darstellung zurück.
geometry ST_GeomFromEWKB(bytea EWKB);
Constructs a PostGIS geometry from an Extended Well-Known Binary (EWKB) representation.
|
|
|
EWKB ist kein Format des OGC Standards, sondern ein PostGIS eigenes Format, welches den Identifikator (SRID) des räumlichen Koordinatenreferenzsystem mit einbindet |
Erweiterung: Mit 2.0.0 wurde die Unterstützung für polyedrische Oberflächen und TIN eingeführt.
Diese Funktion unterstützt 3d und lässt den Z-Index nicht fallen.
Diese Methode unterstützt kreisförmige Strings und Kurven.
Diese Funktion unterstützt polyedrische Flächen.
Diese Funktion unterstützt Dreiecke und dreieckige unregelmäßige Netzoberflächen (TIN).
This example constructs LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932) in NAD83 longitude/latitude (SRID 4269) from its EWKB representation.
PostgreSQL escape string syntax (E'...') always interprets backslash escapes. Each backslash therefore has to be doubled so that the bytea input parser receives the octal escapes.
SELECT ST_GeomFromEWKB((
E'\\001\\002\\000\\000\\040\\255\\020\\000\\000\\003\\000\\000\\000\\344\\112\\075' ||
E'\\013\\102\\312\\121\\300\\156\\303\\050\\010\\036\\041\\105\\100\\047\\277\\105' ||
E'\\047\\113\\312\\121\\300\\366\\173\\142\\235\\052\\041\\105\\100\\225\\174\\354' ||
E'\\056\\120\\312\\121\\300\\160\\231\\323\\145\\061\\041\\105\\100'
)::bytea);
0102000020AD10000003000000E44A3D0B42CA51C06EC328081E21454027BF45274BCA51C0F67B629D2A214540957CEC2E50CA51C07099D36531214540
With standard_conforming_strings enabled (the default), ordinary string literals preserve backslashes. The same EWKB can therefore be written with a single backslash before each octal byte value.
SELECT ST_GeomFromEWKB((
'\001\002\000\000\040\255\020\000\000\003\000\000\000\344\112\075' ||
'\013\102\312\121\300\156\303\050\010\036\041\105\100\047\277\105' ||
'\047\113\312\121\300\366\173\142\235\052\041\105\100\225\174\354' ||
'\056\120\312\121\300\160\231\323\145\061\041\105\100'
)::bytea);
0102000020AD10000003000000E44A3D0B42CA51C06EC328081E21454027BF45274BCA51C0F67B629D2A214540957CEC2E50CA51C07099D36531214540