1

Is there a posibility to align the edges of an polygon (in my case these edges are also the total extents of the layer) to the edges of the map item? I want to keep the specific page dimensions.

enter image description here

edit: I was trying around a while and found a kind of solution: there is an command called Export map as PDF in the "Project" Menu tab. There you can set the extent from a layer of your choice. This exported all active layers in my main canvas to the given extent. Not exactly what I was looking for but in this case it worked fine for me.

  • Welcome to GIS SE! As a new user, please be sure to take the short tour to learn about this site's focused Q&A format. – Andy Jan 27 at 23:08
1

First, zoom to that layer in the main canvas:

zoom-to-layer

Then, Set Map Extent to Match Main Canvas Extent in the Map Item Properties:

set-map-extent


UPDATE:

In QGIS 2.18 and 3.4, that button is located in the Extents section, with the name Set to map canvas extent.

3-4-3

  • unfortunately I cant find the "Set Map Extent to Match Main Canvas Extent" command in my version of QGIS (3.4.4). Also could not find it in the documentation. How did you get these Icon menu bar to your item properties panel? – Woidfeeee Jan 28 at 15:33
  • Sorry, I was using the master version (3.5.0), without noticing that those buttons were exclusive to that version. In versions 2.18 and 3.4, it is found in the Extents section of the _Map Item, with the name Set to map canvas extent. – Gabriel De Luca Jan 28 at 16:08
1

Yes, If your X,Y page dimensions are a parallel ratio of layer extents X,Y. For example, if your page dimension is 30X40cm and you have a 3km by 4km layer just grab the image's boundaries using select/move item too, then align it with your page edges, then find the suitable scale (1:10000 for our example) to fill the page under the "Item properties" tab in the right side of the screen.

If they are not ratios, try to use different raster manipulation softwares like GIMP or PHOTOSHOP to do that but keep in mind that your input layer will stretch or crush and will not represent the true extents of the original layer.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.