[Arcengine + geoprocessor] algorithm analysis process and implementation of intersection Polygon

Source: Internet
Author: User
There is often a need to merge all the intersecting Polygon into one.
No available tools are found in arctoolbox. (Merge, union is not this function. Dissolve is a combination of attributes.
So I want to use dissolve.
Set a field to be merged and take the same value.
This setting is similar to the connected component of graph theory. The equivalence class is divided on the set.
Remember that in data structure, the construction of equivalence classes is implemented using binary trees.

However, in. net, there are statck and queue, and there is no tree data structure (of course there is Treeview UI ).
So on codeplex, find the tree and find a datastruct class library. (How nice it would be to have a classic perfect datastruct !)
It implements binarytree, searchtree, and black-red tree. All are generic-based.

Try again. But I always feel that this open-source project is not mature enough to be used.

After dinner, lie in bed and think about this problem.
I want to use a set to solve the problem. But it's not elegant: Chaos!

Later I thought of my ownCodeAnd use arrays to divide equivalence classes.
There is no doubt about the Array Performance.
In addition, the space complexity is the smallest, and of course the time complexity is high.
HoweverProgramSimple Design and time complexity can be compensated by the performance of the array.

Finally, an array is used as the temporary data structure to query the spatial relationship of elements one by one. If the array values are the same, they are intersecting (undirected ), belongs to the same equivalence class and should be merged.

With the equivalence class, it is easy to directly use geoprocessor + dissolve.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.