Moving a perimeter fence at the estate of Stagecoach tycoon Ann Gloag could increase the risk of a criminal plot against her, a court has heard.
The visit took place in the grounds of the estate
The claim from security advisor Keith Fleming came amid a legal bid by the millionaire to ban the public from part of her Kinfauns estate in Perthshire.
The case has been opposed by the Ramblers Association Scotland.
Sheriff Michael Fletcher earlier visited the site before hearing evidence at Perth Sheriff Court.
Mrs Gloag, one of Scotland's richest women, is seeking to become the first private individual in Scotland to be exempted from right-to-roam legislation.
During the site visit lasting just under an hour, Sheriff Fletcher and legal teams for Mrs Gloag, Perth and Kinross Council and the ramblers, viewed the 7ft-high fence which is topped with barbed wire.
It was erected around part of the 23-acre estate without planning permission, which was later granted retrospectively by Perth and Kinross Council.
The local authority and the Ramblers Association said they wanted a stretch of the one-mile fence moved.
The ramblers have claimed that access is needed to important tree-life in the area, including swamped cypress and giant redwoods.
Mr Fleming, who was paid by Mrs Gloag to assess the vulnerability of Kinfauns Castle, told the court it would be difficult for someone to observe the premises from a concealed position with the fence in its current position.
The former Grampian Police superintendent said: "I recognise that Mrs Gloag is a wealthy businesswoman.
David Morris of the Ramblers Association attended the site visit
"She does possess valuable artefacts and jewellery, some of which are displayed at the castle."
Mr Fleming said: "If someone was planning or plotting against the property or family then having a good line of sight in a concealed area to do that and assess security levels would definitely be to their advantage.
"The current location (of the fence) prohibits that.
He went on: "From the security perspective I would consider the current perimeter location to be wholly appropriate and the proposed alternative likely to expose Kinfauns Castle to unnecessary risk."
However, Mr Fleming agreed that the location of children's play equipment in relation to the fence potentially left Mrs Gloag's grandchildren vulnerable to abduction if left unsupervised.
John Campbell QC, representing the Ramblers Association, put it to Mr Fleming that Kinfauns Castle, being two miles east of Perth and close to the A90 Aberdeen to Perth dual carriageway, was not ideally situated for someone who wanted to maintain their privacy.
Mr Fleming replied: "No it is not."
Jack Irvine, the chairman of public relations firm Media House, which represents Mrs Gloag, told the court that she had been the victim of "gross intrusion" that had been "really quite disgusting".
Mr Irvine said the kind of visitors Mrs Gloag welcomed at the castle included captains of industry, royalty and foreign leaders.
The case continues.