Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize batch Modification of fly Engineering Vector layer in TE

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to achieve batch modification of fly engineering vector layers in TE. I hope you will get something after reading this article. Let's discuss it together.

In the process of making fly, you need to publish the vector layer of the network address, or switch the vector layer to the local address. In the packaging function of TE, the vector layer of the local address can not be packed into a network address, and it needs to be modified manually. When there are a large number of vector layers, it is still a big workload to modify.

In the program developed by te, the batch modification can be carried out by combining the traversal method of fly project and the connection string of vector layer, so as to reduce the workload of modification.

The local data connection string for a vector layer is in the following format: FileName= vector layer path + layer name; TEPlugName=OGR

Network connection string of vector layer, take the data published by sfs as an example: Server= http://ip address / SFS/streamer.ashx;WFSVersion=1.1.0;LayerName= layer name; CRS_XY_OR_YX=1;SFS=1;TEPlugName=WFS

In the two connection strings, the layer name is consistent at the time of publishing and can be replaced by the program.

First of all, traverse the function of the layer. There is a detailed sample code in the API of TE, where you can find a reference.

After traversing to the vector layer, you can get the layer IFeatureLayer66 _ flayer = _ sgWorld.ProjectTree.GetLayer (treeid) according to the layer id.

String _ layerConStr = _ flayer.DataSourceInfo.ConnectionString

In this way, the connection string of the layer can be obtained, the name of the layer can be found from the string, and the connection string of the layer can be replaced with a new one. The updated layer needs to be refreshed with the code.

_ flayer.DataSourceInfo.ConnectionString = _ neturl

_ flayer.Refresh ()

Note: to connect the layer of the network version, you need to modify the program to connect to the server, otherwise the refresh cannot be performed and the refresh of the layer cannot be achieved.

After reading this article, I believe you have a certain understanding of "how to achieve batch modification of fly engineering vector layers in TE". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report