Add some terrain query functions, still broken