2

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: import arcpy arcpy.env.worskapce = r'C:\path\to\my.gdb' for fc in arcpy.ListFeatureClasses(): arcpy.MakeFeatureLayer_management(fc, "lyr") arcpy.SelectLayerByAttribute_management("lyr", "NEW_SELECTION", '"...


1

I can parse the JSON text using JSON.parse. var obj = JSON.parse(jsonResp); service.log(obj.features[0].attributes.ZONE) Notes: The JSON features element is an array with a single element in it (note the square brackets). Put an index reference after features: features[0]. Credit goes to @Steven Kay. The field name is case sensitive. zone didn't work,...


1

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


1

Like this to address only the selected features: fids = join_layer.selectedFeatureIds() request = QgsFeatureRequest() request.setFilterFids(fids) with edit(join_layer): for feature in join_layer.getFeatures(request): feature.setAttribute(feature.fieldNameIndex('Postcode'), feature['HomePostcode']) join_layer.updateFeature(feature) ...


1

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: import arcpy sausage="ID_1_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30" suffix=sausage.split("_")[1:] for i in range(19): arcpy.JoinField_management("PA", "OBJECTID", "PB", "OBJECTID") lastName = [f.name ...


1

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)] ...


1

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' # ...


Only top voted, non community-wiki answers of a minimum length are eligible