[postgis-users] WKT-saving instead of WKB
alex bodnaru
alexbodn at 012.net.il
Mon Jul 9 04:11:33 PDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
i can display this specific line with mezogis, the same i've sent to you
previously.
maybe some other software is incompatible with mezogis on your system.
alex
Daniela Stärke wrote:
> Hi everyone,
>
> I wanted to know if it is possible to save a geometry-column in a database immediately in WKT-format without converting it into WKB automatically.
> For instance when I insert the geometry-data I use the sql-command:
>
> insert into tablename ( id, x) values ( 'line', GeometryFromText ( 'LINESTRING (10 20, 20 30, 50 44)', -1));
>
>
> Then this coordinates are changed/saved in Well-Known-Binary (WKB), or??? But this changing/converting I don't want, because the program (mezogis), which I use to watch the content of the database crashes, when I want to open it.
>
> Which means I get these messages:
>
>
> Traceback (most recent call last):
> File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 291, in __goButton
> if self.runQuery(query) == True:
> File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 400, in runQuery
> self.showResults(cursor, query, layer, resultset, tablelist)
> File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_guicore.py", line 434, 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 524, in __createNewCanvas
> self.ctx = self.pixmap.cairo_create()
> cairo.Error: NULL pointer
>
>
> and then this, when I want to work with a SQL-command:
>
> SELECT * FROM "public"."geodatenpoint";
> Exception in thread Thread-14:
> Traceback (most recent call last):
> File "/usr/lib/python2.5/threading.py", line 460, in __bootstrap
> self.run()
> File "/usr/local/lib/python2.5/site-packages/mezoGISlib/_geodata.py", line 465, in run
> gtk.gdk.threads_leave()
> File "/usr/local/lib/python2.5/site-packages/GeoTypes/_Point.py", line 64, in __init__
> or a psycopg cursor."""
> ValueError: Second param to __init__ is not a %s
> or a psycopg cursor.
>
>
> I had the impression, that somehow mezogis couldn't convert the WKB back into a "well-known-text" format. Thats why I ask, if it is possible to make an explicit statement, that insert geometry-data is not saved in WKB.
>
>
>
> Thanks you for your help in advance
>
> Daniela
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQCVAwUBRpIX5NpwN1sq38njAQI3aAQAkKx6+P2VAf2ir1L13/5M1t8etS5rApZ8
Gu9IS62D8BEa+RRYyzQ5AKY0Cf9viucVE5cpzA82a9/DRT6S3taaZhkM9PuNyJCS
PfbwyUqK/1ziyRIbmwUDT4KrA/T4LVQliAxvD0xrWyGywhPUmH3FdfdFy5L5UV18
Rx9cW961tQU=
=LzJJ
-----END PGP SIGNATURE-----
More information about the postgis-users
mailing list