Hot answers tagged

5

Should this line: arcpy.env.workspace = "C:/Omitted/Environmental.gdb" not be: arcpy.env.workspace = Workspace and this line: if arcpy.Exists("Wetlands"): be: if arcpy.Exists(Wetlands):


3

If I am understanding you right you started out with an NLCD raster and a polygon feature class of your grids. You then converted the raster to polygon within each of your grids cells to yield polygons with the corresponding NLCD land cover class. Spatial Analyst Approach: I would redesign your workflow as follows: Before converting to polygons I recommend ...


2

Another GIS Blog informs us that an ArcPy function: TestingSchemaLock tests if a feature class or table has a schema lock. That posting contains ArcPy code that you could use to develop a Python Script Tool that you could include in your model to check whether the data that your model uses has a schema lock, but not necessarily whether your model is ...


2

Assuming there is a common field between them all: Merge all the feature classes together into one feature class Dissolve the feature class based on the identifier field. This will result in a multi-point feature class with each entry comprised of multiple locations Run feature to point to collapse the multipoint to point


2

There is no built-in functionality to do this. I don't think that Python can detect highlighted rows in a layer or table. Even ArcObjects has a hard time with highlighted rows. I would rethink this workflow. I would just add a LINK field to the meters table and simply copy/paste the ObjectID value or other Unique ID value of the point record you would have ...


2

An alternative to CSV or dBase is to write to a personal geodatabase table, which is essentially an Access table. You if need your data in Excel (xlsx) then you could import it with the tools in Excel. I would recommend writing to a personal geodatabase as it will accept unicode characters, so all your problems discussed above simply go away. You also write ...


2

You can download Python package XlsxWriter, write a script and import to your toolbox for use in your model: https://pypi.python.org/pypi/XlsxWriter


2

There were some records that were blank which caused an error. This code works: def getSufDir( prop_location ): if prop_location is None: return None else: return prop_location.strip().split(" ")[-1]


2

Use summary statistics with your counties layer Use Get Field value to grab the sum from the summary table And Calculate Field to update somewhereland


1

Looking at your model it appears you have accepted default naming. I'm guessing that one viewshed that is created is always the viewshed for the very last row in your input table? I guessing that the model runs for a long time but creates a single output? The reason this is happening is that you are not changing the name of the output of the Viewshed tool, ...


1

This Python script will append shapefiles modified since yesterday to a target fc (I'm not sure if this is what you are after): import arcpy, os, datetime #workspaces workspace = r'D:\Kartdata\tk_riks_Sweref_99_TM_shape\terrang' targetfc = r'D:\Kartdata\test123.shp' #Function that return modification date of files def modification_date(filename): t = ...


1

While I agree that @RichardFairhurst's answer is the quicker and better way to do it, it is actually possible to make the selection of a meter and selection of a table record and have the meter update from the table the way you describe it in your question. import arcpy tblview = arcpy.mapping.TableView('WaterMeterTable') featlyr = ...


1

ModelBuilder does not provide a solution where you can create an editable join based on multiple fields. Your question is virtually the same as Auto populating field in attribute table, using several fields of record information from another table? and the answers are the same. You must either concatenate the fields into a single new field, run my ...


1

Its a bug in 10.4. All my old models went white as picture above after upgrading to 10.4. When i change language settings (Regional and Language Options) from Swedish to English(US) they work. Or i can keep Swedish as language but change decimal sign from , to . (in the Additional settings dialogue). ArcGIS 10.4 for Desktop ModelBuilder Regional Language ...


1

I also had this problem, my model went ´corrupt´ like this. I resolved this issue by opening another model in a different unaffected toolbox, all models in the ´corrupted´ toolbox were affected by this graphic glitch. When I opened a model which wasn´t located in the affected toolbox, the corrupted models went back to normal when opened after I opened the ...


1

This is a slightly different way of doing this, but you can do this with the ArcGIS Maps for Office add-in. I downloaded some crime stats and made a map out of it very quickly:


1

If I understand correctly, your question is more about assigning a unique identifier to each cluster of points rather than an issue with doing the join. You can use the following methodology to assign a unique ID (that will work with model builder). In your buffer layer, add a field (like bufferID or groupID) of type LONG. Right click the new field and ...



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