use KG_WARN flag instead of 1 in geometry manipulation functions