|
POST
|
I've never seen a select by location in a cursor but I'd guess you need to use the geometry of each cursor row - rather than fc1 and fc2 which I assume are your entire features. Maybe try this but no idea if it would work. If not I'd prefer to compare with a geometry.disjoint on the SHAPE token. #needs to be a feature layer if not already
arcpy.MakeFeatureLayer_management(fc1,"fc1_layer")
with arcpy.da.SearchCursor(conflictScores, ["Activity1", "Activity2", "ConflictScore", "SHAPE@"]) as cursor:
for row in cursor:
print("START ROWS)")
if row[0] == fieldname1 and row[1] == fieldname2:
score = row[2]
print(score)
arcpy.management.SelectLayerByLocation("fc1_layer", "HAVE_THEIR_CENTER_IN", row[3], "", "NEW_SELECTION")
arcpy.management.CalculateField("fc1_layer", fieldname3, score)
print(fc1, fieldname3, score)
... View more
12-22-2023
11:38 AM
|
0
|
1
|
2783
|
|
POST
|
You've got your inputs mixed up. should be find('string you're searching for', feature.dumpster_code) this explains why it returns SnowBird for only exact matches and no matches for refuse at all.
... View more
12-22-2023
08:28 AM
|
1
|
0
|
1084
|
|
POST
|
In ArcGIS Pro you can use 'Feature Class to Feature Class' and I guess the now recommended 'Export Features' tool. You can also use the Python API to automate those manual steps you've described - Export and Download calls in AGOL. I can share an example script if that would be useful. Is this a process you're looking to do regularly? If not - the steps you've described are common.
... View more
12-22-2023
05:11 AM
|
0
|
1
|
3416
|
|
POST
|
There's the refresh button (2 blue arrows in a loop) at the top-right corner of the attribute table - does that not work? Removing and re-adding the data should work if that doesn't.
... View more
12-21-2023
11:58 AM
|
0
|
5
|
9811
|
|
POST
|
https://community.esri.com/t5/modelbuilder-questions/sum-the-values-of-a-field-and-paste-the-sum-in/td-p/858695 shows a pure model builder way. NB it's just a variable, not an inline variable.
... View more
12-21-2023
10:05 AM
|
1
|
1
|
4492
|
|
POST
|
Possibly https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/summary-statistics.htm using the 'Case' constraint to group by attribute. or https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/pivot-table.htm post ArcGIS Pro 2.6 you can create a database view using SQL also https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-view.htm
... View more
12-21-2023
08:20 AM
|
1
|
0
|
1105
|
|
POST
|
Try Add Field geoprocessing tool. You can specify the precision and scale of the float/double field. Looking at your code - the del cursor, row looks out of indentation. I think it should be at the same level as 'with cursor'. Also try just returning 'S' or 'a' to troubleshoot. If this is in a model, can you just do summary statistics then get the SUM value from that table to use? What's the ultimate goal here, as a cursor within a field calculator is very hacky at best.
... View more
12-21-2023
06:00 AM
|
0
|
3
|
4494
|
|
POST
|
Do you have the correct scale and precision for the field properties when created? I'd also check no integer division is going on, so try float(a) float(S) etc.
... View more
12-20-2023
12:32 PM
|
0
|
1
|
4508
|
|
POST
|
I'd guess a float can't be added to your Long field type (integers). Can you Add a new field and try it on that, or use int( (a/S) * 100 )
... View more
12-19-2023
10:11 AM
|
0
|
3
|
4556
|
|
POST
|
I believe attributes can now be copied across to some property of the VTPK on publishing but I can't say I've done it myself. I don't think any attributes are copied unless specifically selected, however I can't give you a reassuringly definitive answer. You can browse the individual bundles by opening the .VTPK in 7Zip File Explorer or similar. If you know the bundle encoding I guess you could search the files for some attribute strings etc. but I wouldn't say that's going to be conclusive either.
... View more
12-18-2023
08:09 AM
|
0
|
0
|
3388
|
|
POST
|
server_manager = server.services
services_and_folders = (
[service, folder]
for folder in server_manager.folders
for service in server_manager.list(folder)
)
for item in services_and_folders
service = item[0]
folder = item[1]
print(f'{service} located at {folder}')
... View more
12-18-2023
06:21 AM
|
0
|
0
|
1006
|
|
IDEA
|
You could probably export() as a content item then download() specifying a local path. A bit hacky but would probably work.
... View more
12-16-2023
12:18 PM
|
0
|
0
|
1495
|
|
POST
|
https://doc.arcgis.com/en/arcgis-online/manage-data/create-hosted-views.htm Area of interest—To limit the features included in the view, define a spatial extent for the layer. Only the features located in that extent will be included in the view. Click the Polygon or Rectangle button and draw an area on the map. To define the same area of interest for all the layers in the view, click Apply to all layers.
... View more
12-14-2023
11:19 AM
|
0
|
1
|
1011
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-13-2025 01:08 PM | |
| 1 | 09-25-2025 03:19 PM | |
| 1 | 09-24-2025 02:35 PM | |
| 1 | 09-17-2025 02:42 PM | |
| 1 | 09-10-2025 02:35 PM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|