Пример #1
0
 public CRSInfo(string auth_name, string code, string name, CRSType type, bool deprecated, bool bbox_valid, double west_lon_degree, double south_lat_degree, double east_lon_degree, double north_lat_degree, string area_name, string projection_method) : this(OsrPINVOKE.new_CRSInfo(auth_name, code, name, (int)type, deprecated, bbox_valid, west_lon_degree, south_lat_degree, east_lon_degree, north_lat_degree, area_name, projection_method), true, null)
 {
     if (OsrPINVOKE.SWIGPendingException.Pending)
     {
         throw OsrPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #2
0
        public static CRSType OSRCRSInfo_type_get(CRSInfo crsInfo)
        {
            CRSType ret = (CRSType)OsrPINVOKE.OSRCRSInfo_type_get(CRSInfo.getCPtr(crsInfo));

            if (OsrPINVOKE.SWIGPendingException.Pending)
            {
                throw OsrPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Пример #3
0
        /// <summary>
        /// Writes the JSON representation of the object.
        /// </summary>
        /// <param name="writer">The <see cref="T:Newtonsoft.Json.JsonWriter" /> to write to.</param>
        /// <param name="value">The value.</param>
        /// <param name="serializer">The calling serializer.</param>
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            CRSType crsType = (CRSType)value;

            switch (crsType)
            {
            case CRSType.Link:
                writer.WriteValue("link");
                break;

            case CRSType.Name:
                writer.WriteValue("name");
                break;

            default:
                writer.WriteValue(value.ToString());
                break;
            }
        }