|
POST
|
This is a discussion post. I've been very conservative with my use of the in_memory workspace, mostly using it to set up tables and add and delete fields quickly and conveniently. However at 10.1, we can now even write rasters there, and the questions come up: - Is the in_memory workspace stuck within the application space, ie does it have to fit in ArcMap's x32 space on an x64 machine? - Is there a way to estimate "used" or "available" space in the in_memory workspace? - Has the Esri GP team or users done any exploratory analysis on the conditions which cause the in_memory workspace to cause system thrashing or other problems? - Has anyone benchmarked performance of in_memory vs and SSD? I would think the SSD woudl be slower as you would need to push data through the bus, in_memory would be "on-board" so to speak. Given this is a YMMV kind of thing - people's systems and work habits are different - but it would be nice to have some best-practices based on user experience. Discuss among yourselves.
... View more
03-29-2013
10:51 AM
|
0
|
1
|
1082
|
|
POST
|
Markus, I am have never done an implementation of USLE analysis in ArcGIS. I see you found an expert to help you on gis.stackexchange.com - I will quote his answer here for the local USLE fan club: Jeffrey Evans: How to calculate changes in slope angle between cells/areas? The original USLE assumed little slope curvature and no deposition. To account for flow convergence in complex terrain, modifications were made to the LS factor with an equation that incorporates flow accumulation. Because they are now used interchangeably, when you see reference to slope-length most likely it is in reference to the LS factor, as calculated below. To calculate the LS factor for the RUSLE equation, first calculate flow accumulation (facc) and slope in degrees (slp). Then a bit of map algebra in the raster calculator yields LS. Power(facc * cell resolution / 22.1, 0.4) *
Power(Sin(slp * 0.01745) / 0.09, 1.4) * 1.4 One downside of the stack exchange is they do not promote discussion - they just want the answers! So may I ask you, Markus, to follow up the post when you have figured out how to do this. I am especially interested in whether the Curvature tool (which is designed to capture this deposition/erosion factor for modeling) was any use to you in parameterizing USLE. I'm sure the Spatial Analyst team would love to hear what you think, especially if you have a idea on how to improve or complement that tool.
... View more
03-29-2013
08:38 AM
|
0
|
0
|
1775
|
|
POST
|
The geoprocessing extent is set to the extent of your IDW tool inputs by default. If you want the IDW interpolation to cover a larger extent, you need to set the GP extent to include the entire state. After you generate your surface, you can clip your surface to the state boundary using another tool such as Clip_management.
... View more
03-28-2013
07:29 PM
|
0
|
0
|
3493
|
|
POST
|
However, often when I use EQUAL_AREA I also get empty classes. Can anyone shed light on why this would happen? Stacie - the problem you are running into here is probably having to do with the distribution of your data. Your data probably has a lot of tied values. For example, consider a small 1 x 10 raster with just these cell values: 10 10 10 10 10 20 20 20 20 20 An equal area slice into two levels would look like this: 1 1 1 1 1 2 2 2 2 2 But what if we asked for three? We can't "split" these groups. So you will probably still get: 1 1 1 1 1 2 2 2 2 2 because of the ties.
... View more
03-28-2013
07:13 PM
|
0
|
0
|
955
|
|
POST
|
I think you're missing something. The Calculate Value tool I wrote for you takes the output of the Merge (the precondition connect just makes the merge happens first) and modifies that table. The CV output should then go to the your export tool (make sure it is set to type TABLE so it will be accepted by the tool!) The merge output should not be connected to your export tool.
... View more
03-28-2013
06:44 PM
|
0
|
0
|
1932
|
|
POST
|
Douglas - I suspect a path name issue. What's in the variable tmpGrid? What is the current and scratch workspace set to? (See [thread=48475]How to post Python code[/thread])
... View more
03-28-2013
06:32 PM
|
0
|
0
|
704
|
|
POST
|
I'm trying to create a script tool but when I run the tool I keep getting and error message: I'm not sure what the problem is with the df = arcpy.mapping.ListDataFrames(mxd)[0] Your mxd variable wasn't successfully set to a map document object, it's a unicode string (ie the path to the mxd as a text string). Try changing this mxd = arcpy.mapping.MapDocument = arcpy.GetParameterAsText(0) to this mxd = arcpy.mapping.MapDocument(arcpy.GetParameterAsText(0)) ps Please follow [thread=48475]these instructions[/thread] to post/edit Python code in the forum.
... View more
03-28-2013
06:22 PM
|
0
|
0
|
1422
|
|
POST
|
You need to use preconditions to control the order of processing. Your merge must run first before the Calculate Value so the "Output Table" dbf will have been created before the CV starts. The output of your Calculate Value is a table -- which you then want to provide as input to your export to Excel function. Hope this helps. [ATTACH=CONFIG]23043[/ATTACH]
... View more
03-28-2013
08:37 AM
|
0
|
0
|
7783
|
|
POST
|
I got this command line to run. But the .tifs failed to load into the SDE Raster Catalog. Without error messages, I wouldn't have a clue. Note that Workspace to New Raster catalog assumes the catalog does not exist yet. If you're running into trouble, I recommend going back to the help and following the instructions carefully so you are certain you are making the right flavor of raster catalog for your needs. You also may want to test with a small number of rasters loading to a file geodatabase. I am not an expert on the ArcSDE side, but I have heard that a good approach is to get an unmanaged raster catalog up and working with a file geodatabase and your tif files. Once that's working, then you can convert the whole package to a true ArcSDE raster dataset (that process can take days, but in the end you have a very high-performance image service). There are a lot of tweaks on how this is setup so I recommend piloting a lot with small subsets before you load gigabytes of data into ArcSDE. This is not a simple point and click deal, there is research, database design, testing, and tuning involved to get what you need. You may have noticed: I moved this thread over to the Imagery and Raster Data forum in the hope that some experts in this area may chime in.
... View more
03-28-2013
08:12 AM
|
0
|
0
|
2195
|
|
POST
|
When I right click the raster catalog and click "load", A new window "Raster To Geodatabase (multiple)" pop up. Is this what you mean? No, that method you've been using loads the rasters one by one into separate raster datasets. If I'm understanding right, you have a bunch of map tiles that you want to view together as a single raster layer. The tool I'm talking about is in the ArcToolbox and is not available on the right-click menu. I recommend reading up on it in the 9.3 help: First read that article, so you understand raster catalogs. (I think "unmanaged" is what you want): '>Creating raster catalogs in a geodatabase And here are some tools to look consider using: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=1905&pid=1903&topicname=Create%20Raster%20Catalog%20(Data%20Management)& '>Create Raster Catalog (Data Management) Workspace To Raster Catalog (Data Management) This sample tool is designed to create your catalog and load it up in a single step. This may be your best option: Workspace to New Raster Catalog (Samples)
... View more
03-28-2013
07:44 AM
|
0
|
0
|
2195
|
|
POST
|
I currently have over 4000 .tif raster data that have to be loaded into a SDE Raster Catalog in ArcGIS 9.3.1. I had been manually uploading 1800 in batches using the Raster to Geodatabase (multiple) tools. Have you considered creating a file-based raster catalog instead? If you do this you can access all tifs as one seamless raster, and if you set it up as "unmanaged", you will not have to convert them -- they will be accessed as they are by reference. (You are working in 9.3.1; in 10.x you should use mosaic datasets, which are similar but better.) ArcGIS 9.3 Help: Creating raster catalogs in the geodatabase The Workspace To Raster Catalog tool will batch-load a whole folder of .tif files into your raster catalog. If what you truly want to make a single ArcSDE raster dataset, it is fairly straightforward to convert the entire raster catalog to a geodatabase raster -- a lot easier than trying to individually load thousands of rasters.
... View more
03-27-2013
10:36 PM
|
0
|
0
|
2195
|
|
POST
|
... when I run the zone statistics to table tool, it is ignoring the no data values and not recording them in the output table. Is there a way to get some sort of value for all of the polygon cells I am extracting values to even if the underlying raster value is no data? I think you want to fill in data so you will have a row for each model grid polygon, even if there were no data cells for that polygon, right? If you want to "fill in" missing value codes (say, -9999) for the cells that have no stats results (because there is no data to calculate stats for those cells) your only solution I can think of is to select the polygons with no matching statistic, export those rows to a table, and append those rows to your Zonal Stats As Table output. If you append with the NO_TEST option, only fields that match (same name) will be copied. You could then select those "dummy" rows and populate a missing value code for the stats using the Calculate Field tool. Hope this helps...
... View more
03-27-2013
09:07 PM
|
0
|
0
|
810
|
|
POST
|
arcpy.CalculateField_management(CbuffersFL,AvgGrpField,(GrpFieldJoinNew/SelectedCount),"PYTHON")
The above calculate expression is not properly formed. The divide symbol must be inside the expression string. (This is the same solution you posted earlier today -- in fact I merged the threads here.) Here's a way to approach building the expression using Python string formatting -- generally far easier to debug than adding strings together the way you've been doing it:
SelectedCount=int(arcpy.GetCount_management(CbuffersFL).getOutput(0))
# the name is used to prefix the field name
prefix = arcpy.Describe(CbuffersFL).name
expr = "!{0}.{1}! / float({2})".format(prefix, TotalGrpField, SelectedCount)
arcpy.CalculateField_management(CbuffersFL, AvgGrpField, expr, "PYTHON_9.3")
Here's how using the python formatting simplifies your field addition calculation:
GrpField1= "Nest_All.GrpSz08"
GrpField2= "Nest_All.GrpSz09"
GrpField3= "Nest_All.GrpSz10"
GrpField4= "Nest_All.GrpSz11"
GrpField5= "Nest_All.GrpSz12"
fmt = "!{0}! + !{1}! + !{2}! + !{3}! + !{4}! + !{5}!"
Grpexpression = fmt.format(GrpField1New, GrpField2New, \
GrpField3New, GrpField4New, GrpField5New)
Python also has a sum function for lists, so you could have done this too:
fmt = "sum([!{0}!, !{1}!, !{2}!, !{3}!, !{4}!, !{5}!])"
Grpexpression = fmt.format(GrpField1New, GrpField2New, \
GrpField3New, GrpField4New, GrpField5New)
Hope this helps you out.
... View more
03-27-2013
08:46 PM
|
0
|
0
|
2238
|
|
POST
|
Thanks, Dale -- appreciate the guidance. If you do plan to change the default, please recommend that the online help for Calculate Field starts to warn us now! 🙂
... View more
03-27-2013
02:06 PM
|
0
|
0
|
1058
|
|
POST
|
I discovered today that VB syntax is not working in the x64 processor when I run Calculate Field. I get this error Executing: CalculateField lyr XXVAL 1 VB # Failed to execute. Parameters are not valid. ERROR 000989: Tool CalculateField cannot use VB expressions for service So, it looks like if I want my tools to run in x64 arcpy, I must avoid the default VB parser. Does anyone know which is better to use: the "PYTHON" or "PYTHON_9.3" parser? I'm wondering if there is any performance or compatibility benefit for using "PYTHON" if you don't need to access shape properties. I would think PYTHON_9.3 would be more efficient as it returns objects instead of string representations. I'm hoping someone on the geoprocessing team can give us advice so we can write CalculateValue expressions in a way that will be the most efficient and forward-compatible...
... View more
03-27-2013
09:46 AM
|
0
|
2
|
3629
|
| 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
|