Distance in Buffer Calculation - Not Accurate

510
10
09-03-2021 10:07 AM
Labels (1)
Robswann
New Contributor III

 

 

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 )

0 Kudos
10 Replies
JayantaPoddar
MVP Esteemed Contributor

Could you try using BufferGeodetic() ?



Think Location
0 Kudos
David_Brooks
MVP Regular Contributor

@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. 


David
..Maps with no limits..
0 Kudos
Robswann
New Contributor III

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

0 Kudos
David_Brooks
MVP Regular Contributor

If your data is in Web Mercator, try reprojecting it to NAD1983 also change the system of your map.


David
..Maps with no limits..
0 Kudos
DanPatterson
MVP Esteemed Contributor

Nad83 is a datum... do mean a UTM or State Plane etc with a NAD83 datum?


... sort of retired...
0 Kudos
David_Brooks
MVP Regular Contributor

@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)


David
..Maps with no limits..
0 Kudos
Robswann
New Contributor III

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? 

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

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.



Think Location
0 Kudos
Robswann
New Contributor III

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) 

0 Kudos