Feature request #6985

Export print layout as image with world file

Added by Giovanni Manghi over 11 years ago. Updated about 10 years ago.

Status:Closed
Priority:Low
Assignee:Hugo Mercier
Category:-
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:16090

Description

It would be nice to have an option to export a layout as a georeferenced tiff (tiff+tfw), with regards to a specific map object.

History

#1 Updated by Vincent Picavet almost 11 years ago

Hi,

Can you elaborate on this ?

The need is to export one composer page as tiff image, and write a tfw extent file as well, corresponding to the page extent as if a specific map in it was extended to the whole page ?

What happens when the composer is multi-page ?

Do you have a use case for that ? Any specific example ?

#2 Updated by Giovanni Manghi almost 11 years ago

Vincent Picavet wrote:

Hi,

Can you elaborate on this ?

The need is to export one composer page as tiff image, and write a tfw extent file as well, corresponding to the page extent as if a specific map in it was extended to the whole page ?

What happens when the composer is multi-page ?

Do you have a use case for that ? Any specific example ?

Hi Vincent, good afternoon.

Geo-referenced layouts are requested as mandatory by some public administrations, like the Portuguese one (I can send you the link to the law if needed). At the moment in QGIS this means to export the layout as image and then georeference manually to create the mandatory worldfile. Other GIS packages do create the worldfile while exporting the layout as image.

To solve the problem of >1 map objects and >1 pages it would be enough to consider just the 1st map object (map0) and just to the fist page.

#3 Updated by Vincent Picavet almost 11 years ago

I still do not get it. What you call "layout" is a full composer export as image ? I do not really get the point of having it georeferenced, as it is not really a map by itself, but a document with various things on it (legend, text, figures, tables, etc.), and therefore it does not really make sense to georeference it globally.

The tfw file you want exported, does it correspond to the extent of one of the specific map on the composer export, or to the composer paper export boundaries ? The former is trivial, the latter needs more work.

#4 Updated by Giovanni Manghi almost 11 years ago

Vincent Picavet wrote:

I still do not get it.

I don't get it too, I'm just referring what is mandatory in same places. This missing feature (regardless how much stupid/strange can seem) is limiting quite a lot the adoption of qgis, at least around here.

What you call "layout" is a full composer export as image ?

In this case "layout" means the first page of a qgis layout, exported as image (usually a tif). In other packages the layouts are made of 1 page, as it was in qgis until 1.8, so in general this eventual new feature should just take into account the first page and the first map object (map0).

I do not really get the point of having it georeferenced, as it is not really a map by itself, but a document with various things on it (legend, text, figures, tables, etc.), and therefore it does not really make sense to georeference it globally.

The point of having the world file for the exported layout is to allow someone import it into gis software and see at least the map part of the layout overlayed with other layers (for evaluation purposes), and regardless of the stuff that is in the layout other than the actual map.

The tfw file you want exported, does it correspond to the extent of one of the specific map on the composer export, or to the composer paper export boundaries ? The former is trivial, the latter needs more work.

I guess that the worldfile should take into account the boundaries of the page using them as an "extension" of the map0 object extent.

#5 Updated by Larry Shaffer almost 11 years ago

Giovanni Manghi wrote:

Vincent Picavet wrote:

The tfw file you want exported, does it correspond to the extent of one of the specific map on the composer export, or to the composer paper export boundaries ? The former is trivial, the latter needs more work.

I guess that the worldfile should take into account the boundaries of the page using them as an "extension" of the map0 object extent.

Maybe an option to export ground control points for the defined map extent (i.e. the chosen main map of the composer page layout), then produce a .tfw for the extrapolated 'page' extent. The GCPs could be output in the QGIS Georeferencer's .points file format, so the files are ready to be loaded into the georeferencer. This would help in instances where the extrapolated .tfw file maybe doesn't work right and you have to try re-creating it or doing some adjustments in the georeferencer.

#6 Updated by Vincent Picavet almost 11 years ago

What you call "layout" is a full composer export as image ?

In this case "layout" means the first page of a qgis layout, exported as image (usually a tif). In other packages the layouts are made of 1 page, as it was in qgis until 1.8, so in general this eventual new feature should just take into account the first page and the first map object (map0).

Ok

The point of having the world file for the exported layout is to allow someone import it into gis software and see at least the map part of the layout overlayed with other layers (for evaluation purposes), and regardless of the stuff that is in the layout other than the actual map.

You can do that by exporting the QGIS canvas as image instead of a composer layout. Georeferencing a layout is a strange idea globally, but why not.

I guess that the worldfile should take into account the boundaries of the page using them as an "extension" of the map0 object extent.

Yes, got it now, even if it's not easy to see real use for this.

But the law is the law.

#7 Updated by Vincent Picavet almost 11 years ago

  • Target version changed from Future Release - Nice to have to Future Release - High Priority
  • Assignee set to Hugo Mercier

Oslandia will implement this feature for 2.1.

#8 Updated by Hugo Mercier almost 11 years ago

So, if I understand correctly :
- the user has to choose the map object on which to compute the world file
- the computation depends on the current map extent, the current dpi and the page size

About the GUI integration, I am going to add a checkbox "generate a world file" with a combo box to select the map just below the "print as raster" checkbox.

The world file will be generated each time the composition is exported to an image file (if the checkbox is checked)

Please react if this does not seem correct to you.

#9 Updated by Giovanni Manghi almost 11 years ago

Hugo Mercier wrote:

So, if I understand correctly :
- the user has to choose the map object on which to compute the world file
- the computation depends on the current map extent, the current dpi and the page size

About the GUI integration, I am going to add a checkbox "generate a world file" with a combo box to select the map just below the "print as raster" checkbox.

The world file will be generated each time the composition is exported to an image file (if the checkbox is checked)

Please react if this does not seem correct to you.

seems correct to me!

#10 Updated by Paolo Cavallini almost 11 years ago

Agreed.

#11 Updated by Paolo Cavallini almost 11 years ago

Please note: if there is only one map in the layout, no choice should be requested.

#12 Updated by Hugo Mercier almost 11 years ago

Yes sure, if there is only one map in the layout, the combo box will only contain this one map and it will thus be automatically selected.

#13 Updated by Hugo Mercier almost 11 years ago

I've just pushed the changeset :
https://github.com/qgis/Quantum-GIS/pull/658

#14 Updated by Paolo Cavallini about 10 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

AFAIK, this has been implemented. Reopen if necessary.

Also available in: Atom PDF