I am creating a task where there are many steps to create and assign an address to a point feature. One of the steps I am trying to automate is to have information taken from some polygons that the point feature falls within. I know I can do a spatial join but the problem is, I don't want to end up with a bunch of extra tables from the join. Does anyone know another way to accomplish this? Maybe a script?
You can use a spatial intersection in a field calculation. I've done a very similar process to what you describe using Arcade:
var portal = Portal('your portal url') var polygons = FeatureSetByPortalItem( portal, 'itemid of polygon layer', 0, ['the field you need'], true ) // get first intersecting polygon var xs = First(Intersects($feature, polygons)) // return value of desired field return xs['the field you need']
If you're working with local layers as opposed to services, you can still pull in those other features with different FeatureSet functions in Arcade.
Thanks! I will check this out.
So my data is not from Portal so I assume I would use FeatureSetbyName()
Below is what I am working with:
My Zip code layer is named GISMAIN.DBO.qc_ZipCodes
The field I need to grab data from is "GEOID10"
My dataset that needs the Zip Code appended in is called Addressses_TestData
I basically need to make the user be able to click to add the address point, and have it populate the Zip field with the data from the layer under it.