资源简介
1. 制作地图文档(*.mxd); 2. 发布地图文档; 3. 制作服务器缓存; 4. 生成切片; 5. 打包成zip 详情:http://blog.csdn.net/dahongdahong/article/details/51447680
代码片段和文件信息
#coding=utf8
import ossystimezipfilezlib
import arcpy
import xml.dom.minidom as DOM
reload(sys)
sys.setdefaultencoding(‘utf8‘)
# 创建map document
def CreateMxd(imagepathmxdpath):
dirname=os.path.dirname(imagepath)
imagename=os.path.basename(imagepath)
dotindex=imagename.index(‘.‘)
name=imagename[0:dotindex]
new_mxd=os.path.abspath(dirname+“/“+name+“.mxd“)
rasterlayer=“raster“
temp_mxd = arcpy.mapping.MapDocument(mxdpath)
df=arcpy.mapping.ListDataframes(temp_mxd“layers“)[0]
arcpy.MakeRasterlayer_management(imagepathrasterlayer““““““)
addlayer=arcpy.mapping.layer(rasterlayer)
arcpy.mapping.Addlayer(dfaddlayer“TOP“)
sourcelayer = arcpy.mapping.Listlayers(temp_mxd “raster“ df)[0]
symbologylayer = arcpy.mapping.layer(os.path.dirname(mxdpath)+“/symbology.lyr“)
arcpy.mapping.Updatelayer(df sourcelayer symbologylayer True)
temp_mxd.saveACopy(new_mxd)
del temp_mxd
return ne
- 上一篇:VS2012代码格式化插件Indent Guides
- 下一篇:非常好控制的万历表
相关资源
- Deep_Learning_2016.pdf
- zw_Classification1.zip
- Griffiths-IntroductiontoElectrodynamics4thEdit
- ParaViewTutorial.pdf
- xyisv_10236804.zip
- 计算机图形学第4版高清电子书.pdf
- 《多粒度知识获取与不确定性度量》
- 华成英模电课件.zip
- 70d0cd041f738f12db575d3b46e97582.pdf
- OfficeTabEnterprise13.1.zip
- wxu998.rar
- PowerDesigner16.5汉化文件.rar
- jsgis.zip
- PinyinIME(关键代码写了注释).zip
- 锁相环设计、仿真与应用第5版中.pd
- novelOnLine.zip
- SingleSensorImagingMethodsandApplicationsforDi
- ControlSystemsEngineering7th(NormanS.Nise)
- ModernControlSystems13th(RichardC.Dorf).ra
- VectorMagic_1.15pojie.rar
- complexityoflattice__problems.pdf
- xnby_883749.zip
- TOGAF培训讲义-周金根.pdf
- OS12.2驱动,手机虚拟定位软件,Loca
- 大话系列-大话数据结构(pdf高清版)
- 梁宁产品经理思维30讲.pdf
- CHI760E辰华电化学工作站软件最新版
- SAPERPHCM葵花宝典系列之配置指南(电
- TangZhuoLin.rar
- Day3_NOI.zip
评论
共有 条评论