|
POST
|
I believe you'd have to use ArcObjects to respond to such an event (choosing input/output datasets). Edit: I think you can use a Tool Validator.
... View more
04-27-2011
03:04 PM
|
0
|
0
|
1249
|
|
POST
|
Everything in Arcpy is case sensitive, so you should try: CreateFeatureclass_management
... View more
04-27-2011
01:49 PM
|
0
|
0
|
1383
|
|
POST
|
This course was great: GIS Programming 101 for ArcGIS 10
... View more
04-27-2011
08:12 AM
|
0
|
0
|
930
|
|
POST
|
Actually, if you want to have the coarse grid overlay your original grid, you could add the coordinates to the original table (Add XY Coordinates tool), join the nearest points to the coarse grid, export the resulting table, then use "Display XY Data..." on that table.
... View more
04-27-2011
07:10 AM
|
0
|
0
|
1451
|
|
POST
|
You have (at least) a couple of ways to do this, but you can't do if-then code unless you use the code block. 1.) Make a selection to get only the rows where [Condition] = "Seasonal". Then, use the Field Calculator, which only looks at the selected rows, to make [Canopy] = "20" (if [Canopy] is a number field, leave off the quotes). 2.) Paste this into the Field Calculator code block, when calculating the field [Canopy]:
if [Condition] = "Seasonal" then
result = "20"
else
result = null
end if and type the word result into the main Field Calculator text box. You should probably look at this page for more help.
... View more
04-26-2011
09:50 AM
|
0
|
0
|
316
|
|
POST
|
1.) Polygon to Raster tool, with cell size for your grid. 2.) Raster to Point tool, to get your point grid.
... View more
04-26-2011
09:01 AM
|
0
|
0
|
1769
|
|
POST
|
Is it OK to have the coarse grid offset from your original grid? If so, here's my suggestion: 1.) You've got your original grid (here 100m x 100m). 2.) Make a new empty raster of your area of interest (Create Constant Raster tool) with coarse cell size (here, 1000m x 1000m). Use Raster to Point tool to create a point grid. 3.) Use Spatial Join tool to give coarse grid points the attribute of the nearest point in the original grid (for whatever reason, using the Join from the feature layer right-click menu didn't work).
... View more
04-26-2011
08:54 AM
|
0
|
0
|
1451
|
|
POST
|
Oops - in my example I never gave it any commands for what to do if it was the first time around the loop, so the counter stayed at 0 and never got into the update part. Here's what it should be (you could also add an updateRow to the else part if you want the very first row to have a value - this way it will just be skipped over). for row in rows:
if count != 0: # if this isn't the first time in the loop (ie. if you have a number to subtract)
count = count + 1
row.blankcolumnname = row.MEAS - previous # make the blank column = current - previous
rows.updateRow(row) # updates the whole row, now with a value for the blank column
previous = row.MEAS # sticks the current value into the previous variable for the next time through the loop
else: # do this if it is the first time in the loop
count = 1
previous = row.MEAS
... View more
04-21-2011
10:39 AM
|
0
|
0
|
2423
|
|
POST
|
start with: import arcpy and the actual update cursor statement should be like: rows = arcpy.UpdateCursor(FILL IN YOUR PARAMETERS HERE)
... View more
04-21-2011
08:54 AM
|
0
|
0
|
2423
|
|
POST
|
rows = UpdateCursor(...)
count = 0
for row in rows:
if count != 0: # if this isn't the first time in the loop (ie. if you have a number to subtract)
count = count + 1
row.blankcolumnname = row.MEAS - previous # make the blank column = current - previous
rows.updateRow(row) # updates the whole row, now with a value for the blank column
previous = row.MEAS # sticks the current value into the previous variable for the next time through the loop
del row
del rows # remove row locks
... View more
04-21-2011
07:43 AM
|
0
|
0
|
2423
|
|
POST
|
Can you describe what you're trying to do a little more clearly? Are you trying to resample your grid to a coarser scale?
... View more
04-21-2011
07:11 AM
|
0
|
0
|
1451
|
|
POST
|
You should use an UpdateCursor (there's an example). In the UpdateCursor statement, you specify which fields to sort. Then you loop through all your rows, each time sticking the current value into a variable to save it for the next row where you update the empty column with that value.
... View more
04-21-2011
06:59 AM
|
0
|
0
|
2423
|
|
POST
|
I believe it should be: ElseIf left([AccountInfo_PERMIT_NO],2) = "MG" Then
"If the first two characters equal MG" LIKE is SQL, but you're writing VBScript. (I would normally test this before posting, but my ArcGIS is tied up)
... View more
04-20-2011
01:56 PM
|
0
|
0
|
550
|
|
POST
|
Can you go into more detail? What are you making points from (other geometry, or are you digitizing)?
... View more
04-20-2011
11:53 AM
|
0
|
0
|
1696
|
|
POST
|
Arcpy.AddMessage() just prints the string between the (). The given example uses formatted text to make it pretty. If you only want the string in a variable called value, it would be Arcpy.AddMessage(value).
... View more
04-20-2011
08:18 AM
|
0
|
0
|
693
|
| Title | Kudos | Posted |
|---|---|---|
| 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 | |
| 2 | 07-16-2020 11:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|