Exporting high resolution image from QGIS project

Problem:

You want to export your QGIS project into high resolution image. QGIS desktop “Project” –> “Save as Image” only save/export the project into a low resolution image (i.e. your desktop resolution).

qgis_banyumanik

Solution:

1. Finish your project in QGIS

Finish your GIS project in QGIS Desktop, choose which layers to be shown, what style should it use, etc.

2. Choose your extent that will be exported into image

For myself, I choose the full-extent, but you may choose the extent as you wish. You my use “Vector” –> “Coordinate Capture” to help copying the coordinates. You will need to write down the coordinates for [xMin, yMin] (top-left coordinate) and for [xMax, yMax] (bottom-right coordinate). Save and close your QGIS project.

3. Execute the export command via command line of QGIS

Open your command prompt/console (preferably as Administrator/root). Go to your QGIS binary folder, where you install QGIS +”bin” folder, for example C:\Program Files\QGIS Brighton\bin. Use this command template:

qgis --project "c:\where\you\save\your\qgis\project\file.qgs" --snapshot "c:\where\you\want\to\save\your\image.png" --height result_image_height --width result_image_width --extent xmin,ymin,xmax,ymax

For example:

C:\Program Files\QGIS Brighton\bin>qgis --project "D:\work\dita s1\pmapper\Semarang\Kec_Banyumanik\banyumanik.qgs" --snapshot "c:\users\achmadz\documents\padangsari.png" --height 5000 --width 5000 --extent 435825.86153,9218725.47861,438150.22840,9217277.65534

That command will open QGIS Desktop for a moment then close itself. The command will produce padangsari.png in c:\users\achmadz\documents\. Open the image, and you’ll see the image in high resolution (5000×5000 pixels).

qgis_hasil_resolusi

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>