<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have to complain that gvSIG 1.10 seems not to work properly with PostgreSQL/PostGIS at all! I’ve tested it with the versions:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">Windows 7 professional, 64bit <br>
gvSIG 1.10 <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><br>
PostgreSQL 9.0.2-1, compiled by Visual C++ build 1500, 32-bit <br>
PostGIS 1.5.2<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">as well as<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">PostgreSQL 8.4.6-1, compiled by Visual C++ build 1400, 32-bit
<br>
PostGIS 1.4.2<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">and<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">PostGIS 1.5.2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Whenever I try to export a vector layer to PostGIS the following error is issued:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";color:red">null</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
<span style="color:maroon">java.lang.IllegalStateException: Can't overwrite cause<br>
java.lang.Throwable.initCause(Throwable.java:320)<br>
com.iver.cit.gvsig.exceptions.visitors.ProcessWriterVisitorException.(ProcessWriterVisitorException.java:11)<br>
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGISWriter.process(PostGISWriter.java:192)<br>
com.iver.cit.gvsig.ExportTo$WriterTask.run(ExportTo.java:200)<br>
com.iver.andami.PluginServices$1.construct(PluginServices.java:405)<br>
com.iver.utiles.swing.threads.SwingWorker$2.run(SwingWorker.java:108)<br>
java.lang.Thread.run(Unknown Source)<br>
</span><span style="color:red">null</span><span style="color:maroon"><br>
java.lang.IllegalStateException: Can't overwrite cause<br>
java.lang.Throwable.initCause(Throwable.java:320)<br>
com.iver.cit.gvsig.exceptions.visitors.ProcessWriterVisitorException.(ProcessWriterVisitorException.java:11)<br>
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGISWriter.process(PostGISWriter.java:192)<br>
com.iver.cit.gvsig.ExportTo$WriterTask.run(ExportTo.java:200)<br>
com.iver.andami.PluginServices$1.construct(PluginServices.java:405)<br>
com.iver.utiles.swing.threads.SwingWorker$2.run(SwingWorker.java:108)<br>
java.lang.Thread.run(Unknown Source)</span><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The result is that the table and the attributes are created, but no data gets imported! This is due to “\” –characters being content in some (text field) attributes. When removing these “\”-characters the export works. However – the spatial
reference (EPSG:32767) is lost, so the result is of no use in the project.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Using the shapefile to postgis plugin to import an existing shapefile into PostGIS gives a better result: The “\”-characters are kept and also the spacial reference (EPSG:32767) is set properly. This table seems to be fine when used as
layer in gvSIG.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But finally – in any case - if I export a shapefile- or postgis-layer to another shapefile, again the spacial reference is not being set properly there (as in the previous case, it claims to be EPSG:32767, but the coordinates refer to some
indefinite values…).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I will continue experimenting around the PostGIS interface. Since I’m a gvSIG user only (not a gvSIG developer), I see much work left for some bug fixing! I’m not sure if I can use the current gvSIG release in production, as I’m facing
several other unresolved issues which I also posted here, too. Sorry for saying this..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Klaus Schäfer<o:p></o:p></p>
<p class="MsoNormal">Advisor Regional Administrative Secretariat, Water Sector<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">GIZ Tanzania | German Development Cooperation<o:p></o:p></p>
<p class="MsoNormal">P.O. BOX 324 | Moshi, Kilimanjaro Region, Tanzania<o:p></o:p></p>
<p class="MsoNormal">Mobile: +255 (767) 500 892<o:p></o:p></p>
<p class="MsoNormal">klaus.schaefer4@giz.de | www.giz.de<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<hr>
<font face="Arial" color="Black" size="1">Deutsche Gesellschaft fuer Internationale Zusammenarbeit (GIZ) GmbH;<br>
Sitz der Gesellschaft/Registered Office: Bonn und/and Eschborn, Germany;<br>
Handelsregister/Registered at: Amtsgericht Bonn, Germany, HRB 18384, Amtsgericht Frankfurt am Main, Germany, HRB 12394;<br>
USt-IdNr./VAT ID no.: DE 113891176;<br>
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Hans-Juergen Beerfeltz, Staatssekretaer/State Secretary;<br>
Vorstandssprecher/Chairman of the Management Board: Dr. Bernd Eisenblaetter;<br>
Vorstand/Management Board: Dr. Christoph Beier, Adolf Kloke-Lesch, Tom Paetz, Dr. Sebastian Paust, Dr. Hans-Joachim Preuss, Dr. Juergen Wilhelm<br>
</font>
</body>
</html>