Opened 3 years ago
Closed 3 years ago
#4939 closed enhancement (duplicate)
Add possibility to merge lines without changing order of points.
Reported by: | evgen | Owned by: | komzpa |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.3.0 |
Component: | postgis | Version: | 2.5.x -- EOL |
Keywords: | Cc: |
Description
There is a great function ST_LineMerge. But it could reverse lines in multiline to connect them. E.g.
`
SELECT ST_AsText(ST_LineMerge(
ST_GeomFromText('MULTILINESTRING((-29 -27,1 2),(-29 -27,-45 -33),(-45 -33,-46 -32))'))
);
`
returns LINESTRING(1 2,-29 -27,-45 -33,-46 -32)
but it could be MULTILINESTRING((-29 -27,1 2),(-29 -27,-45 -33,-46 -32))'
.
I process one way roads. When I merge them I'd like to keep point order to know original direction of that segments.
Change History (9)
comment:1 by , 3 years ago
Milestone: | PostGIS 3.1.3 → PostGIS 3.1.4 |
---|
comment:2 by , 3 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:3 by , 3 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
This is actual and needed in generating maps with one-way roads. If directions disagree don't merge.
comment:4 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:5 by , 3 years ago
Milestone: | PostGIS 3.1.4 → PostGIS 3.2.0 |
---|
Slating for 3.2.0 as it sounds like a behavior change rather than a bug. Might even need to go to 3.3.0 if we need to introduce a new arg.
comment:6 by , 3 years ago
Logged as JTS-773.
This is a worthwhile enhancement to JTS and GEOS. It could be exposed in PostGIS as an option to ST_LineMerge
.
comment:7 by , 3 years ago
Milestone: | PostGIS 3.2.0 → PostGIS 3.3.0 |
---|
comment:8 by , 3 years ago
git hub related pull request - https://github.com/postgis/postgis/pull/688
This seems unlikely to happen (when directions of merged lines disagree then…?) It's also something that can be reported upstream in the JTS repository. If there's interest there, or it's easy, it will eventually flow downstream to here.