6

You are listing field objects with ListFields, not the field names which should be input to DeleteField. So change: [field for field in fields if field != "FID" or field != "Shape"] to: [field.name for field in fields if field.name not in ("FID","Shape")] But it is probably better to use the required property since object id and shape fields can have ...


4

For the simplest approach with zero coding I think @FelixIP has nailed it! Simply use the Euclidean Allocation tool, making sure you set your outer boundary as the mask and processing extent, then choose a sensible cell size to produce a smooth raster which you can then turn back into a polygon. Here is the output of the Allocation tool built from the inner ...


2

As mentioned, the function of XY tolerance is completely different than what you are trying to achieve. What I would do is as follows: Use Select Features by Location to select the blue polygons intersecting with the line features by applying a search distance of 10 metres Convert selected polygons to points (as a new point feature class) Use Near tool to ...


2

I found out I was actually creating a table view of a table view. The corrected code reads: import arcpy, os mxdrep = arcpy.mapping.MapDocument("CURRENT") dfsrep = arcpy.mapping.ListDataFrames(mxdrep) #Target folder containing the copied fGDB dbFolder = os.path.join(projFolderPath, "Databases") for dfrep in dfsrep: tablesRep = arcpy.mapping....


2

If I have understood you, you have an NDVI and you want to create a new, derived raster. Instead of converting to multiple vector data layers, use the Raster Calculator with a nested conditional statement on the original data (scroll down to see the complex expressions): outRast = con(ndvi <0, 1, ((ndvi <= 0.2) & (ndvi => 0), 2, ((ndvi > 0.2) &...


2

If you want an alternative to manually buffering each fc code below will work. Each output fc will be named after the input +'_buffered' import arcpy,os ingdb = r'C:\Default.gdb' #Change outgdb = r'C:\Default.gdb' #Change dissolvefield = 'Somefield' #Change buffdist = '100 Meters' #Change arcpy.env.workspace = ingdb polyfcs = [os.path.join(ingdb,fc) for fc ...


2

I fixed the issue by using the "Append Annotation Feature Classes" tool under the Data Management -> Feature Class Toolbox. I then went into the environments and set the output coordinate system to what I wanted.


2

The problem is to do with your "< 1", you have used a < symbol which if you think about it is the opening character of any of your html font tags. So you've essentially opened a tag, not said what it was and not closed it correctly. Hence the weirdness you are getting. So how do you display a symbol as text which is also a special character? You ...


2

I believe your bottom right (iterate_nndvi) model needs to be a sub-model in your bottom left (iterate_masks). If you think about it, you enter iterate_masks, this loops as many times as needed then passes out a single mask raster, hence you are only extracting with one unchanging raster. Place iterate_nndvi inside iterate_masks and connect will ensure ...


1

You can merge raster bands into single image (with 2 bands) using Composite Bands tool. But is still unclear to me why do you need to do that. If you want to do mathemathical operations with raster's cell values - use Raster Calculator. The other approach is: Convert your raster classification results to vector format. Use overlay tools.


1

I usually make an explicit list of fields I want to keep, then loop through and delete any others. I don't remember where I saw this method originally, but it could have come from this discussion about keeping only certain fields. I do like @BERA's use of field.required and would suggest using that - though I've historically listed OBJECTID, FID, SHAPE, etc....


1

Blunt tool might help to solve flawed logic. So let's use result of your test to guess name by simply counting number of operations: import arcpy sausage="ID_1_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30" suffix=sausage.split("_")[1:] for i in range(19): arcpy.JoinField_management("PA", "OBJECTID", "PB", "OBJECTID") lastName = [f.name ...


1

I'd also be very interested to hear of a better, definitive way to resolve this issue. But in the mean time, you can use arcpy.ListFields() to get the list of fields before and after geoprocessing, and compare the before/after lists to determine which fields are new. Eg, before geoprocessing, run: fieldsBefore = [f.name for f in arcpy.ListFields(table)] ...


1

In ArcPy you can use field mapping to determine what fields work as inputs and outputs and how they are combined - this doesn't work for JoinField_management but works for many other geoprocessing functions. This script merges ID fields into the same output field when using the merge tool in data management: layer1 = 'layer1' layer2 = 'layer2' # ...


1

For any interested parties: I contacted ESRI tech support, who confirmed this is a known bug which was first reported, and subsequently shelved, approximately two years ago. Workarounds are to re-export the OLE-joined table to a new feature class and use that as your data-driven pages layer, or to export the OLE-joined data to a different format (e.g. ...


1

Select the pipes with no nodes, then use this layer as the input into Feature Vertices to Points. Ensure that you are only exporting the start and end vertices. Combine this output with your existing Nodes feature class.


1

Here's how I would simplify this. To maintain a consistent number of columns it should write a blank value if the field doesn't exist. import arcpy import csv arcpy.env.workspace = r"path\to\my\gdb" newCSV = r"path\to\new\csv" datasetList = arcpy.ListDatasets("*", "Feature") label_name = 'feature_class' csv_fields = [label_name, 'field1', 'field2', '...


1

Your example seems to indicate two columns for symbology Type and ETAT. Likely the simplest method is to break your single layer out in to multiple layers based on one of the columns. Use a definition Query on each layer that represents the values in one of the columns. Then use the simple single field symbology on each layer based on the other column. ...


1

The problem may be caused by (my guesses): Incorrect vector geometry, check and repair it with the Check Geometry tool. Singlepart nature of the features, try to use Multipart To Singlepart tool. Multipart nature of the features, try to create single file for every feature and try again (so you will get new raster for every polygon).


1

You need to use Clip tool to clip the raster data. You can find it from ArcToolbox -> Data Management Tools -> Raster -> Raster Processing -> Clip


1

Based on the image below (help for the tool), use your field "CODE" as the input, and "GRIDCODE" as the pivot. The output example more closely matches what you wanted as your output.


1

Try adjusting your xy tolerance, as ArcGIS Help indicates this situation will occur when the tolerance is too large: The feature class or layer with the lower rank will snap to the feature from the feature class or layer with the higher rank (with 1 being a higher rank than 2). Note that features in the feature class with a rank of 1 may move when a large ...


1

I would dissolve your original parcels by the appropriate attributes (owner name), then select those resulting polygons greater than 35 acres. Take the centroids of your original polygons and intersect with the selected set of > 35 acre polygons to determine your candidates for the mailing list. Alternatively, you can avoid the necessity of the centroid ...


1

If you have follow the steps mention in Agent Analyst tool interface will not open on ArcGIS for Desktop? and then also you are getting same problem. This is due to Refresh.exe.config file. Your system will be taking as a text file. Download this file and paste it in C:\Repast 3\Agent Analyst\Refresh location. Open this file with notepad and change the ...


1

The reason for this is that the debugger has put a lock on ArcCatalog.gx. Here is a fix which would save your roaming profile. Close ArcGIS Desktop Close Python IDE Go to C:\users\\ Roaming Rename ESRI folder to ESRI_Keep Reopen Python IDE Run python debugger This will create a new ESRI folder. Close Python IDE Delete C:\users\\ Roaming\ESRI Rename ...


1

There are some good suggestions and partial answers buried in the comments, so I'm quoting/paraphrasing them here: @Vince's suggestions: While possible, it's unlikely you'll find such a tool sitting in a shelf. This means you'll need to choose a development language (C++/C#/Python) and start coding. Given the bends in the green polygon chain, you'll need ...


1

There may be a way to do this with arcpy, but I'm not aware of any. So here's how I would do it: Using ArcObjects, write a C# routine that follows these steps: Create a new empty polygon featureclass. Open an insertion cursor on it. Retrieve the MapTopology from the TopologyExtension, then build the full extent. Get a polyline representing the boundary ...


1

Select by Location where Feature A is your Input Feature Layer Set the Relationship to "Intersect" or "Are Identical to" Set the Selecting Feature to Feature B; run the query Delete the selected points from Feature A's attribute table


1

The error is referring to a NoneType object (None) being used as though it was an iterable object. The only instance of using an iterable that I can see (in the portion of code that you posted) is the newList variable in the for loop. This implies that your newList variable has a value of None. (Or possibly that there is another NULL object elsewhere in ...


1

You should use the Spatial Join tool (Analysis Tools Toolbox -> Overlay Toolset -> Spatial Join tool). Assuming the elevation values are numeric you can use the Maximum summary function in a One-To-One Spatial Join. The polygons will be the target layer and the points will be the join layer for the tool. You can change the property of the Elevation field ...


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