Guest User

Untitled

a guest
Dec 18th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. ogr2ogr --debug ON -f 'KML' ./areas_desarrollo_indigena_2017_03_07.kml PG:"host=localhost port=5432 dbname=mapserver user=postgres password=" -sql "SELECT * from ( SELECT ST_Intersection(datasrc.geom, polygon) as sharedPolygon, datasrc.* from ST_MakePolygon(ST_GeomFromText('LINESTRING(-69.02160644531251 -20.053351219365318,-69.78515625000001 -20.45789615504684,-69.09851074218751 -20.979392255760608,-69.02160644531251 -20.053351219365318)',4326)) as polygon,datasources.areas_desarrollo_indigena_2017_03_07_15 as datasrc) as sharedPolygon WHERE ST_IsEmpty(sharedPolygon)='false'"
  2.  
  3. docker run "geodata/gdal:2.1.3" ogr2ogr --debug ON -f 'KML' ./areas_desarrollo_indigena_2017_03_07.kml PG:"host=localhost port=5432 dbname=mapserver user=postgres password=" -sql "SELECT * from ( SELECT ST_Intersection(datasrc.geom, polygon) as sharedPolygon, datasrc.* from ST_MakePolygon(ST_GeomFromText('LINESTRING(-69.02160644531251 -20.053351219365318,-69.78515625000001 -20.45789615504684,-69.09851074218751 -20.979392255760608,-69.02160644531251 -20.053351219365318)',4326)) as polygon,datasources.areas_desarrollo_indigena_2017_03_07_15 as datasrc) as sharedPolygon WHERE ST_IsEmpty(sharedPolygon)='false'"
  4.  
  5. ERROR 1: PQconnectdb failed.
  6. could not connect to server: Connection refused
  7. Is the server running on host "localhost" (127.0.0.1) and accepting
  8. TCP/IP connections on port 5432?
  9. could not connect to server: Cannot assign requested address
  10. Is the server running on host "localhost" (::1) and accepting
  11. TCP/IP connections on port 5432?
  12.  
  13. FAILURE:
  14. Unable to open datasource `PG:host=localhost port=5432 dbname=mapserver user=postgres password=' with the following drivers.
Add Comment
Please, Sign In to add comment