ThinkGeo.com    |     Documentation    |     Premium Support

WmsRasterSource chooses wrong axis order

Since version 12.3.13, WmsRasterSource chooses YX order for coordinate systems that actually use XY.

My code is the equivalent of the following; it fails because Open() changes the AxisOrder property from the default:

        var wms = new WmsRasterSource(new Uri("https://inspire.informatievlaanderen.be/raadpleegdiensten/oi/wms"));
        wms.ActiveLayerNames.Add("OI.OrthoimageCoverage.OMW");
        wms.Crs = "EPSG:31370";
        wms.Open();
        // ...
        if (wms.GetServiceVersion().StartsWith("1.3.") &&
            wms.AxisOrder == WmsAxisOrder.Default)
        {
            wms.AxisOrder = LookupAxisOrder(wms.Crs);
        }
        // ...
        Debug.Assert(wms.AxisOrder == WmsAxisOrder.XY); // FAILS

How does WmsRasterSource determine the axis order? The only reliable way I’ve found is to look it up in the EPSG database. Should I give you the list?

Hi Clemens,

We recently made some changes in WMS RasterSource to smartly set WMS’s AxisOrder based on the CRS for WMS 1.3, apparently we introduced some issues. What is the list you mean exactly, is that the epsg list in which Y is ahead of X? If you have the list, can you let us know where it can be downloaded?

Sorry about the issue. please work it around by manually setting AxisOrder to XY or YX for now.

And by the way, I really don’t like this dynamic axis order stuff in WMS 1.3, make everything complicated. :unamused:

Thanks,
Ben

The EPSG dataset can be downloaded from epsg.org/download-dataset.html.

To get a list of CRS IDs with YX order (which is much shorter than the XY list), import the dump into Postgres and run the following query:

SELECT coord_ref_sys_code
FROM epsg.epsg_coordinatereferencesystem crs
JOIN epsg.epsg_coordinateaxis ax USING (coord_sys_code)
WHERE crs.coord_ref_sys_kind IN ('projected', 'geographic 2D')
  AND crs.show_crs = 1
  AND ax.coord_axis_order = 1
  AND coord_axis_orientation NOT IN ('east', 'west')
ORDER BY 1

result:

2036
2044
2045
2065
2081
2082
2083
2085
2086
2091
2092
2093
2096
2097
2098
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2193
2199
2200
2206
2207
2208
2209
2210
2211
2212
2218
2221
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2935
2936
2937
2938
2939
2940
2941
2953
2963
2985
2986
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3034
3035
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3058
3059
3068
3114
3115
3116
3117
3118
3120
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3144
3145
3146
3147
3150
3151
3152
3173
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3300
3301
3328
3329
3330
3331
3332
3333
3334
3335
3346
3350
3351
3352
3366
3386
3387
3388
3389
3390
3396
3397
3398
3399
3407
3408
3409
3411
3412
3413
3414
3416
3571
3572
3573
3574
3575
3576
3764
3788
3789
3790
3791
3793
3795
3796
3819
3821
3824
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3854
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3889
3906
3907
3908
3909
3910
3911
3973
3974
3976
3995
3996
4023
4026
4037
4038
4046
4055
4075
4081
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4178
4179
4180
4181
4182
4183
4184
4185
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4322
4324
4326
4417
4434
4463
4470
4475
4483
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4558
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4839
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4901
4902
4903
4904
5013
5017
5041
5042
5048
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5132
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5224
5228
5229
5233
5246
5252
5253
5254
5255
5256
5257
5258
5259
5264
5269
5270
5271
5272
5273
5274
5275
5324
5340
5343
5344
5345
5346
5347
5348
5349
5354
5360
5365
5367
5371
5373
5381
5393
5451
5464
5467
5479
5480
5481
5482
5489
5513
5515
5518
5519
5520
5524
5527
5546
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5588
5593
5632
5633
5634
5635
5636
5637
5638
5639
5651
5652
5653
5681
5886
5890
5936
5937
5938
5939
5940
6135
6207
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6311
6318
6322
6325
6362
6365
6372
6381
6382
6383
6384
6385
6386
6387
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6706
6707
6708
6709
6783
6870
6875
6876
6881
6882
6883
6892
6894
6931
6932
6962
6980
6983
6987
6990
7073
7136
7139
7373
7683
7686
7798
7799
7800
7801
7825
7826
7827
7828
7829
7830
7831
7844
7881
7886
8042
8043
8044
8045
8086
8232
8237
8240
8246
8249
8252
8255
8351
8352
8427
8428
8431
8433
8441
8449
8545
8685
8818
8860
8888
8900
8907
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9003
9006
9009
9012
9014
9017
9019
9039
9040
9053
9054
9055
9056
9057
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9140
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21896
21897
21898
21899
22171
22172
22173
22174
22175
22176
22177
22181
22182
22183
22184
22185
22186
22187
22191
22192
22193
22194
22195
22196
22197
25884
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27391
27392
27393
27394
27395
27396
27397
27398
27492
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
29701
29702
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30800
31251
31252
31253
31254
31255
31256
31257
31258
31259
31275
31276
31277
31278
31279
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31466
31467
31468
31469
31700
32661
32761

Thanks! we will integrate it in.

hi Clemens,

We’ve integrated it in our code. You could upgrade your ThinkGeo.Core to 13.0.0-beta305 or above and give it a try. The new build will be available in several hours.

Thanks,
Leo