Select to view content in your preferred language

How to join two shapefiles by location?

1382
4
07-06-2019 03:44 PM
RachelStewart
New Contributor

I have two shapefiles – the wards of a country (larger) and the land cover polygons (smaller) of the same country. At the moment the two layers are overlaid together, on the same projections, but not joined.

I want to be able to join these layers so that:

A. The polygons are all clipped to the ward they sit within.

B. If a polygon sits between two wards, the polygon will be divided along the line and created into two polygons.

C. When I open the attribute table, it says all the polygons names with a field saying which ward they sit within.

I know how to do this by taking each ward, clipping etc etc. However, I would have to do this process 500 times. I’m wondering is there a tool I don’t know about or a model someone has developed or something to make this process a lot faster?

Thanks!

4 Replies
DanPatterson_Retired
MVP Emeritus

It almost sounds like you are trying to do a 'Union'

Union—Help | ArcGIS Desktop 

RachelStewart
New Contributor

I have tried this tool but my outputs always end up like the attached image. The highlighted blue row shows the split between shapefiles.

DanPatterson_Retired
MVP Emeritus

Looking at Shape_Area and Shape_length, pretty well guarantees that one is a projected file and the other is in Geographic Coordinates.  The split occurs at row 462 and 463.

The fact that the two overlay 'on-screen' is not relevant.  You have to examine the coordinate system in the 'properties' of the layer.  the lower polygon file is perhaps a GCS WGS84 or maybe GCS NAD83 or some variant.  You need to use the 'Project tool' in Arctoolbox and not the 'Define Projection' tool if you did so.

Intersect will yield erroneous results as well

NinaRihn
Frequent Contributor

I think Intersect would do that.