Všiml si někdo další, že při použití arcpy.da.TableToNumPyArray na spojené tabulce s definičním dotazem výsledná importovaná tabulka neodpovídala zcela tomuto definičnímu dotazu?
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@', '*']
Přihlášení členové mohou přispívat, sledovat novinky a dělat další věci. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.