POST
|
I have a very long script run in the ArcGIS Pro python window that has stalled, I believe, due to being signed out of the portal during processing. Has anyone experienced this? Is there a way to restart from where it stalled rather than killing the process?
... View more
11-28-2016
12:32 PM
|
0
|
0
|
746
|
POST
|
Interesting. The selection is working just fine. I can only guess that the underscore is being treated as a wildcard. The table has fields integer "park_" and string "park", but no other fields with the word "park...". Could it be it is selecting from the intended field and not getting confused only because there is no alternative?
... View more
04-25-2016
10:03 AM
|
0
|
0
|
644
|
POST
|
That is definitely good to know. I've switch the cursor syntax and also run "del pCursor" after every run. The indentation was just a pasting error, as you assumed. The issue with the Near tool is unresolved.
... View more
04-25-2016
09:59 AM
|
0
|
0
|
644
|
POST
|
Using ArcPy in ArcGIS Pro 1.2, I have a da.SearchCursor for loop that selects a single city park feature per iteration, and runs the Near tool for points within a specified radius. In the first iteration, the Near tool completes successfully, but it fails on the second iteration. map = aprx.listMaps("Layers")[0]
lyrs = map.listLayers()
lyr_Park = [lyrs[0]]
fcs_Crime = [lyrs[1],lyrs[2],lyrs[3],lyrs[4],lyrs[5],lyrs[6]]
for lyr_Crime in fcs_Crime:
crime_type = lyr_Crime.name
pCursor = arcpy.da.SearchCursor(lyr_Park[0], ['park_'])
for park in pCursor:
park_name = str(park[0])
expression1 = "park_="+ park_name
arcpy.SelectLayerByAttribute_management(lyr_Park[0], "NEW_SELECTION", expression1)
arcpy.SelectLayerByLocation_management (lyr_Crime, "WITHIN_A_DISTANCE", lyr_Park[0], '1320 feet', 'NEW_SELECTION' )
arcpy.FeatureClassToFeatureClass_conversion (lyr_Crime,"C:\\Users\\dgoldb2\\Documents\\ArcGIS\\Projects\\Crime_Parks_Relationship\\Crime_Parks_Relationship.gdb", "p" + park_name + "_" + crime_type)
park_crimes = arcpy.ListFeatureClasses("p" + park_name + "_" + crime_type, "Point")
print (("p" + park_name + "_" + crime_type))
arcpy.Near_analysis(park_crimes[0], lyr_Park[0], "492 Meters", "LOCATION", "NO_ANGLE")
print ("Finished") Here is the error: Runtime error
Traceback (most recent call last):
File "<string>", line 44, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1162, in Near
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1159, in Near
retval = convertArcObjectToPythonObject(gp.Near_analysis(*gp_fixargs((in_features, near_features, search_radius, location, angle, method), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 500, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
Failed to execute (Near). I have looked carefully at the in_features and near_features to be sure they are both of type "Layer". Near runs the first iteration, which tells me the types are fine, but fails the second iteration, which tells me something is not progressing in the loop. Any ideas are welcome.
... View more
04-22-2016
11:30 AM
|
0
|
5
|
2815
|
POST
|
Forget the first part of my question then. If the sub model runs to completion, then there would not be an iterated variable passed on to the main model. So for the second question, this is actually two levels of a 4 level nested iteration, so i need the order to be this way. I'm thinking I should remove the iterators from all my models and export them as python scripts. Then I can write easy nested for loops to do the job. Does that sound reasonable, or possible?
... View more
10-28-2015
08:49 AM
|
0
|
1
|
630
|
POST
|
I have a model and a sub-model within it and the output of my sub-model uses a local variable name to create and save new Feature Classes in a GDB Feature Dataset. Variable name= Crime_Type (eg. Assault, Battery, Homicide, etc.) Output = %Crime_Type% (this is a model parameter) The main model should take this new FC in iteration 1 and run to completion before the first model iterates a second time. I have two problems: First, the %Crime_Type% input for the main model is not found because it is being treated literally (Failed...cannot find ...Crimes/%Crime_Type%) instead of looking for the file that was created in the sub-model (.../Crimes/Assault). Second, when running the main model, the sub-model runs to completion, iterating as it should, before the main model starts. I need the sub-model to run one iteration and give that to the main model before the sub-model iterates again. I may be missing something simple with Preconditions, but I am stumped. Any advice is appreciated.
... View more
10-26-2015
09:17 AM
|
0
|
3
|
2739
|
POST
|
Good, thank you. But I want to link from outside this page and drop into the tour at a specified point, in the map in the iframe. If i name the iframe name="map", then can that be used a shortcut somehow to then append the index number, index=7, for example?
... View more
07-01-2015
01:27 PM
|
0
|
1
|
1413
|
POST
|
OK, then how about if the Story Map is an iframe in another page? I do have admin access to both pages.
... View more
07-01-2015
12:26 PM
|
0
|
3
|
1413
|
POST
|
I want to link back and forth between an online text. I can put anchors in the text and add the <a href="www.com">Visit</a> tag to go there FROM the storymap. But how do I link to a particular point within a storymap? I want to drop in at point #n.
... View more
06-16-2015
11:26 AM
|
0
|
9
|
5469
|
POST
|
I'm working in ArcMap, in the Select by Attributes dialog on a PostgreSQL Enterprise GDB feature class. I'm using a SQL expression for MIN (timestamp) to get most recent feature created. MAX() seems to work fine, but MIN() is not working. "created_date" = (SELECT MIN("created_date") FROM sde.sde.AlertSite) On verify: The expression was verified successfully, but no records were returned.
... View more
03-04-2015
01:35 PM
|
0
|
0
|
2638
|
POST
|
Anyone else experiencing this problem? Is it repeatable or just a personal glitch? You are reading this but not commenting! Come one! Help me out here!
... View more
10-02-2014
11:33 AM
|
1
|
0
|
350
|
POST
|
I'm using iOS and the collection form is showing the hints instead of the field names. Is this a known issue? It displays field names on the same web map just fine on Android.
... View more
09-08-2014
02:07 PM
|
1
|
2
|
3697
|
POST
|
In the Calculate Field tool, use the following python expression. def find(shape):
point = shape.getPart(0)
return point.X find(!Shape!) (sub point.Y to get the Y coordinates) This works beautifully. Thank you!
... View more
07-25-2013
08:26 AM
|
0
|
0
|
1295
|
POST
|
My colleague and I found a way to do this by adding two functions to the JS to store and then get the currentFeature. function updateCurrentFeature(currentFeature){
currFeature = currentFeature;
}
function getCurrentFeature(){
return currFeature;
} Then since we need the currentFeature's id, within the executed queryTask we call updateCurrentFeature(addedGraphic.attributes.id) Then in the HTML, instead of trying to call the JS variable, which was being read as a string, we can pass getCurrentFeature() as the parameter to the executeZoomToPrev(currentFeature). <button class='button' id='infoWindowPREV' onClick='executeZoomToPrev(getCurrentFeature());'>< PREV </button> Many thanks to Jon and Paul S.!
... View more
06-12-2013
09:03 AM
|
0
|
0
|
363
|
Title | Kudos | Posted |
---|---|---|
1 | 09-08-2014 02:07 PM | |
1 | 10-02-2014 11:33 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|