|
POST
|
Rainald, My apologies this was a painful task. I've shared this thread and your comments with some people here internally for their review. I can't comment much on the token/headers as this isn't in my specialty, I can comment a little more on the input JSON though. This particular service, documented here: https://developers.arcgis.com/en/rest/elevation/api-reference/summarize-elevation.htm requires a complete gpfeaturerecordset as input (mentioned previously). We recommended submitting a complete parameter for all online services. Including all elements of a parameter should generally reduce unexpected results. This includes the definition of fields, spatialref and geometry. The syntax example hints at that, but doesn't provide a sample you can copy/paste. Again, I'll share this feedback with the team and see if we can provide better information.
... View more
12-19-2013
05:15 AM
|
1
|
0
|
1461
|
|
POST
|
Glad to hear it works. I'll pass on your feedback about the OID field. As for using SOAP, the only information I can find is on this page: https://developers.arcgis.com/en/rest/elevation/ which states: The Elevation Analysis services can be accessed through a REST API. More information on the services, the source data, and how to access them is available in Getting started with Elevation Analysis services. (making no mention of SOAP)
... View more
12-17-2013
04:02 AM
|
1
|
0
|
1461
|
|
POST
|
A few of us have tried to reproduce this issue internally and cannot. Any information on how you reproduce it would be very helpful. Especially details like: what tool(s) you're using where is the data coming from (sde, fgdb, shape, etc) The details on versions/install procedures and licensing are good. I just haven't got the right combination to make it happen here.
... View more
12-16-2013
09:04 AM
|
0
|
0
|
2351
|
|
POST
|
Ok, it actually does look ok. I was trying to consume it in Desktop and didn't understand why I couldn't enter a point. I was made aware that this service can take a point, line or poly as input. Because of this, no schema is set. After adding an OID field and value to your input JSON, it works. Give this a try. {
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 4326
},
"fields": [
{
"name": "OID",
"type": "esriFieldTypeOID",
"alias": "OID"
}
],
"features": [
{
"attributes": {
"OID": 1
},
"geometry": {
"x": 9.4,
"y": 50.3
}
}
]
}
... View more
12-16-2013
07:55 AM
|
2
|
0
|
1461
|
|
POST
|
I'm not the owner of this, but I've looked at it and it does appear to be behaving strangely. I've notified the relevant people and we'll take a closer look. (I'll re-post when I get more information) thanks
... View more
12-16-2013
06:47 AM
|
1
|
0
|
1461
|
|
POST
|
I can't find the NIMs that track the issues - but I do know there was some problems regarding query layers in 10.1 (both map services and gp services if I remember correctly). There were fixes that went into 10.2 for both service types. There could be a couple more fixes in the upcoming release of 10.2.1 as well. (If I'm able to find more information, I'll add it back in here).
... View more
12-11-2013
05:18 AM
|
0
|
0
|
831
|
|
POST
|
Paul, Some problems were found with Remove Join running in the background. We tried quite a few solutions but weren't satisfied with any , thus the only safe solution was to modify it to the foreground. Internally it's still an open issue on trying to get the right fix. If/when we can get it right, we'll allow it to execute in the background. (Note: with the upcoming release of 10.2.1 it is still a foreground only tool).
... View more
12-10-2013
05:31 AM
|
0
|
0
|
928
|
|
POST
|
You can't. The esriJobFailed, esriJobExecuting, esriJobSubmitted, etc are framework messages indicating the status of the job. If you want a better error message you can turn messaging to ERROR (or higher, like INFO), and you'll get back the actual execution messages from the service. If your service throws an error like "Input coordinate is not valid", that message will come through and you can have the client display it.
... View more
12-09-2013
03:59 AM
|
0
|
0
|
469
|
|
POST
|
This is the topic you'll want to read regarding scripts you write for use in a GP Service: http://resources.arcgis.com/en/help/main/10.2/#/Authoring_geoprocessing_tasks_with_Python_scripts/00570000007r000000/ In regards to scratchFolder, scratchGDB, I'd start with this blog: http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/ (It has links to specific topics in the help as well) When you say it works locally and publishes fine but throws an error in Desktop, do you mean when you run the published service, that is throwing the error? I think I see what's happened. This is the line which has confused the publishing: arcpy.Buffer_analysis(waterbodyPoly,"waterbodyBuffer",0.0 - shorelineBuffer) In your script you've told Buffer, the output will be called "waterbodyBuffer". I'm not entirely certain what happened when you ran this on Desktop, but it must have made output of some sort. Perhaps a shapefile? So, when the script gets published, decisions are made based on your script and your environment. From the error it states: IOError: "%scratchFolder%\waterbodyBuffer" does not exist I can tell that the publishing thought you wanted a shapefile, because it tried to place that output into a folder. However, you don't have .shp. So the output wont be valid. The fix is easy enough. In your original script, I'd do this: # Buffer Waterbody inwards by shorelineBuffer waterbodyBuffer = "in_memory\\waterbody" arcpy.Buffer_analysis(waterbodyPoly,waterbodyBuffer,0.0 - shorelineBuffer) arcpy.AddMessage(str(arcpy.Describe(waterbodyBuffer).extent) + " of the waterbodyBuffer") # Noting that I turned your string "waterbodyBuffer" into a variable which points to in_memory\\waterbody and where it was used in Buffer and described, made that point to the variable.
... View more
12-02-2013
04:42 AM
|
0
|
0
|
784
|
|
POST
|
You can use this code to obtain a token.... import json, urllib, urllib2
USERNAME = "____"
PASSWORD = "_____"
REFER = "http://www.arcgis.com"
def urlopen(url, data=None):
referer = "http://arcgis.com/arcgis/rest"
req = urllib2.Request(url)
req.add_header('Referer', referer)
if data:
response = urllib2.urlopen(req, data)
else:
response = urllib2.urlopen(req)
return response
def gentoken(username, password, referer, expiration=60):
#Re-usable function to get a token
query_dict = {'username': username,
'password': password,
'expiration': str(expiration),
'client': 'referer',
'referer': referer,
'f': 'json'}
query_string = urllib.urlencode(query_dict)
tokenUrl = "https://www.arcgis.com/sharing/rest/generateToken"
tokenResponse = urllib.urlopen(tokenUrl, urllib.urlencode(query_dict))
token = json.loads(tokenResponse.read())
if "token" not in token:
print token['messages']
exit()
else:
# Return the token to the function which called for it
return token['token']
token = gentoken(USERNAME, PASSWORD, REFER)
... View more
11-06-2013
04:16 AM
|
0
|
0
|
2019
|
|
POST
|
Well you could, but it wont be the same. Odds are the extent of the input featureset will be bigger than the feature which was given. I guess it all depends on what you want....the true coordinates of the feature which was given, or if the extent will do. If you want the extent, you just describe each coordinate:
d = arcpy.Describe(aoi).extent
xMin = d.XMin
xMax = d.XMax
#etc
... View more
11-04-2013
12:03 PM
|
0
|
0
|
934
|
|
POST
|
The AOI from extractdata is a featureset input. There isn't really a 1 step you can do to get the coordinates of the polygon. If you just want the features returned as they were submitted, you could add an output parameter of type featureclass and copy the input into the output. If you really need the coordinates (which will be at least 3 X/Y pairs, if not more), you'll have to either do a cursor to get X/Y at each vertex, or maybe do something like features to points then do an Add XY and return the table values.
... View more
11-04-2013
10:41 AM
|
0
|
0
|
934
|
|
POST
|
Hmm. One more test. Start with a new session of ArcMap If you goto this folder: \arcgissystem\arcgisinput\ExtractDataTask22.GPServer\extracted\v101 there is a .RLT file in there. Double click it, it'll get put into your Results Window. If you expand the shared node, there will be a tool there. Can you run that? Additionally, because this is the extract data task, do you see layers get added to your ToC after you open the RLT file?
... View more
11-04-2013
05:09 AM
|
0
|
0
|
2615
|
|
POST
|
Tool is invalid for a model tool mean it's probably broken. With ArcMap, if you navigate to this directory on Server: C:\arcgisserver\directories\arcgissystem\arcgisinput\{service name}.GPServer\extracted\v101\{folder name} And open the toolbox, and the model - can you run it? I'm assuming the answer is no, can you edit it? Can you see anything that might be wrong with it? (paths wrong, something inside model is broken, etc)
... View more
11-04-2013
04:21 AM
|
0
|
5
|
2615
|
|
POST
|
That entire help topic is focused on solving the question you're asking. I'd suggest you read through it again. To quote the 3rd paragraph: Rather than opening ModelBuilder each time you want to process your dataset, wouldn't it be better if you could run the model using its tool dialog box, supplying the name of the input dataset by dragging a layer or dataset onto the dialog box, just as you would with a system tool? But when you open the tool dialog box, it displays This tool has no parameters, as illustrated below, so there is no way for you to enter the datasets you want to process.
... View more
10-31-2013
05:28 AM
|
0
|
0
|
1148
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2023 06:37 AM | |
| 1 | 09-18-2025 07:07 AM | |
| 3 | 09-18-2025 06:52 AM | |
| 1 | 03-23-2023 12:07 PM | |
| 1 | 10-21-2024 12:40 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-30-2025
06:25 AM
|