I currently have some scripts that use OGR2OGR to translate data form various source formats like ESRI Shapefile, GML etc to other file formats but especially to my PostGIS database.
My normal command would be:
ogr2ogr -f PostgreSQL PG:"pg conn settings" shapefile.shp
I now need to do this in a Node script so have installed the node gdal module (https://github.com/naturalatlas/node-gdal) which seems to have a lot of functionality of the GDAL library.
So I tried to use the example here to a least connect to my PostGIS database.
var connString = "PG: host=%s dbname=%s user=%s password=%s" %(databaseServer,databaseName,databaseUser,databasePW) var conn = gdal.open(connString)
However, I receive an error saying gdal.open expects a path.
Has anyone got examples of using Node GDAL for ogr2ogr translations or loading to PostGIS.