AnsweredAssumed Answered

Snapping: rounding down of the geometry vertices

Question asked by greenkarmic on Feb 23, 2016
Latest reply on Feb 24, 2016 by greenkarmic

We noticed that when we are using the Measurement widget to measure surfaces, while in snapping mode, the result always seems a bit off from the true surface measure. Not by much, but enough to matter since the users often use the widget to measure land areas and the result does not correspond to the surface annotation in the map for this land.

 

After some investigation, I noticed that when snapping we seem to be losing some precision. It seems the vertices of the polygon are rounded down after the second decimals (compared to the actual feature vertices for this land). Is there a way to avoid this rounding down to improve the Measurement widget precision, or improve any other measurement involving geometry obtained by snapping to lines in the map?

 

Here's an example (in squared meters)

 

2016-02-23_17-16-56.png

 

It was even worse before because the widget only displayed one decimal by default, but even after I modified the numberPattern of the widget to add an extra decimal, it's not enough. It will display 502.06m instead of the true 501.98m value (and compared to the 501.9m annotation in the map). Like I said, not much, but I still wanted to ask the question. Can I prevent this rounding down when using snapping? Many thanks.

 

            this.esriMeasurement = new Measurement({
              map: this.map,
              defaultAreaUnit: units.SQUARE_METERS,
              defaultLengthUnit: units.METERS,
              pointSymbol: new PictureMarkerSymbol("images/esriGreenPin16x26.png", 16, 26),
              numberPattern: "#,###,###,##0.00"

Outcomes