the legislation says that it must be taken at the place of request or nearby. But that is the officers decision to make not the person required to take the test.
"place of request or nearby" sounds eminently sensible, but "it is the officer's decision" somewhat dilutes the wording above - especially if the officer concerned was somwhat officious. My feeling is that it (if that is the case) is a bad law (I know - we are stuck with them!!)
Regarding your own experience related above, I would have thought that a "reasonable" approach - especially if you were in uniform - yes, it did matter - , would to have the test taken out of the view of the public - for exactly the same reasons as I would expect the pilot to have been given the same consideration (or, to be more accurate, to avoid the confidence of the public in the police/pilots due to having one embarrassingly tested in front of them - especially if it turned out, as I hope in your case, to be a "negative")