Arcgis Engine 提示The operation cannot be performed on a non-simple geometry.

Background to the issue:

SDE for using search query and the layers were layers goal Geometry intersect. I get geometry is obtained by map sheet numbers. Error result: The operation can not be performed on a non-simple geometry.

Here Insert Picture Description
I pGeometry which is obtained through the frame No geometry.

Solutions:

I will give you my complete solution ideas, here is the customer service and esri discussed. First, you can use arcgis map of GP tools, the specific location is in the tool - can be found in the Geometry check - Data Management ---- factors. This can be checked with a search tool will be of layers. To see if there is an error problem.
Note: If your data is in the presence of SDE is no need to be checked, because SDE carry out storage time is a certain degree of inspection work, once does not meet the requirements, are not allowed warehousing operations. If I have to check, you first need to first export the data to shpfile further examination.
The above is the search of the layers checked, followed by your incoming geometry to be checked.
Before you apply this geometry should execute this code:

((ITopologicalOperator)pGeometry).Simplify();

Simple explain the meaning of this code is actually very simple geometry is to your cast to simple geometry.
My problem is solved according to this code, so we continue to recover from the results of reasons.
Why I returned geometry is not a simple geometry it?
I guess because the frame No order is not returned to the same coordinates, so causing the above layers are rectangular, although mapcontrol boxy. But in fact is inconsistent connection sequence.

Then everyone science at ITopologicalOperator Interface:

See this direct link to it, to explain the comparative image. https://blog.csdn.net/sydbc/article/details/17710235

Personal summary: I am also a beginner arcgis engine, not deep understanding of the development of AE, but the question arises, to find a solution. AE entry is relatively simple, but in-depth understanding more difficult for each interface, a lot of hope that we can summarize a lot of communication, knowledge sharing, and grow together. Come on, you Gser! My Qiuqiu 384,510,683.

Published 14 original articles · won praise 15 · views 334

Guess you like

Origin blog.csdn.net/weixin_42970847/article/details/103051634