score:1
the union computation, as cited by @martinfrank, would work, but is quite complex and more than is needed in this case. clearly if you can merge two polygons p1 and p2 that share some positive length of boundary, you can merge any number. from the image provided, it appears that the polygons may exactly (as opposed to approximately) share boundary portions. if this is the case, then the following would work.
walk (loop) around the boundary of p1, checking if the current vertex is also a vertex of p2. once you have identified a common shared vertex v, then it is easy to walk forward & backward around the two polygons until you identify starting a and stopping b vertices that delimit the extent of the shared boundary. then delete that ab portion, and stitch the two remaining boundary sections together to form p1 union p2.
Source: stackoverflow.com
Related Query
- how to merge several polygons into one in java
- How to add several views into one tab group in workbench perspective?
- How to merge a.jar,b.jar,c.jar,d.jar into one single jar called e.jar in eclipse IDE project? can you tell the steps to do this?
- How can I put multiple Java exercises into one class in Eclipse?
- How to merge two maven webapps into one project
- How to write a converted to byte array text file content into another one in java
- How to format all Java files in an Eclipse project at one time?
- How to change an Eclipse default project into a Java project
- How to import a GIT non-Eclipse Java project into Eclipse?
- How do I merge a CVS branch into HEAD using the Eclipse merge tools?
- How do I check out an SVN project into Eclipse as a Java project?
- How do I go about adding an image into a java project with eclipse?
- How do I import a pre-existing Java project into Eclipse and get up and running?
- How do you combine two tabs into one floating window in Intellij?
- how to import java source into eclipse?
- How to import a java project missing .project .settings .classpath files into eclipse
- How can I step into a core java class method in Eclipse?
- How can I prevent Eclipse from stepping into Java library code
- How to Merge GWT (Google Web Toolkit) Project and Dynamic Web Project (i.e. Java Web App/Servlets) in Eclipse?
- How to import one Eclipse project as a library into another?
- How to import Java file into Eclipse
- How to launch multiple Java programs with one configuration on separate consoles (with Eclipse)
- How do I properly organize jars into one folder in Eclipse?
- How do I integrate the Java EE docs / API into Eclipse?
- How to import class into existing Java project, with Eclipse
- How to deploy an Eclipse java project into a jar file
- How to show two list items result into one, for multiple results. Using java in selenium Webdriver
- How do I organize my Java Eclipse project so that the user then only needs to do one import?
- How to copy Eclipse app with it's all projects and space from one Mac into another?
- How to add one standalone project into another maven project
More Query from same tag
- Dynamic Reloading with Glassfish and Eclipse
- Do synthetic methods generated for private fields really incur performance penalty?
- Can't include my folders in the executable .jar file
- Eclipse Oxygen plug-in Missing Constraint: Import-Package
- Pydev Eclipse won't allow me rename module
- What can be the reasons that Spring STS hangs?
- Need to setup Subversion in my local box
- NPE running Acceleo generator
- Google app engine deployment : JDK not JRE
- Eclipe mars error
- Running Maven Struts2 app on tomcat
- Adding TextView dynamically in RelativeLayout
- Android application works in emulator but failed in device
- Is it possible to have CDT and Java IDE together in Eclipse?
- Using keytool to install a security certificate
- Getting "The POM for <name> is invalid, transitive dependencies (if any) will not be available" only in Eclipse
- Building workspace hangs at 50% invoking JSHintProblemChecker on </projectname>: Eclipse
- Creating a "closed" shareable project for Android
- Installing Glassfish to work with Eclipse
- Different compile times between IntelliJ and Eclipse IDE
- Eclipse - make overriden methods and class final by default
- Starting activity in Android - Eclipse always shows an error
- Syntax Error Eclipse in R.java
- Android-NDK Project Eclipse build error
- Default font in Eclipse on OSX is terrible (and blurred)
- Error with org.slf4j.Logger
- Eclipse java web project manual set lib folder in WEB-INF
- Eclipse workspace won't show my project anymore
- HtmlUnit NoClassDefFoundError
- Eclipse plugin development- Different folder with different popup menu options in package explorer