|
POST
|
The geoprocessing tool equivalent is Multipart to Singlepart. If that's not what you're after, please elaborate. Just FYI, you can select multiple features to 'explode'.
... View more
08-12-2015
02:38 PM
|
1
|
1
|
1225
|
|
POST
|
Your split string ('a') already contains a usable list of all you need. If your addresses always take the form: - first element = house number - second element = pre-dir - last element = suf-dir - street name = everything between second and last element ... you can parse it apart like this: >>> inString = '1234 E Olive Branch Dr'
... splitString = inString.split(' ')
... a = splitString[0]
... b = splitString[1]
... c = ' '.join(splitString[2:-1]) # everything between 2nd and last element, joined back together with a space
... d = splitString[-1]
... print (a,b,c,d)
...
('1234', 'E', 'Olive Branch', 'Dr')
... View more
08-12-2015
09:08 AM
|
3
|
0
|
8636
|
|
POST
|
First, you called it "Meters_lyr", then refer to "Meter_lyr". Make the same. To clarify, you made a variable called, "Meter_lyr", that held a layer called, "Meters_lyr". Then, you tried to refer to a layer named, "Meter_lyr" when none existed.
... View more
08-10-2015
04:53 PM
|
1
|
1
|
4490
|
|
POST
|
What exactly is the error message at SetNull? I'm guessing this has to do with the fact that when you run the code one line at a time in ArcMap, the raster "outairast" is added to the table of contents. It is then available to SetNull as the layer "outairast" (in quotes). When you run the script outside of ArcMap, there is no table of contents to add the result "outairast" to, therefore no layer called "outairast" (in quotes). It then interprets "outairast" as a string in the call to SetNull, which results in an error. There is a raster held in the variable outairast (no quotes). I believe you should be able to access it using something like: outai_setnull = SetNull(outairast, outairast, "VALUE < 1")
... View more
08-10-2015
01:31 PM
|
1
|
1
|
2692
|
|
POST
|
Is the data type of your field truly "Boolean" or perhaps a 1-digit integer or a text field? I don't see Boolean listed as a valid ArcGIS data type.
... View more
08-10-2015
09:29 AM
|
0
|
1
|
1450
|
|
POST
|
You can do a bulk replace using the field calculator, as outlined in this thread: Python - using Replace in Field Calculator
... View more
08-07-2015
03:32 PM
|
0
|
0
|
1883
|
|
POST
|
Join the Excel sheet to the feature class based on "INT_ID" (provided that is a unique ID) and use the Field Calculator to transfer the values from Excel to feature class.
... View more
08-07-2015
01:10 PM
|
1
|
0
|
1124
|
|
POST
|
Depending on how extensive the changes are, you may want to look into using ArcObjects through Python/comtypes. Be warned: it is a serious brain-shift from arcpy, but may be worth your effort. Can you copy data frames with arcpy? I didn't think that was possible, but I'm not overly familiar with the mapping module.
... View more
08-07-2015
10:55 AM
|
1
|
1
|
1066
|
|
POST
|
Start with the help pages, then return with specific questions. A quick tour of ArcMap—Help | ArcGIS for Desktop
... View more
08-07-2015
09:57 AM
|
2
|
0
|
1872
|
|
POST
|
Change all = to ==, and of course, change [raster] to the name of your raster. An overview of the Map Algebra Operators—Help | ArcGIS for Desktop
... View more
08-07-2015
09:05 AM
|
1
|
1
|
3807
|
|
POST
|
Okay, last reply, then you're going to have to piece some of this together on your own. insCursor = arcpy.da.InsertCursor(pointFC, ['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) # create insert cursor
with arcpy.da.SearchCursor(point,['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) as cursor: # loop through feature set
for row in cursor:
row[0] = row[0] # if the 'Minrights' value is coming from the search cursor, otherwise change this
row[1] = row[1] # if the 'FCVTotal' value is coming from the search cursor, otherwise change this
row[2] = row[4][0] # the X coordinate from the SHAPE@XY
row[3] = row[4][1] # the Y coordinate from the SHAPE@XY
row[4] = row[4] # the whole SHAPE@XY
insCursor.insertRow(row)
... View more
08-06-2015
03:48 PM
|
0
|
6
|
1981
|
|
POST
|
Is there some pattern to the values you want to multiply, or somewhat random? If a pattern, you can potentially build a map algebra expression to handle all cases, if random, you may want the Reclassify tool, but it really depends on exactly what you want. Save us some time and post what you've tried, or at least, provide more information on your specific requirements.
... View more
08-06-2015
03:32 PM
|
1
|
0
|
3807
|
|
POST
|
I'm not sure exactly what you're trying to do inside the search cursor, but 'row' (from the search cursor) is already the 5-part list that will populate your insert cursor. Because you've set up the insert cursor fields and search cursor fields exactly the same, you can slide the 'row' from the search cursor right into the insert cursor. Doesn't this work? insCursor = arcpy.da.InsertCursor(pointFC, ['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) # create insert cursor
with arcpy.da.SearchCursor(point,['Minrights', 'FCVTotal','POINT_X','POINT_Y','SHAPE@XY']) as cursor: # loop through feature set
for row in cursor:
insCursor.insertRow(row)
... View more
08-06-2015
03:25 PM
|
0
|
9
|
4063
|
|
POST
|
If you list 3 fields when you create the insert cursor, then you need to fill it with 3 appropriate things when you insert a row. If you list 100 fields when you create the insert cursor, then you need to fill it with 100 appropriate things when you insert a row.
... View more
08-06-2015
02:04 PM
|
0
|
11
|
4063
|
|
POST
|
Possible map problems: - try a fresh mxd - try deleting Normal.mxt Possible data problems: - try exporting feature classes to fresh FGDB or shapefile - are these GDB feature classes, shapefiles, or other? - are the feature classes participating in a network or otherwise doing something non-standard? - does this type of lag occur with other feature classes? - do the feature classes reside on your machine? Basically, as you've described them, the feature classes sound pretty standard so I suspect there is something more systematic going on. At the very least, you should be able to start a new mxd, add one of the feature classes, and edit it with no problem.
... View more
08-06-2015
01:45 PM
|
1
|
0
|
3126
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|