fix handling of count
query tile height
fix cases where lat/lon were swapped
fix sampling to account for lower left origin