|
POST
|
Hi Curtis, the model-only tools (such as Calculate Value) were not available in 9.3 or 9.3.1. Thanks Nobbir - it's possible this option isn't available to Jose. Calculate Value is available in 9.3, but you do a) need to go get it from the Toolbox - no fancy right-click model-only tools function and b) you need an ArcInfo or Spatial Analyst or 3D Analyst license to use it.
... View more
06-25-2012
06:39 AM
|
0
|
0
|
1279
|
|
POST
|
You need to create a Python script tool and chain the tool with the GetCount's output. The script tool will intercept the output of GetCount return true or false based on your condition. I think you could also do this using Calculate Value to convert the output of Get Count into True or False. * Use the Count Rows tool - name the output element from it "Row Count". * Set that as a precondition to Calculate Value * Calculate Value would look something like this: Expression: check(%Row Count%) def check(rowcount):
return float(rowcount) < 1000 Data Type: Boolean * Rename the output of Calculate Value to "Rows greater than 1000" * Use this element as an iterator condition for your model.
... View more
06-24-2012
08:13 PM
|
0
|
0
|
1279
|
|
POST
|
Just want to add, if you want your scripts to be fully forward compatible, say, so it will work in 9.3 and 10.0 and ..., you need to specify a version of arcgisscripting. Esri has kindly provided a way to make sure the arcgisscripting object model for previous versions of ArcGIS is still available. gp = arcgisscripting.create(9.3) The module it self hasn't changed that much - mostly changes to the list functions and cursors, but enough to break your scripts in future versions if you forget to specify the version you want.
... View more
06-24-2012
07:12 AM
|
0
|
0
|
749
|
|
POST
|
Using the watershed function with a stream order stream network results in generating a sub-basin for each stream segment rather than the merged/hierarchical arrangements of catchments you would expect e.g., order 3 basins contain order 2 basins, order 2 basins have order 1 etc Raster datasets do not support overlapping zones, so the Watershed tool simply can't do this. You could use the Stream Link function to create unique segments, run watersheds one by one, convert each to polygon, and then merge the results. You could tag the orders by doing a Combine of the Stream Link output with the Strahler stream order grid. Perhaps the ArcHydro tools may be a good approach for you, they create what are called "adjoint catchments" which I think is what you're after.
... View more
06-24-2012
07:06 AM
|
0
|
0
|
1771
|
|
POST
|
Another thing i still cannot figure out how to resolve is that ArcGIS assumes the projected coordinate uses WGS84 as datum as explained here http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//004600000017000000.htm The only resolution I know of is to use the Define Projection tool after the raster is imported to redefine to the correct datum (as documented in netCDF tags or in accompanying metadata or readme files).
... View more
06-24-2012
07:01 AM
|
0
|
0
|
1153
|
|
POST
|
In ArcMap, I can use calculate field on the attribute table and successfully update the date with #2011-02-11# (VB). Does anyone know how to use datetime.strptime to calculate a date field using 3 fields that represent year, month, and day? Or perhaps using datetime.strptime to calculate a datefield using a string field of date yyyy/mm/dd? An approach that may help both of you is to try the VBScript DateSerial function: DateSerial(2011,02,11)
DateSerial([yearfield],[monthfield],[dayfield]) Sometimes VBScript is easier, sometimes Python is easier. I'm really happy Esri is letting us have the option!
... View more
06-22-2012
08:42 PM
|
0
|
0
|
5522
|
|
POST
|
The thing is that my rasters have different sizes and are many (over 100, depending of the combination of rasters I need to do the analyses). Do you think it would work for me? I don't see why not as these tools sample for each point location, and will pick a value regardless of how things "line up" against each grid. (Be sure and specify nearest neighbor interpolation to capture your categories.) If you do run into some limits trying to extract from your many rasters, you could always extract a fewer number at a time and join the output tables.
... View more
06-20-2012
11:04 AM
|
0
|
0
|
3355
|
|
POST
|
Daniele, The Combine approach Steve mentions cross-tabulates; creating a new zone for for each unique input value combination. I believe you are wanting cell by cell processing instead. If you want an individual row in your output for each input cell, a way to do this is create a point data set (using Raster To Point) at each cell centroid, and run either Extract Multi Values to Point or Sample. You could then grid up the resulting points if you want a raster with all the attributes. If it's a large raster it will take a while, and you could run into file size problems, but I know this would work for a small raster. If this raster is of appreciable size, I recommend doing this with the current and scratch workspace set to a file geodatabase so you won't run into a file size limit on a .dbf table.
... View more
06-20-2012
09:35 AM
|
0
|
0
|
3355
|
|
POST
|
Hi Steve, Only now I got the chance to run the COMBINE option that you mentioned, but it didn't work cause I have (much) more than 20 rasters Maybe if you explain your analysis in more detail? What is the output you are trying to create once you get this (potentially very long and wide) table?
... View more
06-19-2012
04:29 PM
|
0
|
0
|
3355
|
|
POST
|
I have set the Environment Variable PYTHONPATH = C:\Python26\ArcGIS10.0\python.exe I think you have a misunderstanding of PYTHONPATH. It's the system PATH that locates python.exe, and if ArcGIS scripts are working okay interactively, that PATH is probably set correctly. If you want to ensure you are running a certain python.exe, the easiest way is to use the full path to python.exe in your launching .bat file. PYTHONPATH is used for something else: to modify the Python sys.path (where Python looks for imports): Python" rel="nofollow" target="_blank">http://docs.python.org/tutorial/modules.html#the-module-search-path]Python 2.7.3 tutorial: The Module Search Path
... View more
06-19-2012
04:23 PM
|
0
|
0
|
2676
|
|
POST
|
It worked! I was surprised since the scratch workspace was already set to the correct file GDB in ArcMap, and since the raster itself already (apparently) resided in that GDB, according to ArcCatalog. That sounds strange. Script tools should pick up the geoprocessing environment settings unless you set it explicitly within the script. However, it's a huge advantage to set it in your script so you can for example, ensure your scratch workspace is a folder rather than a gdb. Any changes to these GP environment settings inside a script tool do not migrate "up" to the application, they only apply to your script. I'm wondering if your script is running "in process" or not. I wouldn't think it would make a difference.
... View more
06-18-2012
01:23 PM
|
0
|
0
|
1657
|
|
POST
|
i would like to add some coordinate systems but i cannot find folder with .prj files. They've totally revamped this part of the software at 10.1. This is a good thing, the thousands of files to install really slowed down the install. I'm guessing they set up a database somewhere that replaces the Coordinate Systems folder. You could either: 1) import the coordinate systems from a .prj file one by one and add them to your Favorites, or 2) Set up a connection in ArcCatalog to a folder you have with your custom .prj files. If you want to set some standard coordinate systems up for your site, hopefully I'll get an answer to [thread=60147]my recent post[/thread] on this topic in the install/config forum.
... View more
06-16-2012
08:02 AM
|
0
|
0
|
1314
|
|
POST
|
What am I missing to get my Raster Layer in the right place on the TOC? When you create a raster object with a Spatial Analyst tool, it is normally created in the current scratch workspace (arcpy.env.scratchWorkspace). When you apply the .save method, it is then saved using the pathname you give it. Windows %TEMP% is the default place if you don't specify the scratchWorkspace, which is why your datasets are being written there. I think a better approach would be something like this. Note my use of arcpy map algebra instead of the Arc-9-ish arcpy.gp syntax. (Doing it the "new way" really pays off when you want to nest raster tools like Con, IsNull and SetNull within a single expression.) # Process: Natural Neighbor outpath = Output_GDB arcpy.env.workspace = outpath arcpy.env.scratchWorkspace = outpath from arcpy.sa import * v_raster = NaturalNeighbor(v_route, pmname) v_raster.save("nnraster") # saves to outpath + "/" + "nnraster" arcpy.SetParameterAsText(6, v_raster) If this is run as a script tool, and parameter 6 is set in the script tool parameters to be an output parameter of type "Derived" and data type "raster dataset," a raster layer will be created in the arcmap document from which you ran the tool. That raster layer, of course will source to the raster saved to <outpath>/nnraster. A nice benefit of having the current and scratch workspace being the same is that when you save the raster, it can be simply renamed to the output name instead of copied - which can save a lot of time with large rasters. Hope this helps.
... View more
06-15-2012
09:52 PM
|
0
|
0
|
1657
|
|
POST
|
The displacement is way off, by 2804 miles (in triangular terms, about 2793 miles north and 260 miles east. I tried something else, which was to export the CAD features again, this time project it to the WGC 84 system which is the default setting for ArcGIS. And still, they are far apart. One thing that did happened was a window popped up about transformation. Any thoughts? The transformation difference between WGS84 and NAD83 will on the order of meters, not kilometers, even when you are working with projected data. My money is on incorrect coordinate system defined for your CAD data. One thing common with in CAD files is the use of offsets to make the coordinate magnitudes numerically friendly to CAD operations. Make sure that coordinate system in ArcGIS that you have defined accurately reflects any offsets used in the CAD coordinates. If not, you can fix it by using the Define Projection tool to tell ArcGIS about any offsets / shifts. The way to see which is "wrong" is to plot other reference data, say from Esri data and maps. If one of them is correct, and the other is incorrect, it should be pretty darn obvious.
... View more
06-15-2012
03:35 PM
|
0
|
0
|
1253
|
|
POST
|
I tried to find the HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\Raster\Preferences\grid.max_table_range in Registry Editor, but it was not there. In Arc 10, this setting is part of the main interface. Arc 10 Help: Setting default raster display options http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009t0000008z000000
... View more
06-14-2012
07:17 PM
|
0
|
0
|
2240
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-11-2021 01:26 PM | |
| 5 | 12-10-2021 04:58 PM | |
| 1 | 02-27-2017 09:30 AM | |
| 2 | 12-04-2023 01:05 PM | |
| 1 | 04-12-2016 10:17 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-19-2024
12:10 AM
|