You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ST_LineMerge returns GEOMETRYCOLLECTION EMPTY for LineString input instead of passing it through #2702
In Functions.java line 1198, lineMerge only handles MultiLineString and falls through to returning an empty GeometryCollection for all other types — including LineString:
publicstaticGeometrylineMerge(Geometrygeometry) {
if (geometryinstanceofMultiLineString) {
// ... merge logic ...
}
returngeometry.getFactory().createGeometryCollection(); // <-- LineString hits this
}
Suggested fix
Add a check for LineString before the MultiLineString block:
publicstaticGeometrylineMerge(Geometrygeometry) {
if (geometryinstanceofLineString) {
returngeometry; // A single LineString is already merged
}
if (geometryinstanceofMultiLineString) {
// ... existing merge logic ...
}
returngeometry.getFactory().createGeometryCollection();
}
Activity
Implement GeoSeries: reverse, normalize, representative_point
Implement GeoSeries: reverse, normalize, representative_point
Fix ST_LineMerge returning empty collection for LineString input
Fix ST_LineMerge returning empty collection for LineString input
[GH-2702] Fix ST_LineMerge returning empty collection for LineString …