Andreas,<br><br>Segfaulting is a serious issue. Can you tell the version of GDAL you used?<br><br><div class="gmail_quote">On Wed, Sep 7, 2011 at 8:35 PM, Andreas Neumann <span dir="ltr"><<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">HI Jukka,<br>
<br>
Thank you for your thoughts. Yes, perhaps I should use update instead of append.<br>
<br>
I actually found out what the problem is:<br>
<br>
Tables or views that do not have an entry in public.geometry_columns (the postgis metadata table) cause the segmentation fault. Once the entry is there, it converts fine.<br>
<br>
Perhaps ogr2ogr could issue a warning or error message in this case instead of segfaulting. It would be nicer.<br>
<br>
Thanks again,<br><font color="#888888">
Andreas</font><div><div></div><div class="h5"><br>
<br>
On Wed, 7 Sep 2011 14:52:31 +0000 (UTC), Jukka Rahkonen wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Andreas Neumann <a.neumann <at> <a href="http://carto.net" target="_blank">carto.net</a>> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hi,<br>
<br>
I am converting several tables from Postgis to SpatiaLite using<br>
ogr2ogr.<br>
<br>
Here is my command:<br>
<br>
-----------<br>
ogr2ogr -append -lco LAUNDER=yes -lco SPATIAL_INDEX=yes -nln<br>
av_grenzpunkte -f SQLite uster.sqlite PG:"dbname='mydb' host='myserver'<br>
port='5432' user='username' password='pw' schemas=av_user<br>
tables=grenzpunkte(the_geom)"<br>
----------<br>
</blockquote>
<br>
Hi,<br>
<br>
I have used these options:<br>
<br>
-dsco SPATIALITE=yes<br>
-lco SPATIAL_INDEX=no<br>
and for polygon layers<br>
-nlt MULTIPOLYGON (Spatialite do not want polygons and multipolygons<br>
on the same<br>
layer, so let them be all multipolygons). Same with mixed lines/multilines if<br>
you may have those.<br>
<br>
-update is needed when adding new layers. Are you adding to an existing table<br>
because you have -append?<br>
<br>
Ogr2ogr does not create totally valid Spatialite databases. Therefore<br>
I skip the<br>
SPATIAL_INDEX because conversion is faster without. After ogr2ogr<br>
process I am<br>
cleaning the resulting database by copying the tables into a fresh Spatialite<br>
database with OpenLite tool <a href="http://www.gaia-gis.it/OpenLite/" target="_blank">http://www.gaia-gis.it/<u></u>OpenLite/</a><br>
<br>
-Jukka Rahkonen-<br>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote>
<br></div></div><div class="im">
-- <br>
--<br>
Andreas Neumann<br>
Böschacherstrasse 10A<br>
8624 Grüt (Gossau ZH)<br>
Switzerland<br>
______________________________<u></u>_________________<br></div><div><div></div><div class="h5">
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>