Hot answers tagged

6

The simplest way is to create a full list and then remove the ones you don't want: AllFields = [f.name for f in arcpy.ListFields(featureclass)] StringFields = [f.name for f in arcpy.ListFields(featureclass,field_type='String')] NoStringFields = [x for x in AllFields if x not in StringFields ] Which could be compressed onto a single line: ...


3

According to the List of Tools not available in ArcGIS Pro "collapse dual lines to center line" was not brought over to ArcGIS Pro. I am not sure how to combine the lines. You could try to merge and dissolve the lines with a common field. Or you could delete one of the lines and take an off-center line as the represented line. ArcGIS Pro is a step forward in ...


2

A complete one-liner would be [f.name for f in arcpy.ListFields(featureclass) if f.type not in ["String"]] You can add more entries to the latter list that you do not want to include, or the ones that you want to include by removing not operator.


2

With the updates in the packages I would suggest the following: shape <- shape[!is.na(shape@data$col),]


2

I would suggest you create a series of models using iterators. You can create a model for each type and nest the models as sub models in order to include all of them into a single model. You would have to do this because a model can have only one iterator. So each model will iterate through the data object then deltete. Use preconditions to control the flow. ...


2

Copy Features handles the conversion of file formats (shp into sde-fc like in your example) simply by what workspace has been defined in the output path.


2

Correct. That functionality is not part of ArcGIS Pro. Among others. Link to tools that are not available in Pro.


1

I think this is a matter of personal preference. I tend to use the method associated with C). If I have copies (not duplicates) of the same shapefile, I can add unique attributes to each shapefile which would distinguish them from each other. This, for me, does not cause performance issues though. In regards to A), remember that you can save your style as a ...


1

You are calling your function with text values " " instead of field names ! !, therefore it returns true to the first condition. just try this : codeblock = """def mthree(mthre, mtwo): if mthre >= 1: return -3 if mtwo >= 2: return -5 else: return None """ ...



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