Trovit/src/main/java/org/openestate/io/trovit/TrovitUtils.java
public static String printLatitudeValue(BigDecimal value) {
        if (value == null)
            throw new IllegalArgumentException("Can't print empty latitude value!");
        if (value.compareTo(new BigDecimal("-90")) < 0)
            throw new IllegalArgumentException("Can't print latitude value '" + value + "' because it is below -90!");
        if (value.compareTo(new BigDecimal("90")) > 0)
            throw new IllegalArgumentException("Can't print latitude value '" + value + "' because it is above 90!");

        value = value.setScale(10, BigDecimal.ROUND_HALF_UP);
        return DatatypeConverter.printDecimal(value);
    }
public static String printLatitudeValue(BigDecimal value) {
        if (value == null)
            throw new IllegalArgumentException("Can't print empty latitude value!");
        if (value.compareTo(new BigDecimal("-90")) < 0)
            throw new IllegalArgumentException("Can't print latitude value '" + value + "' because it is below -90!");
        if (value.compareTo(new BigDecimal("90")) > 0)
            throw new IllegalArgumentException("Can't print latitude value '" + value + "' because it is above 90!");

        value = value.setScale(10, BigDecimal.ROUND_HALF_UP);
        return DatatypeConverter.printDecimal(value);
    }
public static String printLatitudeValue ( BigDecimal value ) { if ( value == null ) throw new IllegalArgumentException ( "Can't print empty latitude value!" ) ; if ( value . compareTo ( new BigDecimal ( "-90" ) ) < 0 ) throw new IllegalArgumentException ( "Can't print latitude value '" + value + "' because it is below -90!" ) ; if ( value . compareTo ( new BigDecimal ( "90" ) ) > 0 ) throw new IllegalArgumentException ( "Can't print latitude value '" + value + "' because it is above 90!" ) ; value = value . setScale ( 10 , BigDecimal . ROUND_HALF_UP ) ; return DatatypeConverter . printDecimal ( value ) ; }
Write a {@link BigDecimal} value into XML output
with a valid latitude range.

@param value value to write
@return XML string
@throws IllegalArgumentException if a validation error occurred
Write a { @link BigDecimal } value into XML output with a valid latitude range .