What Is a GeometryCollection?
A GeometryCollection is one geometry object that can contain members of different geometry types, such as points, lines and polygons together.
Explain why mixed geometry collections exist, how they differ from multi-geometries, and why downstream workflows often split them by type.
What Is a GeometryCollection?
A GeometryCollection is one geometry object that can contain members of different geometry types, so one collection may include a Point, a LineString and a Polygon at the same time.
That makes it different from a MultiPoint, MultiLineString or MultiPolygon, whose parts all belong to the same geometry family.
GeometryCollections are valid in standards such as OGC Simple Features and GeoJSON, and they can arise naturally from spatial operations. They are nevertheless less convenient than homogeneous geometry types for many mapping, styling and analysis workflows.
Why mixed geometry can appear
Some spatial operations do not guarantee a result of one dimension.
Imagine intersecting two complex geometries. One part of the result may be an area where the inputs overlap, another may be a line where their boundaries coincide, and isolated points may remain where corners meet. A GeometryCollection can preserve all of those pieces without discarding lower-dimensional results.
A collection can also be created deliberately when one feature is intended to carry several kinds of geometry under one attribute record, although that data model should be used cautiously.
GeometryCollection is not the same as a multi-geometry
The distinction is easiest to see through examples.
A MultiPolygon contains polygons only, a MultiLineString contains lines only, and a MultiPoint contains points only.
A GeometryCollection can contain any mixture of those geometry types.
That difference matters because homogeneous multi-geometries have a predictable dimension and can usually be processed by algorithms designed for that family. A GeometryCollection does not have one simple geometry dimension in the same sense.
One feature can still have one set of attributes
In GeoJSON, a Feature can use a GeometryCollection as its geometry while keeping one shared properties object.
That means a point, line and polygon inside the collection can all inherit the same feature-level attributes. While this may be appropriate when the components genuinely form one conceptual feature, it can create ambiguity when they actually need separate identities or metadata.
If each component has its own name, date, quality or lifecycle, separate Features are usually clearer.
Why renderers can struggle with collections
Many map layers assume that all features have the same basic geometry family. Point layers use point symbols, line layers use strokes and polygon layers use fills.
A GeometryCollection breaks that assumption, so a renderer may need to style each component by type, split the collection internally, ignore unsupported members or reject the feature altogether.
Similar problems appear in file conversion. A target format that supports only one geometry type per layer may require the collection to be exploded into separate point, line and polygon outputs.
The collection can therefore be valid according to a spatial standard while still being operationally inconvenient.
Spatial functions may return only part of what you expect
Downstream algorithms can treat mixed dimensions differently.
A workflow interested only in polygon area may correctly ignore line and point members. A line-length calculation may ignore polygonal components. A conversion that extracts polygon members can silently drop points unless the user knows the collection was mixed.
Before passing GeometryCollections into a pipeline, inspect which geometry types are present and what the receiving operation does with each one.
GeometryCollections are often intermediate results
For many analytical workflows, the most natural role of a GeometryCollection is as an intermediate representation.
A spatial operation can preserve every geometric component first, after which the workflow can extract only the dimensions that matter. This avoids prematurely discarding information while still allowing clean homogeneous outputs later.
For example, an intersection result can be inspected and then separated into polygonal overlaps, shared boundary lines and isolated contact points if each component has a different analytical meaning.
When to keep one
Keeping a GeometryCollection makes sense when:
the mixed components genuinely belong to one conceptual result;
preserving all dimensional components is important;
the downstream software supports collections reliably;
one shared attribute record is appropriate.
Splitting it is usually preferable when:
points, lines and polygons need different styles;
components need different attributes;
the next tool accepts only one geometry family;
measurements should be performed separately by dimension.
Do not confuse heterogeneous geometry with multipart geometry
A multipart polygon remains polygonal. A GeometryCollection may mix entirely different geometry families.
This distinction is important because a MultiPolygon can usually be treated as one polygonal feature for area, containment and polygon styling, while a GeometryCollection may require type-specific logic.
If the real issue is whether disconnected polygon parts should remain one feature or several, see Multipart Features vs Multiple Features instead.
References
OGC Simple Feature Access. Defines GeometryCollection and the geometry hierarchy used across many GIS systems.
RFC 7946 — The GeoJSON Format. Defines GeoJSON GeometryCollection objects and their member geometries.
Related content
Polygon vs MultiPolygon — homogeneous multipart polygon geometry
Multipart Features vs Multiple Features — geometry parts versus feature records