|
POST
|
I have a model processes some raster datasets. It runs fine if I run it within the ModelBuilder environment, but I get syntax errors if I run it directly from a toolbox. The model has several raster calculator processes with somewhat complex map algebra statements with inline variable substitution. Seems like some python interpretor issue in raster calculator that is handled differently between ModelBuilding and direct toolbox Attached are the model and the error. In the error screenshot, you can see the expression Im trying to use. Any insight or suggestions would be greatly appreciated! Thanks Neal
... View more
09-23-2016
05:02 AM
|
0
|
1
|
1923
|
|
POST
|
Thank you Dan, Mody, and Xander for your quick response are helpful suggestions - the RegionGroup tool coupled with a few other processes did the trick. A summary of the solution was: Run Con function in raster calculator to separate all negative and positive raster value. Resulting raster has 2 groups with all positive values given value of 1, all negative cells given value of -1. Run RegionGroup to separate contiguous regions of positive and negative cells. Resulting raster (in my case) had hundreds of records Use Con function coupled with Lookup function in raster calculator to identify the cells that were either positive in resultant raster in step 2 OR were less than a threshold size (in my case I used about 3 acres), so that any of the islands/holes that are less than the threshold get reassigned a value of 0. The negative cells on the boundary (which cover much larger contiguous areas) are removed (assigned as no data). Use Max function with original depth raster and result of step 3 to give final depth raster (I havent done this step yet, but expect will work find.
... View more
09-19-2016
10:27 AM
|
0
|
0
|
2357
|
|
POST
|
I have a raster that represents water depth which was generated by subtracting a flood elevation raster minus a DEM raster along a river system. I have cases where there are negative depth values (i.e. DEM is higher than flood elevation), but are completely surrounded by positive depths - thus "islands" in the raster. I would like to "remove" these islands by replace the isolated negative depth cells with a constant depth of zero (or other specified constant). The challenge that I am have is that I want to keep negative depth values that are not surrounded by positive depth values. I have many negative depth values along the edge of the raster (i.e. higher ground in the river valley) that I will ultimately replace with no data Ive seen posts that suggest focal statistics, but I the problem I have with that is that I only want to change negative depth cells that are completely surrounded and I want to specify a constant value for them (rather than a mean or maximum) Any suggestions would be greatly appreciated
... View more
09-18-2016
05:55 PM
|
0
|
5
|
3615
|
|
POST
|
Hello, I must be missing something. I have a buildings layer with address (house number, street name, street type, etc.) all in one field named "Address". City and zip are in separate fields. I am trying to create a Address locator using 'US Address - Single House', but when I do so it seems to want to have the address separated in multiple fields (e.g. House Number, Street Name, etc.). I dont want to try to parse my data out. I tried specifying the single 'Address' field for all these related fields, but that does not seem to work. How do I create an Address Locator based on a single 'Address' field? Thanks Neal
... View more
03-20-2014
08:29 AM
|
0
|
2
|
1726
|
|
POST
|
I figured out a solution to my problem. You can use the 'Parse Path' tool under the 'Insert'/'Model Only Tools' menu in Model Builder to extract the base name of the input feature class and store it as a variable. Then when using 'Calculate Field' on a joined table, you can refer to the base name of the input field with the stored inline variable. Below is an example. In this example Im joining a user specified "Subbasins" feature class with a "hydrostrms" feature class, and then calculating the "CumDrnArMi" in "Subbasins" field based on an existing field in "hydrostrms". Since the "Subbasins" is a user specified, the actual name of the feature class may vary. The Model Builder image shows the 'Parse Path' tool used to extract base name of parameter input for "Subbasin" and store it as "nmSubbasin". The field calculator image shows how field name of the joined table is specified with in-line variable substitution using %nmSubbasin%. [ATTACH=CONFIG]29155[/ATTACH] [ATTACH=CONFIG]29157[/ATTACH]
... View more
11-17-2013
09:02 AM
|
0
|
0
|
3567
|
|
POST
|
I figured out a solution to my problem. You can use the 'Parse Path' tool under the 'Insert'/'Model Only Tools' menu in Model Builder to extract the base name of the input feature class and store it as a variable. Then when using 'Calculate Field' on a joined table, you can refer to the base name of the input field with the stored inline variable. Below is an example. In this example Im joining a user specified "Subbasins" feature class with a "hydrostrms" feature class, and then calculating the "CumDrnArMi" in "Subbasins" field based on an existing field in "hydrostrms". Since the "Subbasins" is a user specified, the actual name of the feature class may vary. The Model Builder image shows the 'Parse Path' tool used to extract base name of parameter input for "Subbasin" and store it as "nmSubbasin". The field calculator image shows how field name of the joined table is specified with in-line variable substitution using %nmSubbasin%. [ATTACH=CONFIG]29155[/ATTACH] [ATTACH=CONFIG]29158[/ATTACH]
... View more
11-17-2013
08:58 AM
|
3
|
0
|
3567
|
|
POST
|
Thanks Duncan - I hadnt thought of that route. Im hoping there is a smoother alternative, but based doesnt sound like that is likely. Thanks again Neal
... View more
10-29-2013
01:06 PM
|
0
|
0
|
3567
|
|
POST
|
Hello, I have built a model in Model Builder for a specific use that accepts a feature class and table as input parameters, join them together based on known fields, and then runs some operations including running 'statistics' and field calculations. The individual field names in the tables are/will be the same, however, the input feature class and table names may vary. The problem Im having is when I run in model builder, I get errors because it appends the feature class and/or table names to the raw field name (e.g. <table name>.<field name>) which change based on input feature class/table names selected by user. I tried unchecking the 'Maintain fully qualified names' in the Environment settings for field, but I still get same errors. I may not be setting it correctly - I tried setting Environment in the model and at the default ArcToolbox level. Even after I do this the 'statistics' tool seems to still require the full qualified name. Is there a trick to setting the Environment variable or is there another way for some of Model Builder to handle variable feature/table names for these tools? Thanks Neal
... View more
10-29-2013
08:41 AM
|
0
|
5
|
6137
|
|
POST
|
Hello, When using the 'Subbasin Divide' tool on the GeoHMS toolbar, I get the following an error about COM exceptions (see image). The tool does allow me to click the button, drop a point, and then draws the split subbasin, but when it is processing it displays the error. I have tried both version of GeoHMS on HEC website and ESRI beta FTP. Any ideas on what may be causing this and how to get around - stuck in my tracks now.[ATTACH=CONFIG]22762[/ATTACH] Thanks
... View more
03-19-2013
12:28 PM
|
0
|
0
|
2360
|
|
POST
|
Sure thing, syntax in raster calculator is below. The name of the GRID is "lufumod3" the name of the attibute field in the raster attribute table is "pctimpv". In this simple case just trying to create a temporary grid equal 3 times the "pctimpv" value [lufumod3].[pctimpv] * 3 The error I get is: "the input string is not a geographic or projected coordinate system" Error code doesnt make any sense to me, but I had assumed it had something to do how it is interpreting the syntax. One other thing - Im using 9.3 (not 9.2) Thanks again for looking into this for me Neal
... View more
03-02-2011
08:49 AM
|
0
|
0
|
2528
|
|
POST
|
Hello, I have an integer raster that has codes from 1 - 12. I have added a new integer field to the .vat that has a different integer corresponding to each of the 12 value fields. I want to use the raster calculator to perform simple math functions, but want to use the added attribute field rather than the original value field. Is there a way to do this? Ive already tried the syntax [<grid name>].[<added attribute name>], but it didnt work. Thanks in advance! Neal
... View more
03-02-2011
05:05 AM
|
0
|
9
|
7667
|
|
POST
|
Did you ever get a solution for this? Im trying to do the same thing. Thanks Neal
... View more
02-24-2011
03:50 PM
|
0
|
0
|
312
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 04-28-2025 02:04 PM | |
| 3 | 09-10-2022 07:03 AM | |
| 1 | 07-29-2019 05:38 PM | |
| 1 | 07-29-2019 06:23 PM | |
| 1 | 06-15-2020 11:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-29-2025
04:55 AM
|