New answers tagged

0

Problem resolved by using alternate method arisen from insightful discussion with Vince in comments section of question. Rather than using Make Query Table tool, which was struggling with the large amount of data that it needed to process, I used two separate Join tools- joining Table 1 to Table 2 and the output of this to Table 3- and then processed the ...


3

You can use the Get Count tool from the Data Management toolbox, which Returns the total number of rows for a feature class, table, or layer


3

You could use the Summary Statistics tool. The input table would be that which you want to count the records of. The statistics could be any field, but let's say ObjectID/OID. The statistic type would be COUNT. The output table could be whatever you like, possibly even stored in_memory. Once the tool is run, the output table will have one record, and the ...


0

This can most certainly be done in ModelBuilder. The TestFilter is essentially doing the same thing that SelectByAttributes would do in ArcGIS. What you need to determine is what attributes you want to select by and the values they should have. For example, when you say "series of test filters" I'm imagining you're filtering on a particular value of an ...


2

What you will need to use is Iterate Row Selection instead. See the ArcGIS help page for more information. If you then use Get Field Value you will be able to use the Name/Expression in other tools.


2

Check the options in the drop-down against a Text field rather than a Number field. They differ and may be why you don't see what you're expecting. Text field merge options: Number field merge options:


1

Reading the output message of the geoprocessing tool in batch, I realized the batch is not looping as I expected. It seems it loops at each tool in the model for each line in the batch, rather than performing the entire model once and then passing the next line and so on. So, it was sufficient to append an "%n%" to the first output variable ("judete_100_L" ...


0

7 yo script to do the job: # Import arcpy module import arcpy, traceback, os, sys from arcpy import env env.overwriteOutput = True try: # input folder with shapefiles or rasters inputFolder = arcpy.GetParameterAsText(0) env.workspace = inputFolder # output folder for tiles shapefile outputFolder = arcpy.GetParameterAsText(1) # table ...


1

An out-of-the-box ArcMap tool that can do this is Data Management Tools > Features > Minimum Bounding Geometry. This will create a polygon feature class containing one polygon that depicts the extent of your features. You can do different things with this tool. To create a polygon feature class containing a single feature depicting the extent of all ...


1

I haven't attempted to run any of my models in batch mode before, but it sounds like something is being held over from the first step. ArcGIS likes to hold on to layers and selections made when tools are run. It is possible that either the feature layer created in step one, or one of the selections created (step two or four) may still be held in memory and ...


0

Thanks to Stefan for help with the solution in comments. I'll explain below in case this is helpful to others in the future. Here's the modelbuilder image for what worked for me in the end. Model Created a single file gdb filled with the single image mosaics and trimmed the outer pixels for every one. Created the File Geodatabase manually prior to ...


1

You might attempt to set a "precondition" by linking the mosaicmb variable to the Add Raster To Mosaic Dataset a second time, and choosing "precondition" when the connect tool of ModelBuilder shows it's context menu. A pre-condition will ensure the File Geodatabase and Mosaic Dataset will be created in advance of the Add Raster To Mosaic Dataset being run. ...


1

If you want to be able to assign arbitrary values to your scores, I'd use a python dictionary in your calculate field portion of your model. Here's an example code block... def find_val(x): return {1 : 10, 2 : 10, 3 : 10, 4 : 9, 5 : 9, 6 : 9, 7 : 9 }[x] On the left of the colon is your ranking value, and on the right is your score for that ranking. ...


0

Instead of writing a model in ModelBuilder, and exporting it as a Python script, I think you should instead: run the two tools from their tool dialogs use the Geoprocessing | Results window to Copy As Python Snippet their code into a Python script. I find that this is an easier way to learn ArcPy than the way that you are trying.


3

Depends on the machine specs and dataset size and number of points. One way to speed things up is to set the environment processing extent of the snap pour point tool. So if you are snapping a few points in a sub-catchment onto a flow accumulation for the whole of America then may be thats why... Try setting the extent to the extent of your study region. ...


0

You need to right-click the output of the script and choose Intermediate. More info about that here, at Esri Help. UPD: if the Intermediate option is greyed out, you have to make sure these things are true: The parameter for your output table in the Python script tool is Optional/Required (not Derived). You have the output table actually connected as ...


0

If you look at the syntax section of the help file for this tool, what is the output? Then look at the syntax section of the feature class to feature class tool, what is the expected input type? Do they match? This why you should be reading the help file as this explains why the tool will not connect.


0

This would be difficult to do in modelbuilder as there is no iterator that iterates over columns. This would be much easier if done in Python, using as @Roy says the field calculator. Below is the required code: import arcpy myTable = r"C:\Temp\New_dBASE_Table.dbf" fields = arcpy.ListFields(myTable) for f in fields: if f.name[:4] == "FID_": ...


2

You don't need a script to do get your input's basename and reuse it in parameters' names. Add the 'Parse Path' tool to your model and connect it to your input raster. Chose 'NAME' for the 'Parse Type' parameter: Then, in the parameters of the Extract by Mask tool, reuse this name variable (here called by its default name, 'Value') in the path of the mask ...


2

I have not used 9.3 for many years now. An alternative way to run your model is to right click on it and run in batch mode. You may be able to drag and drop multiple datasets in to the batch grid interface? I remember looping was awkward in 9.3 and the usual way of resolving things was to write a simple loop in python.


2

Indeed, marking intermediate parameters as Managed can cause issues. Below is an example of using the Raster Calculator and then Raster to Polygon. When using in_memory the model fails; when marking the intermediate outputs as Managed, the in_memory - even though exists in the output path - is ignored and the data is written to %temp%, as the Scratch folder. ...


2

When you run Polygon to Raster, under Value field you need to specify "distance" (if you haven't changed the default of Multiple Ring Buffer). Then, the new raster will have as many unique values as there were unique distances, specified under field Value. This Value field is the one to reclassify, but until you run Polygon to Raster, ArcMap won't be able ...


0

Other solutions do exist such as copying the raster and adjusting the cell values based on the x,y difference of the next point (virtually not actually). Your points are not equally spaced or merely going in a cardinal direction so I think a system that manipulates the current single raster to get to your end results is achievable but will be quite complex. ...


-3

You can interpolate the already existing raster by using the Extract Values to Points tool in ArcMap: Extracts the cell values of a raster based on a set of point features and records the values in the attribute table of an output feature class.


1

Finally, I added a % sign before and after each tif file in each line and it worked. For eg. "%hydro_sg2.tif%"


0

A dotted line means the output is acting as a precondition to the tool. So in your model f%value%_D must exist (thus the Euclidean Distance tool ran without error) before the Raster calculator can execute. Your Raster calculator expression is Ln("%f%value%_D%" + 1). Look inside the() you are attempting to add a number 1 to a string which makes no sense and ...


0

This should work, make sure your variables and the destination calculated fields are of the same data type (Double to Double or String to String...etc) (if string your in-line variable will need double quotes surround the percent symbols): and...


2

The behaviour you describe sounds correct. The outputs of tools in your model are automatically intermediate, you need to right click on the green blobs and untick intermediate. These intermediate outputs persist when you run your model from within modelbuilder as modelbuilder needs this to happen so the "ready to run" state can be established. This does ...


0

You can download and install an ArcGIS tool called Split By Attribute. This was authored by the USGS. This tool will create a seperate Shapefile for each Field Value. For example, all Points with 01/01/16 date will be copied to shapefile 010116.shp, All Points with date 01/02/16 will be copied to shapefile 010216.shp. SplitByAttribute


0

Could you use your date/time attributes to assign a priority or sort order attribute to each of the layers of your onion, and then either clip out the various layers into different shapefiles depending on priority, or you could use symbology to distinguish between your different layers if visualized all at once? Just an idea, I use it when I have multiple ...


0

For an exact match, I believe this should also work in VB: elseif [Modified] ="blaugh" & Chr(10) & "blaugh" then Score =7



Top 50 recent answers are included