Tag Info

Hot answers tagged

2

The following is a Python script that uses itertools.groupby for a very efficient grouping approach. itertools creates a list of lists (i.e. grouped pairs), that is then iteratively passed to the Mosaic To New Raster (Data Management) tool. import arcpy, itertools, os # Define the input and output workspaces arcpy.env.workspace = ...


1

Output Group Layer Name is the name of the group layer that will store the results of the trace as a selected set. Based on your scenario, there must be one feature layer (e.g. SourceFeatureLayer) inside that group layer that you have to a get a reference to to export it to a Feature Class. You should use the name of output group layer concatenated to the ...


1

This is an old and long document from the 9.3 Help solved my problem. On right clicking the model and opening the properties, there was the option to use relative paths.


1

I was able to get around the problem by removing all data from the spreadsheets except the xy coordinates and place each sheet of the workbook in their own .xlsx file in one folder to be iterated. This was the only solution I found for my data.


1

You need to do a dissolve before the sum, to amalgamate the duplicates into one row. This would be because a track zigzags over the boundary so after intersect there's multiple instances = multiple lines. Dissolve will only work for feature classes, not tables, so it must be done just after the intersect. If you have a table then summarize with summary ...


1

If you have the spatial analysis extension, you should be able to get good results with the spatial join tool using a one-to-many operation. eg. arcpy.SpatialJoin_analysis(points_file, buffers_file, output_file, "JOIN_ONE_TO_MANY") You can also choose which fields you would like to keep, so you can just keep the field which identifies the buffer.


1

I would suggest try using the model only tool parse path to force the name into your copy features tool. You can find the parse path tool under the same menu as the feature selection iterator. For the parse path tool select name and use the name of the variable for the string variable substitution. Also make it a precondition to copy features.


1

This is a Model Builder solution by using Calculate Value tool (this is how Python scripting starts for many model builders :)) by assuming your rasters are in one workspace and their names are generated by using time stamps (which allows sorting, i.e., ascending order will yield correct TOP and BOTTOM parts): Here are the specifics of each Calculate ...


1

Make your current output a temporary dataset and then run Append GP tool to add the results into a final output dataset.


1

Use a try catch to fetch error messages from the gp object. try { GP.Execute("Creation", parameters, null); } catch(exception ex) { Messagebox.Show(GP.GetMessages(<severity>)); }


1

I was experiencing a similar issue with my iterating model. I was calculating a field in a series of tables to equal the names of the tables. I was left with blank fields. Since the data type is string, the expression needed to include quotes around the substituted variable, such as '%Name%' as opposed to %Name%. With this change, the model worked as ...



Only top voted, non community-wiki answers of a minimum length are eligible