Subject: [Thuban-list] Some bugs on Mac OS X

From: Lorenzo Moretti <[email-masked]>
Date: Fri, 17 Dec 2004 17:13:22 +0100

I have built a Thuban for Mac OS X under Aqua 
(not Darwin) but there are some bugs.

See the screenshot at:
http://wwwamb.bologna.enea.it/forgrass/files/thuban_osx.jpg

- The bar (zoom in, zoom  out, etc) is missing 
(see the screenshot): I can only select these 
features from Map Menu (Mappa in Italian);

- if I select Info from Help menu (Aiuto in Italian) I have this error
Si è verificata una eccezione non prevista:
encode() argument 1 must be string, not None
(per piacere segnala l'errore a http://thuban.intevation.org/bugtracker.html)

Traceback (most recent call last):
   File 
"/usr/local/lib/thuban/Thuban/UI/mainwindow.py", 
line 284, in invoke_command
     command.Execute(self.Context())
   File "/usr/local/lib/thuban/Thuban/UI/command.py", line 121, in Execute
     apply(self.function, (context,) + self.args + args, kw)
   File 
"/usr/local/lib/thuban/Thuban/UI/mainwindow.py", 
line 1002, in call_method
     apply(getattr(context.mainwindow, methodname), args)
   File "/usr/local/lib/thuban/Thuban/UI/mainwindow.py", line 479, in About
     dlg = About(self)
   File "/usr/local/lib/thuban/Thuban/UI/about.py", line 40, in __init__
     developers = [ 'Jonathan Coles',
   File "/usr/local/lib/thuban/Thuban/UI/about.py", line 169, in unicodeToLocale
     return unicodeStr.encode(getlocale()[1])
TypeError: encode() argument 1 must be string, not None

- ImportAPR - this features is very good but I 
have many bugs in different apr. Example: I 
import project.apr and the first window is 
"Import APR - 3775 pbject loaded". I select OK 
and often I have this error:
Si è verificata una eccezione non prevista:
ODBBaseObject instance has no attribute 'GetThubanProp'
(per piacere segnala l'errore a http://thuban.intevation.org/bugtracker.html)

Traceback (most recent call last):
   File 
"/usr/local/lib/thuban/Thuban/UI/mainwindow.py", 
line 284, in invoke_command
     command.Execute(self.Context())
   File "/usr/local/lib/thuban/Thuban/UI/command.py", line 121, in Execute
     apply(self.function, (context,) + self.args + args, kw)
   File "/Users/ben/.thuban/importAPR.py", line 265, in import_apr_dialog
     prop = symbol.GetThubanProp()
AttributeError: ODBBaseObject instance has no attribute 'GetThubanProp'

Sometimes Thuban imports many maps (.shp) but it 
does not create thematic colored map like 
original apr file.

--------------------
Raster from GDAL
The external color for raster is black in OS X 
and it's not good for viewing or  printing.

Printing from Thuban.
The printing quality or PDF quality in Mac OS X 
is very poor. The lines are big like a screenshot.
Is this a OS X problem or Thuban-Wx-Python problem?

PRO for Thuban
---------------
It's very very fast in OS X for raster and vector formats.

TIA

Great work
-- 
________________________________________________________________________
||      Lorenzo Moretti        e-mail: [email-masked]     
||/|/|  ENEA prot/idr          Web: http://wwwamb.bologna.enea.it/    
||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (res.)
~~~~~~  40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
			Download GRASS for MAC OS X:    
	           http://wwwamb.bologna.enea.it/forgrass/
________________________________________________________________________

---

From: Jan-Oliver Wagner <[email-masked]>
Date: Fri, 17 Dec 2004 18:08:45 +0100

Hi Lorenzo,

thats the type of reports I am waiting for ;-)

Note: I do not have a ArcView I can play with.

Thus, sending me .apr files where you have specific
wishes helps me a lot.

If you do so, please send me only minimalistic .apr files
that contain the element you want to have improved.
Preferably using the iceland demo data of Thuban.

Best

	Jan

On Fri, Dec 17, 2004 at 05:13:22PM +0100, Lorenzo Moretti wrote:
> - ImportAPR - this features is very good but I have many bugs in different apr.
> Example: I import project.apr and the first window is "Import APR - 3775 pbject
> loaded". I select OK and often I have this error:
>   File "/usr/local/lib/thuban/Thuban/UI/mainwindow.py", line 284, in
> invoke_command
> Sometimes Thuban imports many maps (.shp) but it does not create thematic
> colored map like original apr file.

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

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

---

From: Bernhard Reiter <[email-masked]>
Date: Sun, 19 Dec 2004 11:57:18 +0100

Hi Lorenzo,

On Fri, Dec 17, 2004 at 05:13:22PM +0100, Lorenzo Moretti wrote:
>    I have built a Thuban for Mac OS X under Aqua (not Darwin) but there
>    are some bugs.

>    http://wwwamb.bologna.enea.it/forgrass/files/thuban_osx.jpg

It is good news that you have made it work!

This obviously mean I can close your report 
RT#2616 "Shape files are not displayed", can't I?  ;)
https://intevation.de/rt/webrt?serial_num=2616&display=History

Can you give use some details about the various version numbers?
Usually you would ust just copy and paste the about dialog information,
but as you report below, this does not seem to work for you. :(

>    - The bar (zoom in, zoom  out, etc) is missing (see the screenshot): I
>    can only select these features from Map Menu (Mappa in Italian);

Might be a wxWidgets problem, do you have similiar difficulties with 
the demo applications from wxWidgets? If yes, then they probably like
a bug report about this. If not, we need to get into the details.

>    (per piacere segnala l'errore a
>    http://thuban.intevation.org/bugtracker.html)
>      File "/usr/local/lib/thuban/Thuban/UI/mainwindow.py", line 1002, in
>    call_method

Somehow getlocale() does not return a locale.
Bernhard Herzog changed that code to use getdefaultlocale() two days ago.
You can try this:
	replace getlocale with getdefaultlocale in
		the import from locale line
		the unicodeStr.encode line

>    - ImportAPR - this features is very good but I have many bugs in

Note that: importapr is still experimental because we need feedback
from users and then fix the bugs as you can see from Jan's reply.

>    Raster from GDAL
> 
>    The external color for raster is black in OS X and it's not good for
>    viewing or  printing.

Can you submit a report to the tracker about the wish
to make the default raster color adjustable?

>    Printing from Thuban.
> 
>    The printing quality or PDF quality in Mac OS X is very poor. The
>    lines are big like a screenshot.
> 

This is a general Thuban issue dealing with the possibilities
of wx's device context drawing possibilities.

Actually we envision to build a printing pipeline for high quality printing
with Thuban and thus only have the direct print mechanism as a kind
of fallback as long as the printing queue is not ready or in situations
when it is not available.

So for high quality printing try the route via the Thuban-Map-Svg format.
This weekend I released the svgexport extension as stable 1.0.0;
it allows to to write out an svg file that you can use with any decent
vector drawing application to create a map for high quality printing.

Markus Rechtien did a prototype implementation during his Master thesis
about this printing pipeline which is based on my design concept 
of loosely couple components.

Markus wrote a couple of script for Skencil to really make dealing
with Thuban-Map-SVGs comfortable. Polishing and nicer publication
within the Skencil project is pending.

>    PRO for Thuban

Cool! 
What did you compare it with?

>    Great work

Thanks for taking the time evaluating Thuban and writing
down this helpful feedback.

	Bernhard

---

From: Bernhard Reiter <[email-masked]>
Date: Sun, 19 Dec 2004 12:11:38 +0100

> This obviously mean I can close your report 

[Sorry for the unusual high count of writing mistakes in my email,
I am typing over a slow line here, but this is no excuse. :( ]

> within the Skencil project is pending.

Forgot to write that you of course can use Skencil to make nice maps already.

To make a long story short:

	If you want to print a map with a higher quality,
	Use the Extension->Write SVG Legend and Write SVG Map menu commands
	to write two files to disc.

	Then use a stable Skencil, e.g. 0.6.16 
	and open one file and insert the second one
	to get a nice map 
	in which you can adapt symbols and layout for printing.

	Notes: 
	Don't be alarmed on a huge black rectangle, this might be
	a wrongly interpreated clippath box. Just delete it.

	The Skencil extension scripts for selection like:
	"Select same line and color" can very useful.

Bernhard
-- 
Professional Service around Free Software                (intevation.net)  
Experts for complex webmapping! In business since 1999:
	http://intevation.net/services/gis/webmapping.en.html

---

From: Lorenzo Moretti <[email-masked]>
Date: Mon, 20 Dec 2004 14:36:20 +0100

Hi Bernhard

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

Yes it's fixed
>a bug report about this. If not, we need to get into the details.

This is the problem in thuban but I have an idea.

I have seen the sample in WxPythonOSX and I check samples/pySketch

In terminal I enter:
% pythonw pysketch.pyw

and the program works with all icons inside the window.

Thuban usually run in Linux (GTK) and Windows 
system with menu in a floating window: in this 
window there are the icons (source mainwindow.py, 
I think). OS X is different: the menu is up not 
in a floating window and the icons are lost. 
These icons must to be in a floating window like 
a LEGEND (see LEGENDA window at 
http://wwwamb.bologna.enea.it/forgrass/files/thuban_osx.jpg). 
The source is in legend.py: the normal layer 
icons are there. If I select Zoom In from Map 
menu the icon is showed at the selected window 
but normally is hide.

>		the unicodeStr.encode line

This bug is fixed.

Now works: this is the config

Thuban 1.1 cvs-20041219
Currently using:
	wxPython 2.4.2.4
	Python 2.3.0
	PySQLite 0.5.1
	SQLite 2.8.15
	GDAL 1.2.5.0
	psycopg 1.1.14
Compiled for:
	GTK - not available
	proj 4.4.9
Extensions:
	None registered.

>to make the default raster color adjustable?

OK

>within the Skencil project is pending.

I have produced a Thuban SVG file: it's OK but 
the lines are very big, more than 1 point. OK I 
can change them in my vector program but perhaps 
it's possible to write a smaller size in SVG 
plugin.

>What did you compare it with?

I have seen other Free and Commercials sw and Thuban is faster.

>down this helpful feedback.

Thank for the product

||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (ris.)

---

From: Bernhard Reiter <[email-masked]>
Date: Mon, 20 Dec 2004 17:32:45 +0100

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

Okay, closed the report.

>    Thuban usually run in Linux (GTK) and Windows system with menu in a
>    floating window: in this window there are the icons (source
>    mainwindow.py, I think). OS X is different: the menu is up not in a
>    floating window and the icons are lost. These icons must to be in a
>    floating window like a LEGEND (see LEGENDA window at
>    http://wwwamb.bologna.enea.it/forgrass/files/thuban_osx.jpg). The
>    source is in legend.py: the normal layer icons are there. If I select
>    Zoom In from Map menu the icon is showed at the selected window but
>    normally is hide.

It is related to wxwidgets then, because the toolbar is not displayed
like in other ports (gtk, windows).
Hmmm, I think you should also submit a report about this problem.

>         GTK - not available

Obviously no GTK. ;)

>            None registered.

This is strange you should have a few Extensions.
Or how did you use svgexport? ;)

>    I have produced a Thuban SVG file: it's OK but the lines are very big,
>    more than 1 point. OK I can change them in my vector program but
>    perhaps it's possible to write a smaller size in SVG plugin.

Change the following line in Extensions/svgexport/svgmapwriter.py:
	            self.pen["stroke-width"] = pen.GetWidth()
You might even comment it out.

Best,
	Bernhard

---

From: Bernhard Reiter <[email-masked]>
Date: Thu, 23 Dec 2004 18:16:30 +0100

Sorry for the posts of Lorenzo appearing a few times.
I just fixed a problem with our mailinglist software, Lorenzo is innocent!