oxigdal-proj 0.1.6

Pure Rust coordinate transformation and projection support for OxiGDAL - EPSG database and CRS operations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
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
221
222
223
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
//! UTM zone definitions for the EPSG database.

#[cfg(not(feature = "std"))]
use alloc::format;
#[cfg(not(feature = "std"))]
use alloc::string::ToString;

use super::types::{CrsType, EpsgDatabase, EpsgDefinition};

/// Register all UTM zone definitions into the database.
pub(crate) fn register_utm_zones(db: &mut EpsgDatabase) {
    register_wgs84_utm(db);
    register_jgd2011_utm(db);
    register_gda2020_utm(db);
    register_etrs89_utm(db);
    register_nad83_utm(db);
    register_nad27_utm(db);
    register_gda94_mga(db);
    register_sirgas_utm(db);
    register_ed50_utm(db);
    register_wgs72_utm(db);
    register_cgcs2000_utm(db);
    register_pulkovo_gk(db);
    register_jgd2000_plane_rect(db);
}

fn register_wgs84_utm(db: &mut EpsgDatabase) {
    // UTM Zones (Zone 1N to 60N for WGS84)
    for zone in 1..=60 {
        let code = 32600 + zone;
        let central_meridian = -183 + (zone as i32 * 6);
        db.add_definition(EpsgDefinition {
            code,
            name: format!("WGS 84 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +datum=WGS84 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Between {}°E and {}°E, northern hemisphere",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "WGS84".to_string(),
        });
    }

    // UTM Zones (Zone 1S to 60S for WGS84)
    for zone in 1..=60 {
        let code = 32700 + zone;
        let central_meridian = -183 + (zone as i32 * 6);
        db.add_definition(EpsgDefinition {
            code,
            name: format!("WGS 84 / UTM zone {}S", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +datum=WGS84 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Between {}°E and {}°E, southern hemisphere",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "WGS84".to_string(),
        });
    }

    // WGS 84 / UTM zone 37N (override check)
    db.add_definition(EpsgDefinition {
        code: 32637,
        name: "WGS 84 / UTM zone 37N (override check)".to_string(),
        proj_string: "+proj=utm +zone=37 +datum=WGS84 +units=m +no_defs".to_string(),
        wkt: None,
        crs_type: CrsType::Projected,
        area_of_use: "34°E to 40°E, northern hemisphere".to_string(),
        unit: "metre".to_string(),
        datum: "WGS84".to_string(),
    });
}

fn register_jgd2011_utm(db: &mut EpsgDatabase) {
    // JGD2011 UTM zones EPSG:6669–6687 (zones 51N–60N with JGD2011 datum)
    for zone in 51u32..=60 {
        let code = 6618 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("JGD2011 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +ellps=GRS80 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Japan — {}°E to {}°E",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "JGD2011".to_string(),
        });
    }
}

fn register_gda2020_utm(db: &mut EpsgDatabase) {
    // GDA2020 UTM zones EPSG:7845–7858 (zones 48S–60S)
    for zone in 48u32..=60 {
        let code = 7797 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("GDA2020 / MGA zone {}", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Australia — {}°E to {}°E",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "GDA2020".to_string(),
        });
    }

    // GDA2020 / MGA zones (EPSG:7844 + 20 zones)
    for zone in 49u32..=60 {
        let code = 7844 + zone;
        let lon_0 = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("GDA2020 / MGA zone {}", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Australia — {}°E to {}°E", lon_0 - 3, lon_0 + 3),
            unit: "metre".to_string(),
            datum: "GDA2020".to_string(),
        });
    }
}

fn register_etrs89_utm(db: &mut EpsgDatabase) {
    // ETRS89 / UTM zone 32N (EPSG:25832)
    db.add_definition(EpsgDefinition {
        code: 25832,
        name: "ETRS89 / UTM zone 32N".to_string(),
        proj_string: "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
            .to_string(),
        wkt: None,
        crs_type: CrsType::Projected,
        area_of_use: "Europe - 6°E to 12°E".to_string(),
        unit: "metre".to_string(),
        datum: "ETRS89".to_string(),
    });

    // ETRS89 / UTM zone 33N and 34N
    for zone in [33u32, 34u32] {
        let code = 25800 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("ETRS89 / UTM zone {}N", zone),
            proj_string: format!(
                "+proj=utm +zone={} +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Europe — {}°E to {}°E",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "ETRS89".to_string(),
        });
    }

    // ETRS89 / UTM zones 28N–37N (full range for Europe)
    for zone in 28u32..=37 {
        let code = 25800 + zone;
        if code == 25832 || code == 25833 || code == 25834 {
            continue; // already added
        }
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("ETRS89 / UTM zone {}N", zone),
            proj_string: format!(
                "+proj=utm +zone={} +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Europe — {}°E to {}°E",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "ETRS89".to_string(),
        });
    }

    // Norwegian EUREF89 UTM zones 25835 and 25836
    db.add_definition(EpsgDefinition {
        code: 25835,
        name: "ETRS89 / UTM zone 35N".to_string(),
        proj_string: "+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
            .to_string(),
        wkt: None,
        crs_type: CrsType::Projected,
        area_of_use: "Europe — 24°E to 30°E".to_string(),
        unit: "metre".to_string(),
        datum: "ETRS89".to_string(),
    });

    db.add_definition(EpsgDefinition {
        code: 25836,
        name: "ETRS89 / UTM zone 36N".to_string(),
        proj_string: "+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
            .to_string(),
        wkt: None,
        crs_type: CrsType::Projected,
        area_of_use: "Europe — 30°E to 36°E".to_string(),
        unit: "metre".to_string(),
        datum: "ETRS89".to_string(),
    });

    // Spain — ETRS89 / UTM zone 29N-31N
    for zone in 29u32..=31 {
        let code = 25800 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("ETRS89 / UTM zone {}N", zone),
            proj_string: format!(
                "+proj=utm +zone={} +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Spain — {}°W to {}°E",
                -(central_meridian - 3),
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "ETRS89".to_string(),
        });
    }
}

fn register_nad83_utm(db: &mut EpsgDatabase) {
    // NAD83 / UTM zone 10N (US West Coast)
    db.add_definition(EpsgDefinition {
        code: 26910,
        name: "NAD83 / UTM zone 10N".to_string(),
        proj_string: "+proj=utm +zone=10 +datum=NAD83 +units=m +no_defs".to_string(),
        wkt: None,
        crs_type: CrsType::Projected,
        area_of_use: "North America - 126°W to 120°W".to_string(),
        unit: "metre".to_string(),
        datum: "NAD83".to_string(),
    });

    // NAD83 UTM zones 11N–18N (US/Canada coverage)
    let nad83_utm_zones: &[(u32, u32, &str)] = &[
        (26911, 11, "Between 120°W and 114°W"),
        (26912, 12, "Between 114°W and 108°W"),
        (26913, 13, "Between 108°W and 102°W"),
        (26914, 14, "Between 102°W and 96°W"),
        (26915, 15, "Between 96°W and 90°W"),
        (26916, 16, "Between 90°W and 84°W"),
        (26917, 17, "Between 84°W and 78°W"),
        (26918, 18, "Between 78°W and 72°W"),
        (26919, 19, "Between 72°W and 66°W"),
    ];
    for (code, zone, aou) in nad83_utm_zones {
        db.add_definition(EpsgDefinition {
            code: *code,
            name: format!("NAD83 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +datum=NAD83 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: aou.to_string(),
            unit: "metre".to_string(),
            datum: "NAD83".to_string(),
        });
    }

    // NAD83 UTM zones 1–22N (zones 10–20 already added individually, skip those)
    for zone in 1u32..=22 {
        if (10..=20).contains(&zone) {
            continue;
        }
        let code = 26900 + zone;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("NAD83 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +datum=NAD83 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: "North America".to_string(),
            unit: "metre".to_string(),
            datum: "NAD83".to_string(),
        });
    }
}

fn register_nad27_utm(db: &mut EpsgDatabase) {
    // NAD27 UTM zones 10N–20N
    for zone in 10u32..=20 {
        let code = 26700 + zone;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("NAD27 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +datum=NAD27 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: "North America".to_string(),
            unit: "metre".to_string(),
            datum: "NAD27".to_string(),
        });
    }

    // NAD27 UTM zones 1–9N
    for zone in 1u32..=9 {
        let code = 26700 + zone;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("NAD27 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +datum=NAD27 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: "North America".to_string(),
            unit: "metre".to_string(),
            datum: "NAD27".to_string(),
        });
    }
}

fn register_gda94_mga(db: &mut EpsgDatabase) {
    // GDA94 MGA zones EPSG:28348–28356 (zones 48S–56S)
    for zone in 48u32..=56 {
        let code = 27892 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("GDA94 / MGA zone {}", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "Australia — {}°E to {}°E",
                central_meridian - 3,
                central_meridian + 3
            ),
            unit: "metre".to_string(),
            datum: "GDA94".to_string(),
        });
    }

    // GDA94 / MGA zones not yet added (zones 57–60)
    for zone in 57u32..=60 {
        let code = 28300 + zone;
        let lon_0 = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("GDA94 / MGA zone {}", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Australia — {}°E to {}°E", lon_0 - 3, lon_0 + 3),
            unit: "metre".to_string(),
            datum: "GDA94".to_string(),
        });
    }
}

fn register_sirgas_utm(db: &mut EpsgDatabase) {
    // SIRGAS 2000 UTM zones for South America
    for zone in 17u32..=25 {
        let code = 31960 + zone;
        let central_meridian = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("SIRGAS 2000 / UTM zone {}S", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "South America — {}°W to {}°W",
                -central_meridian + 3,
                -central_meridian - 3
            ),
            unit: "metre".to_string(),
            datum: "SIRGAS2000".to_string(),
        });
    }

    // SIRGAS 2000 / UTM South zones 17S–25S (duplicate-safe)
    for zone in 17u32..=25 {
        let code = 31960 + zone;
        let lon_0 = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("SIRGAS 2000 / UTM zone {}S", zone),
            proj_string: format!(
                "+proj=utm +zone={} +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!(
                "South America — {}°W to {}°W, southern hemisphere",
                -(lon_0 - 3),
                -(lon_0 + 3)
            ),
            unit: "metre".to_string(),
            datum: "SIRGAS 2000".to_string(),
        });
    }
}

fn register_ed50_utm(db: &mut EpsgDatabase) {
    // Turkey — ED50 / UTM zones 35N-37N
    for zone in 35u32..=37 {
        let utm_code = 23000 + zone;
        db.add_definition(EpsgDefinition {
            code: utm_code,
            name: format!("ED50 / UTM zone {}N", zone),
            proj_string: format!(
                "+proj=utm +zone={} +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Turkey — UTM zone {}N", zone),
            unit: "metre".to_string(),
            datum: "ED50".to_string(),
        });
    }

    // ED50 / UTM North zones (EPSG:23028–23038)
    for zone in 28u32..=38 {
        let code = 23000 + zone;
        let lon_0 = (zone as i32 - 1) * 6 - 177;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("ED50 / UTM zone {}N", zone),
            proj_string: format!(
                "+proj=utm +zone={} +ellps=intl +towgs84=-87,-98,-121 +units=m +no_defs",
                zone
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Europe (historical) — {}°E to {}°E", lon_0 - 3, lon_0 + 3),
            unit: "metre".to_string(),
            datum: "ED50".to_string(),
        });
    }
}

fn register_wgs72_utm(db: &mut EpsgDatabase) {
    // WGS72 / UTM North zones 1–60 (EPSG:32201–32260)
    for zone in 1u32..=60 {
        let code = 32200 + zone;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("WGS 72 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +ellps=WGS72 +towgs84=0,0,4.5,0,0,0.554,0.219 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: "World".to_string(),
            unit: "metre".to_string(),
            datum: "WGS72".to_string(),
        });
    }
}

fn register_cgcs2000_utm(db: &mut EpsgDatabase) {
    // CGCS2000 / 3-degree Gauss-Kruger zones
    for zone in 25u32..=45 {
        let code = 4466 + zone;
        let lon_0 = zone as f64 * 3.0;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("CGCS2000 / 3-degree Gauss-Kruger zone {}", zone),
            proj_string: format!(
                "+proj=tmerc +lat_0=0 +lon_0={} +k=1 +x_0={} +y_0=0 +ellps=GRS80 +units=m +no_defs",
                lon_0,
                zone as u64 * 1_000_000 + 500_000
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("China — {}°E to {}°E", lon_0 as i32 - 2, lon_0 as i32 + 2),
            unit: "metre".to_string(),
            datum: "CGCS2000".to_string(),
        });
    }

    // CGCS2000 / 6-degree Gauss-Kruger zones
    for zone in 13u32..=23 {
        let code = 4513 + zone;
        let lon_0 = (zone as f64 - 1.0) * 6.0 - 177.0 + 6.0;
        let lon_0_precise = zone as f64 * 6.0 - 183.0;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("CGCS2000 / 6-degree Gauss-Kruger zone {}", zone),
            proj_string: format!(
                "+proj=tmerc +lat_0=0 +lon_0={} +k=1 +x_0={} +y_0=0 +ellps=GRS80 +units=m +no_defs",
                lon_0_precise,
                zone as u64 * 1_000_000 + 500_000
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("China — {}°E to {}°E", lon_0 as i32 - 3, lon_0 as i32 + 3),
            unit: "metre".to_string(),
            datum: "CGCS2000".to_string(),
        });
    }

    // CGCS2000 / UTM zones 43N–53N
    for zone in 43u32..=53 {
        let code = 4535 + (zone - 43);
        let lon_0 = (zone as f64 - 1.0) * 6.0 - 177.0;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("CGCS2000 / UTM zone {}N", zone),
            proj_string: format!("+proj=utm +zone={} +ellps=GRS80 +units=m +no_defs", zone),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("China — {}°E to {}°E", lon_0 as i32 - 3, lon_0 as i32 + 3),
            unit: "metre".to_string(),
            datum: "CGCS2000".to_string(),
        });
    }
}

fn register_pulkovo_gk(db: &mut EpsgDatabase) {
    // Gauss-Kruger zones for Russia (6° strips, Pulkovo 1942)
    for zone in 4u32..=32 {
        let code = 28400 + zone;
        let lon_0 = (zone as f64 - 1.0) * 6.0 - 177.0 + 6.0;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("Pulkovo 1942 / Gauss-Kruger zone {}", zone),
            proj_string: format!(
                "+proj=tmerc +lat_0=0 +lon_0={} +k=1 +x_0={} +y_0=0 +ellps=krass +towgs84=23.57,-140.95,-79.8,0,0.35,0.79,-0.22 +units=m +no_defs",
                lon_0, zone as u64 * 1_000_000 + 500_000
            ),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Russia — zone {}", zone),
            unit: "metre".to_string(),
            datum: "Pulkovo1942".to_string(),
        });
    }
}

fn register_jgd2000_plane_rect(db: &mut EpsgDatabase) {
    // JGD2000 / Japan Plane Rectangular CS zones I–XIX (EPSG:2443–2461)
    let jp_lon_cm = [
        129.5_f64, 131.0, 132.1667, 133.5, 134.3333, 136.0, 137.1667, 138.5, 139.8333, 140.8333,
        140.25, 142.25, 144.25, 142.0, 127.5, 124.0, 131.0, 136.0, 154.0,
    ];
    for (i, lon_cm) in jp_lon_cm.iter().enumerate() {
        let zone_num = i + 1;
        let code = 2442 + zone_num as u32;
        db.add_definition(EpsgDefinition {
            code,
            name: format!("JGD2000 / Japan Plane Rectangular CS zone {}", zone_num),
            proj_string: format!("+proj=tmerc +lat_0=0 +lon_0={} +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs", lon_cm),
            wkt: None,
            crs_type: CrsType::Projected,
            area_of_use: format!("Japan — zone {}", zone_num),
            unit: "metre".to_string(),
            datum: "JGD2000".to_string(),
        });
    }
}