2

I have a bunch of 4-band GeoTIFFs that I would like to save as high resolution JPEG images. But, in the output image, I also need a separate point .shp to be overlayed and labeled with one of the fields in the shapefile. Additionally, I would like to have a coordinate grid overlayed on the image.

I have attached a screenshot (the 4-meter JPG is too large to share) of a subset (upper left corner) of an example that was generated using ENVI's QuickMap tool, which gives you the option of adding a coordinate grid. The points were overlayed using Arc, I believe.

For each geoTIFF (input), there will be two output jpgs. One with a 4-3-2 (meaning, 4th band = Red, 3rd band = Blue, 2nd band = Green) color composite and another with a 3-2-1 color composite, each with the coordinate grid and labeled points overlayed. ENVI's QuickMap tool works well to convert a geotiff raster to a color composite JPG map with the coordinate grid overlay, but I need to find a way to automate the entire process (including adding the points/labels) as there will be hundreds to thousands of inputs.

I can use GDAL, ENVI/IDL, QGIS or ArcGIS, but if there's a way to do it all in GDAL that would be great. If necessary, I can split the process up to do different steps with different tools.

screenshot of example subset

  • pyQGIS can be used for automated/batch rendering of maps. Everything you outlined here can be done in the QGIS print composer and should therefore also work from pyQGIS. – Kersten Nov 2 '16 at 12:39
  • @Kersten thanks for the tip. Do you know which commands in particular could help me with this? I've used QGIS like once in the last 2 years and never pyQGIS so I'm pretty new to that. – user20408 Nov 2 '16 at 14:14
  • I think that @Kersten have already provided link to pyQGIS documentation in comment, especially to "Map Rendering and Printing". My issue with this document is that there's only example of rendering and I would like to see full example scripts which loads vectors and rasters, render them as a map and then export to image or PDF. If I had such, I would like to rewrite my function for creating maps (github.com/kedziorm/mySNAPscripts/blob/master/myScripts.py#L198) to use pyQGIS (@Kersten do you have any suggestions for that?) – matandked Nov 5 '16 at 6:36

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.