Use getInExtent instead of forEachInExtent