|
POST
|
Yes, you can publish your script as a Geoprocessing service http://server.arcgis.com/en/server/latest/publish-services/linux/a-quick-tour-of-publishing-a-geoprocessing-service.htm
... View more
11-21-2017
10:09 AM
|
0
|
0
|
916
|
|
POST
|
I get 'IndexError: list assignment index out of range' on this line: selections[row[0]][row[1]] = row[2]
... View more
11-21-2017
08:31 AM
|
0
|
1
|
635
|
|
POST
|
You could probably just create a python add-in extension and implement the openDocument event to fire. I'd check the TOC if the layer you want to process is loaded and if not, load it then process it as desired. http://desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/creating-an-add-in-application-extension.htm
... View more
11-21-2017
07:37 AM
|
0
|
0
|
3929
|
|
POST
|
Depending upon what the use of the result is, it can be converted to a dictionary with one more line: dfgrouped = dfgrouped.sort(['area_id,'length'],ascending=[True,False])
dict = dfgrouped.set_index(area_id').T.to_dict()
... View more
11-21-2017
06:29 AM
|
1
|
0
|
2750
|
|
POST
|
I still don't see how you are getting the top 3. I'd like to know too so that I can choose between my solution above and a strictly arcpy approach.
... View more
11-20-2017
01:30 PM
|
0
|
3
|
2750
|
|
POST
|
Not sure what you want to do with the results, but I think this gets close to the desired output. import pandas
import numpy as np
fc = r'C:\somefeatureclass'
fields = ['area_id','length']
nparr = arcpy.da.FeatureClassToNumPyArray(fc, fields)
df = pandas.DataFrame(nparr,columns=fields)
dfgrouped = df.groupby('area_id').head(3).reset_index(drop=True)
print dfgrouped.values
... View more
11-20-2017
01:05 PM
|
1
|
2
|
2750
|
|
POST
|
It was my mistake. I applied the suggested changes to the wrong app (WAB Developer 2.5).
... View more
11-20-2017
12:31 PM
|
0
|
1
|
1797
|
|
POST
|
The web map does not contain the DEM. We are adding it to the WAB application from the AddData widget but it doesn't display the popup information.
... View more
11-20-2017
11:45 AM
|
0
|
3
|
1797
|
|
POST
|
Edit: I goofed and applied the suggested changes to the wrong app, this does fix the issue! Sorry for that. I've implemented the recommended modifications to an app in WAB Developer 2.5 but the popup still does not show field information.
... View more
11-20-2017
08:15 AM
|
0
|
5
|
1797
|
|
POST
|
Your select by attribute needs a where clause added. http://pro.arcgis.com/en/pro-app/tool-reference/data-management/select-layer-by-attribute.htm#ESRI_USAGES_54F55D13A48F460096A074E2B55C3850
... View more
11-15-2017
09:13 AM
|
0
|
0
|
1167
|
|
POST
|
I'm surprised that Joshua didn't offer a pandas solution with its groupby function as well as a to_dict() --- the problem is with the limitations of FeatureClassToNumPyArray with some column types, but this may be something to consider. This gets close but I don't think it's exactly what you are looking for. fc = r'H:\MyfeatureClass'
#Create array
nparr = arcpy.da.FeatureClassToNumPyArray(fc, ['USE_CATEGORY','Shape_Area'])
#get array as pandas dataframe and populate the repeating values column
df = pandas.DataFrame(nparr,columns=['USE_CATEGORY','Shape_Area'])
#summarize as desired on shape area
df = df.groupby(by='USE_CATEGORY', as_index=True)['Shape_Area'].sum()
#make it a dictionary
myDictionary = df.to_dict()
... View more
11-14-2017
08:25 AM
|
0
|
4
|
7817
|
|
DOC
|
I just created a new hosted wab app using the AGOL Web AppBuilder and included the Select and AddData widgets. 1. Select contiguous polygon features and export as GeoJSON (using the Select widget). 2. Using AddData widget, on the File tab I drop in the result.geojson file. It did not import or export correctly, unsure which one. This is the result (darker blue is the geojson export result) on top of the original selected polygon features (white outline, light blue fill).
... View more
11-06-2017
01:15 PM
|
0
|
0
|
9817
|
|
DOC
|
Hi Robert, Possible bug or just user-error but I'm seeing strange results with the "Export to GeoJSON" functionality of search results. In this attached image is a selection result (red polygons), which were then exported to GeoJSON to local disk. Using the AddData widget and choosing the GeoJSON export file -- the result of that is the single blue polygon. If I validate the contents of the exported GeoJSON file on geojsonlint.com it's showing that it is invalid: However, the GeoJSON does validate in https://codebeautify.org/jsonviewer
... View more
11-06-2017
12:12 PM
|
0
|
0
|
9817
|
|
POST
|
Or just write the desc.featureType value to your output: for fc in fcList:
desc = arcpy.Describe(fc)
# Write messages to a csv File
txtFile.write(fc + " " + desc.featureType)
txtFile.write (os.linesep)
#close csv file
txtFile.close()
print "done"
... View more
10-27-2017
12:48 PM
|
1
|
1
|
5800
|
| 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
|