POST
|
You can use a small negative buffer: var ImpCatchments = Featuresetbyname($datastore, "attains_au_catchments_Impaired")
var IntImpCat = Intersects(Buffer($feature, -10, "meters"), ImpCatchments)
var cnt = count(IntImpCat)
IIF(cnt > 0, "Y", "N");
... View more
10-05-2023
03:05 AM
|
1
|
4
|
753
|
POST
|
Calculate Field does not care about how you sort your rows, it will iterate through the table by ObjectID. It might be possible to change that order in the code block, but it's much easier to just do it in pure Python. Calculate Field is nice for quick and simple calculations, but it is very limited. Use this expression in the Python Window: fc = "TestPoints"
type_field = "TextField1"
sequence_field = "TextField2"
prefix = "B"
types = {row[0] for row in arcpy.da.SearchCursor(fc, [type_field])}
i = 1
for t in sorted(types):
with arcpy.da.UpdateCursor(fc, [sequence_field], f"{type_field} = '{t}'") as cursor:
for row in cursor:
cursor.updateRow([f"{prefix}{i}"])
i += 1
... View more
10-03-2023
11:49 AM
|
0
|
0
|
478
|
POST
|
Run this in the Python Window (edit the first 5 lines to reflect your data) fc = "TestPoints" # layer name of path to feature class
type_field = "TextField1"
sequence_field = "TextField2"
order_field = "OBJECTID"
prefixes = {"Type A": "A", "Type B": "B", "Type C": "C"}
for t in prefixes:
i = 1
with arcpy.da.UpdateCursor(fc, [sequence_field], where_clause=f"{type_field} = '{t}'", sql_clause=[None, f"ORDER BY {order_field}"]) as cursor:
for row in cursor:
cursor.updateRow([f"{prefixes[t]}{i}"])
i += 1
... View more
10-03-2023
10:03 AM
|
0
|
2
|
482
|
POST
|
The expression field expects a simple Python expression. Put your function into the Code Block field. # Inspected =
check_screen_id(!SCREEN_ID!) # change to your screen id field name, keep the exclamation marks
# Code Block
def check_screen_id(screen_id):
TableR = "..."
with arcpy.da.SearchCursor(TableR, ["screen_id"]) as cursor:
for row in cursor:
if row[0] == screen_id:
return 1
return 0
... View more
10-03-2023
09:41 AM
|
1
|
1
|
649
|
POST
|
I should have been clearer... There is no projectAs function in Arcade. Ideas are a way for users to request new features. The Idea I linked requests to implement such a function. If you want to support the idea, give it a kudo (klick on the thumb-up symbol).
... View more
10-03-2023
09:32 AM
|
0
|
1
|
706
|
POST
|
Relevant Idea: https://community.esri.com/t5/arcgis-pro-ideas/arcade-projectas-geometry-function/idi-p/1171382
... View more
10-03-2023
04:49 AM
|
0
|
3
|
718
|
POST
|
To post formatted code: Your check for LIFT is wrong. You use =, which is for assignment. You either want to use == for comparison, or (more probable) you want to use the same check > -1 you used for the other words.
... View more
10-03-2023
04:33 AM
|
0
|
0
|
431
|
POST
|
I suggest asking this as a new question, as it doesn't really have anything to do with this question. Plus, your new question will appear on the community feed and attract far more attention.
... View more
09-27-2023
01:19 PM
|
1
|
1
|
2573
|
POST
|
The mosaic dataset doesn't know the min/max yet, that's why it shows the full range. You need to calculate the statistics. Brand-new mosaic: Calculate Statistics After:
... View more
09-27-2023
08:02 AM
|
0
|
0
|
293
|
POST
|
Yes, that is possible. You just have to take precautions against infinite loops (feature 1 updates f2, which in turn updates f1, which then updates f2, etc). // Calculation Attribute Rule on TestPoints
// field: empty
// Triggers: Update
// Exclude from application evaluation!
// get the old and new value
var old_value = $originalfeature.TextField1
var new_value = $feature.TextField1
// abort if value did not change
if(new_value == old_value) { return }
// get all features with the old value that aren't the current feature
var gid = $feature.GlobalID
var other_features = Filter(FeaturesetByName($datastore, "TestPoints"), "TextField1 = @old_value AND GlobalID <> @gid")
// create and fill an update array
var updates = []
for(var f in other_features) {
Push(updates, {globalID: f.GlobalID, attributes: {TextField1: new_value}})
}
// instruct ArcGIS to update the other features
return {
edit: [{
className: "TestPoints",
updates: updates
}]
} Before: After refreshing the table:
... View more
09-27-2023
07:12 AM
|
1
|
1
|
530
|
POST
|
That setting appears to completely remove the status, not show as off/online. Your profile: My profile: Another user's status:
... View more
09-27-2023
06:55 AM
|
1
|
0
|
1170
|
POST
|
Import your csv example: a square and a triangle Calculate Field to add the x and y coordinates of the start point example: 400,000 / 5,660,000 XY Table To Point Points To Line Feature To Polygon Be aware that measuring gives very different results based on your map's coordinate system, the data's coordinate system, and the measuring method. For example, in the images above, I measured the distances using the planar method, while both map and feature class are in the same projected coordinate system. Here is that measurement using the geodesic method: And here is the planar measurement while the map is in the WGS1984 system (geographic):
... View more
09-27-2023
05:10 AM
|
2
|
0
|
689
|
POST
|
I have also experienced (and reported) nearly instantaneous kudos from both new and old accounts who were offline at the time. One of those accounts was a quite active and respected member who was hadn't logged in for several days, so I can't really make an argument for malicious intent here ("Muhahaha, I kudoed your post!" - Worst villain ever)... Seems more like something in the site's backend is wonky.
... View more
09-27-2023
04:15 AM
|
1
|
3
|
1185
|
POST
|
Your default symbol (without rotation) has to point up.
... View more
09-27-2023
03:58 AM
|
0
|
0
|
395
|
POST
|
You can easily create SQL expressions with the SqlExpression parameter type. Just set its dependency to the layer and ArcGIS automatically fills out the possible fields and values.
... View more
09-27-2023
03:50 AM
|
1
|
0
|
398
|
Title | Kudos | Posted |
---|---|---|
1 | 01-12-2023 06:22 AM | |
1 | 06-09-2022 10:42 PM | |
1 | 01-12-2022 04:43 AM | |
1 | 03-03-2023 02:01 PM | |
1 | 08-30-2022 08:26 AM |
Online Status |
Offline
|
Date Last Visited |
02-03-2024
06:14 PM
|