Kontinuation commented on issue #2137:
URL: https://github.com/apache/sedona/issues/2137#issuecomment-3105377594
> IN org.apache.sedona.common.Functions.lineMerge when
(merger.getMergedLineStrings().size() > 1) , the output may be multiple
separate linestrings belongs to the merger result, it makes mistake when return
the input geometry :
>
> else { // if the merger couldn't join the lines, it will contain the
individual lines, so return // the input return geometry; }
>
> =>>
>
> else { Object[] mergedlinestrings =
merger.getMergedLineStrings().toArray(new LineString[]{}); MultiLineString
multiLineString = geometry.getFactory().createMultiLineString((LineString[])
mergedlinestrings); return multiLineString; }
Looking at the
[documentation](https://sedona.apache.org/latest/api/sql/Function/?h=st_linemerge#st_linemerge),
the current behavior seems to be intentional.
I think the change you proposed make sense, We can make this behavior change
to be semantically consistent with [ST_LineMerge in
PostGIS](https://postgis.net/docs/ST_LineMerge.html).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]