The ST_MLineFromKML() function

The ST_MLineFromKML() function takes a KML MultiLineString string and an optional spatial reference ID and returns a multipart polyline object. A KML MultiLineString string can contain the KML shape attributes <extrude>, <tessellate>, and <altitudeMode>, but they are ignored in the ST_MultiLineString representation.

Syntax

ST_MLineFromKML(kmlstring lvarchar)
ST_MLineFromKML(kmlstring lvarchar, SRID integer)

Return type

ST_MultiLineString

Example

EXECUTE FUNCTION ST_MLineFromKML(<MultiGeometry>
    <LineString>
      <coordinates>
        -122.4425587930444,37.80666418607323,0
        -122.4428379594768,37.80663578323093,0
      </coordinates>
    </LineString>
    <LineString>
      <coordinates>
        -122.4425509770566,37.80662588061205,0
        -122.4428340530617,37.8065999493009,0
      </coordinates>
    </LineString>
  </MultiGeometry>,4);