简体   繁体   English

如何更改我在 arcpy 中的符号系统以获得清晰的轮廓点?

[英]How do I change my symbology in arcpy to have a clear outline point?

I am not sure why my arcpy result's point outline is not changing to clear in ArcGIS Pro.我不确定为什么我的 arcpy 结果的点轮廓在 ArcGIS Pro 中没有更改为清除。 Everything else works, except for the outline syntax.除了大纲语法外,其他一切都有效。 Is there anything wrong with my syntax or this may be a ArcPro bug?我的语法有什么问题吗,或者这可能是 ArcPro 错误?

`#Add spatial join layer to the current map
p = arcpy.mp.ArcGISProject('CURRENT')
m = p.listMaps('CompTool')[0]
layer = Stream_Comp.getOutput(0)
m.addDataFromPath(layer)

#Format symbology rendering 
l = m.listLayers(StreamComp_Name)[0]
sym = l.symbology


if sym.renderer.type == 'SimpleRenderer':
    sym.updateRenderer('GraduatedColorsRenderer')
    sym.renderer.classificationField = Comp_Field
    sym.renderer.classificationMethod = 'NaturalBreaks'
    sym.renderer.breakCount = 7


#Updating Symbology Rendering - error:nothing happens to the symbol outline     
for brk in sym.renderer.classBreaks:
    brk.symbol.size = 6
    brk.symbol.outlineColor = {'RGB' : [0, 0, 0, 0]}` 

I'm not sure if you put it there by mistake, but you have a " ' " at the end of your brk.symbol.outlineColor line.我不确定你是否把它放错了,但你的 brk.symbol.outlineColor 行的末尾有一个“'”。 Not sure if it's in your code or not, but if that single quote is there, you're probably getting a mismatched quotes syntax error.不确定它是否在您的代码中,但如果该单引号存在,您可能会收到不匹配的引号语法错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何检查 arcpy 中的搜索光标是否为空? - How do I check if my search cursor is empty in arcpy? 如何在 arcpy 中使用替换功能? - How do I use the replace function in arcpy? 如何使用arcpy.mp更改布局中向北箭头的位置? - How do I change the position of a north arrow in a layout using arcpy.mp? Arcpy脚本循环 - 如何遍历文件夹中的表并在每个表上执行arcpy join功能? - Arcpy Script Looping - How do I loop through tables in a folder and perform arcpy join function on each table? 如何清除我在 if 语句之外引用的变量? - How do I clear a variable that I have referenced outside of my if statement? 如何在 Python 中向值表 (ArcPy) 添加一行? - How do I add a row to a value table (ArcPy) in Python? 如何将我的浮点数更改为两位十进制数字,并使用逗号作为python中的小数点分隔符? - How do I change my float into a two decimal number with a comma as a decimal point separator in python? 如何在 Python 中的 tkinter 画布上更改形状轮廓的粗细? - How do I change the thickness of a shape's outline on a tkinter canvas in Python? 如何将矩形轮廓粘贴到曲面上? - How do I blit a rectangular outline to a surface? 如何在 Python 的函数中清除位置 arguments? - How do I clear positional arguments in my function(s) in Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM