We have a certain functionality developed that:
- Will check for a tolerance value (this input is given by the user as NM);
- Buffer a polygon by that value (all polygons are in WGS-84);
- Iterate through selection (buffer x points) and creates a record for each intersected point.
The tester at my corporation is saying the tool is giving wrong results. Here is his workflow, for testing:
- Creates a polygon;
- Define a nearby point;
- Measure the distance between the polygon and point (using measure tool);
- Configure tolerance to be larger or equal distance;
- RUn the tool;
I have a problem in the middle, is that our user needs to store these tolerance values as nautical miles, and I need to convert them to degrees for them to be used in our buffer (I'm using IUnitConverter). All buffers are constructed using ITopologicalOperator.
My guess is the conversion is being done purely in a numerical way and then, buffering by less than it should.
I've read tons of articles speaking about projection engine.dll, but that is for calculating distances, not buffers (I mean, if I need to implement a custom buffering solution, that will take into account each vertex).
Can you guys recommend an approach for this? How can I convert this measure and still hit these edge cases?