0

I am trying to import a very large sqlite file into Postgres SQL 9.3.

The first tool I tried to use was OGR2GUI (http://www.ogr2gui.ca/). The 64 Bit version does nothing, whilst the 32 bit version says

  • unable to open ogr2ogr !

I have tried running org2ogr from the command line too, I have tried:

ogr2ogr --config SQLITE_LIST_ALL_TABLES YES -f "PostgreSQL" PG:"dbname='mydatabaseName' active_schema=myschema schemas=public host='localhost' port='myportnumber' user='myusername' password='mypassword' " -overwrite -lco SCHEMA=myschema -lco GEOMETRY_NAME=geometry -lco SPATIAL_INDEX=YES myfilename.sqlite  myfilename

ogr2ogr -f "PostgreSQL" PG:"dbname=mydatabaseName" myfilename.sqlite myfilename

ogr2ogr -f PostgreSQL PG:"host=localhost user=myusername password=mypassword dbname=mydatabaseName" -lco LAUNDER="YES" myfilename.sqlite -skipfailures

And various iterations on these, each time I get:

Unable to open datasource'myfilename.sqlite' with the following drivers
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> GMT
  -> WAsP
  -> PostgreSQL
  -> PCIDSK
  -> OpenFileGDB
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> PGDump
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> PDS
  -> HTF
  -> AeronavFAA
 -> EDIGEO
 -> SVG
 -> Idrisi
 -> ARCGEN
 -> SEGUKOOA
 -> SEGY
 -> PDF
 -> SXF

Of course sqlite is not on this list, but how can I add it?

I have tried running osgeo set-up, but there is no option I can find to add it.

3
  • 1
    i suppose that you are using Windows. In that case you can use the binaries from gisinternals.com/sdk. They are compiled with SQLite and Spatialite. – user30184 Jul 27 '15 at 14:20
  • Thanks, I am having a look, but I have not added binaries before, is there a guide anywhere for adding new binaries to OGR2OGR? – Mart Jul 28 '15 at 10:18
  • Ogr2ogr is a compiled binary itself and the gisinternals binaries include ogr2ogr. Use them as ís and you should be fine. With OSGeo4W setup sqlite and spatialite libraries are selected from the "lib" part of advanced setup. – user30184 Jul 29 '15 at 20:08
0

The Issue was resolved with a fresh installation of OSGeo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.