POST
|
#My goal is similar to the thread listed below: #https://community.esri.com/thread/158291 #"I need to move a set of point features based on the XY values from another table linked through table join" #This script works perfectly as long as the feature class with the outdated xy's have no duplicate "PREM_ID" numbers. # A "PREM_ID" number represents a Geocoded address point and its possible to have several of them stacked on top of each other on one parcel. #Unfortunately my outdated xy feature class has a combination of both unique and duplicate PREM_ID numbers and this script will not pass duplicate PREM_ID numbers. #IndexError: list index out of range #Thank You for your assistance, #Larry Adgate import arcpy #input path of gdb where original feature class resides gdb = "C:\\Projects\\MyProject\\Arden.gdb" #input original feature class path with outdated XY (This feature Class has both unique and duplicate "PREM_ID" numbers) basefc = "C:\\Projects\\MyProject\\Arden.gdb\\Arden\\LateralLinesPoints" #input feature class path of points with updated XY (This Feature Class contains only unque "PREM_ID numbers #and not all there numbers can be found in the outdate xy feature class) newfc = "C:\\Projects\\MyProject\\Arden.gdb\\Arden\\CCB_Points" #input field name which has a unique ID to both original and new point feature class field = "PREM_ID" list_idxy = [] with arcpy.da.SearchCursor(newfc, [field, "SHAPE@X", "SHAPE@Y"]) as cur: for row in cur: list_idxy.append(row) i = 0 with arcpy.da.Editor(gdb) as edit: with arcpy.da.UpdateCursor(basefc, [field, "SHAPE@X", "SHAPE@Y"]) as cur: for row in cur: print row if row[0] == list_idxy[0]: row[1] = list_idxy[1] row[2] = list_idxy[2] i += 1 cur.updateRow(row) print "points shifted!"
... View more
04-02-2018
01:31 PM
|
0
|
3
|
633
|
POST
|
A A Typical set is in a text Field column. called PREM_ID-
... View more
03-16-2018
02:15 PM
|
0
|
3
|
888
|
POST
|
Hi Joshuba, My result data structure are numbers in a text field: Ex: 0000256677 My numbers have leading zeros so the field needs to be text Thank You, Larry
... View more
03-16-2018
01:30 PM
|
0
|
2
|
888
|
POST
|
#I would really appreciate some help on this: I need to use the Set function on this script to remove all # my duplicates but the InsertCursor refuses to work here. Any Ideas, Thank You- Larry Adgate import arcpy fc1 = "Database Connections\\TaskmasterServer.sde\\sde_gsw.GSW_SDE.CCB_Updates1" fc2= "Database Connections\\TaskmasterServer.sde\\sde_gsw.GSW_SDE.CCB_Data\\sde_gsw.GSW_SDE.Master_CCB_Points" fc3 = "K:\\808 - TariffMaps\\MyResults\\MyTable.dbf" set_one = set(r[0] for r in arcpy.da.SearchCursor(fc1,"PREM_ID")) set_two = set(r[0] for r in arcpy.da.SearchCursor(fc2,"PREM_ID")) print "Items unique to the Primary Field: {}".format(", ".join(sorted(set_one-set_two))) results = set(set_one-set_two) print results cursor = arcpy.da.InsertCursor(fc3, ["result"]) #Below is my error= TypeError: value #0 - unsupported type: set cursor.insertRow([results]) del cursor
... View more
03-16-2018
01:07 PM
|
0
|
8
|
1067
|
POST
|
I have several Enterprise Geodatabases where I need to cleanup the Domains. Is there a method to ensure all the data in the domain is also matched in the Feature Classes or tables?
... View more
02-08-2018
03:28 PM
|
0
|
1
|
348
|
POST
|
Hi Chris, We are a very large Public Water Utility Company with over thirty eight Geodatabases and our asset management group requires an inventory of all their assets. It will be a challenge looping through all of them and with a little help I will get there..................Thank you for checking back with me. Larry
... View more
01-22-2018
02:40 PM
|
0
|
1
|
747
|
POST
|
I apologize, I forgot to add that eventually I need to loop through aprox four hundred features classes for an inventory project..............Thank You
... View more
01-22-2018
01:30 PM
|
0
|
4
|
747
|
POST
|
#This scrip is working to a point, but is not what I expected. If Someone could help me with this, #it would be greatly appricated.......Thank You in advance. #The GetCount_management "COUNT" for the wHydrant Feature Class is 4457. #After running the script, the result is four separtate rows in one column. See attached. #My expectation is only one row and one column. import arcpy lyrfile ="C:\\Projects\\DavidSchultise_Southwest_GIs\\SouthwestTesting.gdb\\HydrantTesting\\wHydrant" result = arcpy.GetCount_management(lyrfile) print('{} has {} records'.format(lyrfile, result[0])) #My Table fc ="C:\\Projects\\DavidSchultise_Southwest_GIs\\Testing.dbf" for row in (result[0]): cursor = arcpy.da.InsertCursor(fc, ["NUMBER"]) cursor.insertRow(row[0])
... View more
01-22-2018
01:10 PM
|
0
|
6
|
973
|
POST
|
Hi Jonathan, typically Monday morning I arrive at the office to inspect all my Web Services and they are all offline. As a remedy, I submit a request to IT to reboot the Enterprise Server and that seems to resolve the issue. I have suggested using a script to reboot the Server Early Monday morning but IT is bent on only a manual reboot. Thanks, Larry
... View more
01-10-2018
07:20 AM
|
0
|
1
|
608
|
POST
|
For better maintenance to our Web Map Services, is there a Python Script out there to Reboot our Enterprise Server? Thanks, Larry Adgate`
... View more
01-09-2018
08:41 AM
|
0
|
3
|
1147
|
POST
|
I know this information is out there but I guess I'm not searching for it Correctly: I'm looking for an example using a python script to publish a map service using an .mxd file.
... View more
11-01-2017
02:09 PM
|
0
|
3
|
2047
|
POST
|
We are a very large public Water Utility Company with over forty Geodatabases published on our Enterprise Server. All our Server data is accessed over a Citrix Connection that works pretty good. For the first time we are looking at the ArcPro Version 2 software to possible use it in the future but we have had nothing but problems with its operation. Our Company has a suite of computer Drives that are about twenty, but ArcPro is not seeing the Drives. Is anyone using the ArcPro software on a Citrix Connection and what if any problems have they experienced? Thanks, Larry
... View more
09-01-2017
01:34 PM
|
0
|
1
|
637
|
POST
|
Not really, but we found a workaround that everyone is OK with. I was uncomfortable using a Widget that was supported in a Version and not the Default Thanks, Larry
... View more
08-16-2017
02:43 PM
|
0
|
0
|
462
|
POST
|
Thanks Dan for your response on this: I reviewed the reference material you suggested and believe it does not apply because I was the Administrator that created the versions. But for argument sake, I did make the changes as specified in the reference material and I was still hit with the same error. Below is a snippet of my changes arcpy.ReconcileVersions_management(editDB, "ALL_VERSIONS", ' "domain\laadgate".Quality Control', ' "domain\laadgate".ver1List', "LOCK_ACQUIRED", "ABORT_CONFLICTS", "BY_OBJECT", "FAVOR_EDIT_VERSION", "POST", "KEEP_VERSION", Post_Reconcile_Log1_txt)
... View more
07-20-2017
02:07 PM
|
0
|
1
|
505
|
Title | Kudos | Posted |
---|---|---|
1 | 02-19-2019 09:17 AM | |
2 | 11-27-2018 10:53 AM | |
1 | 06-16-2017 10:48 AM | |
1 | 06-06-2017 11:26 AM | |
1 | 06-05-2017 02:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|