Tag Info

Hot answers tagged

10

In ArcGIS Desktop 9.3.1 and prior, right-click on the tool in ArcToolbox and select Edit Documentation. At version 10 it is a little bit different, this thread on Esri Support describes the issue: http://forums.arcgis.com/threads/405-Beta-10-ArcToolbox-Documentation Specifically, at 10.0, you need to access the toolbox item from the ArcCatalog window within ...


9

You can go to Data Management -> Raster -> Raster Processing -> Clip, and Spatial Analyst is not needed. There just check the checkbox "Use input features for clipping geometry". From help: If the checkbox "Use input features for clipping geometry" is checked, then the output raster is clipped based on the perimeter of the polygon shape. If the checkbox is ...


8

Assuming your tool is always outputting the output file in the same directory, this function will return the next highest-numbered file name: import os def getNextFilePath(output_folder): highest_num = 0 for f in os.listdir(output_folder): if os.path.isfile(os.path.join(output_folder, f)): file_name = os.path.splitext(f)[0] ...


8

This help topic discusses some of the raster format limitations for Spatial Analyst: Data formats supported by Spatial Analyst While it is focused mainly on vector overlay operations, this blog post has many suggestions, including improvements made at 10.1 and 10.1 SP1. In particular, if you are working with very large datasets, then using 64-bit ...


7

Here you go: http://help.arcgis.com/en/arcgisdesktop/10.0/help/002t/pdf/Geoprocessing_data_types.pdf From: Data types for geoprocessing tool parameters To answer your specific question, I belive you would want to use a Workspace parameter which will let you specify an SDE connection file, then use filters to limit the workspace type (see screenshots in ...


7

To get the result you are looking for you need the inputs in your model to be empty when you save it and they both need to be set as parameters. Do this by right clicking on them in model building and choosing 'Model Parameter'. You can set up everything else, but leave the input and/or target parameters blank. Then when you open the tool the user will ...


6

Right-click on the toolbox in ArcToolbox and select Save As specifying 9.3 as the outgoing version. I ran into this problem previously, it is wise to copy your 9.2, 9.3 etc toolboxes to a new location prior to loading into version 10. EDIT I should add, that user toolboxes won't be available by default in version 10 even though they may have been so in ...


6

Based upon your comments in other responses, it sounds like you really just want to alert the user about things that have occurred during the operation of your script, rather than necessarily keep the script dialog box open. A couple of alternative approaches could be: Write the pertinent information back to the ArcGIS GP console by adding messages, ...


6

In my personal experience, no. Looking at the product matrix, there is also nothing to indicate they would groom their performance as such. http://www.esri.com/library/brochures/pdfs/arcgis10-functionality-matrix.pdf I would suggest running some test cases with the same data, stored locally, on the same computer, with different licenses in order to ...


6

That's just the statistics. By default it is set to the minimum and maximum possible values. If you use the 'Calculate Statistics' tool from the toolbox it should set those to more meaningful numbers. If you don't want to calculate statistics in your layer properties you can change the minimum and maximum values of the display manually if you have a ...


6

The Feature Class to Feature Class tool is a Conversion tool. The idea is to convert a feature class in one format (e.g. shapefile) to another (e.g. geodatabase). It also allows the user to control the Field Map - i.e. which fields will be copied over. The Copy Features tool simply creates an exact copy of the input features. Note - this tool can also be ...


5

You don't need to worry about buffers or Polygons. I think the tool you are looking for is called "Dissolve" in the Data Management/Generalization Toolbox. You have to decide whether to use the parameter DISSOLVE_LINE or UNSPLIT_LINES - the latter will only create a single line for contiguous features - i.e. lines that share an endpoint. Dissolve and its ...


5

You don't say what license or version you are using, but assuming you have ArcInfo, it is possible to use the "Near" geoprocessing tool to find the nearest object in the same layer. From the tool help page: The same dataset can be used as both Input Features and Near Features. When an input feature's nearest feature is itself (NEAR_DIST is 0), this ...


5

To see how to get a checkbox onto the dialog of a Python script tool try using some test code like this: inputString = arcpy.GetParameterAsText(0) inputBoolean = arcpy.GetParameterAsText(1) arcpy.AddMessage("String set to " + inputString) arcpy.AddMessage("Boolean set to " + str(inputBoolean)) Then when you add this script as a tool you will need two ...


5

That's not built into the application, but I assume running the batch file that sets up the virtualenv in a cmd.exe session and then running arcmap.exe from the same DOS box should get you your virtualenv. ArcMap and friends will modify the path slightly to include the install's arcgisscripting and arcpy. Edit: you will need to explicitly call the ...


5

Currently I have the workflow of ArcCatalog: opening toolbox > selecting model > editing > file > export > to python, switch to SCM tool > refresh changes > commit changes (enter log comment). It's cumbersome so I don't do it so much, and thereby lose many of the benefits of versioning.


4

When your command is run inside ArcMap (should work in ArcCatalog and other applications as well): var arcToolBoxExtension = _app.FindExtensionByName("ESRI ArcToolbox") as IArcToolboxExtension; if (arcToolBoxExtension != null) { var arcToolBox = arcToolBoxExtension.ArcToolbox; var gpTool = ...


4

ArcGIS stores a great deal of a user's preferences in the Windows Registry, which is partially documented in "ArcGIS Desktop Advanced Settings Registry Keys.doc", found in the Utilities folder of your ArcGIS installation. You can browse these settings with the Registry Editor (run regedit), and look into the keys from HKEY_CURRENT_USER\Software\ESRI. This ...


4

Alternatively, you could proceed as followed: Use the aggregate tool on your input data to create a coarser raster with the same extent. Convert the resulting raster to points. Use these points to sample the original grid. The key here is the aggregation factor which controls the degree of generalization of your input data, e.g. the spacing of the ...


4

A clean, no fuss alternative would be to display your log file in a simple Tkinter window at the end of your script. While the registry option is workable, there may be forces beyond your control, admin privileges, etc. if showLog: import Tkinter #read the log data log = open(r'logfile.txt').read() #create a tkinter window with a text box ...


4

I was able to get it running by using enabled instead of Enabled. Here is a link that lists all of the available params properties (they show lowerCamelCase for all of the properties): Programming a ToolValidator class


4

I think an error like yours, seen when you try to Start a Geoprocessing Service either manually or as part of Add New Service (i.e. when it is first created), is likely to be due to trying to start too many Geoprocessing Services for the resources the hardware hosting them has available. If you Stop one or two others then you should be able to Start this ...


4

It sounds like you are working with polygons. I created a 4-corner polygon in a FGDB, and when I look at it in the editor, it does have 4 vertices: However, when I run the following script on it, you can see it does indeed have 5 vertices (as it should), where the first and last are the same in order to close the polygon: import arcpy infc = ...


4

This is from the ArcGIS Editor for OSM documentation: "4.In the ArcCatalog window, browse to the directory where you installed ArcGIS Editor for OpenStreetMap (e.g., C:\Program Files\ESRI\OSMEditor) and the data folder. Doubleclick on the Download, Extract, and Symbolize OSM Data model. " For some reason they chose to leave it there rather than placing its ...


4

It seems as the GP service you are trying to publish does need to copy some project data required for using the service. However, since you have configured the server to not allow data copying, the publishing fails. What you might need to set up is a data store. Basically, you inform the server that there is a certain workspace where the data is stored and ...


4

I've wrote similar python code what your trying to do. Try the following: Check current version using Describe/Workspace properties Create ArcSDE Connection File to connect to version you want to replicate Replicate version using Create Replica Hope that helps.


3

Arcgis 10 Desktop help: Data types for geoprocessing tool parameters pdf of docs -- http://help.arcgis.com/en/arcgisdesktop/10.0/help/002t/pdf/Geoprocessing_data_types.pdf


3

this behavior is built into the script tools. What you have to do is go into the script tool property page select your 'field' parameter set the 'obtained from' property to your table parameter This tells the tool dialog that the choice list for the field parameter should be obtained from the table. THere's a number of parameter type combinations ...


3

I think reading the ESRI Help on documenting tools and toolboxes should guide you through this process: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=An_overview_of_documenting_tools_and_toolboxes


3

"I don't believe there is an issue due to the fact that my routes cross the 180/-180... I believe ArcMap understands how to handle those circumstances." Not in WGS84, no. A feature cannot cross the international date line. You must break it at the international date line or it will throw a bad geometry. Too many bad geometries, and the tool bails out. ...



Only top voted, non community-wiki answers of a minimum length are eligible