GTK-Warning when trying to open a map of geodata from a database.



Hi everyone,

when I want to open a database with geometry data in it with the program MezoGis I receive the following GTK-Warning:

/usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py:530: GtkWarning: Using Cairo rendering requires the drawable argument to
have a specified colormap. All windows have a colormap,
however, pixmaps only have colormap by default if they
were created with a non-NULL window argument. Otherwise
a colormap must be set on them with gdk_drawable_set_colormap
  self.ctx = self.pixmap.cairo_create() 
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_pane_db.py", line 537, in __on_doubleclick
    self.pgbutler.runQuery('SELECT * FROM %s'%table.getSQL())
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 412, in runQuery
    self.showResults(cursor, query, layer, resultset, tablelist)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 446, in showResults
    mapview = openMapView(layer.resultset)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guiwindows.py", line 33, in openMapView
    m = MapWindow(resultset)
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guiwindows.py", line 139, in __init__
    self.canvas = MapCanvas()
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py", line 86, in __init__
    self.__createNewCanvas()
  File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_canvas.py", line 530, in __createNewCanvas
    self.ctx = self.pixmap.cairo_create() 
cairo.Error: NULL pointer

A mapframe is also created, but somehow there is no content in it or nothing is shown on/in the map.
I am nearly for 100% sure, that there is no mistake in my geometry data, because the extend is correct initialized, when I start the database.

Has anyone an idea, what I could do??? I am totally desperate, because the program will not work.


 In the source code I made some print-commands, to see how far the program goes and there I saw, that mezogis goes in the file _canvas.py and also in the function " def __createNewCanvas(self): ". But then, when mezogis should show the extend (with a print command) of the table, I get height: 1 and width: 1. And this can't be right, because my database is filled with geodata of the world, and this extend can't be just 1.

Something must be wrong with the line:

aw = self.mapframe.get_allocation()
because afterwards the height and width is set, and with print I get the extend of 1, like I said.
The get_allocation command is a method of python, or what does it do???  I ask, because in no other file this method is used (ok, just in one of _guiwindows.py, but there, the line is commented out).

When I use the SQL-command (Select * from "public"."dbname" )to show me the content of the database I get the messages which I wrote above.
The program is able to show all data in a table, except from the geometry-column. But actually I wanted a map created, which looks like a worldmap and with which I could work, but without mezogis is quit useless for me.

Also with a database of randomized created geometry data I have the same problem.

I forgot to say, that I work on a SuSe Linux 10.2 distribution.

Thank you very much in advance for your help.

Daniela
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]