Opened 4 years ago

Last modified 4 years ago

#3973 new patch

geography implementation for ST_Intersection ST_Difference ST_Union

Reported by: dangerground Owned by: pramsey
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: 2.4.x
Keywords: Cc:


This patch adds an geography implementation for ST_Intersection, ST_Difference and ST_Union with (Multi)Polygon as parameters. The algorithm is based on Greiner-Hormann and also supports holes within the polygons. I worked on this for some time, but currently lacking spare time for further testing and implementing support for lines in polygons. Also no support for the aggregate version of union is provided by this patch.

I developed this as part of my master thesis, so I can provide additional information if necessary. The thesis is written in german and I don't want it all over the internet, so I won't provide a link, but I can share in private.

Attachments (1)

overlays.patch (53.4 KB) - added by dangerground 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by dangerground

Attachment: overlays.patch added

comment:1 Changed 4 years ago by komzpa

Thanks for the implementation!

I don't see _expected file for your regression tests, so I don't know what results should compare to.

Do you have git branch on some of the mirrors (github/gitlab/gitea) and a pull request to comment inline? A pull request on will show code test coverage as well.

comment:2 Changed 4 years ago by robe

Milestone: PostGIS 2.4.3PostGIS Fund Me

this is all new functionality so can't go into 2.4.3 anyway.

I doubt it can go into 2.5.0 either given all the testing this will require.

In theory it would need funding at least for testing and QA for such major a change even though it does have a patch..

comment:3 Changed 4 years ago by komzpa

I've pushed the patch as a pull request:

@dangerground, can you please at least make your patch compile, so we can have a look at already existing test coverage?

Here's failing travis build:

comment:4 Changed 4 years ago by komzpa

@dangerground I've fixed the compile.

Now it doesn't pass -Werror (there are warnings, and they're as bad as using multi-things in place for things), and breaks regression tests.

Here are the logs:

Note: See TracTickets for help on using tickets.