zoukankan      html  css  js  c++  java
  • arcgis pro python和arcmap python的不同

    ArcMap布局只能矩形,Pro可以是圆形,多边形的,ArcMap可以插入元素,Pro中地图不能插入元素,ArcGIS Pro可以在线更新

    ArcMap字段计算器有VB,Pro没有,字段计算器没有VB语法,是PYTHON3,标注Pro有VB

    pro字段是别名,print(),ArcMap是print 不加空格,

    string.split(arcpy.GetParameterAsText(0), ";") 修改arcpy.GetParameterAsText(0).split(";")

    pro中数据不放在汉字路径下,一个问题用了好几个小时

    在pro中,不需要加 u"没有数据",源码前面一定#coding=utf8

    在ArcMap中

    try

    except Exception, ErrorDesc:
    #If an error set output boolean parameter "Error" to True.
    arcpy.AddError(str(ErrorDesc))
    是正确

     Pro中

      try

     except Exception as err:

        arcpy.AddError(str(err))
    
    

     ArcMap可以

    mystr.decode('utf-8')

    Pro不可以

    pro中没有

    arcpy.CreatePersonalGDB_management(os.path.dirname(out_mdb),os.path.basename(out_mdb))
    文件地理数据库10.0和Pro是兼容的

     ArcMap是默认是绝对路径,Pro是相对路径

    =========================

    在ArcMap中可以

    unicode(titlestr)
    pro不需要
    ===================================
    arcmap中
    filepath+"/Band_1"
    pro中
    filepath+"/Layer_1"
    ===========================
    ArcMap中arcpy.mapping.MapDocument("CURRENT")修改pro中arcpy.mp.ArcGISProject("CURRENT")
    arcpy.mapping修改arcpy.mp
    ===================================
    Pro中增加图层
    mxd = arcpy.mp.ArcGISProject("CURRENT")

    df = mxd.listMaps()[0]
    addLayer = df.addDataFromPath(outFeature)
    df.addLayer(addLayer)
    Map
    
    

    mxd = arcpy.mapping.MapDocument("CURRENT")
    df = arcpy.mapping.ListDataFrames(mxd)[0]

    addLayer = arcpy.mapping.Layer(outFeature)
    arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")

    =============================================

    arcmap 

    string.atof           pro中float
    =================================
    ArcMap是
    arcpy.ConstructSightLines_3d
    Pro
    
    
    arcpy.ddd.ConstructSightLines
    ========================================
    arcmap string.find(toolbox,"(") pro修改toolbox.find(toolbox,"(")
    ==================================
    ArcMap
    try:

    main()

    except Exception as e:
    arcpy.AddError(e.message)
    pro
    
    
    try:

    main()

    except Exception as e:
    arcpy.AddError(e)
    ======================================
    Pro没有arcpy.RefreshActiveView()
     
     
  • 相关阅读:
    树莓派4 (1)一键配置
    Android编码学习之Fragment
    android编码学习
    自动化中app支持schema跳转
    jenkins持续集成
    测试环境运维文章集锦
    HTML5 data-* 自定义属性
    了解一下JavaScript的未来——ECMAScript5
    ECMAScript5的其它新特性
    ECMAScript5 Array新增方法
  • 原文地址:https://www.cnblogs.com/gisoracle/p/12304269.html
Copyright © 2011-2022 走看看