48 double meters_per_deg;
54 if (ulc_lat_dd > 90.0 || ulc_lat_dd < -90.0)
56 if (lrc_lat_dd > 90.0 || lrc_lat_dd < -90.0)
58 if (ulc_lat_dd < lrc_lat_dd)
62 if (ulc_lon_dd > 180.0 || ulc_lon_dd < -180.0)
64 if (lrc_lon_dd > 180.0 || lrc_lon_dd < -180.0)
68 lat_extent_dd = ulc_lat_dd - lrc_lat_dd;
69 rgn.
geo.
ctr.
lat = ulc_lat_dd - lat_extent_dd / 2.0;
70 if (ulc_lon_dd > lrc_lon_dd) {
71 lon_extent_dd = 360 + lrc_lon_dd - ulc_lon_dd;
73 lon_extent_dd = lrc_lon_dd - ulc_lon_dd;
75 rgn.
geo.
ctr.
lon = ulc_lon_dd + lon_extent_dd / 2.0;
81 meters_per_deg = 111319.54315;
82 rgn.
hextent.
xlat = lat_extent_dd * meters_per_deg / 2.0;
83 rgn.
hextent.
ylon = lon_extent_dd * meters_per_deg / 2.0;
#define MTK_ERR_CODE_JUMP(code)
MTKt_status MtkSetRegionByUlcLrc(double ulc_lat_dd, double ulc_lon_dd, double lrc_lat_dd, double lrc_lon_dd, MTKt_Region *region)
Select region by latitude and longitude of upper left corner and lower right corner in decimal degree...