예제 #1
0
 public static string[] UploadTest()
 {
     string[] input = new string[3];
     //input[0] = "cd C:/Program Files/PostgreSQL/10/bin";
     input[1] = "set PGPASSWORD=Carnell2018";
     input[2] = @"shp2pgsql -s 27700 C:/Test/Chambert.shp Chambert | psql -U postgres -h localhost -p 5432 -d postgres";
     string[] output;
     return(output = KmCommandPrompt.RunCommands(input, true));
 }
예제 #2
0
 public static string[] UploadShapeFile(string fullPath, string password, string shpPath, string filename)
 {
     string[] input = new string[3];
     input[0] = "cd " + fullPath;
     input[1] = "set PGPASSWORD="******"shp2pgsql -s 27700 C:/Test/Chamber.shp Chamber | psql -U postgres -h localhost -p 5432 -d postgres";
     input[2] = @"shp2pgsql -s 27700 " + shpPath + " " + filename + " " + @"| psql -U postgres -h localhost -p 5432 -d postgres";
     string[] output;
     return(output = KmCommandPrompt.RunCommands(input, true));
 }