Copy Parcel PINs to Building Footprint Tables en masse?

8790
16
03-17-2016 10:57 AM
JaredPilbeam1
Occasional Contributor

Hi,

I'm working with real estate data/parcels and building footprint feature classes. Each parcel has it's own PIN. The footprint layer is empty of attribute data. I want to be able to copy the PINs over to a building footprint layer without having to do one at a time.

There are a few other Fields that need populated and those I can copy easily enough a bunch at a time by selecting a large area in Editor (see image here). But the PINs cannot be copied this way because they are unique.

Is there a way to do this?

Thanks,

Jared

0 Kudos
16 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Jared,

Take a look at the Spatial Join tool.  You can use this to spatially join the parcel data to the building footprints.  This will create a new output.  You can then join the new output back to the building footprints using the OBJECTID field and calculate over the PIN.

AdrianWelsh
MVP Honored Contributor

Spatial join is a great tool. Though, out of curiosity, will the Transfer Attributes tool work for this?

Transfer Attributes—Help | ArcGIS for Desktop

I have never used it so I just wondered...

JaredPilbeam1
Occasional Contributor

Adrian,

Yes, that works as well in this case.

If you have an instance where you need to transfer attributes from one layer to another you can use the Spatial Adjustment toolbar.

  • Set the Attribute Transfer Mapping (menu item) with the relevant attribute Field of both layers
  • Then choose the Attribute Transfer Tool: choose parcel first and building footprint second to transfer PIN from parcel to building
  • Make sure your layers are made selectable in the Table of contents.

JaredPilbeam1
Occasional Contributor

Jake,

Thanks for the reply. Here are the steps I've taken in reference to your suggestion:

  • Select the buildings you have drawn so far
  • Save that selection in a selection layer.
  • Open the toolbox and run the Feature to Point tool
  • Save the output (point) layer in a file geodatabase or shapefile
  • Then run a Spatial Join with the output (point) layer and the parcels (or select parcels first within municipality).
  • Save that output in the same file geodatabase or a shapefile
  • Join the Spatial Join output with the building footprints layer (I believe joining the OBJECTID).
  • Calculate the PIN in the building footprints layer equal to the PIN from the Spatial Join output

I ran into a snag at "Then run a Spatial Join...". I guess I’m still confused as to what to have as the Target Features and what to have as the Join Features in the Spatial Join tool. And then whether it’s join the Spatial Join to the Building_Footprints, or vice versa?

0 Kudos
ChrisDonohue__GISP
MVP Alum

One caution - stay away from using the ObjectID as a field to join to, as while it is a unique key, it automatically gets renumbered when certain processes are done.  For example, if you select several features and save them out to a new feature class, you will find that the ObjectIDs have changed in that new feature class compared to what they were originally for the same feature.

If there isn't already an appropriate aternative unique field already in your tables, one workaround is to create your own unique ID field from the ObjectID before making changes/processing.  Make a new field, then use Field calculator to populate it with the ObjectID values.  Note - If you add more features, be sure to remember to populate this field with appropriate new IDs, as it is static.

Chris Donohue, GISP

BrianOevermann
Occasional Contributor III

Jared,

You may be making this more complicated than necessary, based upon your response to Jake with your list of actions thus far. All of the comments so far are useful, though offer up a few different approaches. The Spatial Join tool is your best bet for getting the PIN info into your building footprints.

You don't say whether your existing building footprint layer must stay or if you can simply remove and replace it with an updated version. Jake's comment regarding joining the Spatial Join result back to the original layer is operating on the assumption that the existing layer must stay. I will second Chris' warning about using the OBJECTID as a unique ID, as you have no control over the system reordering the IDs, so the suggestion for creating your own unique ID would be useful IF the existing layer must stay.

But, let's keep things simple and assume that you can simply replace the existing buildings layer with the end result new buildings layer once you've finished processing.

  • Set up your attribute fields in your buildings layer however you want or need them. This presumably includes a Parcel PIN field. I suspect this is already done.
  • Fire up the Spatial Join tool from ArcToolbox. From your original post, you want to attach the PIN TO the building footprint. That's the "clue" for deciding, in Spatial Join, which is the Target layer and which is the Join layer. Set your output feature class (this will be your new buildings layer). Keep all Target features (because you set up your buildings layer in step 1 the way you want it. In the Field Map of Join Features box, delete any fields from your parcel layer (Join features layer) that you don't need (don't delete any of the buildings layer fields!). If you are only transferring the PIN, delete all of the parcel layer fields except the PIN field. This will save you from having to delete the extra fields later. The Intersect match option usually works well. I'm assuming that your building footprints don't straddle multiple parcels and are fully within a single parcel. Click OK and run the tool. Your new feature class will be created.
  • In ArcMap, open the attribute table for the new feature class, right click the PIN field you created in your buildings layer (the empty field) and select Field Calculator. Find your parcel layer PIN field and double-click it to put it into the query box. The query effectively is 'BuildingLayerPINfield = ParcelLayerPINfield'. Click OK and whatever value is in the ParcelLayerPINfield will be transferred over to the BuildingLayerPINfield. If you had other info from the parcel layer that you wanted to transfer, perform a similar operation on those fields.
  • Delete the ParcelLayerPINfield from your layer, as you don't need it any longer now that the info has been transferred. Delete any other parcel layer fields you may have kept. The end result should be a buildings layer that contains only the attributes you originally created.
  • This buildings layer is now your new buildings layer. You can get rid of the old one.

That takes care of the PIN field. It sounds like you can do some group selects to populate other fields. Adrian mentioned the Transfer Attributes tool. I use it in certain workflows, but keep in mind that the tool is used in a one-to-one fashion. After setting up the fields you want to transfer, you select a source feature and then a target feature and the mapped fields' attributes are transferred. You could use this for the parcel PIN but you stated you didn't want to do them one at a time. That makes it the "wrong" tool for your current purpose. I only have a cursory knowledge of the Attribute Assistant tool, so I can't comment regarding its usefulness in this context.

Brian

JaredPilbeam1
Occasional Contributor

Brian (et al.),

Thanks for the responses. Yes, the existing Building Footprints layer must stay. I'm working in an SDE and there are a couple other people who are also editing child versions of the Footprints layer. The Footprints are of the entire county. All versions will all eventually be added to the main feature class. So, I'm just working in blocks or larger areas at a time, basically.

I've taken Chris' caution into consideration and attempted to create a new ID in the Footprints layer in the beginning of my original process explained to Jake above. Before I run the Feature to Point tool I select a small area of Footprints, then Create Layer From Selected Layer, then attempt to Add Field to the table:

But I get this error:

I then tried exporting the selected Footprints to a new layer, but this led to OBJECTIDs to be regenerated:

I need the original OBJECTIDs intact in order to do a join back to the Footprints layer at the end of my process? This is where I'm stuck now.

0 Kudos
JaredPilbeam1
Occasional Contributor

Sorry, forgot to mention something. I had editor off while trying to Add Field. I also unselected the features after Create Layer from Selected Features (*typo above) and before trying to Add Field.

0 Kudos
BrianOevermann
Occasional Contributor III

Jared,

A couple of comments regarding the lock/in use message you received when attempting to add a field:

  • You must add the field when connected as the data owner. It will then appear in all versions (may need to refresh the version).
  • It appears that this feature class may also be utilized in one or more map services (just a guess given the 'IMS' user indicated in the lock message)? Also, users of other child versions could also be working with the feature class at the time (though your lock message doesn't seem to indicate that). That complicates things because, as the message indicates, you cannot make schema changes when the layer is in use or otherwise locked.

I run into this occasionally. At those times I must briefly stop my map service(s) that contain the relevant feature class, add the field (as the data owner), the start the map service(s) back up. It helps that I manage all of the data, have the ability to connect to the database as the data owner, and can usually plan the brief 'blip' in map service availability by doing it at an off-peak moment of the day.

Christopher's suggestion to use the Generate Near Table sounds like a great solution for you--if you have an Advanced license. Sadly, many of us do not so we must resort to other methods.