1

I have a couple of hundred raster images (TIFF) with a specific file name, like 242_13_1_0.tif. I also have a shapefile with polygons that corresponds to the corners of one of these files. All polygons have an attribute id that could be used to link a specific polygon to a specific file.

I have previously, when I have done something similar, exported the shapefile to some text format and then created a Python script and with Python/GDAL mapped the image to the correct extent and then create a GeoTIFF. But it's a bit time consuming to have to write new specific scripts whenever this problem occurs, so my question is if this could be done more automatically? Like in QGIS?

4
  • Can you explain what you want to do? What's the problem?
    – Micha
    Mar 6, 2020 at 10:20
  • Well, to be able to create a GeoTIFF, from a "plain" TIFF and the extents that I have in the Shape file. As I described I have an attribute in the shape file that I can use to match to the correct image. So with a Python script and GDAL I have managed to create GeoTIFFs but the question is if this is something this could be done in QGIS or anything like that, so I don't have to write new scripts everytime I have this kind of "problems" Mar 7, 2020 at 10:45
  • If you have an image that is not registered in any coordinate reference system, and you want to register it correctly, then you need, in the general case, more than the 4 corners of the extent of the shapefile. Typically more than 8 points are required to do a full georeference. Or maybe I still do not understand...
    – Micha
    Mar 7, 2020 at 11:30
  • The image is not a geograhpical image, but its corners matches the polygons in the Shape file. The Shape file is sort of a overview image of all the maps and every polygon has a ID that corresponds to a filename. So if I match the correct polygon to the correct raster image, with the ID and the file name, then I can set the set the corners of the image and create a GeoTIFF. This is what I have done in my Python script but I was thiking if this could be done in QGIS. No need to re-invent the wheel over and over again. Mar 8, 2020 at 19:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.