Beispiel #1
0
        protected string FormatAreaComparison(double value0, string compare, double value1,
                                              ISpatialReference sr)
        {
            double f  = FormatUtils.GetLengthUnitFactor(sr, _lengthUnit, ReferenceScale);
            double v0 = f * f * value0;
            double v1 = f * f * value1;

            string format = FormatUtils.CompareFormat(v0, compare, v1, NumberFormat);

            return(string.Format("{0} {1} {2}",
                                 FormatArea(v0, format), compare,
                                 FormatArea(v1, format)));
        }
Beispiel #2
0
        protected string FormatLengthComparison(double value0, string compare,
                                                double value1,
                                                ISpatialReference sr,
                                                string expressionFormat)
        {
            esriUnits lengthUnit     = _lengthUnit;
            double    referenceScale = ReferenceScale;
            string    numberFormat   = NumberFormat;
            double    f = FormatUtils.GetLengthUnitFactor(sr, lengthUnit, referenceScale);

            double v0 = f * value0;
            double v1 = f * value1;

            string compareFormat = FormatUtils.CompareFormat(v0, compare, v1, numberFormat);
            string result        = string.Format(expressionFormat,
                                                 FormatLength(v0, compareFormat),
                                                 compare,
                                                 FormatLength(v1, compareFormat));

            return(result);
        }
Beispiel #3
0
        protected string FormatArea(double area, ISpatialReference sr)
        {
            double f = FormatUtils.GetLengthUnitFactor(sr, _lengthUnit, ReferenceScale);

            return(FormatArea(f * f * area, NumberFormat));
        }