91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 275KB
    文件類型: .zip
    金幣: 2
    下載: 3 次
    發(fā)布日期: 2021-05-05
  • 語言: 其他
  • 標(biāo)簽:

資源簡介

工具針對arcgis界址點編號,十分好用!

資源截圖

代碼片段和文件信息

#?-*-?coding:?cp936?-*-
#一月前的寫的一個小工具,實現(xiàn)按照宗地實現(xiàn)對界址點從左上角開始,按順時針方向進(jìn)行編號,內(nèi)環(huán)編號
#方向為逆時針。編寫環(huán)境為ArcGIS9.3在32位的操作系統(tǒng)上(包括win7?32位)速度還可以,64位要慢
#很多。操作對象位arcmap中加載的宗地面層和界址點層。編號結(jié)果寫在TOPRS_JZDH字段中,運行時會創(chuàng)建
#TOPRS_JZDH、TOPRS_BZ兩個文本字段中,建議在非編輯環(huán)境下使用該工。
#如有疑問?歡迎發(fā)EMAIL至ryx32@126.com
#---------------------------------------------------------------------------

class?Feature_No():

????pass

class?Feature_No_J():

????pass

import?arcgisscripting

import?math

import?cmath

import?time

gp?=?arcgisscripting.create(9.3)

gp.OverWriteOutput?=?1

jctb_shp?=?gp.GetParameterAsText(0)

jzd_shp?=?gp.GetParameterAsText(1)

#tbbh_s?=?long(gp.GetParameterAsText(2))

bh_w?=?long(gp.GetParameterAsText(2))

qz?=?gp.GetParameterAsText(3)

rownum?=?0

tbbh_s?=?1

try:

????gp.Addmessage(“***********************************************“)
????
????gp.AddMessage(“本工具由中測新圖(北京)遙感技術(shù)有限責(zé)任公司?任延旭編制“)

????gp.AddMessage(“使用前請做好數(shù)據(jù)備份,工具產(chǎn)生的不良后果請自行承擔(dān)!“)

????gp.Addmessage(“***********************************************“)

????result?=?gp.GetCount_management(jctb_shp)

????count?=?int(result.GetOutput(0))

????if?count?!=?1:

????????raise?Feature_No

????desc?=?gp.Describe(jctb_shp)
????
????spatialRef?=?gp.Describe(jctb_shp).spatialReference

????if?len(gp.ListFields(jzd_shp“TOPRS_BZ“))?<=?0?:

????????gp.AddField_management(jzd_shp?“TOPRS_BZ“?“TEXT“?““?““?“5“?““?“NULLABLE“?“NON_REQUIRED“?““)

????if?len(gp.ListFields(jzd_shp“TOPRS_JZDH“))?<=?0?:

????????gp.AddField_management(jzd_shp?“TOPRS_JZDH“?“TEXT“?““?““?“5“?““?“NULLABLE“?“NON_REQUIRED“?““)

????gp.MakeFeaturelayer(jctb_shp“l(fā)yr_z“)

????gp.SelectlayerByAttribute_management(jzd_shp?“CLEAR_SELECTION“?““)

????gp.MakeFeaturelayer(jzd_shp“l(fā)yr_j“)???

????gp.SelectlayerByLocation_management(“l(fā)yr_j“?“INTERSECT“?“l(fā)yr_z“?““?“NEW_SELECTION“)

????gp.CalculateField_management(“l(fā)yr_j“?“TOPRS_BZ“?“\“N\““?“PYTHON“?““)

????gp.MakeFeaturelayer(“l(fā)yr_j““l(fā)yr1“)
????
????rows_j?=?gp.SearchCursor(“l(fā)yr1“)

????row_j?=?rows_j.next()

????shapefieldname?=?gp.Describe(“l(fā)yr_z“).shapeFieldName

????rows?=?gp.SearchCursor(“l(fā)yr_z“)

????result_pt?=?gp.GetCount_management(“l(fā)yr1“)

????count_pt?=?int(result_pt.GetOutput(0))

????row?=?rows.next()

????feat_1?=?row.GetValue(shapefieldname)

????pt_l?=?feat_1.labelPoint

????extent_jzd?=?feat_1.Extent

????x_min?=?extent_jzd.XMin

????y_max?=?extent_jzd.YMax

????dis_Min?=?0

????x_j?=0

????y_j?=?0

????#gp.AddMessage(“正在計算編號起點位置.......“)

????geom?=?row_j.shape

????pt_j?=?geom.getPart()
????
????dis_Min?=?math.sqrt((pt_j.X?-?x_min)*(pt_j.X?-?x_min)+(pt_j.Y-y_max)*(pt_j.Y-y_max))

????x_j?=?pt_j.X

????y_j?=?pt_j.Y

????rownum?+=?1
????
????row_j?=?rows_j.next()

????gp.SetProgressorLabel(“正在計算編號起點位置.......“)
????
????while?row_j:

????????rownum?+=?1

????????geom?=?row_j.shape

????????pt_j?=?geom.getPart()

????????dis?=?math.sqrt((pt_j.X?-?x_min)*(pt

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????3209??2012-06-20?09:09??tbbh_auto93.py
?????文件??????281068??2012-11-06?15:21??使用說明.pdf
?????文件????????7680??2012-11-05?10:32??界址點編號工具.tbx
?????文件????????6963??2012-11-06?11:52??bh_20120921.py

評論

共有 條評論

相關(guān)資源