|
POST
|
Here's part of the requirement to iterate the parcel features and select by location for each feature. But untested, likely needs work: with arcpy.da.SearchCursor(parcel_featureclass, ['SHAPE@']) as parcelcursor:
for parcelrow in parcelcursor:
#get the geometry to use in the spatial selection
geom = parcelrow[0]
#select feature from the other layer using the geom variable
arcpy.SelectLayerByLocation_management(the_other_lyr, "INTERSECT", geom, "", "NEW_SELECTION")
#get the area of the selected features and sum
areasum = 0
with arcpy.da.SearchCursor(the_other_lyr,['SHAPE@AREA']) as newcursor:
for newrow in newcursor:
areasum = totarea + rewrow[0]
... View more
12-06-2017
10:02 AM
|
2
|
14
|
5724
|
|
POST
|
Edit: perhaps it actually does filter it out -- I've gone thru several iterations of clearing browser history and kept seeing the usgs content in the search results until now when I just made another attempt. I'll continue to test but looks promising. Thanks again! Robert, I've deployed a test WAB with the changes and have set it and its web map source to shared public. When it opens I am not prompted to login (expected) and open the AddData widget, which defaults to "ArcGIS Online" as the search location (expected). If I type in "usgs", I get the USGS Live Stream Gauges (Flooding) map service that is considered "subscriber" content and distributed by ESRI. Do you get the same?
... View more
12-05-2017
11:18 AM
|
0
|
5
|
1199
|
|
POST
|
Thank you. Does this have to be added in any particular location within SearchPane.js or other call to buildQueryParams?
... View more
12-05-2017
11:06 AM
|
0
|
8
|
2540
|
|
POST
|
So are you saying you only want to apply the filter when the "ArcGIS Online" source is selected and the user is Not signed in? Yes, that sounds like what we'd want to see. If we have a public WAB deployed to our domain then no login is required if the app is opened and no ESRI premium content should be listed in any search result at all because it will automatically redirect to the sign in. This is very disruptive to the user experience -- it should prompt the user to ask if they'd like to sign in and offer the opportunity to cancel so that the WAB does not refresh and the session content lost. However, we can have all internal resources point to the WAB with url parameters so that it opens at the org sign-in rather than open as a public user. This forces the user to sign in first -- this way any AddData search results should then contain all public content, content shared with the organization and ESRI premium content would be fine to add and there will not be any refresh because the user is already signed into the org.
... View more
12-05-2017
06:46 AM
|
0
|
10
|
2540
|
|
POST
|
Robert -- that definitely had an affect. However, it filters out all "My Organization" content if signed in. I think the most desired solution is to filter out ESRI premium content from the "ArcGIS Online" drop-down, but if the user is signed in then do not apply any filter.
... View more
12-05-2017
06:08 AM
|
0
|
12
|
2540
|
|
POST
|
Much appreciated, Robert -- I'll dig into this today and give it a go.
... View more
12-05-2017
05:55 AM
|
0
|
0
|
2540
|
|
POST
|
Problem: The AddData widget does not filter out ESRI Premium Content from its search results and publicly shared WAB apps will have many non-organizational account users. The WAB refreshes if attempting to add ESRI premium content (after signing in) and is a very confusing user experience. Question: Is there an easy way to filter out ESRI Premium Content from the AddData widget search results? We're interested in an interim quick solution that we can implement to our WAB apps we build with WAB Developer and would like to alter the AddData widget as described above. In the longer term, an enhancement request will be made to fix this issue as it seems to be a design flaw in general. There should not be interruptions to the logical flow and is quite confusing to the user.
... View more
12-04-2017
01:17 PM
|
0
|
15
|
3903
|
|
POST
|
Have you tried to add url parameters to the execute on the GP service? Example: ttps://mydomain.com/[ArcGISServer name]/rest/services/[folder name]/[GP Service name]/GPServer/GP service task name]/execute?InputParam1=somevalue&InputParam2=somevalue&env%3AoutSR=&env%3AprocessSR=&returnZ=false&returnM=false&f=json What are those 2 input parameters?
... View more
12-01-2017
12:13 PM
|
0
|
2
|
1951
|
|
POST
|
You should probably look for specific reasons why you think it runs slower and validate via testing. I wouldn't just dismiss a GP toolbox as the reason.
... View more
11-22-2017
08:30 AM
|
0
|
0
|
3640
|
|
POST
|
I have no way of knowing for sure, but your Tkinter GUI is likely part of the problem. You'll have to research how to successfully implement that, but from what I've read it doesn't play nicely in ArcGIS. You may want to switch gears and build an Add-In or just get creative with building a Toolbox for your GUI instead.
... View more
11-22-2017
08:11 AM
|
0
|
6
|
3640
|
|
POST
|
Have you tried to add a wildcard value? rasters = arcpy.ListRasters('*')
http://pro.arcgis.com/en/pro-app/arcpy/functions/listrasters.htm
... View more
11-22-2017
07:57 AM
|
0
|
8
|
3640
|
|
POST
|
Looks like pandas allows to export individual "Sheets" into a single .xlsx but you will have to first convert your feature class to a NumPy Array http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/featureclasstonumpyarray.htm import pandas
# Create a pandas dataframe
df = pandas.DataFrame(nparr,columns=['col1','col2'])
# Create pandas ExcelWriter and point to a .xlsx file
writer = pandas.ExcelWriter(r'H:\pandas_simple.xlsx')
# Convert the dataframe to an XlsxWriter Excel object.
df.to_excel(writer, sheet_name='MySheetName')
# Close the Pandas Excel writer and output the Excel file.
writer.save()
... View more
11-21-2017
10:14 AM
|
1
|
0
|
1340
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-17-2020 10:47 AM | |
| 1 | 10-25-2022 11:46 AM | |
| 1 | 08-08-2022 01:40 PM | |
| 1 | 02-15-2019 08:21 AM | |
| 2 | 08-14-2023 07:14 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-22-2025
02:28 PM
|