POST
|
I cant seem to figure out hoe to edit the title of this question. @Rebecca Strauch can you help? Thanks
... View more
09-26-2016
01:58 PM
|
0
|
1
|
919
|
POST
|
I just got the chance to try it today. The code works!!! Thanks mitchh300
... View more
09-26-2016
12:16 PM
|
0
|
3
|
919
|
POST
|
Hi, Thanks, i just tried it but it returned error: "s" not defined. Is s = 'path_list'?
... View more
09-23-2016
10:00 AM
|
0
|
5
|
919
|
POST
|
I'm trying to write a standalone script to copy the values from 6 fields in a feature class to another feature class based on a spatial join and name query. I am stuck at updating the values from the join table to my original table. print "Importing modules..."
import sys, arcpy, traceback
arcpy.env.workspace = r"C:\LVS\PECO\PECO\Python\Python\Script\test_code.gdb\GAS"
arcpy.env.overwriteOutput = True
# Local variables:
GFR = "GFR"
Parcel = "PECO_TaxParcels"
GFR_SpatialJoin = "C:\\Users\\aadeyemo\\Documents\\ArcGIS\\Default.gdb\\GFR_SpatialJoin"
arcpy.MakeFeatureLayer_management("GFR", GFR)
arcpy.MakeFeatureLayer_management("PECO_TaxParcels", Parcel)
# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(GFR, "NEW_SELECTION", "STREET_NAME IS NULL")
# Process: Spatial Join
arcpy.SpatialJoin_analysis(GFR, Parcel, GFR_SpatialJoin, "JOIN_ONE_TO_ONE", "KEEP_ALL")
path_dict1 = {}
SC1 = arcpy.da.SearchCursor (GFR_SpatialJoin, ["TARGET_FID", "STHSNUM", "STSTNAME", "STSUFFIX", "STCITY", "STSTATE", "STZIP"])
for row in SC1:
path_dict1[ row[0] ] = row[1]
print SC1[1]
print path_dict1
del row
ucursor = arcpy.da.UpdateCursor(GFR, ["OBJECTID", "STREET_NUMBER", "STREET_NAME", "STREET_SUFFIX", "CITY", "STATE", "ZIP_CODE"])
for urow in ucursor:
if path_dict1.has_key( urow[0]):
urow[1] = path_dict1[0] This currently returns a value of zero when i try to copy values.
... View more
09-23-2016
07:11 AM
|
0
|
10
|
2123
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|