using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Net;
|
using System.Net.Http;
|
using System.Threading;
|
using System.Web.Http;
|
using Turf.cs;
|
|
namespace Turf.Controllers
|
{
|
public class AiController : ApiController
|
{
|
[HttpPost]
|
[Route("footprint/predict/2")]
|
[Route("riverface/predict/2")]
|
[Route("roadface/predict/2")]
|
[Route("woodland/predict/2")]
|
public R<Result> footprint([FromBody]Args args)
|
{
|
try
|
{
|
if (null == args || string.IsNullOrEmpty(args.data_dir))
|
{
|
return new R<Result>(2, "Sorry, the parameter is wrong");
|
}
|
|
Thread.Sleep(7000);
|
Result rs = new Result();
|
|
return new R<Result>(0, "ok", rs);
|
}
|
catch (Exception ex)
|
{
|
return new R<Result>(5, ex.Message);
|
}
|
}
|
}
|
}
|