POST
|
Interesting workaround, I will try it next time I'm having this problem. Thank you for sharing your solution!
... View more
07-30-2019
02:18 AM
|
0
|
0
|
3316
|
POST
|
Hi there, Thanks for the input but unfortunately it is not the answer. In the chapter Setting script tool parameters there is a section called "Derived output that does not modify an input parameter". There it specifically states that this parameter "Obtained from" should be empty (see snapshot below).
... View more
03-23-2018
05:19 AM
|
0
|
0
|
3316
|
POST
|
Of course! You are completely right, I forgot it doesn't have an upgrade option. I blame it on lack of coffee at such an early hour Thank you!
... View more
02-07-2018
02:42 AM
|
1
|
0
|
616
|
POST
|
Greetings, Perhaps someone can shed some light on my question. I have two instances of Web Adaptor (v.10.3.1) setup on the same machine which are pointing to two different ArcGIS Server Sites. I wanted to know if you could upgrade only one instance to another version (e.g. 10.5.1 or 10.6) and leave the other instance at it's current version. Thanks in advance, Cheers!
... View more
02-07-2018
01:59 AM
|
0
|
2
|
721
|
POST
|
I am using derived so as not to allow user input for that parameter, basically hiding it from the tool dialog box. I could hard code the parameter inside the script but then I would not get an output which I can subsequently use to chain the script tool in model builder.
... View more
10-23-2017
03:30 AM
|
0
|
1
|
3315
|
POST
|
Hey Aaron sorry for the very very late reply! I don't log on to Geonet very often and I must have missed the notification about your reply. To answer your question I have not found a solution to this. I just work with it like it is, perhaps it's been fixed in the latest version of ArcGIS desktop / Pro. I'm still using 10.3.1 but will be upgrading later to 10.5.1.
... View more
10-13-2017
02:45 AM
|
0
|
0
|
1041
|
POST
|
Howdy! I have a bit of a problem with a python script tool that I am trying to get to work when I chain it to other tools in a model made in model builder. It's just a simple dummy tool I set up to try to sort things out, the model selects a polygon, based on user input via a point type feature set, and buffers this selected polygon (this is the script part) then I wanted to copy the result output (featureclass) to another location by chaining the script tool to the copy features tool but no matter what I try it gives me an error that an input value is required (see model diagram, script tool parameter settings and script tool code below). Script tool runs fine on it's own by the way and gives proper results. Model diagram: Mybuffers Script tool code: import arcpy
import os
from arcpy import env
#Set environement variables
scratch = env.scratchGDB
env.overwriteOutput = True
arcpy.SetLogHistory(False) #Important to reduce metadata writing
#Get input parameters
inpnt = arcpy.GetParameterAsText(0)
mypolys = arcpy.GetParameterAsText(1)
outfcname = os.path.join(scratch, "mybuffers")
#Make feature layer from input point(s)
inpntlyrname = "InputPoints"
inpntlyr = arcpy.MakeFeatureLayer_management(inpnt, inpntlyrname)
#Make feature layer from polygons
polylyrname = "MyPolygons"
polylyr = arcpy.MakeFeatureLayer_management(mypolys, polylyrname)
#Select polygons that intersect input points
selpolys = arcpy.SelectLayerByLocation_management(polylyr, "INTERSECT",
inpntlyr, "25 Meters", "NEW_SELECTION")
#Buffer selected polygons
arcpy.Buffer_analysis(selpolys, outfcname, "5000 Meters")
#Set output parameter
outputfc = arcpy.SetParameterAsText(2, outfcname) Mybuffers script tool parameters settings (for the output parameter): It's like the copy features tool is not getting the data from the script tool even though I've used countless different versions of the SetParameterAsText() and read as much as I can take of the official help. Perhaps there is some good hearted soul willing to look over my code to help me see where I'm going wrong because I'm stuck and getting really annoyed at this Cheers! UPDATE 23.10.2017: I've been relying on the official help in the link below, chapter heading "Derived output that does not modify an input parameter". I have now tested setting up exactly the same example with the post data to repository script tool and the copy features section of the model fails in the exact same way i.e. "input value required", the second tool in the chain does not run. Setting script tool parameters—Help | ArcGIS Desktop
... View more
10-12-2017
09:41 AM
|
0
|
9
|
4916
|
POST
|
In short the problem is that after downloading a work area in Collector it is impossible to create new features (or update downloaded ones) and sync back but that is irrelevant since nothing can be edited or created.The only messages that Collector displays is "Unable to create feature" and "Unable to update feature" respectively. When trying to sync it just says that there was an error with syncing, no details. Working in "live" mode however is perfectly fine. I am using a Huawei P8 with Android 5.0.1. and Collector v10.4.0 (build 1024). The feature service is a locked, on premise service, running on a ArcGIS server 10.3.1 (machine on intranet) that uses a WebAdaptor (IIS 8.5 on win server 2012 R2) intermediate located on a machine on our DMZ. The web map containing the service and used in Collector is in our organization's AGOL site (not own hosted portal). As I say everything works fine in live mode in Collector, even editing on the web map that the Collector is using in AGOL. It's only after downloading a work area and going offline in Collector that things don't work. Anyone else having this problem and/or solution? PS: I know about and have found BUG-000081991 on the support site and this seems to be something else. UPDATE 20161013: I've had field crews confirm that using the same version of Collector but different version of Android (4.x) then downloading, creating and then syncing back works like a charm. Maybe Android version 5.0.1 does not play nice with Collector?
... View more
10-13-2016
03:20 AM
|
0
|
0
|
1274
|
POST
|
EDIT: Just noticed an error in snippet 2, the editStopOperation() call should be after the del cursor, cursor2 statement otherwise you get an error that the cursors have been invalidated because the edit operation has stopped. Thanks for the input Joshua, it was very helpful indeed and I'll mark is at the correct answer. However as you point out the efficient way depends on the number of events vs. possible risk of losing edits if something goes wrong. In my case the number of events is quite modest so I'll use the code from snippet 2
... View more
09-14-2016
06:46 AM
|
0
|
1
|
908
|
POST
|
Greetings! I would like to pose a question about two snippets of Python code that basically take in a list of events, each of which contain a latitude, longitude and depth like so eventslist = [[ lat1, lng1, depth1], [lat2,lng2, depth2] ... [latN, lngN, depthN]] and input these as points into two separate Geodatabase Featureclasses. I have verified that both these code snippets work but I would like to ask, which snippet in your opinion is the more efficient/correct one in regards to where to start/end the edit operation (edit.startOperation()) and creation/deletion of the insert cursors. Also if you think another solution is even more preferable then please don't hesitate to suggest, thanks in advance! SNIPPET 1 #Start an edit session to insert new events. Need to have edit session because of using two insert cursors at the same time.
edit = arcpy.da.Editor(env.workspace)
edit.startEditing(False, False)
#Iterate over the list of new events, each event contains lat, lng and depth
for event in newevents:
edit.startOperation()
cursor = arcpy.da.InsertCursor(inFc, ["SHAPE@", "lat", "lng", "depth"])
cursor2 = arcpy.da.InsertCursor(archiveFc, ["SHAPE@", "lat", "lng", "depth"])
lat,lng,Z = (event[0], event[1], event[2])
location = arcpy.Point(lng, lat, Z) #Create the 3-D point object
pointGeom = arcpy.PointGeometry(location) #Create the shape geometry as pointGeometry
row = [pointGeom, lat, lng, depth]
row2 = [pointGeom, lat, lng, depth]
cursor.insertRow(row) #Insert the new events into longterm class using insert cursor
cursor2.insertRow(row2) #Insert the new events into archive class using insert cursor2
del row, row2
del cursor, cursor2
edit.stopOperation()
edit.stopEditing(True) SNIPPET 2 #Start an edit session to insert new events. Need to have edit session because of using two insert cursors at the same time.
edit = arcpy.da.Editor(env.workspace)
edit.startEditing(False, False)
edit.startOperation()
cursor = arcpy.da.InsertCursor(inFc, ["SHAPE@", "lat", "lng", "depth"])
cursor2 = arcpy.da.InsertCursor(archiveFc, ["SHAPE@", "lat", "lng", "depth"])
#Iterate over the list of new events, each event is a list that contains lat, lng and depth
for event in newevents:
lat,lng,Z = (event[0], event[1], event[2])
location = arcpy.Point(lng, lat, Z) #Create the 3-D point object
pointGeom = arcpy.PointGeometry(location) #Create the shape geometry as pointGeometry
row = [pointGeom, lat, lng, depth]
row2 = [pointGeom, lat, lng, depth]
cursor.insertRow(row) #Insert the new events into longterm class using insert cursor
cursor2.insertRow(row2) #Insert the new events into archive class using insert cursor2
del row, row2
edit.stopOperation()
del cursor, cursor2
edit.stopEditing(True)
... View more
09-13-2016
03:47 AM
|
0
|
3
|
2038
|
POST
|
Great, thanks for the feedback Philip. My DBA will be happy to hear that
... View more
03-28-2016
04:03 AM
|
0
|
0
|
2682
|
POST
|
Aha ... didn't realize that was what it was for, thought it was only for sharing with individual users. Live and learn
... View more
03-21-2016
03:48 AM
|
0
|
0
|
2682
|
POST
|
Moved, thanks for the tip! Only problem is I can only move it to one place so it's very hard to choose which one!
... View more
03-18-2016
08:29 AM
|
0
|
2
|
2682
|
POST
|
We have a dynamic map service based on an mxd map document containing a Query Layer from a spatially (PostGIS) enabled PostgreSQL table (uses geometry data type for shape column). The service works fine both in ArcGIS clients and JavaScript browser applications through REST, no problems. Our PostgreSQL DBA contacted me however and told me that the service was leaving open and idle queries in the database which he says is not acceptable. He sent me a report as an example, see below. POSTGRES_TXN_IDLE WARNING: DB "postgres" (host:******) longest idle in txn: 56384s (15 hours 39 minutes 44 seconds) PID:32278 database:****** username:********* address:***.****.*** port:**** query:BEGIN My understanding is that this is normal behavior for ArcGIS server map service connections but I would like to verify if this is the correct understanding or not (we have AGS 10.3.1 and PostgreSQL 9.3.x). So is this normal behavior or not? The only viable solution that I can think of to meet the DBAs demand is to set the minimum number of service instances to zero so that idle services (and their connections to the DB) are closed after x minutes of inactivity. This however would result in a bit of a performance hit for the first user that comes along, and no instances are running, and he has to wait for at least one instance of the service to start up. UPDATE 20160321: Found a post by another user which seems to confirm this behavior on PostgreSQL connections. He had some interesting findings and our DBA seems to agree with him that this is not a good way to make connections to a database. Here is the post, check it out. arcgis server connection pooling
... View more
03-18-2016
06:27 AM
|
0
|
13
|
7666
|
Title | Kudos | Posted |
---|---|---|
1 | 02-07-2018 02:42 AM | |
1 | 09-21-2015 01:10 AM | |
1 | 03-08-2016 03:33 AM | |
12 | 09-21-2015 01:14 AM | |
1 | 09-18-2015 07:21 AM |
Online Status |
Offline
|
Date Last Visited |
08-23-2024
06:59 AM
|