Tag Info

New answers tagged

3

Can you link the first precondition to the second precondition (so the first precondition must be true before the second fires) then link both (or just the second) to the final process? Perhaps you can use If-Then-Else logic as output from your "Sum Field Insert New" process, and then link the output variable as the precondition to 'Altered Input?" In ...


0

Once you've done your edits, you could run a model with the following tools: 1.Copy Features. Copy your shapefile to a feature class. This will allow you to use the Alter Field tool in step 3. And it will leave your input intact so you don't have to be afraid of modifying it, and won't bother deleting the fields added in the steps below. 2.Add Geometry ...


0

I think that you should split the string variable in order to get a list: myList = arcpy.GetParameterAsText(0).split(";") A thread at the ESRI forum here reports that spaces in the path can produce an error, so you can .strip("'") the extra single quotes around the file path. myList = [x.strip("'") for x in myList] In addition, check the Union_analysis ...


2

I hate to be the bringer of bad news, but your current workflow is probably an inefficient way of reaching your goal. What you should check out is the Spatial Join Tool http://resources.arcgis.com/en/help/main/10.1/index.html#//00080000000q000000. It should do, I think, everything you are asking to accomplish if you set up the options right. You'll just ...


0

'Table to Table' tool will accomplish the task, as it 'Converts an input table to a dBASE or geodatabase table'.


2

Well, the answer to that really is "It depends". Both options are very viable solutions for your problem and would likely fully be able to meet your needs. However, some things you should consider when making this decision: Model Builder uses the graphic user interface of the geoprocessing tools you are likely already used to using and the parameters in ...


4

The issue is in the interpretation: %Name% Expands out to the name of the feature class so the field calculation is looking for a field that matches the name of the feature class, is unable to find one, then returns an error as no field called MCD43B3.A2002001.h21v09.005.2007114212806.hdf.tif exists in the feature class. To use the name of the feature ...


0

This can be achieved in model builder. You would use a Feature Selection Iterator to iterate through the state codes and use that to select your points/polylines. The selection could then be used in a spatial join. Basically you need to read up on model builder and the iterators that can be used to loop with.


1

The .loc files generated by an address locator are plain text files. Therefore, you can modify any settings that are specified in the .loc file without the need for an arcpy function. For example, to change the minimum match score from the default to 70%: locator_fn = 'my_address_locator.loc' locator_file = open(locator_fn,'a') # open for appending ...


1

There is a tool called "apply symbology from layer" that you can use for reusing an existing symbology. You therefore need to save the symbology once as a .lyr file (right click > save as layer file). Note that you first need the tool "make feature layer" to create a layer on which you can apply a symbology. For more control on you symbology in a script, ...


0

I do not think "Copy Parallel" is accesible via ArcPy or Model-Builder, using ArcObjects is a possibility. A possible work around would be to buffer your line features, then use the "Feature to Line" tool.


3

Since you only have points, one method you could try would be using the Minimum Bounding Geometry (Data Management) tool. I tried using the "Convex Hull" option and grouped by an attribute field option. If they are truly grouped in distinct areas (like for example, US States), you will see "spikes" that run across the screen for outliers. Another ...


3

I would spatial join the area layer to the point layer. That should create a new point file with the area information joined to each point. I would go into the new attribute table, create a new 'Misplaced' Field and then field calculate "1" if "Points.Zones" <> "Area.Zones" Perhaps you can run a nearest neighbor analysis on the point file. That would ...


3

Connect a 'Make Feature Layer' tool in between the .SHP and the 'Select Layer by Attribute' tools. Creates a feature layer from an input feature class or layer file. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved to disk or the map document is saved. 'Select Layer by ...


0

I cannot see the right hand end of the screenshot of your model but it sounds like you have not included a Remove Join (Data Management) tool: Removes a join from a feature layer or table view. Try adding that and I suspect your model may run more like you want it to.


1

I would recommend using the Find Identical (Data Management) tool. Select the field where you would like to find identical records Join the resulting table to the shapefile using the IN_FID* field Perform the appropriate corrective actions on the duplicate records as marked in the new FEAT_SEQ field. Alternatively, you can use the Calculate Field (Data ...


1

Doing this iteratively in a model with selections is one approach but there are a couple of other options that I think would eliminate the need for iterations. I'm not entirely clear if you're trying to fit a solution into a larger model you've already built or going the model route because of the size of the data and necessary iterations to use selections. ...


1

I think it will work if you use a Collect Values tool between ZPS 83 polygone and the Union tool. In the first example on the Help page: The output of Collect Values, Collected Values, is a multivalue of rasters and is input to the Mosaic To New Raster tool. This will therefore pull all the iterated features into one "input" for the Union tool to work ...


1

in a model, you can use the "select by location" tool (management > Layers and table view). The little trick is that you first need to create a layer (with the "make feature layer" tool, same location) before you can use the "select by location" tool. based on your updates, you could also consider the use of "tabulate intersection" providing you have the ...


1

You may build custom tools and algorithms using ArcGIS Engine. Common Questions Is an application that's built with ArcGIS Engine dependent on ArcView, ArcEditor, or ArcInfo? No. Custom applications built with the ArcGIS Engine Developer Kit are not dependent on ArcView, ArcEditor, or ArcInfo. Custom ArcGIS Engine applications only need ...


1

Not as such, but if you are linked with ESRI you can publish your model as a geoprocessing service on the Web. This requires a specific licence on your side (ArcGIS server), and the tool will run on your computer. Alternatively, you can use some Open source software, but the core software will most of the time need to be installed on the users computer in ...


4

Modelbuilder is an interface for chaining together proprietary ArcGIS tools, which require a license to run. There's no way to operate a model outside of Modelbuilder or Arcpy, both of which also require a license.


1

I think your question is easily answered by using the following steps: Construct a simple model using the ArcGIS ModelBuilder Export this model to Python syntax which you can do without having ANY knowledge of Python because it is an option on the ModelBuilder menu Try running the same script with QGIS and address any Python/QGIS errors thrown as they ...


1

I use following code to get path of a file. from Tkinter import Tk from tkFileDialog import askopenfilename Tk().withdraw() filename = askopenfilename() if filename == '': exit(0) else: if filename.split(".")[-1] == "mxd": #checking file extention return filename else: do smth This opens a simple window where ...


1

Instead of calling your python script from the model you would have more control of the code if the tool worked entirely in python. To do this: Export your model to python script Create a script tool and define input parameters (similar to model parameters) Combine the python scripts into one script and re-define the script tool parameters This will ...


0

If you want a field picker you have to code it in python. The code is as follows: # Import system modules import arcpy # Set the parameters InputFeatureClass = arcpy.GetParameterAsText(0) InputField = arcpy.GetParameterAsText(1) arcpy.SetParameter(2, InputField) And the tool is set as follows: Input Feature Layer Data Type: Feature Layer (You might ...


0

This issue can be overcome in Model Builder using inline variable substitution - instead of passing the value from the iterator directly to the Add Field tool, use %Value% as the field name in the Add Field tool.


4

What you are describing sounds like Page Definition Queries: Page Definition Queries allow you to specify which features of a layer draw based on an SQL query. Though similar to other definition queries, Page Definition Queries differ in that they only work with Data Driven Pages and are dynamic. If this is not what you are after then I recommend ...


1

if i understand the question - one way would be to use a SearchCursor - the cursor can vary slightly depending on your version of arcgis, but basically use the search cursor to total the value and calculate the average and variance. something similar to: numberOfRows=0 total=0 data=[] with arcpy.da.SearchCursor('yourshapefile.shp','GRID_CODE') as sCursor: ...


0

You need to create a submodel and connect that to the Merge tool. For example: The submodel (SubModel1) The full model


2

If the extension were installed but not enabled you'd see a padlock symbol, not a red cross. If a model or script tool has lost its reference you would see such a symbol and you'd need to fix the reference to the tool/model location. See the 10.2 Desktop Help article: Repairing a model


1

The technique I use to do this in ModelBuilder is to: Run Summary Statistics (Analysis) to write the MAX value into its output table Use Get Field Value (ModelBuilder) to read the first row of the table just created which holds that MAX value


1

Try making the table view permanent by using Table to Table and then try the %n% system variable. Alternatively, call the Value variable: vshed_%Value%_View Additional Information: A quick tour of using inline variable substitution Examples of in-line variable substitution with ModelBuilder system variables


3

Well, I think the problem you are having is, with your expression as is, this condition you wrote is being evaluated for each row/record in your data. So, if you had a table like: OID | Value 1 | 123 2 | 456 3 | 789 my understanding is that your expression, with real values substituted in for variables, would look like: 123 >= MAX(123)*0.25 456 ...


2

You're using your variable names in a string literal. You can do the following to have the values substituted into the string: arcgis.rand("Normal {0} {1}".format(MN, SD)) You could also import numpy and use numpy.random.normal(MN, SD, n) to draw a sample of size n from the specified normal distribution. Documentation.


1

I have not used arcgis.rand which I found documented under the Calculate Value tool. However, there seems to have been a bug NIM099744 found in ArcGIS 10.2.1 for Desktop: In ArcGIS 10.2.1, the arcgis.rand function incorrectly gives only one value as an output instead of random values. Perhaps this is what you are encountering.


3

Use the Select tool Extracts features from an input feature class or input feature layer, typically using a select or Structured Query Language (SQL) expression and stores them in an output feature class.


4

It's Python code but your Expression Type in the second screenshot is VB ;)


2

I am providing a scripted alternative either in the interactive window or as a stand alone script. layer = "YOURLAYERNAME" #interactive window in quote, standalone script needs path arcpy.AddField_management(layer, "Same", "TEXT") rows = arcpy.UpdateCursor(layer) for row in rows: if str(row.getValue("POLYGON_NM)) == str(row.getValue("NAMING"): ...


3

I usually approach situations like this using a few steps. The general process is to determine the maximum value in each polygon and then determine which points actually has that value: First join a unique identifier from the polygons to the points (Using intersect, spatial join, etc..). This doesn't have to be OBJECTID, but it can be. Then run summary ...


2

I'm not sure how to manage your changing neighborhood size, but here is already an answer. Iterate Rasters runs the same tool/chain of tools for a series of datasets in the specified workspace, so it's not going to do what you need. If you want to reuse the output of the model as input a number of times, you should do the following: Right-click the input ...


3

If I understand correctly, you want to determine if you have duplicate NAME values within the same municipality. Here is a quick way that may do what you want. Create a new field in your table called Merged. Use the field calculator to concatenate the two string columns, [POLYGON_NM] + [NAMING] Right click on the Merged column and choose Summarize from ...


2

Use the Select Data tool on the result of the Solve tool. It will allow you to get at what you need: The Select Data tool selects data in a parent data element such as a folder, geodatabase, feature dataset, or coverage. The tool allows access to the data stored inside a parent container, such as feature classes or tables inside a geodatabase. ...


0

Is it possible to Convert Raster to Polygon, then use the polygons in one of the tools referenced by Branco's comment? Feature Outline Masks Minimum Bounding Geometry


1

Here is one approach: Your merge output feeds into the model below (i'm calling a layer directly in this example). There is a new variable called "Field" which is of type string and exposed as a parameter. In the calculate field tool I have the following: I am using inline substitution to replace the bit of the VB code that would change.



Top 50 recent answers are included