-1

I would like to create a single polygon from two adjacent polygons that may not share any boundaries (there may be a gap between the two polygons) so that I end up with one final polygon that encompasses both polygons and the space between them. OperatorUnion does not work for this scenario.

Convex hull is not what I'm looking for, by the way.

Any suggestions would be nice, thx.

QigangZhong
  • 21
  • 1
  • 5
  • Welcome to Stack Overflow. Please take the [tour] to learn how Stack Overflow works and read [ask] on how to improve the quality of your question. Then [edit] your question to include the source code you have as a [mcve], which can be compiled and tested by others. Also check the [help/on-topic] to see what questions you can ask. Please see: [Why is “Is it possible to…” a poorly worded question?](https://softwareengineering.meta.stackexchange.com/q/7273). – Progman Jul 11 '20 at 08:55

1 Answers1

0

in your case it is best to duplicate your shapefile ;

if your boundaries are too far , it is preferable to create a polygon between them and then merge everything ;

if your boundaries are too close or overlapping just at certain points , if you are using ArcMap , you can use the align to shape tool located in the advanced editing toolbar , just specify the buffer between your 2 boundaries and trace along the boundary .

is147
  • 118
  • 7
  • Thank you very much. I was looking for some kind of algorithm which I can write in java language. Given two or more polygons, if they overlap each other, I can just merge or union them. But if they don't, I would like to draw another polygon which can encompass all of them. Or just link them up by filling the blanks between them. Some example images: [example1](https://github.com/QigangZhong/gis-demos/blob/master/imgs/outline%20of%20polygons-2.jpg),[example2](https://github.com/QigangZhong/gis-demos/blob/master/imgs/outline%20of%20polygons-3.jpg) – QigangZhong Jul 12 '20 at 09:29
  • i know your issue , but in GIS if you are using vectors they must have a geometric topological structure in order to do this operation , if we have 2 separate polygons , this structure does not exist and it must be created manually. – is147 Jul 13 '20 at 13:16