New answers tagged

1

When automating a process you will need to take it one step at a time. I'll answer your first question: Do you know if there is a way for ModelBuilder to see in an Excel file Yes - as long as you are using an ArcGIS for Desktop version (10.2.1 or later, I think) you will be able to do this using the Excel To Table tool: Converts Microsoft Excel ...


1

This should work for removing NA's for a specific column yet, retain the sp class of the object. We will use the muese dataset from the sp library as an example library(sp) data(meuse) coordinates(meuse) <- ~x+y names(meuse) Here we add some NA's to copper, at rows 2, 5 and 20, and look at the resulting data meuse@data[c(2,5,20),]$copper <- NA ...


2

I propose two different ways. Using processing tools: see my answer to another question. It is not difficult to adapt it to your problem, since it is about polygon overlays A Python script to copy&paste into Python console or to run from Python editor The script get 2 layers A, B. Replace them with the names of your layers. B is the one providing ...


2

You've got a few options depending on how your data is organized. You can perform a table join/relate using a common field between your data sets (with the .dbf of shape file A as the table being joined to shape B) or if your .dbf's present data for the exact same shapes in the exact same order you should be able to replace the .dbf from one to another. ...


1

If the valve data has a waterline identifier that matches what waterline it belongs on there is a simpler and potentially more accurate way to do this. These would be the steps: Join the waterlines to the valves by the waterline identifier. Note that this would be an attribute join, not a spatial join. See the image below for an example. Select the ...


1

I'm not sure what low level I/O conflict was taking place, but the shapefile was in a folder that was set to sync with a cloud storage provider. I was writing to file at least every 30 seconds and the sync utility was dutifully attempting to keep up. It seems this would occasionally cause QgsFeatureIterator to grab a bad chunk of data and, after looking at ...


1

While @ed-hankins spatial join answer is correct and will solve your immediate problem, for a potential on-going solution I recommend looking at Esri's Attribute Assistant. The Attribute Assistant may be of some use as this can be set up to automatically populate one field based on a value in a field in another layer (selected by spatial location). This ...


1

You probably want to do a spatial join. Join your lines to points and make sure to select to give each point (valve) the attributes of the line (pipe) it is nearest. Once you have joined the tables, sort ascending on the valve size field (the field with the 0s) and highlight/select all the records with "0" then right click on the field header and use ...


3

Although Attribute Assistant uses VB statements, you are using the wrong elements of VB for your logic. The "&" operate concatenates strings together, it does not act as a logical AND that combines two separate expressions into a single logical result. Additionally, some of your statements are using SQL syntax which does not work in Attribute Assistant ...


2

The example code above should work (coincidently with or without the 'grid.updateFeature(feature)'). The problem was in my actual code I was trying to pass Numpy datatypes and rather than throwing an TypeError, changeAttributeValue() just silently failed. Always remember to check your variable types when debugging!



Top 50 recent answers are included