OGC Standard Geometry
GEOMETRYCOLLECTION
WKT GEOMETRYCOLLECTION: Heterogeneous Spatial Geometry
Direct Definition:A WKT GEOMETRYCOLLECTION contains any arbitrary combination of 0 or more valid geometries (such as combining a POINT and a POLYGON into a single spatial entity).
Valid Syntax & Example
GEOMETRYCOLLECTION (POINT (-77.04 -12.04), LINESTRING (-77.03 -12.03, -77.02 -12.02), POLYGON ((-77.01 -12.01, -77.00 -12.01, -77.00 -12.00, -77.01 -12.01)))
Syntax: GEOMETRYCOLLECTION (POINT(x y), LINESTRING(x1 y1, x2 y2), POLYGON((...)))
Common Mistakes to Avoid
⚠️ Gotcha:
Attempting to run surface-area calculations on collections containing zero-area points or linear lines.
PostGIS SQL Query Recipes
Creating and querying GEOMETRYCOLLECTION geometries in PostgreSQL:
1. Construct GEOMETRYCOLLECTION from WKT
SELECT ST_GeomFromText('GEOMETRYCOLLECTION (POINT(0 0), LINESTRING(0 0, 1 1))', 4326);2. Export GEOMETRYCOLLECTION to WKT text
SELECT ST_AsText(geom) FROM complex_features;
Python & Shapely Parsing
from shapely import wkt
gc = wkt.loads("GEOMETRYCOLLECTION (POINT (0 0), LINESTRING (0 0, 1 1))")
print("Total geometries:", len(gc.geoms))Frequently Asked Questions
Can WKT Studio visualize GEOMETRYCOLLECTION geometries?+
Yes. WKT Studio automatically unpacks GEOMETRYCOLLECTION objects and plots every inner point, line, and polygon simultaneously on the map canvas.
Convert GEOMETRYCOLLECTION to Another Format
Every converter below accepts GEOMETRYCOLLECTION and runs entirely in your browser.
All GIS format converters →