You can specify the GDB as your workspace and then use the arcpy.ListFeatureClasses() function to get all the names of the features in that GDB:
arcpy.env.worskapce = r'C:\path\to\my.gdb'
for fc in arcpy.ListFeatureClasses():
arcpy.SelectLayerByAttribute_management("lyr", "NEW_SELECTION", '"...
I can parse the JSON text using JSON.parse.
var obj = JSON.parse(jsonResp);
The JSON features element is an array with a single element in it (note the square brackets).
Put an index reference after features: features. Credit goes to @Steven Kay.
The field name is case sensitive.
zone didn't work,...
You can open the processing toolbox.
Then type in the searcher: Extract specific vertices
Choose the input layer
In vertex indexes type: 0, -1 (first and last point)
After that you can obtain your lat-lon coordinates creating new fields in the field calculator
Like this to address only the selected features:
fids = join_layer.selectedFeatureIds()
request = QgsFeatureRequest()
for feature in join_layer.getFeatures(request):
Blunt tool might help to solve flawed logic. So let's use result of your test to guess name by simply counting number of operations:
for i in range(19):
arcpy.JoinField_management("PA", "OBJECTID", "PB", "OBJECTID")
lastName = [f.name ...
I'd also be very interested to hear of a better, definitive way to resolve this issue. But in the mean time, you can use arcpy.ListFields() to get the list of fields before and after geoprocessing, and compare the before/after lists to determine which fields are new.
Eg, before geoprocessing, run: fieldsBefore = [f.name for f in arcpy.ListFields(table)]
In ArcPy you can use field mapping to determine what fields work as inputs and outputs and how they are combined - this doesn't work for JoinField_management but works for many other geoprocessing functions.
This script merges ID fields into the same output field when using the merge tool in data management:
layer1 = 'layer1'
layer2 = 'layer2'