ProjNet.CoordinateSystems.Projection.GetParameter C# (CSharp) Method

GetParameter() public method

Gets an indexed parameter of the projection.
public GetParameter ( int n ) : ProjectionParameter
n int Index of parameter
return ProjectionParameter
        public ProjectionParameter GetParameter(int n)
        {
            return _Parameters[n];
        }

Same methods

Projection::GetParameter ( string name ) : ProjectionParameter

Usage Example

Example #1
0
        /// <summary>
        /// Checks whether the values of this instance is equal to the values of another instance.
        /// Only parameters used for coordinate system are used for comparison.
        /// Name, abbreviation, authority, alias and remarks are ignored in the comparison.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>True if equal</returns>
        public override bool EqualParams(object obj)
        {
            if (!(obj is Projection))
            {
                return(false);
            }
            Projection proj = obj as Projection;

            if (proj.NumParameters != this.NumParameters)
            {
                return(false);
            }
            for (int i = 0; i < _parameters.Count; i++)
            {
                ProjectionParameter param = GetParameter(proj.GetParameter(i).Name);
                if (param == null)
                {
                    return(false);
                }
                if (param.Value != proj.GetParameter(i).Value)
                {
                    return(false);
                }
            }
            return(true);
        }