For some reason my buffer distance for a attribute rule is very inaccurate. I have tested this with the code below, and for an example, Features that are within 1 mile of school districts layer are not being counted. Any help would be appreciated.
var Districts = FeatureSetByName($datastore, "SCHOOL_DIST")
var Buffer1mile = buffer($feature,1,'mile')
var Districts_Within_Search_Radius = INTERSECTS(buffer1mile,DISTRICTS)
VAR NO_OF_SCHOOLS = COUNT(Districts_Within_Search_Radius)
@Robswann are you working in Web Mercator auxiliary sphere by any chance? Change to a national projection system and rerun the buffers to confirm that's the issue.
Buffering in WMAS is a nightmare, so you'll need to switch to geodetic method of buffer if you need to stay in that.
OK i have tried both suggestions. I was working with WMAS, and changed it to NAD 1983. I am still getting inaccurate returns. For some reason, when I input the buffer geodesic it returns an error. Again thanks for the help
@DanPatterson , great point, i wasn't clear in my reply. You need to change the coordinate system into a projected system in either UTM or state plane (local system to your area)
Yes it is returning a count.
It should return a 1 when the polygon is not within 1 mile of a school district.
If it is 1 mile within a school district it should return 2. (The school district is located in, and the school district within 1 mile)