# GDAL: C++ API to Convert Text file of Coordinate points to Raster Pixel line?

I am using GDAL to "Grow" areas form starting seed points. I have a text file listng the coordinates of my seed locations. The X,Y coordinates are in the coordinate system of a raster image. I want to burn these point locations into the raster image. I don't kow how to convert my point coordinates to the proper raster image pixel/line locations. I have the geotransformation of the image.

I see GDAL classes in the API tutorial that return transformed coordinates from image row/col locations but not the reverse. I am famialiar with the utility that does this, but I don't see a C++ programmers API to do this. Does anyone know how to do this? This capability is fundamental to what I'm trying to do.

-

This should work (being 'adfGeoTransform' the normal geotransform array and 'adfInvGeoTransform' an empty array of 6 elements to store the inverse geotransform parameters):

GDALInvGeoTransform( adfGeoTransform, adfInvGeoTransform );