private synchronized double[][] findGeometriesBoundaries() {
        if (mGeometryList.isEmpty()) {
            Log.wtf(TAG, "Empty geometries list");
            return null;
        }
        double minX = Double.MAX_VALUE;
        double maxX = -Double.MAX_VALUE;
        double minY = Double.MAX_VALUE;
        double maxY = -Double.MAX_VALUE;
        for (Geometry g : mGeometryList) {
            int size = g.mPolygon.getSize();
            List<Transform> points = g.mPolygon.getPoints();
            for (int i = 0; i < size; i++) {
                double[] pointPosition = points.get(i).getPosition();
                minX = Math.min(minX, pointPosition[0]);
                maxX = Math.max(maxX, pointPosition[0]);
                minY = Math.min(minY, pointPosition[1]);
                maxY = Math.max(maxY, pointPosition[1]);
            }
        }
        return new double[][]{{minX - mRobotRadius, minY - mRobotRadius},
                              {maxX + mRobotRadius, maxY + mRobotRadius}};
    }
private synchronized double[][] findGeometriesBoundaries() {
        if (mGeometryList.isEmpty()) {
            Log.wtf(TAG, "Empty geometries list");
            return null;
        }
        double minX = Double.MAX_VALUE;
        double maxX = -Double.MAX_VALUE;
        double minY = Double.MAX_VALUE;
        double maxY = -Double.MAX_VALUE;
        for (Geometry g : mGeometryList) {
            int size = g.mPolygon.getSize();
            List<Transform> points = g.mPolygon.getPoints();
            for (int i = 0; i < size; i++) {
                double[] pointPosition = points.get(i).getPosition();
                minX = Math.min(minX, pointPosition[0]);
                maxX = Math.max(maxX, pointPosition[0]);
                minY = Math.min(minY, pointPosition[1]);
                maxY = Math.max(maxY, pointPosition[1]);
            }
        }
        return new double[][]{{minX - mRobotRadius, minY - mRobotRadius},
                              {maxX + mRobotRadius, maxY + mRobotRadius}};
    }
private synchronized double[][] findgeometriesboundaries() { if (mgeometrylist.isempty()) { log.wtf(tag, "empty geometries list"); return null; } double minx = double.max_value; double maxx = -double.max_value; double miny = double.max_value; double maxy = -double.max_value; for (geometry g : mgeometrylist) { int size = g.mpolygon.getsize(); list<transform> points = g.mpolygon.getpoints(); for (int i = 0; i < size; i++) { double[] pointposition = points.get(i).getposition(); minx = math.min(minx, pointposition[0]); maxx = math.max(maxx, pointposition[0]); miny = math.min(miny, pointposition[1]); maxy = math.max(maxy, pointposition[1]); } } return new double[][]{{minx - mrobotradius, miny - mrobotradius}, {maxx + mrobotradius, maxy + mrobotradius}}; }