internal virtual Dictionary<string, string> ToDictionary()
{
Dictionary<string, string> dic = new Dictionary<string, string>();
if (this.Bounds != Rectangle2D.Empty)
{
dic.Add("bounds", JsonHelper.FromRectangle2D(this.Bounds));
}
if (!string.IsNullOrEmpty(this.Dataset) && this.InterpolationAnalystType==InterpolationAnalystType.DATASET)
{
dic.Add("datasetName", this.Dataset);
}
if (this.MaxReturnRecordCount > 0 && this.InterpolationAnalystType == InterpolationAnalystType.DATASET)
{
dic.Add("maxReturnRecordCount", this.MaxReturnRecordCount.ToString(System.Globalization.CultureInfo.InvariantCulture));
}
if (this.FilterQueryParameter != null && this.InterpolationAnalystType == InterpolationAnalystType.DATASET)
{
dic.Add("filterQueryParameter", FilterParameter.ToJson(this.FilterQueryParameter));
}
if (!string.IsNullOrEmpty(this.OutputDataset))
{
dic.Add("outputDatasetName", this.OutputDataset);
}
if (!string.IsNullOrEmpty(this.OutputDataSource))
{
dic.Add("outputDatasourceName", this.OutputDataSource);
}
dic.Add("pixelFormat", this.PixelFormat.ToString());
dic.Add("resolution", this.Resolution.ToString(System.Globalization.CultureInfo.InvariantCulture));
dic.Add("searchRadius", this.SearchRadius.ToString(System.Globalization.CultureInfo.InvariantCulture));
if (!string.IsNullOrEmpty(ZValueFieldName))
{
dic.Add("zValueFieldName", this.ZValueFieldName);
}
if (this.InterpolationAnalystType == InterpolationAnalystType.GEOMETRY)
{
StringBuilder input = new StringBuilder();
input.Append("[");
for (int i = 0; i < InputPoints.Count; i++)
{
Point2D point = InputPoints[i];
var x = point.X.ToString(System.Globalization.CultureInfo.InvariantCulture);
var y = point.Y.ToString(System.Globalization.CultureInfo.InvariantCulture);
var z = Convert.ToDouble(point.Tag).ToString(System.Globalization.CultureInfo.InvariantCulture);
input.Append(JsonHelper.FromPoint2DWithTag(point, "z", true));
if (i != InputPoints.Count - 1)
input.Append(",");
}
input.Append("]");
dic.Add("inputPoints", input.ToString());
}
return dic;
}