using the QGIS Georeferencer GDAL plugin, I can select GCPs (ground control points) on a map (plain raster input map image in a format like PNG or TIF) in an unknown projection and boundaries, and specify the coordinates for those points in my desired output projection; then the Georeferencer plugin can reproject the map image from the unknown input projection into the specified output projection, epsg:4326 in this case: (each GCP is the x,y coordinate pair of a pixel in the input image followed by the lon,lat coord of that pixel on the map in the desired target projection)
gdal_translate -of GTiff -a_srs EPSG:4326 -gcp 738.445 571.363 -5.3664 39.8004 ...[lots of gcps]... -gcp 656.449 529.382 -5.2034 40.4102 inputmap.png tmpmap.tif gdalwarp -r near -order 2 -co COMPRESS=NONE tmpmap.tif outmap.tif
When the input image with its ground control points is reprojected into the output image, the GCPs are reprojected too, and shown at their correct new locations.
Is there a programmatic way to obtain the pixel coordinates of the GCPs in the reprojected output image? And more generally, is there a way to reproject a single point/coordinate pair from an unknown projection into a known specified projection, using GCPs to define the unknown projection like in the above commands?