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"]
[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 ...
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 ...
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 ...
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....
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) &...
If you want an alternative to manually buffering each fc code below will work. Each output fc will be named after the input +'_buffered'
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 ...
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.
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 ...
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 ...
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.
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....
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:
for i in range(19):
arcpy.JoinField_management("PA", "OBJECTID", "PB", "OBJECTID")
lastName = [f.name ...
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)]
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'
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. ...
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.
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.
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', '...
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. ...
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).
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 ...
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 ...
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 ...
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
There are some good suggestions and partial answers buried in the comments, so I'm quoting/paraphrasing them here:
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 ...
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 ...
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
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 ...
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 ...