GeographicLib: UTMUPS.hpp Source File (original) (raw)

76 private:

78 static const int falseeasting_[4];

79 static const int falsenorthing_[4];

80 static const int mineasting_[4];

81 static const int maxeasting_[4];

82 static const int minnorthing_[4];

83 static const int maxnorthing_[4];

84 static const int epsg01N = 32601;

85 static const int epsg60N = 32660;

86 static const int epsgN = 32661;

87 static const int epsg01S = 32701;

88 static const int epsg60S = 32760;

89 static const int epsgS = 32761;

90 static real CentralMeridian(int zone)

91 { return real(6 * zone - 183); }

92

93

94 static bool CheckCoords(bool utmp, bool northp, real x, real y,

95 bool msgrlimits = false, bool throwp = true);

96 UTMUPS() = delete;

97

98 public:

99

100

101

102

103

104

105

106

107

108

110

111

112

113 MINPSEUDOZONE = -4,

114

115

116

117 INVALID = -4,

118

119

120

121

122 MATCH = -3,

123

124

125

126

127

128

129 UTM = -2,

130

131

132

133

134

135

136

137

138 STANDARD = -1,

139

140

141

142 MAXPSEUDOZONE = -1,

143

144

145

146 MINZONE = 0,

147

148

149

151

152

153

154 MINUTMZONE = 1,

155

156

157

158 MAXUTMZONE = 60,

159

160

161

162 MAXZONE = 60,

163 };

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179 static int StandardZone(real lat, real lon, int setzone = STANDARD);

180

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220 static void Forward(real lat, real lon,

221 int& zone, bool& northp, real& x, real& y,

223 int setzone = STANDARD, bool mgrslimits = false);

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262 static void Reverse(int zone, bool northp, real x, real y,

264 bool mgrslimits = false);

265

266

267

268

269 static void Forward(real lat, real lon,

270 int& zone, bool& northp, real& x, real& y,

271 int setzone = STANDARD, bool mgrslimits = false) {

272 real gamma, k;

273 Forward(lat, lon, zone, northp, x, y, gamma, k, setzone, mgrslimits);

274 }

275

276

277

278

279 static void Reverse(int zone, bool northp, real x, real y,

280 real& lat, real& lon, bool mgrslimits = false) {

281 real gamma, k;

282 Reverse(zone, northp, x, y, lat, lon, gamma, k, mgrslimits);

283 }

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318 static void Transfer(int zonein, bool northpin, real xin, real yin,

319 int zoneout, bool northpout, real& xout, real& yout,

320 int& zone);

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340 static void DecodeZone(const std::string& zonestr,

341 int& zone, bool& northp);

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360 static std::string EncodeZone(int zone, bool northp, bool abbrev = true);

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375 static void DecodeEPSG(int epsg, int& zone, bool& northp);

376

377

378

379

380

381

382

383

384

385

386

387

388 static int EncodeEPSG(int zone, bool northp);

389

390

391

392

393

395

396

397

398

399

400

401

402

403

404

406 { return Constants::WGS84_a(); }

407

408

409

410

411

412

413

415 { return Constants::WGS84_f(); }

416

417

418 };