/// <summary> /// Initializes a new instance of the <see cref="GribBox"/> class. /// </summary> /// <param name="msgHandle">The MSG handle.</param> /// <param name="nw">The nw.</param> /// <param name="se">The se.</param> public GribBox(GribHandle msgHandle, GeoCoordinate nw, GeoCoordinate se) { int err; var box = GribApiProxy.GribBoxNew(msgHandle, out err); if (err != 0) { throw GribApiException.Create(err); } var pts = GribApiProxy.GribBoxGetPoints(box, nw.Latitude, nw.Longitude, se.Latitude, se.Longitude, out err); if (err != 0) { throw GribApiException.Create(err); } _points = new GribPoints(SWIGTYPE_p_grib_points.getCPtr(pts).Handle, false); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_grib_points obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public static void GribPointsGetValues(GribHandle h, SWIGTYPE_p_grib_points points, out double val) { int ret = GribApiProxyPINVOKE.GribPointsGetValues(h.Reference, SWIGTYPE_p_grib_points.getCPtr(points), out val); if (ret != 0) { throw Grib.Api.Interop.GribApiException.Create(ret); } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_grib_points obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }