Opened 2 years ago

Closed 2 years ago

#5161 closed enhancement (fixed)

Exposed GEOSLineMergeDirected

Reported by: mdavis Owned by: pramsey
Priority: medium Milestone: PostGIS 3.3.0
Component: postgis Version: 3.2.x
Keywords: Cc:

Description

(Moved here from Dev list)

Expose the enhanced GEOS functionality GEOSLineMergeDirected

How should it be exposed in PostGIS? Nicest might be an optional "directed=false" flag on ST_LineMerge. But will that cause upgrade problems?

Change History (6)

comment:1 by mdavis, 2 years ago

Regina says:

It won’t cause any problems if you overload it rather than add a default arg.

The default arg is cleaner, since we won’t have an additional function to contend with.

The main danger with adding a default arg is anybody who is using ST_LineMerge in views will have some upgrade issues. Since adding a default arg requires dropping the old version.

Though Sandro made some adjustments to partly resolve that. https://trac.osgeo.org/postgis/ticket/5033

It renames the old function (assuming you put in the right availability comments) and then if there are views dependent on the old (because views references the oid of the function, and not the function name), then the upgrade will be in an incomplete upgrade state (will just have those dangling old names)

https://trac.osgeo.org/postgis/changeset/3d947448b9c939b321bc22b85c719845722ecc3d/git

comment:2 by komzpa, 2 years ago

Resolution: duplicate
Status: newclosed

Duplicates #4939

comment:3 by mdavis, 2 years ago

Resolution: duplicate
Status: closedreopened

This is the fix for #4939

Version 0, edited 2 years ago by mdavis (next)

comment:4 by sergeish, 2 years ago

Tests using GEOS main branch (3.11.0dev) are failing on Github (PR: https://github.com/postgis/postgis/pull/688) when building PostGIS with error: implicit declaration of function 'GEOSLineMergeDirected' -- it seems that GEOS is a bit stale.

Is it updated automatically? Do I need to ask somebody to do it?

comment:5 by robe, 2 years ago

Decided name is ST_LineMerge as Sergei has coded.

comment:6 by sergei sh <sshoulbakov@…>, 2 years ago

Resolution: fixed
Status: reopenedclosed

In 9b0809b/git:

ST_LineMerge overload with "directed" argument.

Closes #5161

Note: See TracTickets for help on using tickets.