Comparing those two values shall result in a \"true\":
53.9173333333333 53.9173
Thanks. I did it this way:
double lon = 23.567889; BigDecimal bdLon = new BigDecimal(lon); bdLon = bdLon.setScale(4, BigDecimal.ROUND_HALF_UP); System.out.println(bdLon.doubleValue());