OGC Standard Geometry
MULTILINESTRING
WKT MULTILINESTRING: Multi-segment Path Format
Direct Definition:A WKT MULTILINESTRING represents a collection of linear paths grouped as one feature, commonly used for river networks with tributaries or disconnected road segments.
Valid Syntax & Example
MULTILINESTRING ((-77.04 -12.04, -77.03 -12.03), (-77.02 -12.02, -77.01 -12.01))
Syntax: MULTILINESTRING ((line1_p1, line1_p2), (line2_p1, line2_p2))
Common Mistakes to Avoid
⚠️ Gotcha:
Confusing single-line coordinates with multi-line parentheses. Each line segment must be wrapped in its own parentheses.
PostGIS SQL Query Recipes
Creating and querying MULTILINESTRING geometries in PostgreSQL:
1. Construct MULTILINESTRING from WKT
SELECT ST_GeomFromText('MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))', 4326);2. Export MULTILINESTRING to WKT text
SELECT ST_AsText(geom) FROM river_networks;
Python & Shapely Parsing
from shapely import wkt
multi_line = wkt.loads("MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))")
print("Total length:", multi_line.length)Frequently Asked Questions
Can lines in a MULTILINESTRING intersect each other?+
Yes, lines can intersect at vertices or cross without invalidating the geometry.
Convert MULTILINESTRING to Another Format
Every converter below accepts MULTILINESTRING and runs entirely in your browser.
All GIS format converters →