|
POST
|
ESRI has published an article with some information about Electric models here: http://downloads2.esri.com/support/techarticles/energy_utilities.pdf . See the Electric Transmission Model on page one.
... View more
07-25-2017
06:05 PM
|
0
|
0
|
617
|
|
POST
|
Is the field you're calculating from a Double type?
... View more
07-25-2017
06:02 PM
|
0
|
1
|
1639
|
|
POST
|
If you have the existing data, you could symbolize the layer(s) to show what plants/areas are in bloom. What layers/data does your GIS consist of now?
... View more
07-24-2017
08:35 AM
|
0
|
1
|
575
|
|
POST
|
Yeah, I've never seen a cursor like that before. Please check this link on SearchCursor. You don't necessarily have to set an arcpy.env.workspace either. It should look similar to this: database = r'C:\pathtoDatabase.gdb'
fc = database + '/' + 'fc'
fields = ['AssetID']
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
assetID = str(row[0])
arcpy.AddMessage(assedID)
del cursor
... View more
07-24-2017
07:36 AM
|
0
|
0
|
5477
|
|
POST
|
What exactly are you trying to accomplish with the Search Cursor? Don't forget to add an 'r' in front of your database path. #No :(
arcpy.env.workspace = 'C:\Users\jas\Documents\ArcGIS\L_Sr_geodatabase.gdb'
#Yes :)
arcpy.env.workspace = r'C:\Users\jas\Documents\ArcGIS\L_Sr_geodatabase.gdb'
... View more
07-24-2017
05:44 AM
|
0
|
5
|
5477
|
|
POST
|
Yes, you're correct. Change 'table1' to 'table2' in line 19. Oops... regarding the error: change 'insertCursor.insert(i)' in line 23 to 'insertCursor.insertRow(i)'.
... View more
07-20-2017
11:01 AM
|
0
|
1
|
522
|
|
POST
|
Okay, then remove line 19. Remove line 22. Dedent ( CTRL + [ ) lines 23 and 24.
... View more
07-20-2017
08:54 AM
|
0
|
3
|
2651
|
|
POST
|
First, set your arcpy.env.workspace to a database, not a feature class. Try the code below, and edit line 3 & 15. If table1 has different field names than table2, simply create a new list variable, 'table2fields', and specify the required fields. Then, replace 'fields' with 'table2fields' on line 28. Please read more about InsertCursor and how it functions. The items in the 'ids' list must be indexed to the field lists in order for the values to be written to the proper fields. import arcpy
arcpy.env.workspace = r'...path to database...'
table1 = 'table1'
table2 = 'table2'
table1List = []
with arcpy.da.SearchCursor(table1, ['Street']) as cursor:
for row in cursor:
table1List.append(row[0])
del cursor
#list of fields whose will need to be imported into table2
fields = ['FULLSTREET','Input_Other','Necessary_Fields','Here']
#list of values from table1 to inject into table2
ids = []
included = ["RES","Reserved","proposed"]
with arcpy.da.SearchCursor(table2, fields) as cursor:
for row in cursor:
if row[0] in included:
if row[0] not in table1List:
ids.append(row[0:])
del cursor
#create insert cursor variable
insertCursor = arcpy.da.InsertCursor(table2,fields)
#loop through items in ids list and insert into table
for i in ids:
insertCursor.insert(i)
del cursor
... View more
07-19-2017
07:12 PM
|
2
|
5
|
2651
|
|
POST
|
What exactly do you mean by "update table 1 with the missing names"? Do you mean insert the rows into the table? Or update the old street names with the new ones from table 2?
... View more
07-19-2017
01:49 PM
|
0
|
1
|
2651
|
|
POST
|
Try this: EDIT: Now that I think about this more.. the below code will only select the in-memory layer by the streets that are not in table2. If you need to add the missing names to table two, like actually add the rows in the table, you'll need to use an InsertCursor—Data Access module | ArcGIS Desktop. Is this what you're trying to do? import arcpy
arcpy.env.workspace = r'...path to database'
table1 = 'table1'
table2 = 'table2'
table1List = []
with arcpy.da.SearchCursor(table1, ['Street']) as cursor:
for row in cursor:
table1List.append(row[0])
del cursor
ids = []
included = ["RES","Reserved","proposed"]
with arcpy.da.SearchCursor(table2, ['FULLSTREET']) as cursor:
for row in cursor:
if row[0] in included:
if row[0] not in table1List:
ids.append(row[0])
del cursor
arcpy.MakeTableView_management(table1, "table1view")
qry = "{} IN ('{}')".format("FULLSTREET", "', '".join([x for x in ids]))
arcpy.SelectLayerByAttribute_management("table1view", "NEW_SELECTION",qry)
... View more
07-18-2017
08:34 PM
|
2
|
3
|
2651
|
|
POST
|
import arcpy
database = r'...path to database...'
arcpy.env.workspace = database
domains = ['CD_Level','CD_FittingDiameter','CD_FittingMaterial',
'CD_Diameter','CD_Material','CD_Ownership','CD_Parcel ID']
for feature in arcpy.ListFeatureClasses():
for field in arcpy.ListFields(feature):
if field.domain in domains:
arcpy.RemoveDomainFromField_management(feature,field.name)
print "%s domain removed."%str(field.domain)
... View more
07-18-2017
01:27 PM
|
1
|
3
|
5139
|
|
POST
|
What version of ArcGIS are you using? Did you try using the 'Add Data' button?
... View more
07-18-2017
08:10 AM
|
1
|
0
|
2602
|
|
POST
|
The random module is a Python module.... Do you need to select random attributes from a single field? All fields? Some fields? Please expand on your question. Give an example.
... View more
07-18-2017
06:32 AM
|
0
|
0
|
3770
|
|
POST
|
You can use the random module. Do you need random values in an attribute table? Or random rows?
... View more
07-18-2017
06:22 AM
|
1
|
3
|
3770
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-28-2024 11:43 AM | |
| 1 | 09-12-2025 07:32 AM | |
| 1 | 10-26-2018 06:50 AM | |
| 1 | 10-26-2018 08:43 AM | |
| 1 | 02-25-2016 07:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-02-2025
01:10 PM
|