POST
|
thanks. I'm definitely not getting the data from the microstation folks. (there's a reason they're still using microstation). I've tried adding just control points, but alas, ArcGIS crashes as soon as I try and lay down the first georeference point. I'm thinking I may have to take this further up the chain if that's going to be the solution. Thanks for the quick responses and ideas though. It's really appreciated.
... View more
03-15-2016
12:54 PM
|
0
|
4
|
754
|
POST
|
I convert a microstation dgn to geodatabase. The original is completely unprojected so there is no spatial component whatsoever. I'm trying to use spatial adjust to lay it down over top of the true location, but it fails every time I hit "adjust". I read where you need to convert to shapefile first, so the adjustment and then re-import into the geodatabase (29769 - Spatial Adjustment does not work on geodatabase feature class. ). [note this hasn't been updated since 2011. Did ESRI ever do anything about it?] The problem with this is that I can't carry over the annotation which is the most time-consuming piece if done manually. I know it says about creating a geodatabase with a large enough extent to encompass everything, but every export and change I make to try and up the extent still results in the same. I'm not sure if I'm doing the extent changes wrong, or what else could be causing it. I've tried creating the feature dataset with ridiculously high extents; and I also tried setting the environment output when converting from CAD to be really high; but neither is giving results. Any help is greatly appreciated.
... View more
03-15-2016
10:27 AM
|
0
|
8
|
2910
|
POST
|
getValue huh? well sir; you are correct. I am currently still on 10.0, so I did have to use the previous methods. Worked like a charm though. Thanks so much!
... View more
04-23-2013
09:37 AM
|
0
|
0
|
1516
|
POST
|
I am doing a bulk spatial join on gps points by assigning the attributes within a site buffer to the points themselves. Unfortunately, there are 4 different types of GPS points. Within that, I only want to populate the most frequently occurring points(categories). I have it set up with a stats table ordered by frequency. From there, I am inserting the top 3 into a list, and then assigning as such. My problem is that because the ID field for the GPS points has a different name for each type. When I go to grab the field from the search cursor, I'm forced to use an item.{variable} rather than item.fieldname. It doesn't like that at all! Is there a better way I could grab the field name from the table? Any help would be greatly appreciated. I know it's a lot of code, but as I said, I'm just trying to find a way to grab the item.Columnname value from within the cursor.
towerfield = ["RNW","Cell","Scramble1","ServSN"]
def PQid():
for value in towerfield:
print towerfield.index(value),value
PQnum = input("Which field identifier is this carrier using?")
PQKey = towerfield[PQnum]
return PQKey
Columnname = PQid()
arcpy.Statistics_analysis("FC_lyr", "F:/GIS Data/Drive Testing.gdb/stats", [["Device","COUNT"]], Columnname) #draw stats from inside feature
statstable = "F:/GIS Data/Drive Testing.gdb/stats"
result = int(arcpy.GetCount_management(statstable).getOutput(0))
print result
Scursor = arcpy.SearchCursor("F:/GIS Data/Drive Testing.gdb/stats")#, "","", Statscolumn + "; \"FREQUENCY\"", "COUNT_Device") #allow searching of stats table
currentState = ""
mylist = []
Scursorfields = arcpy.ListFields(statstable)
for item in Scursor:
if arcpy.Exists("SelectedSite"):
rt = (item.Frequency, str(item.Columnname),)
mylist.append(rt)
mylist.sort()
mylist.reverse()
... View more
04-23-2013
08:02 AM
|
0
|
2
|
2100
|
POST
|
I have been racking my brain for over a week now and no matter how I format my code, the arcpy.CalculateField_management line just will not run for me. The parts of the code for the operation are below. arcpy.env.overwriteOutput = True env.workspce = "F:/GIS Data/Drivetesting.gdb" #mxd = arcpy.mapping.MapDocument("CURRENT") --used in the Arcpy environment #df = arcpy.mapping.ListDataFrames(mxd, "New Data Frame") --used in the Arcpy environment Field = "PCode1" FC = "F:/GIS Data/Drivetesting.gdb/Carrier/Phone" MyField = Myfield = arcpy.ListFields(FC)[24] arcpy.MakeFeatureLayer_management(FC,"FC_lyr") ---------> tons of geoprocessing going on right here, but not included as not relevant to question (and saves space!) mylist = [] # Iterate through the rows in the cursor for item in Scursor: a = (item.Frequency, item.PCode1,) mylist.append(a) mylist.sort() mylist.reverse() del mylist[1:] applist = [x[1] for x in mylist] applist.append(CellIDs.UNIQUE_ID) applist.append(CellIDs.CellID) print applist PCode1 = str(applist[0]) PCode2 = str(applist[1]) PCode3 = str(applist[2]) Unitname = str(applist[3]) Columnname = '"Cellname1"' print Cellname print MyField.name arcpy.SelectLayerByAttribute_management("FC_lyr","SUBSET_SELECTION",' "PN1" = ' + PCode1 + " or \"PN1\" = " + PCode2 + " or \"PN1\" = " + PCode3) arcpy.CalculateField_management("FC_lyr",Columnname,Unitname) It throws ERROR 000728: Field "Cellname1" does not exist within table Failed to execute (CalculateField). I've tried writing out Cellname1, I've tried getting it through arcpy.listfields. I've tried single quotes, double quotes, quoting the quotes...you name it; I think I've tried it. If anyone has any idea why this is happening, I would greatly appreciate some assistance as I am at my wits end here. I know the field name exists as the 'print MyField.name' is derived from the listfields function, and gives me "Cellname1" as my result. PLEASE HELP!
... View more
04-10-2013
11:05 AM
|
0
|
2
|
459
|
POST
|
I work with E911 wireless data all the time that uses "sector wedges" for default coverage direction. It's certainly not the same thing, but you might be able to tweek it a bit to get the desired results. It takes a lot of other data that you could probably default with 'a' and '1', but the important thing is it takes an orientation, radius, and wedge width. http://www.arcgis.com/home/item.html?id=9ac78cd092b640b3b69c6093e1be40bf side note: This is NOT my script. The guy that wrote this is a million times smarter than me.
... View more
06-05-2012
04:44 AM
|
0
|
0
|
797
|
POST
|
As long as every record has a "-" separating the road type, and the route number you could try this In the label expression, check 'advanced' and paste the following [HTML]Function FindLabel ( [ST_NAME] ) a = split( [ST_NAME] ,"-") b = a(1) FindLabel = b End Function[/HTML]
... View more
05-31-2012
04:06 AM
|
0
|
0
|
221
|
POST
|
had a script using the 'env', and I found it caused errors for me if I didn't have the 'arcpy.' before it. So my first suggestion would be to try making it 'arcpy.env.workspace' instead of just 'env.workspace'. In the python debugger, it comes up with the variable being the 2 different paths, so hopefully that is what the issue was. If not, then I'm not really sure myself.
... View more
05-14-2012
09:34 AM
|
0
|
0
|
378
|
POST
|
now is this something where you know which layer is to be selected, or you're trying to figure it out? If you already know the layers in the TofC, you can list them using the following in the python window [HTML]mxd = arcpy.mapping.MapDocument("insert path to mxd here, or if within arcmap use "CURRENT" ") arcpy.mapping.Listayers(mxd)[/HTML] That will get you all of the layers in the TOC. If it's more than that, then I don't think I'm quite clear on what you're looking for. I'm not a VB guy, so I don't know what IMXDocument::SelectedItem actually means.
... View more
05-09-2012
11:03 AM
|
0
|
0
|
558
|
POST
|
if you're running directly from a python script independant of ArcGIS, then yes, it works just fine. That was actually my problem. I was running my script as a stand-alone using the IDLE window to process everything. I got tired of having to navigate to the file everytime though, so I tried to add it as a tool within Arctoolbox. If you process it from the Arcpy window within ArcMap, or as a tool script that requires much closer interaction with ArcGIS, then set( ) will not work. Open up the Python window within ArcMap and try it. That's probably the best way to see it.
... View more
05-09-2012
10:49 AM
|
0
|
0
|
922
|
POST
|
I have a python script that works fine as a stand-alone python script. In an effort to integrate it as a tool in ArcGIS however, it's not working. After some research, I came across a forum thread that stated the python variable type 'set' is not usable in Arcpy. Is there an alternative to make this work? Some way of expressing set( ) in arcpy? Basically I have a feature class with features that intersect a selected point. Some of these features have duplicate names. the script is designed to take the names out of the intersecting features, and append them into a 'name' field in the point feature class. To avoid having duplicate data names, I used set( ) in Python to go through the list of features that are intersecting, and weed out the duplicates. So eg, my list originally was list = [a,b,c,f,h,a,c,c,c,t]. Using set(list), it becomes [a,b,c,f,h,t]. I then convert it to string, make it look all fancy and nice, and throw it into the 'name' field of my point featureclass. any help is appreciated.
... View more
05-08-2012
08:14 AM
|
0
|
7
|
1739
|
POST
|
taken from: http://forums.arcgis.com/threads/4021-ArcGIS-10-Pre-Release-finding-duplicates As long as you have the tables joined together so that everything is one dataset... Calculate field, and choose the python parser and in the pre-logic: [HTML]uniqueList = [] def isDuplicate(inValue): if inValue in uniqueList: return 1 else: uniqueList.append(inValue) return 0[/HTML] then in the calculate field: [HTML]isDuplicate(!FIELD_NAME!)[/HTML]
... View more
05-07-2012
07:27 AM
|
0
|
0
|
348
|
Title | Kudos | Posted |
---|---|---|
2 | 04-10-2013 12:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|