public static EnvelopeN InitializeEnvelope(EnvelopeN baseEnv, Extent bbox) { EnvelopeN result; try { EnvelopeN envelopeN; if (baseEnv == null) { envelopeN = baseEnv; } else { envelopeN = new EnvelopeN(); } envelopeN.XMin = bbox.XMin.Value; envelopeN.XMax = bbox.XMax.Value; envelopeN.YMin = bbox.YMin.Value; envelopeN.YMax = bbox.YMax.Value; envelopeN.SpatialReference = AGSSpatialReference.SpRefFromString(bbox.SpatialReference); result = envelopeN; } catch { result = baseEnv; } return(result); }
public override ITask GetExportTask(AGSExportOptions eo, HiddenUpdateForm form) { string arg = base.Parent.URL + "/" + base.FullName + "/ImageServer/exportImage"; StringBuilder arg2 = this.BuildURIRequest(eo); string requestURL = arg + arg2; return(new UpdateRasterImageTask(base.Parent) { RequestURL = requestURL, UpdateForm = form, OutputFile = eo.OutputFile, OutputSpatialReference = AGSSpatialReference.SpRefFromString(eo.OutputWKT) }); }