|
POST
|
You're looking at the symbology there which doesn't affect the labels. If you right-click on the layer in the ToC and go to Labelling Properties - you can choose the Arcade expression you require i.e. DomainName($feature, 'yourLabelFieldName') It may not have done this automatically due to your Field options. If you go to the attribute table (right-click on the layer in the ToC ) and click on the hamburger icon at the top-right - you should see an option to 'Show domain and subtype descriptions'.
... View more
01-29-2025
09:48 AM
|
1
|
2
|
2117
|
|
POST
|
Ah Ok. Can't be done in Field Calculator as the fieldnames aren't exposed as variables. locals() return nothing useful from what I can see. Easy enough in a standalone script or Python window with arcpy UpdateCursor. Update the below with your field names and filepath. This will modify the input data with no undo. Advise making a copy of your data from testing and sanity-check the results on a subset of data. import arcpy
#note does not account for equal Max values
#just chooses one of the rock types even if both 50%
#path to your data
#remove from Pro ToC if lock encountered
filepath = r'C:\ArcGIS\GeologyRocks.gdb\Rock_stuff'
#list of field names countaining values
#to get max of
value_fields = ['Granite', 'Sand', 'Clay']
#name of field to be updated with rock types
max_field = ['Predominant_Geology']
fields = value_fields + max_field
#value to write if null or error etc.
null_string = 'unknown'
with arcpy.da.UpdateCursor(filepath, fields) as cursor:
for row in cursor:
values = {fields[i] : row[i] for i in range(len(fields)) if row[i] is not None}
if values:
max_field = max(values, key=values.get)
row[-1] = max_field
else:
row[-1] = null_string
cursor.updateRow(row)
... View more
01-29-2025
09:23 AM
|
0
|
0
|
2931
|
|
POST
|
It's probably just an Arcism if it worked before. Easiest fix might be to just put everything into the code block return.
... View more
01-28-2025
10:17 AM
|
0
|
0
|
2036
|
|
POST
|
I can see getMaxField() used for another post. It's not a native function and is defined in the code block at the bottom of field calculator. This works for me. Ensure you past the following into the 'Code Block' at the bottom of the Field Calculator window. def maxValue(*args):
filtered = [arg for arg in args if arg is not None]
return (max(filtered)) if filtered else None then above the Code Block you will have something that looks like <fieldname being calculated> = in the box below that enter (obviously replace with your fieldnames: maxValue(!yourField1!, !yourField2! .... )
... View more
01-28-2025
08:44 AM
|
0
|
2
|
2950
|
|
POST
|
Ah yes apologies. The auto complete polygon tool on the Create editing template should work for most use-cases. if you do end up with so extra multipart polygons you can easily delete them out. https://pro.arcgis.com/en/pro-app/3.4/help/editing/create-adjoining-polygons.htm#GUID-BDD43E74-B118-49BE-B842-0C05D8A118E2
... View more
01-27-2025
11:48 AM
|
1
|
0
|
1705
|
|
POST
|
https://pro.arcgis.com/en/pro-app/latest/help/editing/construct-polygons-from-features.htm
... View more
01-27-2025
10:44 AM
|
0
|
0
|
1717
|
|
POST
|
How was this script generated? Did you grab it from a model builder output? I'd guess it's something to do with the getparameter values being out of scope of the function, or that it seems to have hardcoded values into your function - but I'm not too hot on the model builder output 'scripts'. I'd either really simplify it into a script tool or just use the Parse Path and Add Message functions inside Model Builder.
... View more
01-27-2025
10:01 AM
|
0
|
1
|
1444
|
|
POST
|
You need to change the projection of your shapefile/feature class to WGS84 (EPSG 4326) then the SHAPE@XY will be a tuple of decimal lat lon. Run the 'project' tool. https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/project.htm Obviously this will mean your data is now all in WGS84. There is an alternative where you could run a geometry operation or pass the coords into a few geoprocessing tools as intermediate steps to get the x an y in UTM for you to plug in. But certainly easier to just run with the data in WGS84 if you can get away with it.
... View more
01-27-2025
09:46 AM
|
1
|
1
|
2160
|
|
POST
|
Your coordinate system is UTM Zone 16. SHAPE@XY will be expecting a tuple of UTM cartesian coordinates. Can you check the coordinates of your new point in ArcMap - you'll likely see it about 100m from the UTM origin. I'd also run a search cursor to print out the SHAPE@XY values and you'll be able to see what's going on.
... View more
01-27-2025
08:07 AM
|
2
|
3
|
2196
|
|
POST
|
Hi Glenn, The Esri MOOCs might be useful. I believe subscribing to the training also covers licensing in ArcGIS Online and ArcGIS Pro depending on which course. Although they are only available at certain times in the year. https://www.esri.com/training/mooc/ Luckily the 'Going places with Spatial Analysis' course seems to be starting very soon and you (and your students) could register for it. A nice email to the Esri team (do a search on the forum for 'MOOC') might also potentially open some over avenues for materials etc.
... View more
01-26-2025
12:52 PM
|
1
|
0
|
1942
|
|
POST
|
Ah that's useful info. I'll also add that the view I checked returns both 'Hosted Service' and 'View Service' in the list - so may need additional checks such as if 'Hosted Service' in list and 'View Service' not in list etc. Could be other gotchas to be aware of also.
... View more
01-26-2025
12:43 PM
|
0
|
0
|
1219
|
|
POST
|
I'd recommend Tabulate intersection as Dan suggested. Then probably create a new field and use Calculate Field with Python or Arcade to return the Field Name of the rock type field which has the highest Area. Then you can clean up by deleting all the rock fields if necessary. I'd certainly just run the Tabulate Intersection first and you'll understand what I mean when you look at the output. Also definitely check out the link dan provided which explains the tool.
... View more
01-25-2025
12:50 PM
|
1
|
6
|
3009
|
|
POST
|
Firstly that's a very well laid-out and annotated model. Iterate Layers output should already be the layer name, how are you retrieving the full filename/path? Default is an oval with 'Name' which will be the layer name as it appears in the map. I guess you've changed the name to FileName in the picture supplied. I also don't understand why FileName is set as a Parameter - it makes no sense to me. Maybe this is causing the issues. I'd really recommend creating a new model for testing - and input a map with just 1 layer. Run it with just the Iterate Layers outputs and you'll probably see what's going on.
... View more
01-25-2025
12:27 PM
|
0
|
0
|
1934
|
|
POST
|
There appears to be an identifier in the Item property typeKeywords - 'View Service' from arcgis.gis import GIS
gis = GIS("home")
#replace with your layer id
feature_id='73fdbf4gxxxxxxxxxxxx'
item = gis.content.get(feature_id)
#item property 'typeKeywords' produces a list which
#should have a 'View Service' element listed if so
print(item.typeKeywords)
#if it is a view service - print typeKewords properties
if "View Service" in str(item.typeKeywords):
print(str(item.typeKeywords))
... View more
01-25-2025
11:55 AM
|
1
|
0
|
1251
|
| 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 |
Monday
|