0

I'm not really asking for a chunk of code to do this, but more of an algorithm I can work with myself.

For example, this is the state of Maine, obviously, and I have the points of each county stored as an individual polygon. I am looking to process all of those points in whatever way possible to end up with only the outer outline.

Does having islands outside of the outline complicate things?

I know this is easy in QGIS but I need to be able to do it on the fly with a PHP script. Note2: Maine is just an example, I know state outlines are available elsewhere. I could have any number of counties from potentially more than one state.


This question differs from others in that it is absolutely necessary for it to be done in PHP code, and not in GIS editing programs. In addition, this problem is more complicated than simply generating a convex hull as concave contours are a definite possibility. I honestly have no idea where to even begin.

0

2 Answers 2

1

You may use GeoTools, which is an open source java toolkit, for doing your union/dissolve process, check out this Q/A:

combine several polygon objects in one polygon object with geotools (is it possible)?

1

This is a pure PHP polygon class that offers many geometric operations such as union and intersect. The library is released under GNU license. http://www.phpclasses.org/package/2544-PHP-Perform-geometric-operations-on-polygons.html

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.