Reading polygons with four corner coordinates (clockwise or anti-clockwise) from files / data format?

Hi, I am fairly new gmt user and I have a question regarding how to read polygon data in order to plot them with fill colors. For satellite image it is sometimes useful to plot the footprint (ground pixel) which is usually given by latitudes and longitudes of the four corners. Which format (netcdf, ascii) has the input file in order to be able to simply process the data with gmt?

Polygons are usually closed loops with lon,lat coordinates of all vertices, with one coordinate pair per record. Depending on the extent of the image, if you plot a polygon based on the 4 corners via gmt plot then we will compute intermediate points along the connecting great circles. However, you can can control that aspect via the -A option. For this stuff it is probably simplest to make an ascii table. If your images are rotated and in a projected coordinate system then things are a bit more complicated but gmt grdinfo -Ib can output the enclosing polygon in whatever coordinates the grid is in and you can inverse project those to get an oblique long, lat polygon.