Hi all,
Working on large data sets and I want to get started off on the right foot before I begin to implement any changes to the Attribute Table so I am looking for some help in order to efficiently implement the task at hand. I am new to python but have some experience in C++ and a little Java.
I am trying to assign a HUC 12 Watershed ID number to NHD flowlines that are located within said HUC 12 Watershed. This is just the first step in a larger goal with the data set but what I learn here will be able to apply to the rest of the project.
First off I have a file with the HUC 12 (sub-watershed) polygons, each has their own unique ID number labeled HUC_12 in the attribute table. I also have a file with the NHD Flowlines (stream lines) lines, this file needs to have the data added to it.
So I start off by singling out one HUC 12 e.g. 020700090303 by just clicking on it/selecting it. Then I run Select Layer By Location with my input being the Flowline file; Relationship: Within; Selecting Features: HUC_12; Run.
This gives me all of the Flowlines within this HUC 12 sub-watershed. I wish to now add the HUC 12 ID of 020700090303 to the 31 different flowlines that were selected within the watershed. How do I go about doing this? Is it as simple as a Calculate Field? I want to create some sort of code or script to easily apply this answer to the 11,000 subwatersheds and 250,000 flowlines I have to link in the most time saving way.
Maybe I need to create some sort of loop to execute for all unique HUC_12 ID codes but I just do not know how to go about it on this large of a scale.
Cheers,
gpalmer_geo92