|
POST
|
I think you're probably looking for Zonal Statistics as Table, using a new raster covering the whole area as a single zone. However, as Dan says, a single number might not describe your situation very well. For example, suppose you have a situation where you have a single dune covering the left 50% of your raster, and it moves to cover the right 50% of your raster. The left will all be -100% and the right will be all +100%, so the mean from Zonal Statistics as Table will be 0%, although there has been quite a bit of change.
... View more
11-14-2017
02:46 PM
|
1
|
0
|
1978
|
|
POST
|
My dreadfully boring two cents: if the data must be maintained by non-GIS people, leave it in a common format like your spreadsheet, CSV, or shapefile with instructions to update it with coordinates and attribute info, then give to GIS person to update the app. Points are easy enough to maintain in a list - if you were dealing with polygons or lines, that's a different story. Also, especially if the app is to persist more than a couple years, I'll suggest not relying on, dare I say, peripheral apps like Collector or Survey123, because who knows if they'll exist (gasp).
... View more
11-06-2017
01:42 PM
|
3
|
0
|
2043
|
|
POST
|
More info: Use the DataFrame Extent Polygon to Clip your feature class, inside the loop.
... View more
11-05-2017
12:18 PM
|
1
|
1
|
2753
|
|
POST
|
Without really paying attention to what your code is doing, just a couple thoughts: - Running any geoprocessing tool (e.g. spatial join) inside a cursor is a red flag. Tools are for datasets, not individual features, so there's probably a better way if you need to work with individual features. - Nesting any combination of search and update cursors is a red flag. Read the search cursor into a dictionary, like how you did with valueDict. - To address your main question, update (and search) cursors only operate on selected features if there is a selection, so just add a where clause to the update cursor to work on selected features meeting some criteria.
... View more
10-19-2017
09:51 AM
|
3
|
1
|
1529
|
|
POST
|
I can only suggest to take a close look at the raster properties to see what's different about those five, things like projection, pixel depth, number of bands, etc.
... View more
10-18-2017
11:41 AM
|
1
|
0
|
2143
|
|
POST
|
Did "Build Raster Attribute Table" run successfully, individually?
... View more
10-18-2017
10:02 AM
|
0
|
3
|
2143
|
|
POST
|
Your original question says you're trying to insert polyline geometries into a polygon feature class. Is that correct?
... View more
10-18-2017
09:42 AM
|
0
|
1
|
2354
|
|
POST
|
1.) Calculate total area of districts into a new field 2.) Intersect districts with mountain classes 3.) Dissolve intersected polygons by district ID, district area, and mountain class 4.) Calculate area for dissolved polygons. Now each polygon has its own area and the district area. 5.) Divide polygon area by district area to get proportions 6.) Dissolve again by district ID, mountain class, and proportion, also calculating MAX proportion 7.) Delete any features where proportion <> max proportion 8.) Join back to districts by district ID
... View more
10-18-2017
09:36 AM
|
1
|
0
|
1497
|
|
POST
|
This passes the current field value to the function (not what you want - would pass all 0s first time, then all 1s, etc.): seq_num_max(!ColorCode!) Try (you always want 3): seq_num_max(3) And code block (untested): cnt = 0
def seq_num_max(val):
global cnt
if cnt < val:
cnt += 1
else:
cnt = 0
return cnt Or (untested): cnt = -1
def seq_num_max(val):
global cnt
cnt += 1
return (cnt % val) + 1
... View more
10-16-2017
10:45 AM
|
2
|
1
|
4920
|
|
POST
|
for i in range(10):
print (i % 3) + 1
1
2
3
1
2
3
1
2
3
1
... View more
10-13-2017
04:38 PM
|
1
|
0
|
4920
|
|
POST
|
Inside your update cursor, just split the Addr1 and Addr2 fields and compare (substitute row[0], row[1] as fits your cursor): if Addr1.split(" ")[0] <> Addr2.split(" ")[0]:
mismatch = 1
if Addr1.split(" ")[1] <> Addr2.split(" ")[1]:
mismatch = 2
...
if Addr1.split(" ")[3] <> Addr2.split(" ")[3]:
mismatch = 4 You might want to rather use a string field to store the mismatches, as there could be multiple mismatch types (e.g. "HPN" vs. "H" vs. "PNS" etc.).
... View more
09-27-2017
01:45 PM
|
2
|
2
|
5370
|
|
POST
|
Make sure you use "SHAPE@", a special token for the actual geometry.
... View more
09-26-2017
09:16 AM
|
0
|
1
|
7334
|
|
POST
|
Ah, okay. Here are my thoughts on speed, but someone correct me if I'm wrong. You're in a situation that would naturally result in nested cursors (for each street, look through each address point). Nested cursors are bad due to the exponential operations, but I think they might actually be faster in some cases than selections because selections are just so dreadfully slow individually. Either way, check here for Richard Fairhurst's cursor/dictionary pattern to speed things up: /blogs/richard_fairhurst/2014/11/08/turbo-charging-data-manipulation-with-python-cursors-and-dictionaries So, I think you should load the points into a dictionary and read through streets with UpdateCursor. For each street, fetch the matching points and test whether they meet the street min/max criteria. If so, update the street row. Not sure if 400,000 records is reasonable for a dictionary, but I'd think so.
... View more
09-20-2017
05:05 PM
|
1
|
1
|
2006
|
|
POST
|
I just want to see if the where statement evaluates to 'true', and if so, update a field in the row of the cursor. Can't you just use an UpdateCursor, rather than SearchCursor? UpdateCursor—Help | ArcGIS for Desktop
... View more
09-20-2017
08:53 AM
|
1
|
0
|
2006
|
| 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
|