yutannihilation opened a new pull request, #503:
URL: https://github.com/apache/sedona-db/pull/503

   This pull request implements `ST_LineMerge`.
   
   https://postgis.net/docs/en/ST_LineMerge.html
   
   This is mostly straightforward using GEOS's LineMerge via the geos crate. 
One thing to note is that, the direction-aware version 
(`.line_merge_directed()`) requires GEOS >= v3.11, which was [released 3.5 
years ago](https://github.com/libgeos/geos/releases/tag/3.11.0). I don't think 
this is a difficult requirement, but I'm not really sure.
   
   
https://github.com/georust/geos/blob/47afbad2483e489911ddb456417808340e9342c3/src/geometry.rs#L2796-L2802
   
   
   ```
   > SELECT ST_LineMerge(ST_GeomFromWKT('MULTILINESTRING ((0 0, 1 0), (1 0, 1 
1))'));
   
┌────────────────────────────────────────────────────────────────────────────────┐
   │ st_linemerge(st_geomfromwkt(Utf8("MULTILINESTRING ((0 0, 1 0), (1 0, 1 
1))"))) │
   │                                    geometry                                
    │
   
╞════════════════════════════════════════════════════════════════════════════════╡
   │ LINESTRING(0 0,1 0,1 1)                                                    
    │
   
└────────────────────────────────────────────────────────────────────────────────┘
   ```


-- 
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]

Reply via email to