|
POST
|
for width, item in enumerate(sym.renderer.groups[0].items):
item.symbol.size = width
lyr.symbology = sym
... View more
09-21-2022
01:43 AM
|
0
|
1
|
5054
|
|
POST
|
Float fields are listed as Single: table = arcpy.management.CreateTable("memory", "bla")
arcpy.management.AddField(table, "FloatField", "FLOAT")
arcpy.management.AddField(table, "DoubleField", "DOUBLE")
for f in arcpy.ListFields(table):
print(f.name, f.type)
#OBJECTID OID
#FloatField Single
#DoubleField Double
... View more
09-21-2022
01:31 AM
|
2
|
1
|
1428
|
|
POST
|
tl;dr: No, it won't affect the featureclass. There's a big difference between a Featureclass/Shapefile and a Layer. The featureclass is the data that resides in your database. A layer ist a local representation of this data. It doesn't have any data itself, it points to the featureclass's data. And with a layer, you can change how to present this data (symbols, labels, popups, filters, etc.) You can't do selections on featureclasses, only on layers. Select Layer(!) By Location affects the layer's selection, the underlying data is not changed in any way. It behaves the same way as manual selection does. If you manually select a feature, you change your local representation of the data (the layer), not the data itself. The selection does not get passed on to other users, it only happens in your local map.
... View more
09-20-2022
10:13 PM
|
1
|
1
|
1505
|
|
POST
|
It is possible, at least in Attribute Rules, I suspect you can do it in Field Maps, too. Instead of returning a value, you can return a dictionary that follows a certain schema: Attribute rule dictionary keywords—ArcGIS Pro | Documentation var lines = FeaturesetByName($datastore, "LineFeatureclass", ["OBJECTID"], false)
var i_line = First(Intersects($feature, lines))
if(i_line == null) { return null }
return {
//result: {attributes: {TextField: "value"}},
edit: [{
className: "LineFeatureclass",
updates: [{objectID: i_line.OBJECTID, attributes: {PointStatus: $feature.Status}}]
}]
}
... View more
09-20-2022
09:57 PM
|
0
|
0
|
1841
|
|
POST
|
I'm not sure, but try running Rebuild Indexes before.
... View more
09-19-2022
05:22 AM
|
0
|
0
|
1747
|
|
POST
|
Ah, OK. x = [1, 2, 3]
y = "t"
for i, k in enumerate(x):
x[i] = y + str(k)
print(x)
# ['t1', 't2', 't3']
... View more
09-19-2022
02:34 AM
|
0
|
0
|
2204
|
|
POST
|
Easiest way is to use Calculate Field to set the target field null to trigger the Attribute Rule. With that many features, this probably takes some time. Fastest way is probably to run a Python script after importing that does the following Disable the Attribute Rule Run the Near tool for all target feature classes For each point, find the closest feature Use UpdateCursor to calculate the field Enable the Attribute Rule
... View more
09-19-2022
01:44 AM
|
1
|
2
|
1773
|
|
POST
|
To add an element to the end of a list, use list.append(element) To add an element to the start of a list use list.insert(0, element) To add all elements of a list to another list, use list.extend(other_list) x = [1, 2, 3]
x.append("a")
print(x)
# [1, 2, 3, 'a']
x.insert(0, "b")
print(x)
# ['b', 1, 2, 3, 'a']
x.extend(["x", "y", "z"])
print(x)
# ['b', 1, 2, 3, 'a', 'x', 'y', 'z']
... View more
09-19-2022
01:08 AM
|
0
|
2
|
2234
|
|
POST
|
Create a Calculation Attribute Rule for your point feature class (SiteAddress). As field for the rule, choose "BaseParcel" As triggers, choose "Insert". As expression, use this: var parcels = FeatureSetByName($datastore, "SurveyParcel", ["ParcelID"], false)
var intersecting_parcel = First(Intersects(parcels, $feature))
if(intersecting_parcel == null) {
return null
}
return intersecting_parcel.ParcelID This should work if you're working in a file geodatabase. If you work in an Enterprise geodatabase, you have to replace "SurveyParcel" in line 1 with the complete name of the feature class ("Databasename.Dataowner.SurveyParcel").
... View more
09-16-2022
05:04 AM
|
1
|
1
|
2140
|
|
POST
|
In this example, I excluded records with nulls in the user or date field from the input data, see line 6: layer = Filter(layer, `${name} IS NOT NULL AND ${datetime} IS NOT NULL`) As this problem is all about working with dates, we have to exclude null values in the date field. But it could be interesting to know about null values in the user field. For that, we have to change the filter inside the function according to whether the user argument is null or not: function specific(fs, user) {
var sql = `${datetime} IS NOT NULL AND ${name} = @user`
if(user == null) {
sql = `${datetime} IS NOT NULL AND ${name} IS NULL`
}
var fs = Filter(fs, sql)
var extract_date_string = `CONCAT(EXTRACT(YEAR FROM ${datetime}), '-', EXTRACT(MONTH FROM ${datetime}), '-', EXTRACT(DAY FROM ${datetime}))`
var grouped_by_date = GroupBy(fs,
[{name: "DateString", expression: extract_date_string}],
[{name: "Count", expression: "1", statistic: "COUNT"}])
var edits = Sum(grouped_by_date, "Count")
var days = Count(grouped_by_date)
//return edits / days
return {edits: edits, days: days, mean: edits/days}
} If you use the editor tracking fields for this, you won't get any meaningful results, because when the user field is empty, the date field will obviously be empty, too.
... View more
09-16-2022
04:55 AM
|
1
|
1
|
1206
|
|
POST
|
For ArcMap, there's the Attribute Assistant. For ArcGIS Pro, there are Attribute Rules.
... View more
09-16-2022
04:25 AM
|
1
|
1
|
1477
|
|
IDEA
|
Assuming you mean the Espression window in things like Calculate Field: Right-Click -> Show Line Numbers Before: After:
... View more
09-16-2022
03:54 AM
|
0
|
0
|
2279
|
|
POST
|
Here's another way: var cityList = []
for(var c in inCity) {
Push(cityList, c.CTU_NAME)
}
if(Count(cityList) > 1) {
cityList[-1] = "and " + cityList[-1]
}
var cityString = Concatenate(cityList, ", ")
cityString = Replace(cityString, ", and", " and")
return "This park is in: " + cityString
... View more
09-16-2022
01:11 AM
|
0
|
1
|
1896
|
|
POST
|
You can check if candidateParcels is an empty Featureset (no parcels intersected). Two ways to do that (both after line 9 ) // intuitive, but slow for large datasets (should be OK here)
if(Count(candidateParcels) == 0) {
return "Not Detected"
}
// not as intuitive, but much faster
if(First(candidateParcels) == null) {
return "Not Detected"
}
... View more
09-16-2022
12:47 AM
|
1
|
0
|
1384
|
|
POST
|
I'm currently answering a similar question here: Re: How to calculate the angle of a line respect t... - Esri Community
... View more
09-14-2022
11:11 PM
|
1
|
1
|
3339
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-30-2023 09:57 AM | |
| 1 | 05-18-2023 12:51 AM | |
| 1 | 03-05-2023 12:46 PM | |
| 1 | 12-07-2022 07:01 AM | |
| 1 | 06-21-2022 08:27 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-03-2024
06:14 PM
|