|
POST
|
Unfortunately at this time - no. We encountered a crash with the tool when run in background (certain circumstances made it happen), as such we didnt feel comfortable releasing the product with the issue. We were unable to narrow down the cause in the time frame we had to fix it, thus the only safe option we had was to make the tool foreground only. We're actively working to fix it for the next service pack.
... View more
12-20-2012
06:57 AM
|
0
|
0
|
1685
|
|
POST
|
Can you make the simplest of map services with 1 or 2 of the same layers your GP tool uses and try to publish that? Map and GP services follow the same rules, there could be a different code path they go down. If map service copies the data then it at least shows its a wider issue or if not, then specific to GP.
... View more
12-19-2012
12:48 PM
|
0
|
0
|
2071
|
|
POST
|
Take a look at the post Dale has in this thread: http://forums.arcgis.com/threads/35219-Overlapping-polygons-cover-percentage He does a better job of explaining than I ever could....
... View more
12-14-2012
12:18 PM
|
0
|
0
|
3004
|
|
POST
|
Unless I didn't understand your question completely, then yeah it should be. You said: I wish to calculate the acreage of the 2 new layers which each consist of only 1 feature each. The instructions I gave will calc a field for a given layer. 1 to many features inside each layer will have their own acreage calculated on a per feature basis. So if I understand what you want to do, you'll have to do 2 calcs, once for each layer.
... View more
12-14-2012
11:59 AM
|
0
|
0
|
3004
|
|
POST
|
You're scripting, so you can use the Calculate Field tool to work this out. See this link, it provides examples to Calc Field. http://resources.arcgis.com/en/help/main/10.1/index.html#/Calculate_Field_examples/005s0000002m000000/ An example in your case: Parser:
Python
Expression:
!shape.area@acres! Side note - you can do a "Calculate Geometry" within the app, see the following: http://resources.arcgis.com/en/help/main/10.1/index.html#//005s00000027000000
... View more
12-14-2012
11:50 AM
|
0
|
0
|
3004
|
|
POST
|
Server 10.1 is for Windows or Linux (no longer Java or .net) Have you seen this help topic on deploying custom tools? If not, it should answer some questions. Please post if you still have questions.
... View more
12-14-2012
06:23 AM
|
0
|
0
|
723
|
|
POST
|
Are you saying the problem is : you need to associate attributes with the point you click on the map? Feature Sets at 10.1 are now based entirely off of Feature Templates (what you'd set up when performing edits). You can set default symbologies and attributes for your input features. Since you've shown in the tool dialog a point that says something along the lines of "click a point on the map".. its initializing the feature set correctly. If its a matter of getting those attributes into the point feature, you have a few choices: a) right click on the point feature and supply values. Any point you click on the map will then be populated with those defaults b) after creating features, right click on the layer in the ToC and open the attribute table and fill in the details. I'd give a quick read of this quick tour of FS help topic. As well as setting the schema (more information about feature templates on this page).
... View more
12-14-2012
06:18 AM
|
0
|
0
|
3145
|
|
POST
|
Mike, We've debugged this down further and think we have an understanding of the problem. If you still have a version of your toolbox before hacking it up to get around this problem, you can try this which should probably work: In ArcCatalog, goto Geoprocessing > Environments. Set a value for the Current Workspace (under the Workspace heading) You can set this to a folder or a fGDB. Now when publishing or packaging it should work. Again, my apologies for the inconvenience. We're working on a fix that you'll hopefully see in service pack 2.
... View more
12-13-2012
08:46 AM
|
0
|
0
|
3137
|
|
POST
|
I dont think I have all the answers to your questions, but I can say this: When writing paths, you don't need the 'u'. (as long as they're written correctly - correctly being forward slash or double backslash or done with 'u' or 'r') If you're building up paths I strongly encourage you to use the os.path.join function and never the "+" to add up paths. I cannot guarantee that when scanning your script for required data for publishing/packaging that strings (paths) built up with + will be caught. We can and do work quite well with os.path.join I'm not sure if you've seen this help topic, if not I'd give a quick read: http://resources.arcgis.com/en/help/main/10.1/#/Authoring_geoprocessing_tasks_with_Python_scripts/00570000007r000000/ The short of it: if we encounter project data in your script, we evaluate that against the datastore to either copy or not. The following code works fine.
>>> import os
>>> start = "sde.sde"
>>> end = ".fc1"
>>> sdeServer = "c:/mydata/somesde.sde"
>>> print os.path.join(sdeServer, start + end)
c:/mydata/somesde.sde\sde.sde.fc1
However, if you start mixing in slashes with your strings, you'll see what happens when they get put together with os.path.join
>>> start2 = "/test.sde"
>>> print os.path.join(sdeServer, start2 + end)
/test.sde.fc1 This stackexchange answer describes what slashes do inside an os.path.join statement : http://stackoverflow.com/questions/1945920/os-path-join-python So anytime that slash is encountered in os.path.join, its like resetting the path. Does this clear it up at all? Regardless of all this, it shouldn't crash : I assigned the bug to a developer and we'll evaluate for 10.1.2 (NIM087309 - Publishing or sharing a PYT from ArcCatalog causes a crash when referencing a .SDE workspace) Thanks for including your workflow. I'll take a look to make sure we're catching everything.
... View more
12-12-2012
11:29 AM
|
0
|
0
|
3137
|
|
POST
|
When I publish from ArcMap, and go find the PTY in the Input directory, I have the following inside: # Esri start of added variables
import os, arcpy
g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,u'ne2k864_DB_auth.sde')
# Esri end of added variables
#........
def execute(self, parameters, messages):
"""The source code of the tool."""
wrkspc = g_ESRI_variable_1
return
This is correct per the publishing process. My SDE connection file lives at: c:\arcgisserver\directories\arcgissystem\arcgisinput\Tool.GPServer\extracted\v101 The v101 folder is the packageworkspace. Are you using 10.1 final or 10.1 sp1? I'm not sure how you're getting the staging directory pushed into the PYT. Thats definitely wrong, but I can't reproduce that. Side note to your first point : a workspace isn't a supported input type with GP Services. We re-map that to constant (basically hardcode it). We do support "string", you could manually write that up. Without knowing your requirements, the only general statement is most of the time, workspaces arent necessary as a parameter visible to users. If any changes to the workspace need to be done, its best done behind the scenes. Do you have a full PYT you could share (just so I can get a better idea what you're doing)? If you dont want to post here, you can email it to me: [email protected] thanks
... View more
12-12-2012
08:13 AM
|
0
|
0
|
3137
|
|
POST
|
Thanks for reporting. I can reproduce this and will get a bug logged for it. Just on the quick testing I've done: it seems specific to executing this workflow in ArcCatalog. If I do the same inside ArcMap it works fine - can you try your workflow there? thanks again.
... View more
12-12-2012
07:41 AM
|
0
|
0
|
3137
|
|
POST
|
As you've probably already determined, the (from/to) KML tools arent supported in the Runtime. In core ArcGIS, either the tools or using the output from Server with type of KML is the only way to create KML. (or extensions like data interop) I havent personally used any of the C# KML packages listed here, but one might provide a useful option? Or there might be a script tool out there which writes KML. If you can find a script that someone has already written you can wrap that in a geoprocessing task.
... View more
12-10-2012
07:26 AM
|
0
|
0
|
2706
|
|
POST
|
Ok.... so you could possibly let your script do all "intermediate" processing in the scratch space and then have one copy at the end to persist your output to a known location. This would be much "easier/safer" then doing everything in a local, non-server managed directory. The code in should be straight forward: -do intermediate processing (file raster output saved to scratchFolder on the server) -check directory to copy file to (reading list of files) -file name = last file +1 (or some idea to keep it unique and incremented - maybe a datestamp on the file name?) -copy file Of course there is still the chance of 2 or more service executions trying to write at the same time, but the chance of this depends mostly on how often the service will be executed.
... View more
12-07-2012
11:09 AM
|
0
|
0
|
2723
|
|
POST
|
It is possible, but you have to set it up in a certain way. Can I ask why you want to do this? From my experience I've seen nothing but trouble when trying to write the result to somewhere other than the scratch folders. You're on your own in making sure the output names are unique or in the very least can overwrite existing output. And there is also the question if you have 2 instances running at the same time: They're both going to try and write the output to the same spot/same name. Anyways, if you're sure this is what you want to do, this basic script demonstrates how to do it. The point is having a variable point to a folder and that folder being registered with the data store. During the publishing process that folder is found in the datastore, thus data that is inside that folder is NOT copied, nor updated to scratchFolder/scratchGDB inside the script. import arcpy, os
arcpy.env.overwriteOutput = True
inPts = arcpy.GetParameterAsText(0)
inDistance = arcpy.GetParameterAsText(1)
outputFolder = r"c:\gpServices\writeToFolder" #this needs a matching entry in the datastore.
#If you have the output param set to required, make sure the path/name in the dialog matches the path set inside the script
outputFC = os.path.join(outputFolder, r"output.gdb\output2")
arcpy.Buffer_analysis(inPts, outputFC, inDistance) Goodluck.
... View more
12-07-2012
10:56 AM
|
0
|
0
|
2723
|
|
POST
|
As said, you'll need to ensure you have the following installed prior to installing ArcGIS: -Python 2.7.2 -Numpy* -Matplot lib* *I forget version numbers, I think 1.6 for numpy.. If the ArcGIS Installer detects you have those installed, it wont install Python + modules.
... View more
11-29-2012
06:53 AM
|
0
|
0
|
948
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-25-2026 08:25 AM | |
| 1 | 09-29-2025 05:19 AM | |
| 2 | 09-20-2023 06:37 AM | |
| 1 | 09-18-2025 07:07 AM | |
| 3 | 09-18-2025 06:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-25-2026
08:04 AM
|