|
POST
|
If you post the original code you used for Field 2, we can go from there.
... View more
03-15-2016
02:58 PM
|
0
|
0
|
2473
|
|
POST
|
Okay, if you're talking about a one-to-many relationship, then you should look into Relates. Joins and relates—ArcGIS Pro | ArcGIS for Desktop
... View more
03-15-2016
11:28 AM
|
2
|
1
|
2752
|
|
POST
|
Make points geometries, perhaps centroids, from the polygons and then join your tabular data to those.
... View more
03-15-2016
11:07 AM
|
1
|
5
|
2752
|
|
POST
|
You are describing Joining data: Joins and relates—ArcGIS Pro | ArcGIS for Desktop You will need to make a common, single column on which to make your join (e.g. "Section_Block" -> "1_122").
... View more
03-15-2016
10:58 AM
|
1
|
7
|
2752
|
|
POST
|
The following script iterates through your buffer geometries, and assigns each to a group where none of the geometries overlap. There are surely ways to streamline the code and this may not be very efficient for large datasets, so I make no guarantees there. >>> def group_buffs(buff_dict, group_no): # the magic function
... group_no += 1 # group ID
... changes = 0 # see if any changes happened on this run
... for k,v in buff_dict.iteritems(): # loop through buffer dictionary
... if v[1] == 0: # if row doesn't have a group ID
... test_geom = v[0] # record geometry
... buff_dict [1] = group_no # assign group ID
... break # just need the first one
... for k,v in buff_dict.iteritems(): # loop through buffer dictionary
... if v[1] == 0: # if row doesn't have a group ID
... if v[0].disjoint(test_geom): # if row is disjoint to the test_geom
... changes += 1 # record a change
... buff_dict [1] = group_no # assign group ID
... test_geom = test_geom.union(v[0]) # add current geometry to test_geom
... if changes == 0: # no changes, must be done
... return buff_dict # return the finished dictionary
... else: # there were changes, call function again
... return group_buffs(buff_dict,group_no) # call the function again and return the result
... buff_fc = 'buff2km' # the buffer feature class
... buff_dict = {} # an empty dictionary
... with arcpy.da.SearchCursor(buff_fc,['OID@','SHAPE@']) as cursor: # load OIDs and geometries to dictionary
... for row in cursor:
... buff_dict[row[0]] = [row[1],0] # key = OID, value = [geometry, default group ID]
... buff_dict = group_buffs(buff_dict, 0) # call function to assign group IDs
... group_field = 'group_no'
... #arcpy.AddField_management(buff_fc,group_field,"SHORT") # uncomment if need to add a field for group ID to feature class
... with arcpy.da.UpdateCursor(buff_fc,['OID@',group_field]) as uCursor: # update feature class with group IDs
... for uRow in uCursor:
... uRow[1] = buff_dict[uRow[0]][1]
... uCursor.updateRow(uRow) edit: I'll add that you can do exactly the same thing using PointGeometries and its distanceTo method, rather than Polygon's disjoint method.
... View more
03-15-2016
10:04 AM
|
4
|
2
|
2690
|
|
POST
|
I don't think you'll find an out-of-the-box tool to do this for you, so you'll need to parse it yourself. I'd suggest creating new fields in the current table rather than creating a new table for each row, but it may depend on your data.
... View more
03-15-2016
09:24 AM
|
1
|
0
|
1462
|
|
POST
|
If you're open to creating a new field and populating it for your selection, you can do (Python parser): solution stolen mostly from here: http://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-float-in-python
... View more
03-14-2016
01:22 PM
|
3
|
1
|
4981
|
|
POST
|
Here's an example. I used spatial join with the original points as both the target and join fature classes. The points are labeled by "Id". For example, the highlighted point ("Id" = 2) has an elevation of 5795, and it is closest to point 3 ("Id_1" = 3) which has an elevation of 2896.
... View more
03-14-2016
01:07 PM
|
2
|
0
|
1842
|
|
POST
|
You should be able to use Spatial Join with Closest relationship. Spatial Join—Help | ArcGIS for Desktop
... View more
03-14-2016
11:15 AM
|
0
|
2
|
1842
|
|
POST
|
It worked for me projecting to UTM 13. Perhaps there's something going on with your custom CRS...?
... View more
03-11-2016
02:40 PM
|
0
|
0
|
2139
|
|
POST
|
See this discussion for a nice explanation of exactly your problem (in the end, use Euclidean Distance, as mentioned above): Circular vs. Octagonal Cost Distance
... View more
03-11-2016
02:04 PM
|
1
|
0
|
1813
|
|
POST
|
Does the same thing happen if you try to project to another CRS, like UTM? I've never seen that particular CRS and it doesn't appear in my list, so I assume it's custom.
... View more
03-11-2016
01:38 PM
|
1
|
1
|
2906
|
|
POST
|
Your mention was just me (cheekily) alerting you that there was an opportunity to use numpy, but after I provided one such solution, it didn't seem necessary.
... View more
03-11-2016
01:33 PM
|
0
|
1
|
3986
|
| 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
|