Alternate Coordinate system for Web AppBuilder Measurement widget

624
0
02-25-2021 12:10 PM
Status: Open
Labels (2)
berniejconnors
Occasional Contributor III

UPDATE - when I wrote this yesterday I was not aware that the Measurement widget uses a geodesic method to calcualte distances.  Therefore we do not have to worry about Web Mercator distorting measurements.  But I still believe this Idea is valid for applications that require planar measurements on a local coordinate system instead of geodesic measurements on the ellipsoid.  The WAB Measurement widget documentation should be updated to clearly state that measurements are geodesic and are not influenced by Web Mercator distortions.

----------------------------------------------------------

Way back in 2010 when Esri adopted Web Mercator for all the Esri published basemaps they warned us not to make measurements with the Web Mercator coordinate system:

If you use the new ArcGIS Online services, avoid the temptation to perform measurements of polylines and polygons in Web Mercator.

Esri also gave us a work-a-round with sample code:

Fortunately, you don’t have to perform your measurements in the same coordinate system used by the map. When a user submits a geometry to your application for measurement, you can re-project that geometry into a more appropriate coordinate system for measurement. The re-projected geometry is used internally for measurement only; you don’t display it on the map. Once the measurement is complete, you return the correct result to the user.

My proposal for this "Idea" is to allow the Measurement widget and the Draw widget (or any OOTB WAB widget that performs a measurement) to be configured with an alternate coordinate system that will be used to calculate the distance and area measurements.  The widget would default to the coordinate system of the basemap geodesic calculations for distance and area.  But if an alternate coordinate system is provided in the widget config the geometry submitted by the user will be reprojected to the alternate coordinate system before distance, area, or direction calculations are performed.

Tags (3)