|
POST
|
The two nearest cells would be 5 x 5 neighborhood: o o o o o o o o o o o o x o o o o o o o o o o o o a 2 x 2 neighborhood probably looks more like this: o o x o
... View more
05-11-2011
09:56 PM
|
0
|
0
|
1073
|
|
POST
|
Thanks, that was most of what I needed. First, though I had to compute which pixels where >30% slope. I did this with the raster calculator which I eventually found hidden under Map Algebra. I was then able to use the Tabulate Area under Zonal tools to finish the job. Here's another approach: 1. Tag high-slope pixels with the polygon ID, others NoData (Raster Calculator or Single Output Map Algebra) (Set the extent, snap, and raster processing cell size to elevgrid before executing) SetNull(slope(elevgrid,"DEGREES") <= 30,polygrid(inpoly,polyid)) 2. calculate area of each zone with the Zonal Geometry As Table tool
... View more
05-11-2011
05:37 AM
|
0
|
0
|
1318
|
|
POST
|
Does it matter if rasters have a different pixel type or pixel depth when using the raster calculator? My experience is that no, it doesn't, the intermediate data sets and output will use a data-appropriate pixel depth. If you want to reliably force the output pixel depth of a raster, the only method I know of that works, is to copy the raster with the Copy Raster tool.
... View more
05-11-2011
05:20 AM
|
0
|
0
|
557
|
|
POST
|
Does anyone know if the following docell code can be done with map algebra in ArcGIS 10? docell if (flr_ezg eq 1) to_flg_lg = flg_lg_ezg(1,0) if (flr_ezg eq 2) to_flg_lg = flg_lg_ezg(1,1) if (flr_ezg eq 4) to_flg_lg = flg_lg_ezg(0,1) if (flr_ezg eq 😎 to_flg_lg = flg_lg_ezg(-1,1) if (flr_ezg eq 16) to_flg_lg = flg_lg_ezg(-1,0) if (flr_ezg eq 32) to_flg_lg = flg_lg_ezg(-1,-1) if (flr_ezg eq 64) to_flg_lg = flg_lg_ezg(0,-1) if (flr_ezg eq 128) to_flg_lg = flg_lg_ezg(1,-1) end I would like to code in arcobjects c# with map algebra. I have read about numpy array as one way to do it in python. Thanks for any help Bruce Vandenberg Bruce, Neighborhood notation is not supported at Arc 10. We've been asking. Please do contact tech support on this. They may send you to using numpy rasters to do this kind of thing. Another workaround may possibly to use the MultiOutputMapAlgebra tool, but it isn't supported at 10.0 although it is still there in the gp object. You may be able to work out something using the Shift tool to offset a bunch of rasters and then use Pick to select the right one from the list. You can convert the powers of two to 1...8 using this map algebra expression. This could be used with Pick. (Log2(flr_ezg) + 1) Hope this helps you out!
... View more
04-29-2011
09:43 AM
|
0
|
2
|
789
|
|
POST
|
What was the problem with the union processing -- did the tool fail, or did the result not have the results you needed? Have you considered doing the analysis in the raster domain using the Combine tool? This tool would give you a table of every unique combination of inputs at each cell which can then be used with the Pivot Table tool (or exported to a database or spreadsheet) for summarizing the combinatorial analysis results.
... View more
04-18-2011
10:31 AM
|
0
|
0
|
388
|
|
POST
|
I'm wondering if that was a pathname issue. BTW the best way to strip off the extension is to use the python os module. This will work even if the input file name doesn't include an extension: import os ascOut = os.path.splitext(ascIn)[0] + ".img"
... View more
04-18-2011
07:09 AM
|
0
|
0
|
2277
|
|
POST
|
It's also kind of dangerous to name datasets or fields anywhere in arcgis that start with a number.
... View more
04-15-2011
06:31 PM
|
0
|
0
|
2277
|
|
POST
|
Does this tool require an ArcInfo level license? Yes unfortunately most of the tools do require an arcinfo license. I have a version that does not require an ArcInfo license for as many of the tools that I am testing. I have successfully got it running with versions 9.3 SP 2, 9.3.1 SP 2 and 10.0 SP 1. Let me know if you'd like to test it out -- my email is cprice ------ at ------ usgs.gov
... View more
04-15-2011
03:11 PM
|
0
|
0
|
2525
|
|
POST
|
Are you thinking a series of embedded CON statements? That's exactly what I was thinking. You could write python code to generate the map algebra needed. Now that I think about it, I think the approach I'm suggesting is way too complex. If these are integer codes, why not run a combine() to make a temp grid with all unique combinations in the VAT, add a field to the VAT, and then use Calculate Value to populate your output using a Python or VBScript function, then use the Lookup tool (equivalent to the old grid.item syntax) to create your output grid. (Python would be neater because you can use dictionaries and/or lists to elegantly do your lookup.)
... View more
04-14-2011
09:14 AM
|
0
|
0
|
547
|
|
POST
|
Jamal, the best you can do is to create a point feature at the point you are interest in, populate it with the raster value using the Extract Values to Points tool, and then label the point. Hope that helps.
... View more
04-12-2011
10:00 PM
|
0
|
0
|
1864
|
|
POST
|
It is best to use NoData to represent NoData. Any raster operations you do should handle NoData correctly and your statistics will not include the NoData areas. So, yes, use SetNull to set your -9999 cells to NoData and use that grid for the mask, extent and snap raster for future operations. If you want to dump the raster out for use outside ArcGIS, you can either convert the NoData using the IsNull function to a value, or the conversion too (Grid To Ascii) often allows you to specify a value for NoData cells.
... View more
04-12-2011
09:59 PM
|
0
|
0
|
1185
|
|
POST
|
I'm looking for a geoprocessing tool that would this: given this value in raster x and this value in raster y, raster z (output) gets this value. I'm thinking something like "Reclass using Ascii file" but using a matrix of two paramaters maybe? Any ideas? This sounds like something that could be pretty handily accomplished using map algebra. You could use the Calculate Value tool to build a map algebra expression and pass it to the single-output map algebra tool (9.3.1) or the new map algebra tool (10.0). You could get pretty fancy building the expression by writing a function in python in the code window of the Calculate Value tool.
... View more
04-12-2011
07:16 AM
|
0
|
0
|
547
|
|
POST
|
The intermittent problem I was having with unicode was occurring only in modelbuilder. The problem path strings there are created by the system and the error would occur while the Calculate Value tool was reading the string -- so there was no place to work around it in code. It was a very intermittent problem, fixed by resetting my HKCU registry hive, so I'm very happy that the ESRI support folks were able to reproduce it.
... View more
04-12-2011
07:10 AM
|
0
|
0
|
3322
|
| 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
|