定義クエリが設定された結合テーブルに arcpy.da.TableToNumPyArray を使用すると、インポート後のテーブルに定義クエリが完全に反映されないことに気づいた方はほかにもいますか?
Could you provide an example of some of the results and the field types of the data?
Most da stuff doesn't respect layer definition queries from what I can tell. You can try passing the query to a SearchCursor:
from arcpy.da import SearchCursor from arcpy.mp import Layer lay = Layer() # Replace with actual layer from tool param or ListLayers with SearchCursor('joined_table', ['*'], where_clause=lay.definitionQuery) as cur: np_arr = cur._as_narray()
Note: If you want the full shape (assuming that you have a shape field), you'll need to explicitly pass SHAPE@ as one of the fields, e.g. ['OID@', 'SHAPE@', '*']. Would give you OID@ and SHAPE@ fields that have the ObjectID/FID and full row geometry.
SHAPE@
['OID@', 'SHAPE@', '*']
ログインすると、投稿したり、更新をフォローしたりできます。初めてですか?無料アカウントを登録しましょう。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.