You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - Geoprocessing Scripting (Python, JavaScript, VB) forum

extracting feature attribute from a polygon...   Rob Shearer Oct 12, 2006
Re: extracting feature attribute from a pol...   Vipul Bhatia Oct 13, 2006
Re: extracting feature attribute from a pol...   Rob Shearer Oct 13, 2006
Re: extracting feature attribute from a pol...   Chris Snyder Oct 13, 2006
Re: extracting feature attribute from a pol...   Rob Shearer Oct 13, 2006
Re: extracting feature attribute from a pol...   Chris Snyder Oct 13, 2006
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject extracting feature attribute from a polygon shapefile 
Author Rob Shearer 
Date Oct 12, 2006 
Message In VB, given an x,y coordinate pair how would I extract an attribute from the feature of a polygon feature class which had the point within its extent. Say the polygon feature class is "RM" and the field is "RMname", and I want to assign the value to the variable "Label" 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: extracting feature attribute from a polygon shapefile 
Author Vipul Bhatia 
Date Oct 13, 2006 
Message An idea :

1) PLot the point programmatically in graphic frame
2) use the select by location to select the feature.
3) select the feature class table.
4) select selected features
5) get the attribute info from that particular field.

thanks 
  Vipul Bhatia
mailto: Vipul.pec@hotmail.com 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: extracting feature attribute from a polygon shapefile 
Author Rob Shearer 
Date Oct 13, 2006 
Message I have thousands of points to process, so I would like to have the process automated. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: extracting feature attribute from a polygon shapefile 
Author Chris Snyder 
Date Oct 13, 2006 
Message If you are handy in Python you can use the geometry field properties (using a Search Cursor) to cursor through the XMIN XMAX YMIN YMAX extents of each feature in your (polygon?) featureclass to test with your XY locations. Sorry I don't have any code examples for this, but it can definitely be done. How many polygons features and point features do you have? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: extracting feature attribute from a polygon shapefile 
Author Rob Shearer 
Date Oct 13, 2006 
Message Overall there are at least 10,000 each, but i've clipped both to about 300. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: extracting feature attribute from a polygon shapefile 
Author Chris Snyder 
Date Oct 13, 2006 
Message If there are not a whole lot, you can export each feature to its own feature class first and avoid having to use a cursor. In your case I'd look into the cursor method...

Check out the "GetValue and SetValue" section of http://webhelp.esri.com/arcgisdesktop/9.1/index.cfm?id=1939&pid=1937&topicname=Data%20access%20using%20cursors%20in%20a%20geoprocessing%20script