|
POST
|
I got looking at this mid last week and was off Thursday/Friday, so I handed it off to Mike. Everything I've seen makes it look possible. I had to hand it off to Mike because I wasn't sure of the code to combine features and attributes into a single parameter. I'm not sure if Mike had anytime to look at it. As for the code you posted earlier, I think you're on the right track. It just didnt look like yours had any geometry being sent, it was only sending the attributes.
... View more
02-11-2013
06:33 AM
|
0
|
0
|
1942
|
|
POST
|
Cool. I think I mostly follow what you are saying here... How would I turn my python script tool into a geoprocessing service? Also, what would the client application be? I'm assuming the client application would be the webpage itself which would consume the geoprocessing service and pass the data as arguments somehow? Correct, the "client application" is the webpage. The webpage has the code to consume the service. As for your script, you first turn the script into a tool (script tool). Once you have that you turn the tool into a geoprocessing service. I'd start here with creating a script tool. Basically you just need to make the tool accept some parameters (your X/Y coordinate and string values). Once you have a working tool, you publish it. The quick tour on publishing a GP service is a good first topic to read. And after you've published the service you add the code to your webpage to consume the GP Service. You say you're using a aspx.vb page. I'll make the assumption that you can consume or talk to a REST end point through this? We have Javascript, Flex and Silverlight APIs. As long as you can make your page talk to the Service End point in a similar manner as one of those APIs, your page can send the input off to the GP Service. Heres a link to GP Rest help. Heres a sample which takes an actual input point on a map, as well as 1 text parameter and passes that info to a GP service (written in JavaScript).
... View more
02-06-2013
07:30 AM
|
0
|
0
|
1942
|
|
POST
|
I dont know about that getting around licensing or anything - mainly because I dont know if its possible. Since you have ArcGIS Server and you want people through a browser (whether internally or externally) to consume the page, add some information and have something "done" to a featureclass, you can make use of a couple different service types. If you use a FeatureService you can allow people to push features and attributes down into a FC as well as make updates. You can do the same with a geoprocessing service. A GP service is basically a tool which is one of: a system tool, a chain of tools in ModelBuilder, a Python script or some sort of function tool (.DLL). Either the GP Service or FeatureService could be done... and they both have pros and cons. I'm not sure I'm in a position to lean you one way or another. (I'm biased towards GP because thats my focus area). I'd give a read about FeatureServices to see if they do what you're after. (This would mean either getting a Flex or Silverlight viewer, or building a page in Flex, JavaScript or Silverlight from the ground up) If you want to go the GP way and already have a Python script that does some or all of this, you just need to turn it into a script tool. A good starting place is here. After you have a tool, you can eventually get that into a Geoprocessing Service. To consume the service you'd again need a client application (the same as the feature service). The pattern of "using" these services would be different, but the overall design and use of the webpage you make would be the same.
... View more
02-05-2013
03:00 PM
|
0
|
0
|
1942
|
|
POST
|
Well I guess my first question is how do they enter a "point"? Because you said no map, it sounds like they're entering an X/Y coordinate? If thats the case its a pretty basic model with 2 tools, Make XY Event Layer and then you could use the Append or Merge tool to combine that output into your existing featureclass. Or if you are adding those webforms into the FC attributes, a more straight forward way could be to write a Python script. You can use an arcpy function to create the geometry, and pass in the values as strings or longs into an InsertCursor. You could do that directly on the FC you want to update or you could persist the arcpy geometry into a feature and then use append or merge. Hope these ideas help.
... View more
02-05-2013
10:55 AM
|
0
|
0
|
1942
|
|
POST
|
My apologies, the da.Walk command was added at 10.1 Service Pack 1. Based on the message I'm guessing you have 10.1 final (no service packs). If you're able to install the service pack it'll fix that.
... View more
01-31-2013
06:32 AM
|
0
|
0
|
2921
|
|
POST
|
Off the top of my head? No. I'll try to make some time this afternoon to test it.
... View more
01-30-2013
10:01 AM
|
0
|
0
|
1942
|
|
POST
|
I don't have the Runtime explanation, but I can explain it from the GP Service perspective. With a GP Service you can override the schema by passing in a description (fields tag below) of the fields the output will have... The following JSON example shows that ID and NAME field have been defined, and then you see those fields attached to the geometry. {
"geometryType" : "esriGeometryPoint",
"spatialReference" : {"wkid" : 4326},
"fields":[
{"name":"Id","type":"esriFieldTypeOID","alias":"Id"},
{"name":"Name","type":"esriFieldTypeString","alias":"Name"}
],
"features" : [
{
"geometry" : {"x" : -104.44, "y" : 34.83},
"attributes" : {"Id" : 43, "Name" : "Feature 1"}
},
{
"geometry" : {"x" : -100.65, "y" : 33.69},
"attributes" : {"Id" : 67, "Name" : "Feature 2"}
}
]
} So to answer your question, you will probably need to define the schema when you pass in the features. I'm not entirely sure how to do that in the Runtime without testing.
... View more
01-30-2013
08:19 AM
|
0
|
0
|
1942
|
|
POST
|
You have to use a script tool. Theres no tool in the toolbox (to put into modelbuilder) to extract a zipfile. You can wrap the above script as a script tool and put that into a model if it serves your purpose.
... View more
01-25-2013
07:41 AM
|
0
|
0
|
2921
|
|
POST
|
The following code (10.1 + only) walks through a directory and finds FeatureClasses (this example assumes a folder of "zip" files). It then copies each one into a fGDB. You can change what it does, but the logic in it should start you off. You'll notice that a directory is created inside the scratchFolder (the variable "ZipFolder") - this is where the uploaded ZipFile is extracted to. Then the code looks in there.
import arcpy
import zipfile
import os
inFile = arcpy.GetParameterAsText(0)
# Create a folder in the scratch directory to extract zip to
zipFolder = os.path.join(arcpy.env.scratchFolder, "zipContents")
os.mkdir(zipFolder)
# Extract the zip contents
zip2Extract = zipfile.ZipFile(inFile, 'r')
zip2Extract.extractall(zipFolder)
zip2Extract.close()
# Create a folder in the scratch directory to hold the fgdb which will be downloaded
fgdbFolder = os.path.join(arcpy.env.scratchFolder, "fgdbOutput")
os.mkdir(fgdbFolder)
# Work through all the FeatureClasses inside the extracted zip folder
for dirpath, dirnames, filenames in arcpy.da.Walk(zipFolder, datatype="FeatureClass"):
for filename in filenames:
# You could replace the code below here with your own code to do what you want....
arcpy.AddMessage("Copying: {}".format(filename))
# Strip .shp from the filename when merging shapefiles
if filename.endswith("shp"):
outFilename = filename[:-4]
else:
outFilename = filename
# Copy each featureclass into the output.gdb
arcpy.CopyFeatures_management(os.path.join(dirpath, filename),
os.path.join(fgdbFolder, "output.gdb", outFilename))
... View more
01-25-2013
06:44 AM
|
0
|
0
|
2921
|
|
POST
|
What do you mean by manipulating a package in the Runtime? The simplest explanation I can provide is: Desktop creates the Packages (mpk/tpk/gpk) Runtime consumes the Packages The How-to create links at the bottom of this topic might be a good starting point on creating packages if you haven't got that far.
... View more
01-23-2013
07:25 AM
|
0
|
0
|
1745
|
|
POST
|
My one remaining limitation is figure out how to pass the path to the generated PDF back so the client can download it. Just output a file (if you're using a script tool) just have an output file parameter and set the file as output. The framework handles sending the file back. If your client is ArcMap, it will just get the file for you. A web app, a little bit of code required to get the output: JS example: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/gp_clipasync function completeCallback(jobInfo){
if(jobInfo.jobStatus !== "esriJobFailed"){
gp.getResultData(jobInfo.jobId,"Output_Zip_File", downloadFile);
}
}
function downloadFile(outputFile){
map.graphics.clear();
var theurl = outputFile.value.url;
window.location = theurl;
}
... View more
01-16-2013
12:16 PM
|
0
|
0
|
1211
|
|
POST
|
Fantastic, glad that did it. And its nice to hear the toolkit is useful for your workflows. Cheers!
... View more
01-16-2013
06:40 AM
|
0
|
0
|
403
|
|
POST
|
Well...thats certainly a lot of services. The amount of memory they use depends greatly on what they're hosting. Simply based on the numbers and the typical behavior of a map service, it sounds right to me. In my experience an instance will not use more memory because there is more system memory available. (I run 2 machines, 1 with 4gig RAM and another with 8gig. Services behave the same on each machine) My question is : are you running out of system resources or do you have something else besides ArcGIS Server on the machine that needs RAM? Or are you more concerned that you need more RAM to support these instances? I'm not saying "dont do anything", but in my opinion if you're at 75% RAM and during normal day to day use it never hits 99%, then its ok. Or if you have services which rarely to never get used, you could set their Min Instances to 0. This means that the service is available, but no instances are up and ready, thus no memory footprint. The first user to hit that would incur the wait of spin up. These are just some personal thoughts, hopefully some other forum members with more "worldly" experiences can give their 2 cents. There is also a wealth of information in the system design wiki: http://www.wiki.gis.com/wiki/index.php/System_Design_Strategies
... View more
01-15-2013
02:37 PM
|
0
|
0
|
1667
|
|
POST
|
How many services do you have running? Could I infer that 15 gigs (15000MB) / 80MB avg size = ~188 services? (give or take) Do you have any outliers? A few that are 500+MBs? Or is every single one "small"? Since 10 and 10.1 are very different, you can't say that Map Service A on 10.0, x-MB == Map Service A on 10.1, x-MB
... View more
01-15-2013
01:12 PM
|
0
|
0
|
1667
|
|
POST
|
Your python snippet looks perfect. Not to be picky on words, but are you saying "server" as in the machine you run the script on, or "ArcGIS Server" is what you installed and run the script against. If ArcGIS Server is the case, ArcGIS Server at 10.1 is 64bit, thus 64bit Python, thus you need 64bit client libraries when connecting to SDE. Since you can install the instantclient anywhere, I can't say "go look here". All I can tell you on this subject is in the PATH environment variable you need to set where to find it. For example, part of my PATH variable looks like: C:\Program Files\ArcGIS\instantclient;C:\Program Files (x86)\ArcGIS\instantclient_11_2 I drop the instant client into my 64bit Server install directory and my 32bit ArcMap install directory (thats just how I manage it). Then in my Path (as shown above), I reference the 64bit one first, followed by the 32bit.
... View more
01-15-2013
12:18 PM
|
0
|
0
|
3536
|
| 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
|