2

I have a vector map with all the zip-codes of Denmark. I have taken a picture in each zip-code, and I now want to fit theses pictures into the zip-code polygons (I'm using QGIS). I can add the pictures one by one by changing the layer style to raster, and scaling the image. Seeing that there are almost 600 zip codes in Denmark, and that the pictures might change through time, I would very much like to find an automated way to do this. Hope somebody can help.

  • are the photos overlapping? what if you stitch the photos together and georeference the stitched photo? You could do one for fyn, one for sjaeland, and one for jylland to minimize any potential distortion you might have from the full stitched photo. – crld May 17 '16 at 15:23
  • Thank you for your response. The photos are not related as such, they are pictures of the cities. I would then like to fit these pictures in the individual polygons, to get a map with 593 polygons with an individual image in each. I thus don't think the approach you suggested would work in this case. – dss May 17 '16 at 15:27
  • QGIS can use an image to fill a polygon shape, clipping the image to the polygon's borders, but I'm not sure how to do it programmatically. – Dan C May 17 '16 at 15:57
  • I see. At my company, we have a process that automatically georeferences rasters by creating the world georef files associated with the image (en.wikipedia.org/wiki/World_file); if you know the top left coordinate for each, you can adjust the scale/skew values to make your images fit to where they're supposed to. I suppose this process would require a baselayer dataset (like the minimum bounding geometry of a city boundary) on which to base those values. – crld May 17 '16 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.