Select to view content in your preferred language

Getting value from a one FC to put into another FC

688
0
07-20-2010 09:18 AM
ChrisMathers
Regular Contributor II
Anyone have an idea of a way in python that would let me take the centroid of a feature and then get the values of intersecting features from other feature classes to put into attributes for the centroid? I dont want to use Spatial Join because I dont want a bunch of intermediate files or to deal with making feature layers to join those files back to the original feature class to calc over the data. The way I am doing it now is:

parcel centroids are spatially joined to a polygon feature class like zoning
join field permanently joins the pertinent fields from centroids_sj to the parcels feature class
the added field is calculated over to another field in the parcels schema and the added field is deleted

This is wildly inefficient because Join Field takes a really long time to run all 27 times in this script. If I could go over the parcels with a cursor and for each row get the centroid with describe and just intersect it with other features I think it could speed up this code.
0 Kudos
0 Replies