arcgis10.5没有字符标记符号

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了arcgis10.5没有字符标记符号相关的知识,希望对你有一定的参考价值。

ArcGis无法显示标注怎么办
香香香香4782次浏览2019.03.25
在使用Arcgis标注矢量数据要素的时候,可能会出现无法显示标注的情况,下面给大家介绍一下如何解决无法显示的标注的情况。

开启分步阅读模式
工具材料:
ArcGis

操作方法
01
首先,点击打开arcgis,并加载图层,如图所示

02
在图层中双击shp文件,进入图层属性设置,如图所示

03
在图层属性中,点击进入标注选项卡,如图所示

04
在标注选项卡中,点击进入其他选项中的放置属性,如图所示

05
在放置属性中,将“仅在面中放置标注”的设置
取消勾选,点击确定即可,如图所示

06
然后在显示标注的要素即可,如图所示

本页搜狗指南内容仅供参考,请您根据自身实际情况谨慎操作。尤其涉及您或第三方利益等事项,请咨询专业人士处理。

0无帮助
查看全文
大家还在搜
arcgis标注后没有出现
arcgis标注怎么转注记
arcgis标注两行显示
标注转换为注记 arcgis
arcgis注记怎么调位置
arcgis标注要素不显示
arcgis标注字段不显示
arcgis注记显示不了
arcgis标注要素不见了
arcgis标注不显示
arcgis显示标注
arcgis标注牵引线制作
arcgis标注突然不显示了
arcgis标注不显示怎么办
arcgis怎么引出一条线标注
arcgis标注转化为注记转换不了
arcgis有些标注显示不出来
arcgis标注怎么添加牵引线
arcgis标注怎么只显示部分
arcgis标注转注记录怎么解决
arcgis标注牵引线不出来
arcgis标注缩小后不显示
arcgis设置了标注但不显示
arcgis怎么把标注转为注记
arcgis标注如何设置不压盖
arcgis小班注记无法显示
arcgis怎么将标注转为注记
arcgis标注超出位置怎么调
arcgis图层要素无法显示
arcgis数据标注拉不出来
arcgis有些标注显示不出来
arcgis标注怎么添加牵引线
arcgis标注怎么只显示部分
arcgis标注转注记录怎么解决
arcgis标注牵引线不出来
arcgis标注缩小后不显示
arcgis设置了标注但不显示
arcgis怎么把标注转为注记
arcgis标注如何设置不压盖
arcgis小班注记无法显示
arc
参考技术A ArcGIS 10.5没有字符标记符号,但它有一个强大的符号库,可以满足您的图形需求。它提供了多种类型的符号,包括点、线、面、文本和符号组合等,可以满足您的复杂地图需求。此外,ArcGIS 10.5还提供了一些额外的功能,可以帮助您更好地管理和组织您的符号库,以及更好地分析和编辑您的地图。

将识别列表中的空字符串并在那里打印标记/符号的函数(Python Tic-Tac-Toe)

【中文标题】将识别列表中的空字符串并在那里打印标记/符号的函数(Python Tic-Tac-Toe)【英文标题】:Function that will identify an empty string in a list and print a marker/symbol there (Python Tic-Tac-Toe) 【发布时间】:2021-06-30 17:33:01 【问题描述】:

这里是编码新手,正在使用 Python 编写我的第一个井字游戏。

最近问了this question,回复的人都很有帮助。除了我的代码不正确/没有以可以返回我想要的结果的方式编写之外,我意识到我已经超越了自己。我需要先编写一个函数,让我的井字游戏中的两个玩家(使用一台计算机)轮流,which I successfully completed。然后我意识到我需要确定我的井字棋盘上是否有空闲空间来放置标记(“X”或“O”),我将其表示为:

def space_check(board, position):
    
    return board[position] == ' '


space_check(test_board, 8)

问题:

现在,我很难编写一个函数来识别棋盘上的特定位置是否空闲,然后将玩家的标记(“X”或“O”)放置在空白处。

尝试过的解决方案(注意:下面的这些板是测试板,我使用'$'作为测试标记): 

board = ['#','a','b','c','d','e','f','g','h',' ']
marker = "$"
position=0

def place_marker(board, marker, position):


# while our position is an acceptable value (an int between 1 and 9)
    while position not in range(0,10):
        position = int(input("Choose a number from 1 through 9: " ))   
        

# at the board's position, place marker 'X' or 'O'
    board[position] = marker
    print(board)

place_marker(board, marker, position)

虽然这确实以列表的形式返回输出,但当我显示板时,板不受影响:

place_marker(board, marker, position)
display_board(board)

输出:

 | |  
g|$|$
 | |  
______
 | |  
d|e|f
 | |  
______
 | |  
a|$|c
 | |  

我也试过这个,但是代码不能在 VSC(我用于这个项目的主要 IDE)中运行,即使它在 Jupyter notebook 中工作:

test_board = ['#','a','b','c','d','e','f','g','h',' ']

def player_choice(board):

    position = 0
    
    while position not in [1,2,3,4,5,6,7,8,9] or not space_check(board, position):
        position = int(input("Choose your next position (1-9): " ))
        
    return position

player_choice(test_board)

输出:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-169-72130d7eb126> in <module>
----> 1 player_choice(test_board)

<ipython-input-168-37d67e2d2b88> in player_choice(board)
      7 
      8     while position not in [1,2,3,4,5,6,7,8,9] or not space_check(board, position):
----> 9         position = int(input("Choose your next position (1-9): " ))
     10 
     11     return position

ValueError: invalid literal for int() with base 10: ''

我知道我的理解存在差距,但我不知道我缺少什么或如何继续。被困在这里几天了,所以我很感激帮助!

更新:解决方案

 # NEXT STEP: write a function that can check for input in acceptable range AND check for free space

def player_choice(board):

# while player is taking a turn
while True:
    try:
        # ask player for input
        position = int(input("Choose a Number (1 -9): " ))
        
        assert 0 < position < 10 # ensure that this input is within range
        assert board[position] == ' ' # ensure that there is a free space on which to place the input as marker
    
    except ValueError: # override the ValueError exception

        print("You didn't enter a number. Try again!") # tell player that input was not in range
        
    except AssertionError as e:
        print(e)

    else:
        return position

【问题讨论】:

异常是由于数据类型无效类型转换为 int。也许您正在输入数字以外的数据。你应该在这里使用try except 【参考方案1】:

乍一看,如果使用int(input() 作为位置变量,如果它是一个空字符串 ('') 会导致错误,这就是你得到的错误。相反,试试这个:

position = input("Choose Position (1-9):   ")
try:
    position = int(position) # Trying to make position into an integer
except: # If there is an error, 
    if position == '':
        # Do whatever if position is empty
    else: # This means the position is not an integer, and not an empty string
        # Do something to force the player to enter an integer or an empty string
    

我们没有足够的代码自行尝试,所以我将尝试从这里提供帮助:)

更新

marker = '$'
while True:
    try:
        position = int(input('Choose a Number (1 -9)   '))
        break
    except ValueError:
        if not position:  # 'not' compares to an emptry value, or a False boolean.
                          # It's much clearer imo than == ''
            position = marker
        pass

在回复您的第三条评论时,NoneType 例外是当您有一个 None 值而需要另一个值(字符串或整数)时。当您收到错误时,您可以随时用 Google 搜索错误的含义。编程时开发的另一件好事是记住一些基本错误是什么,例如NoneTypeparsing error。在您的情况下,类型错误 NoneType 意味着您的列表中有一个 None 值。

【讨论】:

您好!谢谢你的回答!在此之前我还没有遇到过try/except(我正在学习的在线课程稍后会讨论它),所以我做了一些研究以了解什么是异常以及如何使用try/except。不过,我不确定我是否理解如何让代码做我想做的事。换句话说,当我运行您使用的确切代码时,添加了一个“else”参数(通俗地使用“parameter”,而不是 Pythonic 意义上的“argument”),我的板仍然没有更新新的标记。从好的方面来说,这确实促使我的输入函数实际运行。 Here's what happened 当我使用 try/except 运行我的第一个函数时:代码运行,但我的板没有改变(正如您从输出中看到的那样)。我可能做错了什么?在此先感谢您与我合作。我真的很想明白! @cybersuccubus,检查更新。我认为正在发生的是,该位置是您要放置标记的位置,并且由于用户没有输入有效位置,因此您无处放置标记。我的更新只是您所写内容的更简洁版本,它确保如果您的用户无法输入无效位置(在您的代码中,他们可以输入一次无效位置,然后输入另一个无效位置,它将通过) 由于一个严重的错字删除了我的最后一条评论。感谢您的更新!根据我对 try/except 的了解,我知道现在这让我更接近克服这个障碍。但是,它带来了另一个问题:在我的代码中,我有以下函数:def place_marker(board, marker, position): # at the board's position, place marker 'X' or 'O' board[position] = marker 现在,在运行更新后的代码之后,I'm seeing this Type error 响应 def place_marker 意在标记你,@Dugbug

以上是关于arcgis10.5没有字符标记符号的主要内容,如果未能解决你的问题,请参考以下文章

#ArcGIS 10.5# 正式版安装教程

ArcGIS Server + ArcGIS Portal 10.5

ArcGIS 10.5 产品介绍

arcgis10.5新功能图形缓冲

ArcGIS 10.5 named user介绍

ArcMap进行标记符号制作