|
POST
|
So if "car" is in your equipment field, you always want to return that link, but with an alias like "These are the fastest cars"? In that case you would put the link into the popup's HTML and show or hide it with the expression: <div style="display: {expression/show_car};"><a href="https://luxe.digital/lifestyle/cars/fastest-cars">These are the fastest cars</a></div>
<div style="display: {expression/show_ship};"><a href="https://..../biggest-ships">These are the biggest cruise ships</a></div> // show_car
var lines = Split($feature.Equip, ",")
for(var i in lines) {
if(lines[i] == "car") { return "block" }
}
return "none"
... View more
10-20-2021
10:07 PM
|
1
|
7
|
5361
|
|
POST
|
Yes, that's exactly what the code does. Performance should be OK, this is a simple operation, as opposed to e.g. intersecting another layer or filtering a table. Although the loop makes the code more flexible, in this case writing the 3 Replace statements might be better (less code and fewer computations), but you wouldn't notice any performance difference. If my answer was what you were looking for, please mark it as solution, so that your question shows up as solved.
... View more
10-20-2021
06:21 AM
|
0
|
0
|
4713
|
|
POST
|
You'll have to do it manually: var value = 1234567890 / 1000
var x = Text(value, "#,###.0")
var pat_rep = [[".", ";"], [",", "."], [";", ","]]
for (var i in pat_rep) {
x = Replace(x, pat_rep[i][0], pat_rep[i][1])
}
return x + " kt"
// 1.234.567,9 kt
... View more
10-20-2021
04:00 AM
|
0
|
0
|
4738
|
|
POST
|
Not with clicking a button or pressing delete or anything else as simple. You could add another expression to your query that the user has to fill out to exclude certain features. Possible workflow for your user: query for "Attribute > 5" check the query result, note the ObjectID (or some other attribute, of course) of 2 features to exclude go back to the query and change it to "Attribute > 5 AND ObjectID NOT IN (50, 51)", rerun
... View more
10-19-2021
10:29 PM
|
0
|
0
|
2436
|
|
POST
|
In my experience, that is the phone's GPS just spazzing out at times. I have the same problem with geotagged photos. everything looks great, then I see a few photos way off from the others, all on the same spot. The photos I made a minute later are all right again. A "fix" I found for this is checking my position in the phone's map app from time to time. Especially when I changed locations in a mayor way, like driving to the next capture site, I wait until my position stays constant in the map app.
... View more
10-19-2021
05:13 AM
|
0
|
0
|
1262
|
|
POST
|
I need to know if there is a way to edit in ArcGIS online collaboratively If the data resides in an SDE database, it can be edited by multiple editors at the same time, using versioning: https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/overview-of-versioning-in-arcgis-pro.htm and to be able to keep track of what has been edited and what has not You can add a field (e.g. "EditStatus") to your table(s) that describes the current state of the feature. This could be something simple, e.g. 1: edited, 0 or null: not edited. Or you could use more statuses, like in your screenshot. After you finish editing a feature, you would set the field's value, probably using a domain to make that even easier. In the map, you would use distinct symbology for each value of the EditStatus field.
... View more
10-19-2021
04:48 AM
|
0
|
1
|
1973
|
|
POST
|
It's called "Trace". https://pro.arcgis.com/en/pro-app/latest/help/editing/create-segments-by-tracing-other-features.htm
... View more
10-18-2021
10:58 PM
|
1
|
0
|
1705
|
|
POST
|
var attachments = Attachments($feature)
var txt = []
for(var a in attachments){
Push(txt, a+1)
}
return Concatenate(txt, ", ") What's your end goal here? Because I fear it's linking those indices to the attachments. If so, you're on the wrong track.
... View more
10-17-2021
10:09 PM
|
2
|
1
|
3063
|
|
POST
|
EDIT: Updated the code. I forgot that the Date function uses a zero based month. Thanks, @KenBuja ! Date Functions | ArcGIS Arcade To convert your strings to dates: calculate date field, switch to Arcade if(IsEmpty($feature.DateText)) {
return null
}
var date_split = Split($feature.DateText, ".")
return Date(date_split[2], date_split[1] - 1, date_split[0]) To change how the date is displayed in the table: https://pro.arcgis.com/en/pro-app/latest/help/data/tables/format-numeric-and-date-fields.htm
... View more
10-15-2021
04:12 AM
|
2
|
4
|
5602
|
|
POST
|
It seems like you have all the ingredients. Just use the first point of your new line B as split feature. var start_point = Geometry($feature).paths[0][0]
var fs_line_a = FeatureSetByName($datastore, "LineA", ["GlobalID"], true)
var result = {"geometry": Geometry($feature)}
var edit_line_a = {"className": "LineA", "adds": [], "deletes": []}
for(var s in Intersects(fs_line_a, start_point)) {
var path = Geometry(s).paths[0]
// we don't care about intersections with start or end points of LineA features
if(Intersects(path[0], start_point) || Intersects(path[-1], start_point)) {
continue
}
// construct cutter
var clip_path = Clip(Geometry(s), Extent(Buffer(start_point, 0.1))).paths[0]
var a = (Angle(clip_path[0], clip_path[-1]) + 90) * PI/180
var m_geometry = Geometry($feature)
var cutter = Polyline({
"paths": [ [
[start_point.x - 0.1 * cos(a), start_point.y - 0.1 * sin(a)],
[start_point.x + 0.1 * cos(a), start_point.y + 0.1 * sin(a)]
] ],
"spatialReference": Geometry($feature).spatialReference
})
// cut LineA feature
var line_a_cuts = Cut(Geometry(s), cutter)
// delete the intersected LineA feature
Push(edit_line_a .deletes, {"globalID": s.GlobalID})
// add both cut parts
Push(edit_line_a .adds, {"geometry": line_a_cuts[0], "attributes": {"ID_A": NextSequenceValue("ID_A"}})
Push(edit_line_a .adds, {"geometry": line_a_cuts[-1], "attributes": {"ID_A": NextSequenceValue("ID_A"}})
}
// return
return {"result": result, "edit": [edit_line_a ]}
... View more
10-15-2021
01:26 AM
|
0
|
0
|
942
|
|
POST
|
// load your polygon featureset
// https://developers.arcgis.com/arcade/function-reference/data_functions/#featuresetbyname
var polygon_fs = FeatureSetByName(...)
// filter your polygons
var ref_id = $feature.ReferenceID
var polygon_filter = Filter(polygon_fs, "Global_ID = @ref_id")
// return the attribute
if(Count(polygon_filter) > 0) {
return First(polygon_filter).Attribute
}
return null
... View more
10-13-2021
08:47 AM
|
2
|
3
|
6896
|
|
POST
|
You were on the right track (although there is an easier solution, as Josh pointed out). Where you went wrong: You used $feature in the for loop. $feature is a global variable describing the feature to which a popup/rule/label/etc applies, in your case the feature you click on. If your $feature isn't a polygon, the expression won't work. If your $feature is a polygon, you will get a wrong total (because you multiply the $feature's area instead of adding up the target areas). This expression should work (although, again, Josh's answer is easier): // Also, maybe you need to use FeatureSetByName here...
var table = FeatureSetByID($datastore,"PARCELS",[‘*’], true);
var total = 0;
for (var t in table) {
total = total + t["Shape__Area"]
}
return total;
... View more
10-13-2021
06:35 AM
|
1
|
0
|
1783
|
|
POST
|
The tutorial you found is for point features, which have slightly different labeling options than line features (what you have). Point: Line: Polygon: For lines, use this:
... View more
10-13-2021
06:19 AM
|
1
|
0
|
4113
|
|
POST
|
I guess you know already, but just to be sure: In Pro 2.7 and later, you can alter multiple attributes with the same rule, so upgrading would be your best option. You outlined 2 possibilities: doing the intersect in each rule doing the intersect in the first rule, saving the id in a field, then using that id to filter (Filter(), you don't need to iterate) the target featureset I don't know which one is faster, but my guess would be the second one, because the test for intersection should be more expensive than an sql query. Test it, I guess... But I want to propose another solution: Create a field that stores a string. In the first rule, you save the intersected feature's attributes in that field: var fs = FeatureSetByName(.....)
var intersect_fs = Intersects($feature, fs)
var intersect_f = First(intersect_fs)
if(intersect_f == null) { return null } // no intersecting feature
var attributes = Dictionary(Text(intersect_f)).attributes
return Text(attributes) In the following rules, you can use that field to extract the values: if(IsEmpty($feature.IntersectAttributes)) { return null }
var attributes = Dictionary($feature.IntersectAttributes)
return attributes.Attribute This way, you need to search the other table only once, which should be the best option performance-wise. You'd need to create an extra field, but you need that in your second proposed solution, too.
... View more
10-13-2021
04:00 AM
|
1
|
1
|
1567
|
|
POST
|
Seems like you don't find any matches in line 8. When you call First() on an empty featureset, the result will be null (line9). if(matchfeature != null) {
return matchfeature.TECH_REV
}
return null
... View more
10-13-2021
12:12 AM
|
2
|
0
|
2710
|
| 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
|