Select to view content in your preferred language

Geocode excel many2one

457
3
10-25-2023 08:42 AM
FredrikEkefjard1
New Contributor

Hi! I have an excel sheet with 1300+ rows that I want to set point geometry to. One point feature for every row. I have a feature class with 30000 point features. Many rows in the excel has the same place, so it's a many2one relation. The feature class and the excel sheet have matching attribute values. If I make an "Add Join" Excel --> feature class it will be non-spatial table. If I make an "Add Join" Feature class --> Excel I wont get 1300+ points, just a feature class with the 283 unique coordinates. How do I do...?

ArcGIS Pro 3.1

0 Kudos
3 Replies
clt_cabq
Frequent Contributor

If you join your feature class with coordinates (the one with 300000 points)  to your excel table you'll end up with a coordinate pair to each of your 1300+ rows, even if there are duplicate values, then use those coordinates to make an XY layer from the excel table. Are the coordinate values captured in fields in your feature class, you'll want to make sure they are so you can create the XY layer after.

FredrikEkefjard1
New Contributor

Thanks, that will solve my problems in this case. But if it were polygons or lines instead of point, how would you do then? 

0 Kudos
clt_cabq
Frequent Contributor

In a lot of respects this is a non-spatial problem so it doesn't really matter what the geometry is - you are simply transferring attributes from one table to the other. In fact, what I'd probably do with your FC of points (or it could be lines or polygons) is something like the following:

  1. Calculate X/Y coordinate fields in your spatial layer - if you are working with non-point geometries, you can calculate a centerpoint for those features, but you need to make sure that is  the 'correct' representation of your feature's location for your uses.
  2. Summarize the 30,0000 features so you end up with one record per location - you mentioned there are 283 unique locations in those 30K features, that's a lot of redundant data you can remove, and you can reduce the number of fields you have to contend with to the unique ID that matches between the two tables you are working with and the X/Y fields. If you are trying to transfer other attributes from the spatial layer to the excel table, you can include those data in the summary output. 
  3. Join the summary table to your 1300 records in the excel table.
  4. Create an XY layer from the joined excel/summary table - you may have to save the joined table out to a new table, i don't recall off the top of my head if you can create an XY layer from a table that has a join but I think you can't.

A couple of assumptions:

  • you have a unique ID that matches between the excel table and the spatial layer
  • the excel table represents unique locations - there aren't duplicate locations represented by the data - if your spatial data represent almost 300 unique locations, why does the excel table have 1300 records? You really have to pin down how you are thinking about the spatial output you need to create. 
  • there is a 100% match of locations between the two tables, otherwise you have to figure out how to handle cases in the excel table that don't have a corresponding record in the spatial layer.
0 Kudos