I recently launched a drone near, but not on, a railroad's right of way. My flight was to take a video from a 60' altitude at a time between scheduled commuter trains. I flew within all FAA rules but received tickets from both local and transit police for trespassing. The court costs and the lawyer retainer fee were in the $1000's. As my drone footage and AIRDATA GPS data showed I was clearly not on RR property, the criminal charges were dropped. BUT ... the transit police, who have issues with "train enthusiasts" who take hand help photos on rail right-of-ways creating dangerous situations, asked the judge for a "lessor included offense" and a fine of $1000. The question I have is whether, from current law, the railroad transit police had any right to charge me for anything as I was not on railroad property and my drone was in FAA airspace. BTW, before the flight, I used AIRMAP and came up with no restrictions. I feel I accrued significant expenses due to uninformed police, a lawyer unfamiliar with the appropriate law, and a judge (possibly not a drone advocate) who finally set the sentence at $900. I am 75, have no criminal record, and over 450 hours of safe legal drone flying. I have passed the 107 remote pilot in command license and interpret the FAA rules very conservatively. So ... any one familiar with the correct law in this situation.