SQL Reference
Geospatial Functions
Linestring Constructors
{{ocientgeo}} linestring constructors use geospatial data to create a linestring object st linefromtext alias for st linestring(char) creates a linestring from a specified char the char must be a linestring value in wkt format syntax st linefromtext(char) 136,139,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linefromtext('linestring(1 2)'); output linestring(1 000000 2 000000) st linefromwkb alias for st linestring(binary) creates a linestring from the specified binary the binary value must be a linestring in wkb format syntax st linefromwkb(binary) 136,137,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linefromwkb( binary( '0x010200000002000000000000000000f03f000000000000004000000000000008400000000000001040' ) ); output linestring(1 2,3 4) st linefromewkt creates a linestring from the specified char the char value must be a linestring in ewkt format st linefromewkt is functionally the same as st linestring(char) the input string must include an srid=…; value however, the database ignores this component as all {{ocient}} geography types are srid 4326 syntax st linefromewkt('srid=value;char') 136,168,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linefromewkt('srid=4326;linestring(1 2)'); output linestring(1 000000 2 000000) st linefromgeojson creates a linestring represented by the specified geojson the specified geojson can represent a geojson point or linestring type valid geojson formats follow {{ietf}} https //datatracker ietf org/doc/rfc7946/ , and you can generate them by using docid\ ln31h9xuiniz 9q3nd0m if you specify an invalid geojson, the behavior of the function is undefined syntax st linefromgeojson(geojson \[, geodesic ]) 136,166,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type examples in this example, the function converts an empty geojson value of a linestring select st linefromgeojson('{"type" "linestring","coordinates" \[]}',false); output linestring empty in this example, the function converts a geojson value of a linestring select st linefromgeojson( '{"type" "linestring","coordinates" \[\[1,1],\[1,5],\[5,5],\[5,1]]}', false); output linestring(1 1, 1 5, 5 5, 5 1) st linestring alias for st makeline creates a linestring based on the specified inputs st linestring(geoarray) creates a linestring from the specified array of either linestring or point values syntax st linestring(geo array) 136,177,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linestring( st linestring \[]\(st linestring(st point(1, 2), st point(3, 4)))); output linestring(1 000000 2 000000, 3 000000 4 000000) st linestring(binary) creates a linestring from the specified binary the binary value must be a linestring in wkb format syntax st linestring(binary) 136,163,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linestring(binary('0x010200000002000000000000000000f03f000000000000004000000000000008400000000000001040')); output linestring(1 2,3 4) st linestring(char) creates a linestring from the specified char the char value must be a linestring in wkt format syntax st linestring(char) 136,169,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linestring('linestring(1 2)'); output linestring(1 000000 2 000000) st linestring(geo1, geo2) creates a linestring consisting of two separate geographic arguments, both of which must be either a point or linestring you can mix geographic types, meaning one argument can be a point while the other is a linestring syntax st linestring(geo1, geo2) 136,169,350 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example select st linestring(st point(1, 2), st point(1,3)); output linestring(1 000000 2 000000, 1 000000 3 000000) st makeline alias for docid\ ja2bwo8hlbgf8s2gffhvk st makeline(geo1, geo2) alias for docid\ ja2bwo8hlbgf8s2gffhvk st makeline(char) alias for docid\ ja2bwo8hlbgf8s2gffhvk st makeline(geoarray) alias for docid\ ja2bwo8hlbgf8s2gffhvk related links docid\ czxgepf3prq9ufwhwbiuy docid waxmx64wjb9bhjibuf8b docid\ ln31h9xuiniz 9q3nd0m