在 ESRI/ArcSDE 中编写脚本或自动创建要素类
我正在寻找有关如何编写 SQL 脚本以在 ArcSDE 中自动创建版本化要素类的信息,我希望能够自动化该过程本身并将脚本置于版本控制之下。任何人都可以向我指出解释如何执行此操作的资源吗?
这可能吗?添加要素类后,表和数据之间似乎存在很多相互关系。
PS 它不一定是纯 SQL,但它应该是某种脚本,这样我们就可以保存到版本控制并在 ESRI 桌面工具之外运行。
I'm looking for info on how to write SQL scripts to automate the creation of a versioned feature class in ArcSDE I want to be able to automate the process itself as well as put the scripts under version control. Can anyone point me to a resource that explains how to do this?
Is this even possible? It seems like there are lots of interrelationships between tables and data when a feature class is added.
P.S. It doesn't have to be pure SQL, but it should be some kind of scripting so we can save to version control and run outside of ESRI desktop tools.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 SQL 中执行此操作而不破坏数据库是极其困难的。正如您所指出的,表之间有很多关系,如果您没有正确处理,那么您的数据库就会混乱。
如果您正在寻找脚本化解决方案,您可能需要考虑创建一个 Python 脚本来创建版本化要素类。有多种方法可以实现此目的,从在记事本中创建原始 Python 脚本,到在 ArcCatalog 中创建地理处理模型并将模型导出到 Python 脚本。
以下是有关地理处理脚本的 ESRI 帮助的链接: http://webhelp .esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_writing_geoprocessing_scripts
It would be exceedingly difficult to do this in SQL without breaking your database. As you indicated, there are a lot of relationships between the tables, and if you don't get it right, then your database is messed up.
If you're looking at a scripted solution, you might want to look at creating a Python script to create the versioned feature class. There are a few ways to do it, from creating a raw Python script in Notepad, to creating a geoprocessing model in ArcCatalog and exporting the model to a Python script.
Here's a link to the ESRI help on geoprocessing scripts: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_writing_geoprocessing_scripts