|
POST
|
I'm trying to build some simple service checks (map, feature and gp services) that are published on our ArcGIS Server site(s). Example: Check a folder for stopped services—Documentation (10.3 and 10.3.1) | ArcGIS for Server is what I'm attempting to implement but having difficulty with the request at fetching the token. I've been provided with the serverName and serverPort parameters (lines 22 and 23 of the sample code) by our AGS admin but I keep tripping the error at line 137. If I print the response.status it shows a response of 302 and response.reason is "Found". Any input or success implementing this script?
... View more
07-28-2016
06:15 AM
|
0
|
24
|
12265
|
|
POST
|
Max extent (in Web Mercator Aux Sphere spatial ref): 40,000 acres My initial recommendation was to re-work the point feature class for those larger scales so as to reduce the density, and ultimately the processing times for the Selection. But I hoped to fully vet this out before going down that road. When I look at the AGS logs, all seems to process ok 200 codes with this published GP service. Looking at developer tools, it says about 225,000 milliseconds or about 3.75 mins to process that 40k acre polygon on points selection.
... View more
06-28-2016
06:58 AM
|
0
|
0
|
1591
|
|
POST
|
I'm looking for any alternatives to enhancing an existing SelectByLocation process. The most optimized/best performer so far has been to simply put a FeatureLayer and a FeatureClass into an INTERSECT as parameters in an arcpy.SelectByLocation_management method. 1 polygon in the selection feature class (an in_memory FC). >10million points in a target point feature layer (a FC in a FGDB on a network location registered with ArcGIS Server) The extent of the polygon feature encapsulates about 2.5 million point features and executes in about 100 seconds. Not bad I guess if we're running on ArcGIS desktop but this is part of a script that is a published Geoprocessing Service and I'm looking to optimize as much as possible to keep the GP service in a synchronous state rather than completing as an asynchronous job. Thanks for any input! ply_fc = r'H:\MyFolder\gpdata.gdb\WM_InputPly_0624'
pnt_fc = r'H:\MyFolder\gpdata.gdb\WM_InputPts_0624'
arcpy.MakeFeatureLayer_management(pnt_fc, "PointFeatures")
#perform the selection
arcpy.SelectLayerByLocation_management("PointFeatures", "INTERSECT", ply_fc)
rowcount = int(arcpy.GetCount_management("PointFeatures").getOutput(0))
... View more
06-27-2016
10:15 AM
|
0
|
2
|
3388
|
|
POST
|
Does it work if done manually in ArcMap? How about if you run the Make XY Event Layer tool on your input? These might uncover if there's an issue with the input itself.
... View more
06-23-2016
08:03 AM
|
3
|
1
|
4195
|
|
POST
|
my propose was to save me to click on "save" buttun in all the open MXD's by my self- i wanted the python will do it. So you are running the script from an Add-In tool? I don't think it is possible to execute this type of save method from a script running parallel to the mxd document you are trying to alter --- I'd think there will be 2 separate instances of python conflicting. You will likely have to check to see if an .mxd referenced in your for loop is open and perform a saveAs instead.
... View more
06-15-2016
11:38 AM
|
0
|
0
|
870
|
|
POST
|
Your code works fine for me. Double-check the folder and file permissions.
... View more
06-15-2016
06:26 AM
|
0
|
0
|
3987
|
|
POST
|
I'm not sure where you placed the line (it looks like you put it in the for loop?), but it should probably be located just after you set the workspace: env.workspace = r"D:\PROJECTS\bat_galim\gis"
env.overwriteOutput = True
... View more
06-15-2016
05:44 AM
|
0
|
0
|
3987
|
|
POST
|
Just to be different, I used numpy and pandas to get the result. Basically just converts the input FC into a pandas DataFrame, apply filter, create output table, join back to original FC and apply final SelectByAttributes. import arcpy
import pandas as pd
import numpy as np
dflist=[]
arrOut = r'in_memory\_arrOut'
items = ['very','longer','sweater','really']
fc = r'<input feature class>'
fl = arcpy.MakeFeatureLayer_management(fc, "inputFC")
flds = [f.name for f in arcpy.ListFields(fc)]
tarr = arcpy.da.TableToNumPyArray(fc,flds)
df = pd.DataFrame(tarr,columns=['OID','Full_Text','flag'])
df['flag']='x'
for item in items:
df_result = df[df['Full_Text'].str.contains(item)]
dflist.append(df_result)
listofdfs = pd.concat(dflist)
dfar = listofdfs.to_records()
tarrout = np.array(dfar, np.dtype([('ID', np.int32),('Full_Text', '|S255'),('flag', '|S1')]))
arcpy.da.NumPyArrayToTable(tarrout, r"in_memory\numpytab2")
arcpy.AddJoin_management(fl, "OBJECTID", r"in_memory\numpytab2", "OID", "KEEP_COMMON")
exp = """ "flag" = 'x' """
arcpy.SelectLayerByAttribute_management(fl, "NEW_SELECTION", exp)
... View more
06-14-2016
11:57 AM
|
1
|
1
|
4634
|
|
POST
|
Maybe try to set the workspace Overwrite property? arcpy.env.overwriteOutput = True
... View more
06-14-2016
07:19 AM
|
1
|
3
|
3987
|
|
POST
|
Thank you for the reply, Robert. Is this something that ESRI support could address or is this an issue related to a custom widget? Thanks again for all of your input!
... View more
06-06-2016
05:23 AM
|
0
|
8
|
3126
|
|
POST
|
Search results added to the legend as operational layers correctly display the service name it originated from. However, when sending to a print task (as a pdf or any other output type), it renames this to "Override 1" in the legend of the print. Has anyone been able to at least modify this name to something specific? Any suggestions on where to begin? Thanks!
... View more
06-01-2016
06:23 AM
|
0
|
14
|
7385
|
|
POST
|
*** Update *** ArcGIS Online Assistance works! ArcGIS Online Assistant It may not be a super efficient process, but I can see implementing a satisfactory process for our map service publication workflow. In essence, here's what I did to "update" an existing web layer that gets broken when overwriting the underlying map service with updates/changes to it: 1. Re-publish the updated map service 2. Create a new web layer from the updated map service: open a new web map and add the map service. Create a "copy", apply any symbol adjustments and popup setup. Save it. 3. Open ArcGIS Online Assistant, navigate to the newly created web layer and copy the JSON (just the "data" portion) of the newly created web layer. Add it to a Text Pad, or just keep it in the clipboard when you copy. 4. From ArcGIS Online Assistant, locate the original web layer that is broken. Select all of the "data" section of the JSON, delete it and paste in the JSON from the newly created web layer. 5. Save the JSON editor. You should be good to go!
... View more
05-20-2016
08:03 AM
|
4
|
1
|
4869
|
|
POST
|
Geojobe has some AGOL admin tools that allow for exporting and importing individual items, which I thought looked promising! However, when I exported the JSON of the broken web layer, applied the fix and then imported it back into AGOL --- it created a new item instead of maintaining it's original item Id for some reason. So, it doesn't "fix" the existing item, it just creates a new item. This is a difficult issue that we've run into as well at our organization. We are using "Map Image Layers" as the items in AGOL so that the underlying map services can be formalized for sharing, and more importantly, for discovery. We have a sort of elaborate admin design that incorporates specific accounts and groups that help us organize content based upon specific business units of the organization. Essentially, we are managing content by creating AGOL accounts and groups that are specific to each business unit of the organization -- which works well! However, we've run into the issue of managing that content as Map Image Layers when their underlying map services are altered (as we should expect them to!). This could be a simple schema change to one or more of the feature classes in the service has occurred OR more often, it's simply adding a new feature class to the map service that causes the web layer to break. This alteration to the map services, expectedly, corrupts the web layers and because each web layer has a unique URL we simply cannot replace it with a new/updated/fixed web layer because that original web layer could have already been added to tons of user's web maps. Now, the next time these users access their web map products they've created, that web layer is broken or corrupted. There is no simple fix because we cannot alter that original web layer and a new one must be created. This means a new URL is created and those user's do not get the new web layer in those map products. The suggested fix: some sort of JSON editor that will allow us to update the actual properties of the web layer and save it back in order to maintain that original URL. Then user's web map products that contain that web layer will include those updates automatically.
... View more
05-20-2016
06:53 AM
|
2
|
0
|
4869
|
|
POST
|
Edit: I see there is one already that I overlooked! Any plans or insights on creating an Attribute Editor widget?
... View more
04-21-2016
11:57 AM
|
0
|
0
|
2799
|
| 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
|