Tag Info

New answers tagged

0

It's a good bet that your SRID is 4326, and that you are testing if each geometry is within 500°, which is non-sense. Since everything is within 500° of each other, the expected return is 1560 * 1560 = 2433600 rows. Try casting to a geography type, which uses distance units of meters (e.g., see ST_DWithin for geography inputs). Try this: ST_DWithin ...


0

Thanks for your input and ideas. I have solved it by giving the same field name ("SJ_count") in my input feature classes X1, X2, X3. After the join I altered the field name using the in-line variable substution string (count_name) given with the iterator as my addition. So my new field name became "SJ_count_%count_field%). An example of a field name woud ...


0

The NNJoin Plugin should do the job. For each feature of the input layer it adds all the attributes of the nearest feature in the join layer and also adds a distance attribute with the distance to this feature.


3

You should be able to do this using a spatial join, or the intersect tool. Spatial join will allow you to retain all features regardless of whether they intersect the second feature class, intersect will create a new feature class with only those features that intersect.


0

As an alternative/expansion to the other two answers: Open the attribute table of the shapefile. From the attribute table window export the table to a csv file. Open the csv in Excel and sort it on the county name field (you can delete all other columns if you like). Open your original Excel file and sort it on county name. Copy and paste the column from the ...


2

You'll have to correct the state values to match exactly. I'd suggest taking the table into excel and separating the columns. Or using Excel's Find and Replace tool.


2

I would recommend creating a two field lookup table that maps the county names from the shapefile to those in the table which will hopefully be a one to one match. Then you can join that onto your shapefile so that it has an additional field with the county names from the table that you can use to join that on. If there are just a few rules that you can ...


1

First of all, make sure your excel table is "clean". This may seem obvious, but you'd be surprised...Here's an example of what kind of things you should avoid: Just with this precaution it should work. However, if it's still not working, use the conversion tools. Conversion tools>Excel>Table to excel and import your excel into a gdb. That should work. If ...


1

First, open the Excel file in Excel, and then click Save As and select CSV (Either Macintosh or MS DOS works for this purpose) Next, in ArcMap, choose the tool Table to Table and for the input, choose the CSV you just created. Have it output somewhere you can find the table, and the joining should work with the table that was just created. TL;dr: Save ...


0

What you are showing in the image is Join Field tool in batch mode (it is not a model created with model builder). So I think there is misunderstanding here! To achieve your goal do these steps: create an empty model Go to Insert > Iterators > Feature Classes Double click on "Iterate Feature Classes" tool and select your workspace (which contains your ...


0

You can delete all the excess fields using the 'delete field' tool. Within this tool you can easily select all the fields that you don't want to have, even if the table still needs to build through model builder.


0

I ended up being able to do what I wanted by using the Intersect function between the buffer layer and the CT layer, as @Chris W suggested. The first time I tried running it, the output was empty. I was told that there was a similar bug in ArcGIS where you had to re-export your shapefile if it had been created with a buffer/union/intersect/etc. function. To ...


3

The problem was that both the current working copy and the shadow copy tables were named the same. The join went fine but the field calculator and geometry were greyed out. To fix this, I simply renamed the backup table name to something different. I was able to field calculate and essentially restore the data. I did not find this resolution documented ...


1

@radouxju is correct - it's either a relate or duplicate geometry, and those are your choices. You can duplicate the geometry most easily with the Make Query Table tool. If your version of Arc is recent enough (10.1 or higher I think?) and you're working in a geodatabase, you can do a Join followed by an export of the result and that should give you ...


1

This has worked for me: # Get input (csv) and target (Shapefile) layers shp=iface.activeLayer() csv=iface.mapCanvas().layers()[0] # Set properties for the join shpField='code' csvField='codigo' joinObject = QgsVectorJoinInfo() joinObject.joinLayerId = csv.id() joinObject.joinFieldName = csvField joinObject.targetFieldName = shpField shp.addJoin(joinObject) ...


1

If it's ok for you to use Processing algorithms for that, it's as simple as this (from the QGIS Python console): import processing res = processing.runalg("qgis:joinattributestable","/path/to/shape.shp","/path/to/table.csv","fieldShp","fieldTable","/path/to/output.shp") layer = QgsVectorLayer(res['OUTPUT_LAYER'], "joined layer", "ogr") ...


0

One additional answer that successfully removes joins created with the Join tool in ArcToolbox, or with the Joins and Relates menu item on the context menu of a layer, or with a Join that is created with an IDisplayRelationshipClass. This method is considerably slower than the RemoveAllJoins3 method I also posted. private void ...


0

I know I posted one answer, but I have a few alternatives to removing the joins that don't have code samples posted. This method successfully removes joins that are created with the Join tool in ArcToolbox, or with the Joins and Relates menu item on the context menu of a layer, or with a Join that is created with an IDisplayRelationshipClass. As in my answer ...


0

I know this is years late, but I struggled with this as well and, for me, Kirk's answer working successfully depended on how the join was created. I don't have enough rep to comment on Kirk's answer, but it threw an exception until I changed it to what's below. Namely, I switched sourceTable and destinationTable. I also had to add the ComReleaser for the ...


2

You don't say which GIS system you are using! You can dissolve lines using the Dissolve tool in ArcGIS. Make sure you tick on unsplit lines option.


1

I have never used the Coverage Tools but am very familiar with ArcInfo Workstation and AML but I think you should be able to accomplish this in a two step process: Table To Table (Conversion) This tool can convert input tables to dBASE (.dbf), geodatabase (personal, file, or SDE), or INFO tables. Join Info Tables (Coverage) Joins the item ...


1

Instead of: for fields in arcpy.Listfields(Feature): print fields try: for field in arcpy.Listfields(Feature): print field.name My changing of fields to field is not important but I think it makes the code read better. However, what is important is that ListFields returns a list of field objects and so you need to examine the name property of each ...



Top 50 recent answers are included