Memory overflow - Print Composer resources?

Moderators: Uros, OXO, JBr

Post Reply
safemode
Posts: 1
Joined: Sun Mar 10, 2013 5:16 pm

Memory overflow - Print Composer resources?

Post by safemode » Mon May 21, 2018 11:08 pm

Hi.
My landscape is 3x3 in tiles.
Unfortunatelly when Im trying to export mask.png in QGIS Print Composer with 24576x24576 px dimentions I have "memory overflow" warning and no file is generated.
Is 16 Gs of RAM for Win7 not enough?
Highest parameters I can generate is 16377x16377.
Do I need more?
Br.

User avatar
Tomkin
Posts: 33
Joined: Sun Mar 08, 2009 6:24 pm

Re: Memory overflow - Print Composer resources?

Post by Tomkin » Mon Dec 31, 2018 5:07 pm

This is exactly what happens to me now.
Found this old Question when i was searching the forum, but no answer.
How to solve this? I have 16GB of Memory, Enough SSD Space and CPU Power!
You do not have the required permissions to view the files attached to this post.
CU in Air

Tomkin

User avatar
JBr
Posts: 498
Joined: Tue Feb 28, 2006 11:33 am

Re: Memory overflow - Print Composer resources?

Post by JBr » Mon Dec 31, 2018 8:37 pm

You have to do it per partes. 2x2 is the largest I was able to export, so you need to partition your area and do it by 2x2 pieces. Or come with some other more clever and effective way :) This was the best I could come up with when writing the guide.
Image

User avatar
Tomkin
Posts: 33
Joined: Sun Mar 08, 2009 6:24 pm

Re: Memory overflow - Print Composer resources?

Post by Tomkin » Tue Jan 01, 2019 1:20 am

Happy New Year :-) !

Thats a little bit, lets say dissapointing. I understood the guide in a way that the 2x2 Tile Setup is a suggestion for Beginners and
not a Limitation. So i spend more than 25 hours to come to the point thats says, thanks for all and now delete your crap.

So i Beginn fresh from the start.
CU in Air

Tomkin

User avatar
JBr
Posts: 498
Joined: Tue Feb 28, 2006 11:33 am

Re: Memory overflow - Print Composer resources?

Post by JBr » Tue Jan 01, 2019 1:50 am

Well, the guide was never supposed to be about textures. Those should be prepared by each author themself to his/her best likiing. But since I wanted to give a walkthrough example of how to make a simple scenery, I had to deal with the textures too. Basically, I had two choices: I could either provide some finished textures as bitmaps or describe a process how to make them. My choice was the latter. But it was never supposed to be the official and only way how to do it.

You don't need to scrap anything, you just have to invest some time. Don't expect to have everything done in an hour. Large landscapes can easily take huge amounts of time to make. For example CW-B by Cadfael, which will be released today, took more than one year of daily work to make and 99% of this time was spent on making textures, placing objects and making water/forest maps.
Image

User avatar
Tomkin
Posts: 33
Joined: Sun Mar 08, 2009 6:24 pm

Re: Memory overflow - Print Composer resources?

Post by Tomkin » Tue Jan 01, 2019 3:03 am

So it is possible to merge scenery parts together and they work as one large scenery?
Excuse me if this sounds as im a complete Moron, but how can this work when more thean 2 x 2 tiles
could not be composed? Maybe its far to late now, it's 3 AM and i need some sleep.
Good Night!
CU in Air

Tomkin

User avatar
JBr
Posts: 498
Joined: Tue Feb 28, 2006 11:33 am

Re: Memory overflow - Print Composer resources?

Post by JBr » Tue Jan 01, 2019 10:59 am

If you have a larger terrain, just export it (as long as it it complies with all requirements, ie. dimensions are multiples of 23040 m). Composer is only used to export "masks" for textures in my tutorial. It doesn't in any way influence the actual terrain. If you'd want to use photoreal textures, you wouldn't be using it at all.

I don't know the dimensions of your landscape, so, for example let's assume a simple 4x4 landscape...

The tiles in such landscape would be organized in a 4x4 matrix as follows:
grid.jpg
Since 2x2 is the largest area Composer is able to handle, masks for each 2x2 submatrix would have to be processed separately in the Composer. As you have to specify extents of the part of the map that is used in the Composer, it is actually fairly easy to do so, it just takes time. When making the landscape, have to know UTM coordinates of at least one corner, let's assume you've been working with the the top left corner coordinates the whole time. Then, XYmin and XYmax values for extents of each submatrix can be calculated simply by adding/subtracting 46080 to/from the corner coordinates. Again, let's assume some values for our 4x4 example:

Top left coordinates: easting (X) 500000, northing (Y) 5500000

Bottom right coordinates (you don't need them, but let's have them now for verification of results): easting 592160, northing 5407840

Now, let's calculate (be careful, Composer uses bottom left XYmin, top right XYmax coordinates of the area):

Yellow submatrix

Xmin = 500000
Ymin = 5500000 - 2*23040 = 5453920
Xmax = 500000 + 2*23040 = 546080
Ymax = 5500000

Green submatrix

Xmin = 500000 + 2*23040 = 546080
Ymin = 5500000 - 2*23040 = 5453920
Xmax = 500000 + 4*23040 = 592160
Ymax = 5500000

Orange submatrix

Xmin = 500000
Ymin = 5500000 - 4*23040 = 5407840
Xmax = 500000 + 2*23040 = 546080
Ymax = 5500000 - 2*23040 = 5453920

Blue submatrix

Xmin = 500000 + 2*23040 = 546080
Ymin = 5500000 - 4*23040 = 5407840
Xmax = 500000 + 4*23040 = 592160
Ymax = 5500000 - 2*23040 = 5453920

The blue matrix bottom right coordinates (Xmax, Ymin) are 592160, 5407840 and they are the same as the bottom right coordinates of the whole landscape, so are calculations are correct.

This way you can calculate coordinates for all the submatrices you need and export masks one submatrix by one. You can make a spreadsheet with formulas for subtracting/adding so you don't have to calculate it yourself.
You do not have the required permissions to view the files attached to this post.
Image

User avatar
maymar
Posts: 727
Joined: Thu Dec 01, 2005 2:00 pm
Location: Leszno -> Warsaw (Poland)
Contact:

Re: Memory overflow - Print Composer resources?

Post by maymar » Tue Jan 01, 2019 12:24 pm

JBr wrote:
Tue Jan 01, 2019 10:59 am
You can make a spreadsheet with formulas for subtracting/adding so you don't have to calculate it yourself.
here's example of spreadsheet for my scenery (10x12 tiles)
SWPoland-tilsy-xls.png
You do not have the required permissions to view the files attached to this post.

User avatar
Tomkin
Posts: 33
Joined: Sun Mar 08, 2009 6:24 pm

Re: Memory overflow - Print Composer resources?

Post by Tomkin » Tue Jan 01, 2019 12:28 pm

Ok, thanks s far.
I will try it next time.
Now i began from scratch wit a 2x2 tile Version just to see how it works. :oops:
If I'm more familiar with it i will do the next step and try build a bigger Landscape. :D
Thanks for your patience an support.
CU in Air

Tomkin

Post Reply