|
POST
|
Hmm, seems to be another case of ArcGIS widgets blocking certain HTML... Other possibilities I can think of: use a div instead of the span <div style="text-align: center; font-size: large; font-weight: bold;">
<div style="display: inline; border-bottom: 5px solid #e01a2a;">Introduction</div>
</div> use the u tag (can't control thickness) <div style="text-align: center; font-size: large; font-weight: bold;">
<u style="text-decoration-color: #e01a2a;">Introduction</u>
</div> underline the whole width <div style="text-align: center; font-size: large; font-weight: bold; border-bottom: 5px solid #e01a2a;">
Introduction
</div>
... View more
12-08-2021
12:35 AM
|
0
|
1
|
5495
|
|
POST
|
I mean, yeah, ideally you would have a DEM from right before the avalanche... If interpolating the original DEM doesn't work, you can try interpolating the thickness of the avalance fan (basically your fist method) guess or measure (if it's safe to go on the avalanche fan) the thickness at various points including points outside of the fan with thickness = 0 interpolate a thickness raster use the Raster Calculator to get the original DEM actually, you don't need this, just run the statistics on the thickness raster...
... View more
12-07-2021
12:43 AM
|
1
|
0
|
2462
|
|
POST
|
create points around the avalanche fan on important DEM features e.g. for 1.png: Extract the heigths of those points https://pro.arcgis.com/de/pro-app/latest/tool-reference/spatial-analyst/extract-values-to-points.htm Interpolate an estimated terrain without avalanche https://pro.arcgis.com/de/pro-app/2.7/tool-reference/spatial-analyst/idw.htm use your DEM as snap raster and for cell size
... View more
12-06-2021
11:02 PM
|
1
|
0
|
2464
|
|
POST
|
<div style="text-align: center; font-size: large; font-weight: bold;">
<span style="border-bottom: 5px solid #e01a2a;">Introduction</span>
</div>
... View more
12-06-2021
10:14 PM
|
0
|
0
|
5511
|
|
POST
|
Acid Sulfate Soil Potential | Datasets | data.gov.au - beta I downloaded it from the above link, the shp files are there.
... View more
12-06-2021
04:37 AM
|
0
|
1
|
2519
|
|
IDEA
|
Labels ARE switched on and off with the layer. Sounds like you have to wait for the map to refresh or manually refresh it.
... View more
12-06-2021
03:50 AM
|
0
|
0
|
2162
|
|
POST
|
What you need: Field Amenities: comma separated string "Tent Camping,Group Camping,Dogs Allowed" Field Activities: same "Fishing,Hiking,Biking" image urls for check, cross, activity icons Amenities: Create an Arcade expression for each amenity you want to show: var target_amenity = "Tent Camping" // change this
var amenities = Split($feature.Amenities, ",")
if(Includes(amenities, target_amenity)) {
return "https://checkmark_url.jpg"
}
return "https://cross_url.jpg" In the popup definition, create a table. First column is the amenity, second column is an image, image url = expression for that amenity. In the HTML source, it looks like this: <h3>Amenities</h3>
<table>
<tablebody>
<tr><td>Tent Camping</td><td><img src="{expression/expr10}"></td></tr>
<tr><td>Group Camping</td><td><img src="{expression/expr11}"></td></tr>
<tr><td>Dogs Allowed</td><td><img src="{expression/expr12}"></td></tr>
<!-- and so on -->
</tablebody>
</table> Activities: For each activity you want to show, create an Arcade expression: var target_activity = "Hiking" // change this
var activities= Split($feature.Activities, ",")
if(Includes(activities, target_activity )) {
return "inline"
}
return "none" In the popup definition, switch to HTML source. Use the style variable of the img tags to show or hide the activity icons: <h3>Activities</h3>
<img src="biking_icon_url" style="display: {expression/expr15};">
<img src="hiking_icon_url" style="display: {expression/expr16};">
<img src="fishing_icon_url" style="display: {expression/expr17};">
<!-- and so on -->
... View more
12-06-2021
03:02 AM
|
0
|
4
|
2941
|
|
POST
|
You're actually never using the feature set. You use $feature["B03..."] instead. Do your features have these fields? It seems as if you're trying to do something like this: // load feature set from Living Atlas
var portal = Portal("https://www.arcgis.com")
var popu_all = FeatureSetByPortalItem(Portal,
"23ab8028f1784de4b0810104cd5d1c8f",2,
['B03002_003E','B03002_004E','B03002_005E','B03002_006E'
,'B03002_007E','B03002_008E','B03002_009E','B03002_012E']
, true);
// intersect with the feature you clicked on
var popu = Intersects(popu_all, $feature)
// get sum of categories of all intersected population polygons
var fields = [
{ value: Sum(popu, "B03002_003E"), alias: "White Alone, not Hispanic" },
{ value: Sum(popu, "B03002_004E"), alias: "Black or African American Alone, not Hispanic" },
{ value: Sum(popu, "B03002_005E"), alias: "American Indian and Alaska Native Alone, not Hispanic" },
{ value: Sum(popu, "B03002_006E"), alias: "Asian Alone, not Hispanic" },
{ value: Sum(popu, "B03002_007E"), alias: "Native Hawaiian and Other Pacific Islander Alone, not Hispanic" },
{ value: Sum(popu, "B03002_008E"), alias: "Some Other Race Alone, not Hispanic" },
{ value: Sum(popu, "B03002_009E"), alias: "Two or More Races, not Hispanic" },
{ value: Sum(popu, "B03002_012E"), alias: "Hispanic or Latino" }
];
// get the predominant category
function getPredominantCategory(fieldsArray){
var maxValue = -Infinity;
var maxCategory = "";
for(var k in fieldsArray){
if(fieldsArray[k].value > maxValue){
maxValue = fieldsArray[k].value;
maxCategory = fieldsArray[k].alias;
} else if (fieldsArray[k].value == maxValue){
maxCategory = maxCategory + "/" + fieldsArray[k].alias;
}
}
return IIF(maxValue <= 0, null, maxCategory);
}
getPredominantCategory(fields);
... View more
12-06-2021
02:05 AM
|
1
|
0
|
2757
|
|
POST
|
And regarding the same names: Use the full paths. original_fc = "path:/to/the/fc_to_be_updated/FC_A"
update_fc = "path:/to/the/update_fc/FC_A"
arcpy.management.TruncateTable(original_fc) # deletes ALL rows!
arcpy.management.Append(original_fc, update_fc) # for same table schema
... View more
12-05-2021
11:01 PM
|
2
|
0
|
1974
|
|
POST
|
I'm using the terms of the Add Join tool: input table and join table. Based on a quick test: you can not use UpdateCursor on a joined table doesn't matter if you try to update fields of the input table or the join table doesn't matter if you use the full field names or not you can use Calculate Field on the fields of the input table you have to use full names ("input_table.Field") you can not use Calculate Field on fields of the join table (you also can't edit them manually) Your code doesn't work as expected, because Calculate Field calculates ALL rows, not just the one in your SearchCursor. In fact, I'm surprised that you have a feature that is different from the others. In this case, it's probably easier to edit the table(s) on their own. Are PERC_COVER_FIELD and DOM_SPECIES_FIELD in the input table or the join table? and what are your join fields?
... View more
12-05-2021
10:55 PM
|
2
|
3
|
3949
|
|
POST
|
So you have some sort of chainage going on, where entities are connected to each other, but they don't form one big network but multiple small ones. You want to assign IDs to these small networks. Does this come close to what you want? # output dict
groups = dict()
group_id = 100000000
# keys that already are in a group
visited_keys = set()
for key in sample_dict:
if key not in visited_keys: # to prevent processing the same group multiple times
# create the group this key belongs to
group = set()
# use a heap/stack to process all keys belonging to that group
heap = {key}
while heap: # while there are keys to be processed
k = heap.pop() # take the last key from the heap
group.add(k) # add it to the group
visited_keys.add(k) # mark it as visited
# add all the keys connected to k to the heap (empty list if there are no other keys)
heap.update(sample_dict.get(k, []))
# add all the keys that k is connected to to the heap
heap.update([a for a, b in sample_dict.items() if k in b])
# remove all visited keys from the heap to prevent infinite loop
heap -= visited_keys
# assign ID to the group and add it to output dict
# PLEASE DON'T ASSIGN YOUR ID WITH random.randint!
# it's ugly, it's not guaranteed to be unique, you will hate yourself
# when you have to add a group manually.
# Either use a Universally Unique ID [python: uuid.uuid4()]
# or increment a counter like I do here
groups[group_id] = group
group_id += 1
for group_id, group in groups.items():
print(group_id, group) print(list(UIDs.values())[0])
#[1, 3, 2, 115247, 23]
print(list(groups.values())[0])
#{1, 2, 3, 37, 115241, 115247, 23}
... View more
12-03-2021
06:16 AM
|
0
|
1
|
3974
|
|
IDEA
|
You have to create an attribute rule in the zone polygon fc for that: // Attribute Rule on the polygon FC
// triggers: Update
// field: empty
// if Inspector didn't change, do nothing
if($feature.Inspector == $originalfeature.Inspector) { return }
// load the points
var poles_fs = FeatureSetByName($datastore, "Poles", ["GlobalID"], true)
// get the points inside the polygon
poles_fs = Intersects(poles_fs, $feature)
// create and fill an array with edits to the point fc
var updates = []
for(var pole in poles_fs) {
Push(updates, {"globalID": pole.GlobalID, "attributes": {"Inspector": $feature.Inspector}})
}
// return
// instead of returning a value for a single field, you can return a dicitionary. for more info on that:
// https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm
return {"edit": [{"className": "Poles", "updates": updates}]}
... View more
11-30-2021
12:45 AM
|
0
|
0
|
2604
|
|
POST
|
To insert code: You are trying to input a tuple of (FeatureSet, Text) into the Left function, which is not a valid argument. According to the docs, the first argument can be Text, Array, Number, or Boolean. You have to fill your feature set sequencially: var fs = FeatureSetByPortalItem(Portal('https://arcgis.com'),'e7ad315d17a742fda44fb63cd311152a', 0, ['ZONE'], false)
var novy = {
'fields': [{'name':'Zona', 'type':'esriFieldTypeString'}],
'geometryType': '',
'features': []
}
for(var f in fs) {
var new_f = {'attributes': {'Zona': Left(f.ZONE, 2)}}
Push(novy.features, new_f)
}
return FeatureSet(Text(novy))
... View more
11-30-2021
12:31 AM
|
2
|
5
|
8258
|
|
POST
|
If you're OK with creating a new feature class, GeotaggedPhotosToPoints can help you.
... View more
11-23-2021
11:02 PM
|
1
|
0
|
720
|
|
POST
|
var fs = FeatureSetByRelationshipName(...)
// if you clicked on a feature where pkida == 1, then only the first 3 entries
// of your example table will be in fs.
// you can do various things with that feature set:
// return the number of saving accounts
var fs_savings = Filter(fs, "Service = 'Savings'")
return Count(fs_savings)
// just return "Yes" if there is at least one "Savings" entry, "No" otherwise
if(Count(fs_savings) > 0) { return "Yes" }
return "No"
// return the sum of all savings accounts
return Sum(fs_savings, "Balance")
// return a total balance
fs_loans = Filter(fs, "Service = 'Loan'")
fs_shares = Filter(fs, "Service = 'Shares'")
return Sum(fs_savings, "Balance") + Sum(fs_shares, "Balance") - Sum(fs_loans, "Balance")
... View more
11-23-2021
10:47 PM
|
1
|
2
|
4033
|
| 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
|