|
POST
|
I thought I had this figured out but it came back again. In Pro if you try to set symbology outside the layer values it gets mad. This is actually highly annoying because then we can never set consistent colors. In code it seems to let me do it unless the scale is really small. Like -0.0003 to 0.0003 the classify values below with fail. Again highly annoying. So here I try to set 10 breaks. If that fails I default to generic symbols. Again I really do not want to do that as then the user cannot compare anything. sym = rasterLayer.symbology
sym.updateColorizer('RasterClassifyColorizer')
# was Condition Number
sym.colorizer.colorRamp = project.listColorRamps('Prediction')[0]
sym.colorizer.classificationField = "Value"
sym.colorizer.breakCount = 10
#sym.colorizer.noDataColor = {'RGB': [255, 255, 255, 100]}
# manual breaks
# this will fail on small time periods
if len(sym.colorizer.classBreaks) == 10:
sym.colorizer.classBreaks[0].upperBound = -100
sym.colorizer.classBreaks[0].label = "Over -40%"
sym.colorizer.classBreaks[1].upperBound = -40
sym.colorizer.classBreaks[1].label = "-30% to -40%"
sym.colorizer.classBreaks[2].upperBound = -30
sym.colorizer.classBreaks[2].label = "-20% to -30%"
sym.colorizer.classBreaks[3].upperBound = -20
sym.colorizer.classBreaks[3].label = "-10% to -20%"
sym.colorizer.classBreaks[4].upperBound = -10
sym.colorizer.classBreaks[4].label = "0% to -10%"
sym.colorizer.classBreaks[5].upperBound = 10
sym.colorizer.classBreaks[5].label = "0% to 10%"
sym.colorizer.classBreaks[6].upperBound = 20
sym.colorizer.classBreaks[6].label = "10% to 20%"
sym.colorizer.classBreaks[7].upperBound = 30
sym.colorizer.classBreaks[7].label = "20% to 30%"
sym.colorizer.classBreaks[8].upperBound = 40
sym.colorizer.classBreaks[8].label = "30% to 40%"
sym.colorizer.classBreaks[9].upperBound = 100
sym.colorizer.classBreaks[9].label = "Over 40%"
else:
arcpy.AddMessage("Warning Trend Rasters may not work with short time frames. Trying reduced symbols.")
sym.updateColorizer('RasterStretchColorizer')
sym.colorizer.colorRamp = project.listColorRamps('Condition Number')[0]
sym.colorizer.stretchType = "StandardDeviation"
rasterLayer.name = "Total Change"
rasterLayer.symbology = sym But today we had a case where the value range was -7 to 8 and the breaks did set to -40 to 40 like I want BUT the entire map all draws at a single color. So my check to look for not 10 breaks fix fails. If I ask it how many breaks it does say 10. And my bounds are correct. Worse it sets the color to the first blue - so now the user thinks its all in the >-40% category. Any ideas on how to fix this? I am pretty confused why symbology will not let me set anything I want. We cannot have all the maps using a different color scale. That is weird. thanks
... View more
02-05-2025
02:10 PM
|
0
|
4
|
2702
|
|
POST
|
What I do is have the package on the network then use sys.path.append(path to dir of packages) before the import. Works slick. We can't install any packages so your way would not work for us.
... View more
02-05-2025
01:59 PM
|
0
|
0
|
1535
|
|
POST
|
What is going wrong? Is it a crash? I do know that if you try to run First on an empty set then it will crash. So you need to check the intersect for IsEmpty before you try First. So more like this var County_Parks = featuresetByName($map, 'County_Parks', ['Parent_Asset_ID']) // Intersect the current location with the County_Parks and var County_Parks = Intersects($feature, County_Parks) // If the current location does intersect a feature, // return the name of the County_Park. Otherwise, return null if (!IsEmpty(County_Parks)) { return First(County_Parks)['Parent_Asset_ID'] } else { return null }
... View more
02-05-2025
01:45 PM
|
0
|
1
|
1332
|
|
IDEA
|
@JordanCarmona no sorry that was my last job actually. I was just trying to do a simple field list from a given layer but WAB cant do that anyway.
... View more
02-03-2025
04:08 PM
|
0
|
0
|
1106
|
|
POST
|
Well just found my own post.. almost 10 years later and I still need it and it is still not there.
... View more
02-03-2025
02:49 PM
|
0
|
0
|
1463
|
|
IDEA
|
And then 3.3 has a bug where it is not respecting the list of who can publish GP tools so it is limited to admins only. So I still cannot actually fix this. Sigh.
... View more
02-03-2025
01:33 PM
|
0
|
0
|
1121
|
|
POST
|
Then you would need to use selected-at probably. Pull out each value that way, then recombine using concat. I do this and write out the max possibilities. If it is blank just nothing shows. But this may give you trailing commas. This code also gets the label vs the name. Seems like a lot of work just to add a comma though. concat(jr:choice-name(selected-at(${Rash1},0), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},1), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},2), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},3), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},4), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},5), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},6), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},7), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},8), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},9), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},10), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},11), '${Rash1}'), ' - ', jr:choice-name(selected-at(${Rash1},12), '${Rash1}'), ' - ', ${Q1UserNotes})
... View more
01-31-2025
07:25 AM
|
0
|
0
|
2010
|
|
POST
|
It may be do to wrapping it in the concat. Some functions do not like that. Try separating the join into its own field then use that field in the concat.
... View more
01-31-2025
06:31 AM
|
0
|
2
|
2016
|
|
POST
|
If you have any options to escalate the bug via your support please do. ENH-000130624 and BUG-000146406 : Upper and lower case globalids
... View more
01-31-2025
06:28 AM
|
0
|
0
|
1960
|
|
POST
|
You need a 1 to 1 lookup key is all. Right now your csv has no unique lookup key is why you are stuck. Its like going into a room and saying Jamie raise your hand - and 4 people do. But if you say first, middle, and last name then it works. Hope that makes more sense. For you just make a column with all 3 together. Then in your form use a concat field to also combine. Then use this for your lookup. Give it a shot it will probably click on a test.
... View more
01-30-2025
02:31 PM
|
0
|
3
|
4091
|
|
IDEA
|
Have you tried this setting on the Collaborate tab?
... View more
01-30-2025
07:58 AM
|
0
|
0
|
1265
|
|
POST
|
Usually using bad field names. You should see little green boxes in any fields it does not like. Posting the form would help.
... View more
01-29-2025
03:54 PM
|
1
|
0
|
1719
|
|
POST
|
Correct it is ignoring the selection which was a very weird thing to leave out. It has us at a standstill on converting now. Last I heard it was "coming soon" but I still do not see it working.
... View more
01-29-2025
03:53 PM
|
0
|
2
|
2921
|
|
POST
|
Code for it is not too bad. Excel is prob the easiest. Or even a Dashboard. import os, time
from arcgis.gis import GIS
import tempfile
# Setup inputs
configFile = r"config.txt"
# config format is just FriendlyName,ServiceItemID
backupDir = r""
#--------------------------------------------
# Make a connection to ArcPro
gis = GIS('pro')
# read in the config file for list of HFS for Survey123
BackupAllAGOHFSConfigFile = open(configFile, 'r')
HFSList = BackupAllAGOHFSConfigFile.read().splitlines()
BackupAllAGOHFSConfigFile.close()
for HFS in HFSList:
HFSname = HFS.split(",")[0]
itemId = HFS.split(",")[1] # this now comes from the main AGO page with all the settings.
# Start the export to GDB job
dt = time.strftime("%Y%m%d_%H%M%S")
#out_file = os.path.join(backupDir,"{}_{}".format(HFSname,dt))
out_file = os.path.join(backupDir,"{}_{}.zip".format(HFSname,dt))
print ("Export job started for " + HFSname + dt)
fsLink = gis.content.get(itemId)
result = fsLink.export("export" + HFSname + dt, "File Geodatabase")
# Save to file system
print ("Saving final downloaded FGDB to {}...".format(out_file))
result.download(backupDir, out_file)
# Remove the extracted FGDB from AGOL (cleanup)
print ("Removing the export file from AGOL")
deleteResult = result.delete()
print ("Delete result is " + str(deleteResult))
... View more
01-29-2025
11:03 AM
|
0
|
1
|
2293
|
|
POST
|
I cannot remember but I think $editcontext.editType was different if they copied an existing point and that messed some stuff up. I would check that.
... View more
01-29-2025
09:08 AM
|
0
|
0
|
4206
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-08-2026 07:34 AM | |
| 1 | 2 weeks ago | |
| 1 | a month ago | |
| 1 | a month ago | |
| 1 | a month ago |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|