Socrata was acquired by Tyler Technologies in 2018 and is now the Data and Insights division of Tyler. The platform is still powered by the same software formerly known as Socrata but you will see references to Data & Insights going forward.

to_line

Function: to_line
  parse a WKT (text) representation of a line into a line value

Examples:

  to_line('LINESTRING (30 10, 10 30, 40 40)')
  -- Result: {"type":"LineString","coordinates":[[30,10],[10,30],[40,40]]}

  to_line(a_wkt_line)
  -- Result: {"type":"LineString","coordinates":[[30,10],[10,30],[40,40]]}

  to_line('LINESTRING (30 10)')
  -- Result: {"type":"invalid_geometry","english":"Geometry invariant violation: LineString must have at least 2 coordinates","data":{"value":{"type":"LineString","coordinates":[[30,10]]},"reason":"LineString must have at least 2 coordinates"}}




Signatures
text -> line
line -> line