I am working on a project linking ideas in Geology and Ecology.
I currently have a map showing the geology of an area (polygon layer), with a points layer on top indicating the locations of data collection.
I have added an empty column to the attributes table for the points layer (
geology_where_captured) and would like to know if there's a way - using arcpy - to fill in this column with the name or id of the geology that each data point is sitting within?
I have looked into the
SummarizeWithin function but when I try to use this (I am using ArcMap 10.7.1 on my home computer) I get an error saying the object has no attribute?
I'm pretty new to Python.
I wrote this small bit of code following advice from https://pro.arcgis.com/en/pro-app/tool-reference/geoanalytics-desktop/summarize-within.htm
import arcpy arcpy.env.workspace = 'C:\Users\User\Documents\University\4th Year Project\Data\mydata_arcgisOnline/XYLEMUR_DATA_AMBATOVY2.dbf' summarizedLayer = "XYLEMUR_DATA_AMBATOVY2" summaryPolys = "Geology" arcpy.SummarizeWithin_analysis(summarizedLayer, summaryPolys, 'geology_where_captured')
Runtime error Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'SummarizeWithin_analysis'
No joy! (I'm new to this)