POST
|
I'm using Alfred's reply as the solution because re-running the script tool with the table closed finally resolved my issue with no field values after running the script. That being said, Dan's mention of deleting the cursors prior to stopping the edit session also merited kudos. Thanks to you both.
... View more
03-16-2024
10:53 AM
|
0
|
0
|
227
|
POST
|
Unless I'm overthinking this, it seems pretty easy- export your map as a JPG twice- one version that includes small point symbols for the areas you need to define for the hot spots and a second version without them. Next, use one of the online image map generator websites with your JPG with the point symbols in it to determine what the x,y image coordinates should be for those hot spots. Once you have that list of x,y coordinates built, send that along with the JPG without the point symbols to your HTML person.
... View more
03-15-2024
11:50 AM
|
0
|
0
|
123
|
POST
|
No dumb questions here as my distain for Pro is large and it's entirely possible I'm doing something wrong. The table was open during my initial runs (not the case with my current run in a blank project) and I did hit the refresh button after it ran and used the identify tool and clicked on feature in the map. The attribute field is still blank.
... View more
03-15-2024
08:27 AM
|
0
|
0
|
243
|
POST
|
Thanks, Dan. After adding the code to delete the cursors, my initial re-run resulted in no change in the end result. I'm trying to run it a second time but it's taking forever. If I run the script tool inside a project where the two datasets have been loaded into a map inside the project, the script runs in about 18 minutes but has the lock error. In this setup, the two script parameters have a type of "layer". I'm currenting running the script after starting Pro without a template & manually navigating to the 2 layers (type specified as "dataset" this time) and the script is still running (about 11 hours so far) with a couple hundred records yet to process. Sigh. "It worked in Arcmap.."
... View more
03-15-2024
08:13 AM
|
0
|
0
|
247
|
POST
|
This is driving me crazy. I used a different Python script developed in Arcmap as a framework for this new script for use in ArcGIS Pro. The script is pretty basic- the user specifies two polygon layers and the script loops through all features in the first layer (theUnits in the script) and then does an overlap select against features in the second layer (theParcels). It then builts a unique list for values for a specific field and then populates a field in the first layer with that list of values. The script runs through to completion but the attribute field it's supposed to populate remains empty. What am I overlooking? I've been running the script through a Toolbox Script tool and choosing the two layers which are present in my map. FWIW, here's the tail end of the output pushed to the details window: ...Parcel FID List: 1502; 12075 2 parcels intersected and Trusts Encountered were: 2,42 Current ObjectID: 17482 Parcel FID List: 4656 1 parcels intersected and Trusts Encountered were: 1 Current ObjectID: 17483 Parcel FID List: 12100 1 parcels intersected and Trusts Encountered were: 1 Current ObjectID: 17484 Parcel FID List: 10375 1 parcels intersected and Trusts Encountered were: 1 Current ObjectID: 17485 Parcel FID List: 3101; 5204; 7300 3 parcels intersected and Trusts Encountered were: 1 Current ObjectID: 17490 Parcel FID List: 6957; 16736 2 parcels intersected and Trusts Encountered were: 3 Current ObjectID: 17491 Parcel FID List: 745; 3102; 4127; 5613 4 parcels intersected and Trusts Encountered were: 1 Current ObjectID: 17494 Parcel FID List: 97 1 parcels intersected and Trusts Encountered were: 3 Current ObjectID: 17495 Parcel FID List: 358 1 parcels intersected and Trusts Encountered were: 3 Current ObjectID: 17496 Parcel FID List: 97 1 parcels intersected and Trusts Encountered were: 3 Current ObjectID: 17500 Parcel FID List: 1011 1 parcels intersected and Trusts Encountered were: 3 SCRIPT SUCCESSFULLY PROCESSED 3948 SALE UNITS IN 0:19:04.009152 Here's the actual script: #==============================================================================
# Import python modules
#==============================================================================
import arcpy, os, time
from datetime import timedelta
startTime = time.time()
#==============================================================================
# Link to and establish the required layers specified in the Toolbox dialog
#==============================================================================
theUnits = arcpy.GetParameterAsText(0)
theParcels = arcpy.GetParameterAsText(1)
arcpy.AddMessage('Timber Sale Units: ' + theUnits)
arcpy.AddMessage('Parcels: ' + theParcels)
workspace = 'G:/gis/PlannedSales\/20230907/20230907_pdr_7971.gdb'
# Start an edit session. Must provide the workspace.
edit = arcpy.da.Editor(workspace)
edit.startEditing(with_undo=False, multiuser_mode=True)
# Start an edit operation
edit.startOperation()
#==============================================================================
# Now let's loop through all of the Timber Sale Units.....
#==============================================================================
theCounter = 0
totalRecordCount = arcpy.GetCount_management(theUnits)
fields = ['OBJECTID', 'tTrusts', 'SHAPE@']
with arcpy.da.UpdateCursor(theUnits,fields) as theCursor:
for row in theCursor:
#--------------------------------------------------------------------------
# Step 1: Unselect all applicable overlay themes & reset any variables ----
#--------------------------------------------------------------------------
arcpy.SelectLayerByAttribute_management(theUnits, "CLEAR_SELECTION")
curTrustList = []
theCounter = theCounter + 1
#--------------------------------------------------------------------------
# STEP 2: Get the current sale unit shape ---------------------------------
#--------------------------------------------------------------------------
if (theCounter % 100 == 0):
curTime = time.time()
totalTime = curTime - startTime
totalTimeFormatted = "{:0>8}".format(str(timedelta(seconds=totalTime)))
arcpy.AddMessage("{0} of {1} records processed (elapsed time: {2})..".format(theCounter,totalRecordCount,totalTimeFormatted) )
curObjectID = row[0] #OBJECTID
arcpy.AddMessage('Current ObjectID: ' + str(curObjectID))
#--------------------------------------------------------------------------
# STEP 4: Perform an overlap select against the Stands Polygons -----------
#--------------------------------------------------------------------------
SelPoly = arcpy.SelectLayerByAttribute_management(theUnits, "NEW_SELECTION", "\"OBJECTID\" =" + str(curObjectID))
SelectedFeatures = arcpy.SelectLayerByLocation_management(theParcels, "INTERSECT", SelPoly)
matchcount = int(arcpy.GetCount_management(SelectedFeatures)[0])
desc = arcpy.Describe(SelectedFeatures)
arcpy.AddMessage('Parcel FID List: ' + desc.FIDSet)
trustFields = ['TIMBER_TRUST_CD', 'SHAPE@']
with arcpy.da.SearchCursor(SelectedFeatures,trustFields) as parcelCursor:
parcelCounter = 0
curList = []
for parcelRow in parcelCursor:
parcelCounter = parcelCounter + 1
curList.append(parcelRow[0])
curUniqueList = list(set(curList))
theTrustList = ",".join(str(element) for element in curUniqueList)
arcpy.AddMessage(str(matchcount) + ' parcels intersected and Trusts Encountered were: ' + theTrustList)
row[1] = theTrustList
theCursor.updateRow(row)
# Stop the edit operation.
#edit.stopOperation()
# Stop the edit session and save the changes
#edit.stopEditing(save_changes=True) # <== Throws error if uncommented: 'Cannot acquire a lock'
endTime = time.time()
totalTime = endTime - startTime
totalTimeFormatted = "{:0>8}".format(str(timedelta(seconds=totalTime)))
arcpy.AddMessage("\n\nSCRIPT SUCCESSFULLY PROCESSED {0} SALE UNITS IN {1}\n\n".format(totalRecordCount, totalTimeFormatted) )
... View more
03-14-2024
07:07 PM
|
1
|
7
|
343
|
POST
|
Oh, hey, it's nearly 3 years later and this issue *STILL* exists. And Daniel is spot on- garbage like this is precisely why I'm still avoiding Pro as much as I can. Long live Arcmap. 😞
... View more
03-14-2024
03:16 PM
|
1
|
0
|
51
|
POST
|
You can also bypass the Living Atlas and go here and download the data for whatever years you're interested in.
... View more
03-08-2024
08:57 AM
|
0
|
3
|
217
|
POST
|
ESRI has claimed that AGO EB will achieve WAB parity by the ESRI UC this year so it remains to be seen how this will all shake out. The Dev team is maintaining this post which lists the WAB/EB widget list overview. As with all things ESRI, I'm pessimistic that they'll reach parity without removing *some* functionality under the pretense of progess. Oh, and add 6 months to the specified timeline if you're using Portal EB as it is the last product the chain to receive updates.
... View more
03-01-2024
08:45 AM
|
2
|
2
|
330
|
POST
|
In the properties of the Data Frame, on the General Tab, play with specifying a reference scale. This is what impacts symbology size when printing or exporting.
... View more
02-29-2024
11:27 AM
|
0
|
1
|
192
|
POST
|
You need to look at your dataset and verify that your "date" field is actually defined as a date field. Based on what you're describing, the date field may actually just be a text field with dates stored in it. That won't work for date orientated widgets. In Portal / AGOL, you can go to your hosted feature layer and look at the Data section and field information. You should see the word Date as the field type: Alternatively, you can go to the REST endpoint of the service and confirm it the same way:
... View more
02-16-2024
02:59 PM
|
1
|
0
|
225
|
POST
|
Yeah, I'm afraid this is outside my area of expertise as well. I thought I'd give the url a try just to see if it would work for me but nope. Interesting thing, though- I tried the link via my work computer and it bonked. I tried the link through my personal phone browser and I was able to get to the REST url. I have no idea how to remedy this but perhaps it's related to network security in the workplace.
... View more
02-08-2024
02:00 PM
|
0
|
0
|
267
|
POST
|
I get the same error you mentioned when I tried adding it to a blank map so it appears to me that the service has restrictions (or the USDA server has restrictions on whom can access it).
... View more
02-08-2024
01:36 PM
|
0
|
3
|
304
|
IDEA
|
Currently if you publish a web layer to be hosted within Portal, it just goes into one gigantic trash can of published layers. It would be great if there was some ability to create structure and organization with the Hosted layers folder. Our organization has taken all of our official layers and published them as hosted layers using the same naming convention that we use within SDE. This is great as it provides a similar browsing experience in the REST directory but if I publish additional layers, they get inserted and break up the order due to alphabetization. It would be far cleaner and easier to find a specific hosted layer if there were subfolders (Planning, Public Works, etc). Anyways, structure from chaos.
... View more
02-05-2024
08:16 AM
|
6
|
1
|
212
|
IDEA
|
If you haven't seen this, the Solutions team looks like they will be releasing a sidewalk management solution later this year (blog link). This topic is really outside my normal duties but about 3 years ago, I was wrangled into building a public facing app that would show the public our ADA inventory information. I just rebuilt it with Experience Builder because of forced migration (thanks ESRI) and you can poke around in it here: https://gis.snoco.org/portal/apps/experiencebuilder/experience/?id=f1d7bd5e44ae466c953994a37c074128 The data in this application is old and kind of severed from the current workflow. We need to reconcile this and incorporate the new information but there's only so much I can do as I have to force migrate several apps before my IT shuts down our original Portal instance at the end of this month. Anyways. as I attempt to recall how this worked, the staff that were doing the inventory may still have been doing clipboard attribute collection and using a consumer level GPS for some field data collection. All the data was actively maintained in a file geoDatabase and I had a cut pulled out and published publicly in order to build the original WAB application. Since that time, my organization has adopted an asset management system (Cartegraph) and now the ADA inventory information is being captured in there so field staff are using tablets to capture location & attribute information and it's all stored in there. Because of the drastic change, the current workflow has been "date forward" and doesn't contain that historical stuff yet. I've been told there are some issues about duplicate features with respect to merging old and new data but I'm not really clear on that part. Not super helpful but I'll help get the ball rolling with discussion.. 🙃 Steve
... View more
02-01-2024
01:38 PM
|
0
|
0
|
410
|
POST
|
Yes and no..Within the default Map Viewer interface, there isn't a way. The most direct way I can think of is if you have access to the REST endpoint of the map service. You can query against the service with a WHERE clause (OBJECTID=77 or TYPE='Active' etc) and have the REST query return the results in JSON format. Then you can copy/paste the JSON into a text file and then import it back into desktop GIS using the geoprocessing tool for JSON to Feature.
... View more
02-01-2024
11:04 AM
|
0
|
0
|
231
|
Title | Kudos | Posted |
---|---|---|
1 | Monday | |
4 | 3 weeks ago | |
1 | 3 weeks ago | |
2 | 4 weeks ago | |
1 | 03-06-2017 02:26 PM |