Heeft iemand anders ook gemerkt dat wanneer je arcpy.da.TableToNumPyArray gebruikt op een gekoppelde tabel met een definitiequery, de geïmporteerde tabel het definitionQuery niet volledig weerspiegelt?
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@', '*']
Ingelogde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Maak gratis een account aan.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.