private void GenerateAbsoluteUrl(ThiessenAnalystParameters thiessenParams)
{
if (thiessenParams == null)
{
throw new ArgumentNullException("请求服务参数为空");
}
if (thiessenParams is DatasetThiessenAnalystParameters)
{
var datasetParams = (DatasetThiessenAnalystParameters)thiessenParams;
if (string.IsNullOrEmpty(datasetParams.DataSet))
{
throw new ArgumentNullException("数据集参数为空");
}
if (this.Url == null)
{
throw new InvalidOperationException(ExceptionStrings.InvalidUrl);
}
if (this.Url.EndsWith("/"))
{
this.Url += "datasets/" + datasetParams.DataSet + "/thiessenpolygon.json?debug=true&returnContent=true";
}
else
{
this.Url += "/datasets/" + datasetParams.DataSet + "/thiessenpolygon.json?debug=true&returnContent=true";
}
}
else if(thiessenParams is GeometryThiessenAnalystParameters)
{
var geometryParams = (GeometryThiessenAnalystParameters)thiessenParams;
if (this.Url.EndsWith("/"))
{
this.Url += "geometry/thiessenpolygon.json?debug=true&returnContent=true";
}
else
{
this.Url += "/geometry/thiessenpolygon.json?debug=true&returnContent=true";
}
}
}