distance = UnitOfMeasurement.convert(unit, distance);
return LiteralFactory.createTypedLiteralWithoutException("\"" + String.valueOf(distance) + "\"", "<http://www.w3.org/2001/XMLSchema#double>");
}
else
{
throw new TypeErrorException("Distance Function expects exactly 3 arguments: two geometry object and a unit.");
}
}