D 2012-11-03T16:22:31.697 L VirtualOGR U sandro W 6945
Step #1 we'll start loading libgdal as a dynamical extension to SQLite; if we were on Windows we obviously had to load a file named libgdal.dll (or something like; it usually depends on packagers choices) |
![]() |
Step #2 now we'll try to connect a PostGIS table l09, located in the schema merano of the databases gis
|
![]() |
Step #3 just a simple test query to check if anything works as expected |
![]() |
Step #4 we'll now check the Geometry-Type and SRID of geometries contained into the PostGIS table. For some odd reason the SRID is reported as -1 (undefined); anyway a direct query on PostGIS reports SRID=25832 (Could be I've missed to set some magic argument into the connection string ?) |
![]() |
Step #5 now we'll create a genuine SpatiaLite own table |
![]() |
Step #6 we'll then add a Geometry column to the previously created table |
![]() |
Step #7 and finally we'll create a Spatial Index on this geometry column |
![]() |
Step #8 now we simply have to execute a very trivial INSERT INTO ... SELECT SQL statement, and the whole table will be directly imported into SpatiaLite from PostGIS |
![]() |
Step #9 end of the story: now we simply have to disconnect the PostGIS table and we've completely finished our job with full success. Really amazingas simple as drinking a glass of water !!! |
![]() |