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.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Jul 27, 2015 at 11:04
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. Commented Jul 27, 2015 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? Commented Jul 28, 2015 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. Commented Jul 29, 2015 at 20:08

1 Answer 1

0

The Issue was resolved with a fresh installation of OSGeo

answered Aug 3, 2015 at 12:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.