Commit 2d587b01 authored by Eric Duminil's avatar Eric Duminil
Browse files

No nanometer precision for coordinates anymore.

parent 540e20e2
Pipeline #7208 passed with stage
in 35 seconds
......@@ -398,7 +398,8 @@ const regionChooser = (function(){
var geom = sketch.getGeometry().clone().transform(sourceProj, 'EPSG:4326');
var wgs84Coords = geom.getLinearRing(0).getCoordinates();
var wktPolygon = "POLYGON((";
wktPolygon += wgs84Coords.map(lonLat => lonLat.join(" ")).join(", ");
var precision = 6; // ~ 10 cm precision
wktPolygon += wgs84Coords.map(([lon, lat]) => lon.toFixed(precision) + " " + lat.toFixed(precision)).join(", ");
utils.copyToClipboard(wktPolygon + "))", dataPanel);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment