ST_GeomFromEWKB — Ritorna un valore ST_Geometry a partire da Extended Well-Known Binary (EWKB).
geometry ST_GeomFromEWKB(
bytea EWKB)
;
Costruisce una ST_Geometry PostGIS a partire da OGC Extended Well-Known Binary (EWKT).
![]() | |
Il EWKB non è uno standard OGC ma uno specifico formato di Postgis che include il codice del sistema di riferimento spaziale (SRID). |
Miglioramento nella version 2.0.2: introdotto il supporto per superfici poliedriche e TIN.
Questa funzione supporta il 3d e non distrugge gli z-index.
Questo metodo supporta le Curve e le Circular String.
Questa funzione supporta le Polyhedral Surface.
Questa funzione supporta i Triangoli e le Triangulated Irregular Network Surfaces (TIN)
Rappresentazione binaria di LINESTRING(-71.160281 42.258729,-71.160837 42.259113,-71.161144 42.25932) in NAD 83 long lat (4269).
![]() | |
NOTE: Even though byte arrays are delimited with \ and may have ', we need to escape both out with \ and '' if standard_conforming_strings is off. So it does not look exactly like its AsEWKB representation. |
SELECT ST_GeomFromEWKB(E'\\001\\002\\000\\000 \\255\\020\\000\\000\\003\\000\\000\\000\\344J= \\013B\\312Q\\300n\\303(\\010\\036!E@''\\277E''K \\312Q\\300\\366{b\\235*!E@\\225|\\354.P\\312Q \\300p\\231\\323e1!E@');
![]() | |
In PostgreSQL 9.1+ - standard_conforming_strings is set to on by default, where as in past versions it was set to off. You can change defaults as needed for a single query or at the database or server level. Below is how you would do it with standard_conforming_strings = on. In this case we escape the ' with standard ansi ', but slashes are not escaped |
set standard_conforming_strings = on; SELECT ST_GeomFromEWKB('\001\002\000\000 \255\020\000\000\003\000\000\000\344J=\012\013B \312Q\300n\303(\010\036!E@''\277E''K\012\312Q\300\366{b\235*!E@\225|\354.P\312Q\012\300p\231\323e1')