Solutions to the problem of calling the GP Tool erase in ArcGIS

Source: Internet
Author: User

About calling the GP tools. Erase and symdiff in ArcGIS

Solution to the problem without generating results

□/ 文3 echo

I. Problem description:

Recently, I am working on a data check tool to check the correctness of the topological relationship of the spatial data. I use the following code to achieve the effect of the image erasure and the effect of the image difference set. It is strange that no result file is generated.

1. Erase the effect code

Erase terase = new erase ();

Terase. in_features = tinfeatures; // The layer to be erased.

Terase. erase_features = terasefeatures; // erase the Layer

Terase. out_feature_class = strfilename; // output file path

Terase. cluster_tolerance = This. m_tolerance; // The tolerance value.

 

2. difference set effect code

Symdiff tsymdiff = new symdiff ();

Tsymdiff. in_features = tinfeatures;

Tsymdiff. update_features = tupdatefeatures;

Tsymdiff. out_feature_class = strfilename;

Tsymdiff. cluster_tolerance = "0.01"; // This. m_tolerance;

Tsymdiff. join_attributes = "all ";

 

Ii. Problem Analysis

Possible reasons for not generating the result file are as follows: one is that the parameter settings are incorrect. For example, if the tolerance value is a numeric text, that is, the result file cannot be generated. The second is that the element class settings are incorrect.

I carefully checked the two cases and found that the code I wrote was indeed correct, but it was really strange to come to the results from the outputs.

Iii. Problem Solving

The license authorization problem is finally found. If we set the permission lower than ArcInfo when the program starts to run, the generated results will not be obtained. If you don't believe it, you can try using ArcMAP. Therefore, we need to grant the correct permissions when initializing the license.

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.