Converting postscript to psbasemap commands

Given any postscript graticule and border annotations, is there a way to convert these to GMT psbasemap commands, effectively reverse engineering the GMT script to produce it? I’m only considering the map gratiule and border decorations, not any grids or plotted map data.

If you have the PostScript file then the GMT commands are stored as comments. Just grep on GMT.

No, I meant a postscript map graticule not created by GMT.

Well, PostScript is a programming language and as you know there are lots of ways to code up a solution to any problem. So you would have to see how that PostScript file does things and then come up with a way to unscramble specific settings. But if you don’t know the projection etc because it is not embedded in the PS I think you are better off just doing some trial and error experiments, unless this is going to be part of some production run - which in case I still think you wish to avoid going that route. Or complain to the producer of said PostScript and ask why they would not embed that critical information in the plot as comments? We thought that was a reasonable thing to do back in 1988…

Ok, I’ll investigate whether the postscript has any proj info embedded in the headers, thanks.