Ist sonst noch jemandem aufgefallen, dass die importierte Tabelle bei Verwendung von arcpy.da.TableToNumPyArray auf einer verbundenen Tabelle mit einer Definitionsabfrage die definitionQuery nicht vollständig widerspiegelt?
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@', '*']
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.