Re: [Gdal-dev] SQLite problem
Hi all, I have change client and I have no more problems. Thank you for all. This is a great mailing list. Best regards, a P.S. the client is http://sqliteadmin.orbmu2k.de/ - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it -- View this message in context: http://www.nabble.com/SQLite-problem-tp20233548p20243956.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
[Gdal-dev] SQLite problem
Hi all, I have created a sqlite spatial db with ogr2ogr, starting from a simple shapefile. I'm able to read the proper info of this sqlite db with ogrinfo. If I add a column to this sqlite db inside the table where I have the WKT_GEOMETRY, ogrinfo is no more able to read properly this db. Is it possible to add a column to a sqlite spatial db without destroy the spatial component? I'm using SQLite Manager 0.3.15 for firefox to edit the db. I'm attaching the original sqlite file: http://www.nabble.com/file/p20233548/output1.sqlite output1.sqlite Thank you, Andrea - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it -- View this message in context: http://www.nabble.com/SQLite-problem-tp20233548p20233548.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
This must be a problem with your SQLite client. I used the sqlite3 console gui and did on your database: ALTER TABLE output ADD COLUMN newcolumn VARCHAR; ogrinfo was still working afterwards. Le Wednesday 29 October 2008 19:52:41 iomeneandrei, vous avez écrit : d a column to this sqlite db inside the table where I have the WKT_GEOMETRY, ogrinfo is no more able to read properly this db. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
iomeneandrei wrote: Hi all, I have created a sqlite spatial db with ogr2ogr, starting from a simple shapefile. I'm able to read the proper info of this sqlite db with ogrinfo. If I add a column to this sqlite db inside the table where I have the WKT_GEOMETRY, ogrinfo is no more able to read properly this db. Is it possible to add a column to a sqlite spatial db without destroy the spatial component? I'm using SQLite Manager 0.3.15 for firefox to edit the db. I'm attaching the original sqlite file: http://www.nabble.com/file/p20233548/output1.sqlite output1.sqlite Andrea, The file you referenced seems to work fine with my (trunk) ogrinfo. Can you provide an example that ogrinfo can't read? Generally, adding new columns to a spatial table should not cause problems for OGR. Best regards, -- ---+-- I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Programmer for Rent ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
Hi Frank, thank you very much. Frank Warmerdam-2 wrote: The file you referenced seems to work fine with my (trunk) ogrinfo. Can you provide an example that ogrinfo can't read? Generally, adding new columns to a spatial table should not cause problems for OGR. The file I have attache was the right one. I have used this query: ALTER TABLE main.output ADD COLUMN test VARCHAR And I have had the file I'm attaching now http://www.nabble.com/file/p20237327/output2.sqlite output2.sqlite . I'm not able to read it with ogrinfo. My sqlite client is this: https://addons.mozilla.org/en-US/firefox/addon/5817 Thank you, Andrea - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it -- View this message in context: http://www.nabble.com/SQLite-problem-tp20233548p20237327.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
I can read output2.sqlite with ogrinfo: INFO: Open of `output2.sqlite' using driver `SQLite' successful. Layer name: output Geometry: Point Feature Count: 2 Extent: (13.00, 38.00) - (13.50, 39.00) Layer SRS WKT: GEOGCS[WGS 84, DATUM[WGS_1984, SPHEROID[WGS 84,6378137,298.257223563, AUTHORITY[EPSG,7030]], AUTHORITY[EPSG,6326]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4326]] id: String (0.0) testo: String (0.0) xi: String (0.0) yi: String (0.0) test: String (0.0) OGRFeature(output):1 id (String) = 1 testo (String) = ciao xi (String) = 13.00 yi (String) = 38.00 test (String) = (null) POINT (13 38) OGRFeature(output):2 id (String) = 2 testo (String) = bau xi (String) = 13.50 yi (String) = 39.00 test (String) = (null) POINT (13.496 39.0) I believe having read somewhere that old versions of sqlite libraries didn't handle well changing the structure of a table after its creation. Is there any chance that your GDAL build links to an old sqlite library ? Le Wednesday 29 October 2008 23:39:19 iomeneandrei, vous avez écrit : Hi Frank, thank you very much. Frank Warmerdam-2 wrote: The file you referenced seems to work fine with my (trunk) ogrinfo. Can you provide an example that ogrinfo can't read? Generally, adding new columns to a spatial table should not cause problems for OGR. The file I have attache was the right one. I have used this query: ALTER TABLE main.output ADD COLUMN test VARCHAR And I have had the file I'm attaching now http://www.nabble.com/file/p20237327/output2.sqlite output2.sqlite . I'm not able to read it with ogrinfo. My sqlite client is this: https://addons.mozilla.org/en-US/firefox/addon/5817 Thank you, Andrea - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
Yes, see http://www.sqlite.org/lang_altertable.html You need SQLite 3.1.3 Le Wednesday 29 October 2008 23:44:37 Even Rouault, vous avez écrit : I can read output2.sqlite with ogrinfo: INFO: Open of `output2.sqlite' using driver `SQLite' successful. Layer name: output Geometry: Point Feature Count: 2 Extent: (13.00, 38.00) - (13.50, 39.00) Layer SRS WKT: GEOGCS[WGS 84, DATUM[WGS_1984, SPHEROID[WGS 84,6378137,298.257223563, AUTHORITY[EPSG,7030]], AUTHORITY[EPSG,6326]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.01745329251994328, AUTHORITY[EPSG,9122]], AUTHORITY[EPSG,4326]] id: String (0.0) testo: String (0.0) xi: String (0.0) yi: String (0.0) test: String (0.0) OGRFeature(output):1 id (String) = 1 testo (String) = ciao xi (String) = 13.00 yi (String) = 38.00 test (String) = (null) POINT (13 38) OGRFeature(output):2 id (String) = 2 testo (String) = bau xi (String) = 13.50 yi (String) = 39.00 test (String) = (null) POINT (13.496 39.0) I believe having read somewhere that old versions of sqlite libraries didn't handle well changing the structure of a table after its creation. Is there any chance that your GDAL build links to an old sqlite library ? Le Wednesday 29 October 2008 23:39:19 iomeneandrei, vous avez écrit : Hi Frank, thank you very much. Frank Warmerdam-2 wrote: The file you referenced seems to work fine with my (trunk) ogrinfo. Can you provide an example that ogrinfo can't read? Generally, adding new columns to a spatial table should not cause problems for OGR. The file I have attache was the right one. I have used this query: ALTER TABLE main.output ADD COLUMN test VARCHAR And I have had the file I'm attaching now http://www.nabble.com/file/p20237327/output2.sqlite output2.sqlite . I'm not able to read it with ogrinfo. My sqlite client is this: https://addons.mozilla.org/en-US/firefox/addon/5817 Thank you, Andrea - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [Gdal-dev] SQLite problem
Hi Even, Even Rouault wrote: Yes, see http://www.sqlite.org/lang_altertable.html You need SQLite 3.1.3 to build my sqlite spatial db I use ogr2ogr utility I have in the lates fwtools for windows. The same for ogrinfo. Whit this I have: FAILURE: Unable to open datasource `C:\output2.sqlite How is it possible to have sqlite 3.1.3 inside fwtools? Thank you for all, Andrea - Andrea Borruso email: [EMAIL PROTECTED] blog: http://blog.spaziogis.it -- View this message in context: http://www.nabble.com/SQLite-problem-tp20233548p20237748.html Sent from the GDAL - Dev mailing list archive at Nabble.com. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev