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)
Count(districts_within_search_radius )
Could you try using BufferGeodetic() ?
@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
If your data is in Web Mercator, try reprojecting it to NAD1983 also change the system of your map.
Nad83 is a datum... do mean a UTM or State Plane etc with a NAD83 datum?
@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)
I have all layers and map in the NAD 1983 StatePlane Texas S Central FIPS 4204 (US Feet), Should I try a different Coordinate System?
Does your original script return any count at all? Please check with 10 miles of buffer distance. If it doesn't, there is issue with the script.
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)