geoserver的图层发布是基于Python写的,C#没有写出来(要是有大神写出来可以发我一份)。这个问题困扰了我很多天,终于在大神的帮助下解决了。
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace WpfApp1
{
class CurlLoad
{
public static void Get()
{
var rr = Guid.NewGuid().ToString();
string tmpFile = Path.GetTempPath() + "/curl_temp_" + rr + ".txt";
Process p = new Process();
p.StartInfo = new ProcessStartInfo();
p.StartInfo.FileName = "curl.exe";
string workspace = "tiff";
string fpname = "D:\\sixindexdata\\result\\tif\\NO2\\20191121\\NO2_2019112114.tif";
string layername = "NO2_2019112114";
string url = "