cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

createCircularGeoFence resolution

jasong
12-Amethyst

createCircularGeoFence resolution

Without just manually trying a bunch of different values, I am unsure what  the "resolution" parameter should be set it. The Wiki doesn't mention anything, other than:


resolution – the number of points to calculate for drawing the circle


That's not so helpful to me - How can I determine this resolution number? Should it be dynamic based on the distance? Can I just hardcode a value that will work well in most situations? I would think 360 would be good, one point per degree, unless my radius is very large.


Suggestions?



2 REPLIES 2
jasong
12-Amethyst
(To:jasong)

Additionally, in the snippit containsLocation(), it takes a "LocationField". Is that the column in the geoFence that contains the Location data?

So for passing in a geofence made from createCircularGeofence, that's just "location".


Let me know if my assumptions are correct.



adam11
7-Bedrock
(To:jasong)

Hi Jason,

You are correct about the LocationField – it is the field that contains the location data you will be using to determine whether a point is contained in the geofence. Regarding resolution, there is no magic formula for determining an appropriate value. A colleague recommended ~30 as a reasonable value, but you may want to increase/decrease this depending on your use case. Keep in mind, the higher the resolution, the more computationally expensive your Service will be.


Thanks,

Adam



Announcements


Top Tags