I am, trying to export GeoJSON from postgis. I am using the following code which is working local machine but when I am trying to use this in a server the following error is occuring
CODE:
ogr2ogr -progress -f GeoJSON landuse_gen0.geojson -t_srs EPSG:4326 "PG:host=localhost port=5432 dbname=database user=usernbame password=Password" -sql "SELECT way, way_area AS area, COALESCE(landuse, leisure, 'natural', highway, amenity, tourism) AS type FROM planet_osm_polygon WHERE way_area > 100000 ORDER BY way_area DESC"
ERROR:
FAILURE:
Unable to open datasource `PG:host=localhost port=5432 dbname=database user=usernbame password=Password' with the following drivers.
-> `PCIDSK'
-> `PDF'
-> `ESRI Shapefile'
-> `MapInfo File'
-> `UK .NTF'
-> `OGR_SDTS'
-> `S57'
-> `DGN'
-> `OGR_VRT'
-> `REC'
-> `Memory'
-> `BNA'
-> `CSV'
-> `GML'
-> `GPX'
-> `KML'
-> `GeoJSON'
-> `ESRIJSON'
-> `TopoJSON'
-> `OGR_GMT'
-> `WAsP'
-> `OpenFileGDB'
-> `XPlane'
-> `DXF'
-> `CAD'
-> `Geoconcept'
-> `GeoRSS'
-> `GPSTrackMaker'
-> `PGDUMP'
-> `GPSBabel'
-> `SUA'
-> `OpenAir'
-> `OGR_PDS'
-> `HTF'
-> `AeronavFAA'
-> `EDIGEO'
-> `SVG'
-> `Idrisi'
-> `ARCGEN'
-> `SEGUKOOA'
-> `SEGY'
-> `ODS'
-> `XLSX'
-> `SXF'
-> `Selafin'
-> `JML'
-> `VDV'
-> `MVT'
-> `TIGER'
-> `AVCBin'
-> `AVCE00'