Add coordinate validation and clearance check