Subject: [Thuban-list] problems with postscript output

From: "Moritz Lennert" <[email-masked]>
Date: Wed, 10 Nov 2004 15:53:12 +0100 (CET)

Hello, I have some problems with postscript output of a thuban session.

Here you can see the thuban session:

http://moritz.homelinux.org/misc/map_thuban.png

and here you can see the resulting file print output:

http://moritz.homelinux.org/misc/map_ps.png

As you can see an important part of the 'secteurs statistiques' layer is
missing in the south.

Moritz

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Thu, 11 Nov 2004 21:43:23 +0100

Hi Moritz,

> As you can see an important part of the 'secteurs statistiques' layer is

not only that. Also missing is the legend which is usually at the
rigth-hand of the map.

I've tried to reproduce it with the Frida data (frida.intevation.org)
but I failed (ie. all is perfect).

Which version of Thuban are you using?
Which operating system?
Is it possible you send me the minimum data set that fails for you
so that I can try whether I can reproduce it then?

Best

	Jan
-- 
Jan-Oliver Wagner               http://intevation.de/~jan/

Intevation GmbH                      http://intevation.de/
FreeGIS                                http://freegis.org/

---

From: "Moritz Lennert" <[email-masked]>
Date: Fri, 12 Nov 2004 12:25:40 +0100 (CET)

> not only that. Also missing is the legend which is usually at the

No, that is because I cut out the map...

> Which version of Thuban are you using?

cvs from Nov. 10.

> Which operating system?

Debian GNU/Linux testing/unstable

> so that I can try whether I can reproduce it then?

I'll send it in a private mail.

Moritz

> _______________________________________________
> Thuban-list mailing list
> [email-masked]
> https://intevation.de/mailman/listinfo/thuban-list
>

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Fri, 12 Nov 2004 18:57:47 +0100

> No, that is because I cut out the map...

OK.

> I'll send it in a private mail.

I received the data from Moritz.
I can reproduce the problem.
However, for me there are missing fewer number of objects.
It might be equal to the number of point objects that
Moritz has in his screenshot (I got only the line data).
This makes me believe that the total number of objects has
some sort of limit. So that is the direction for further
investigations ...

Best

	Jan

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Sat, 13 Nov 2004 19:04:33 +0100

> some sort of limit. So that is the direction for further

So far I found out the number:
The shapefile has 22197 Shapes.
Only 21702 are drawn, then the routine stops.

The routine is
Thuban.UI.baserenderer.py (BaseRenderer.draw_shape_layer_incrementally)

Still I have no idea why it happens.

	Jan

---

From: Bernhard Reiter <[email-masked]>
Date: Mon, 15 Nov 2004 18:28:10 +0100

> > I can reproduce the problem.

I have an entry in the bug tracker for it:
	#2692
https://intevation.de/rt/webrt?serial_num=2692&display=History

---

From: Bernhard Herzog <[email-masked]>
Date: Fri, 26 Nov 2004 23:08:58 +0100

>> > I can reproduce the problem.

I have a potential fix.  See attached patch.  It's "potential" because
I'm not sure I understand the code involved well enough.  My excuse for
that is that I didn't write it myself and it's underdocumented and seems
at least at a first glance a bit too complicated for what it intends to
do and it's become quite late :)

> https://intevation.de/rt/webrt?serial_num=2692&display=History

I'll add a note about the patch.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/
Index: Thuban/UI/renderer.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/renderer.py,v
retrieving revision 1.50
diff -c -r1.50 renderer.py
*** Thuban/UI/renderer.py	17 Nov 2004 22:02:29 -0000	1.50
--- Thuban/UI/renderer.py	26 Nov 2004 21:55:15 -0000
***************
*** 264,269 ****
--- 264,270 ----
          self.shifty = (mmaxy - mminy)*0.5 - (ury - lly)*0.5
  
          self.offset = (offx+self.shiftx, offy+self.shifty)
+         self.region = (llx + self.shiftx, lly + self.shifty, urx, ury)
  
          # Draw the map
          self.dc.BeginDrawing()
Index: Thuban/UI/view.py
===================================================================
RCS file: /thubanrepository/thuban/Thuban/UI/view.py,v
retrieving revision 1.62
diff -c -r1.62 view.py
*** Thuban/UI/view.py	17 Feb 2004 13:14:49 -0000	1.62
--- Thuban/UI/view.py	26 Nov 2004 21:55:15 -0000
***************
*** 94,100 ****
          canvas_scale = self.canvas.scale
          x, y, width, height = self.region
          renderer = PrinterRenderer(dc, self.map, scale, offset,
!                                    region = (0, 0,
                                               (width/canvas_scale)*scale,
                                               (height/canvas_scale)*scale),
                                     resolution = resy,
--- 94,100 ----
          canvas_scale = self.canvas.scale
          x, y, width, height = self.region
          renderer = PrinterRenderer(dc, self.map, scale, offset,
!                                    region = (mapregion[0], mapregion[1],
                                               (width/canvas_scale)*scale,
                                               (height/canvas_scale)*scale),
                                     resolution = resy,

---

From: "Moritz Lennert" <[email-masked]>
Date: Sat, 27 Nov 2004 10:37:33 +0100 (CET)

> I'll add a note about the patch.

It seems to work here. All maps I've tried so far are printed to postscript
file completely now.

Thanks a lot !

Moritz