wambacher
(Walter Nordmann)
87
ich hab mal eine kleine Auswertung “improvisiert”. Einfach nur die doppelten PLZ-Gebiete in Deutschland mit deren Anzahl.
Insgesammt 466 Dubletten, dabei einige wirklich erschreckende.
select *
from
( SELECT count(tags->'postal_code') count,
tags->'postal_code' postal_code
FROM relations
WHERE tags->'type' in('multipolygon','boundary')
AND tags->'boundary' in ('administrative','postal_code')
AND tags ? 'postal_code'
AND geom && (select geom from relations where id=1111111)
group by tags->'postal_code'
order by count(tags->'postal_code') desc, tags->'postal_code'
) foo
where count > 1
count | postal_code
-------+-------------
27 | 06369
20 | 53520
16 | 53332
13 | 27616
13 | 28857
11 | 37308
11 | 53913
10 | 02788
10 | 07580
10 | 31595
10 | 37245
9 | 02763
9 | 06386
9 | 27243
9 | 27245
9 | 28816
9 | 37318
9 | 53518
9 | 53539
8 | 07570
8 | 09306
8 | 26427
8 | 27232
8 | 27305
8 | 53547
7 | 07980
7 | 31582
7 | 37627
7 | 53506
7 | 53533
7 | 53534
6 | 02779
6 | 02977
6 | 04720
6 | 07589
6 | 26556
6 | 27248
6 | 27251
6 | 27257
6 | 27259
6 | 27324
6 | 27330
6 | 31603
6 | 37619
6 | 49828
6 | 49832
6 | 54480
6 | 78465
5 | 01824
5 | 02747
5 | 04617
5 | 09437
5 | 09573
5 | 27254
5 | 31600
5 | 49457
5 | 49751
5 | 53505
4 | 01809
4 | 01814
4 | 02708
4 | 02797
4 | 02899
4 | 07557
4 | 08393
4 | 09432
4 | 09526
4 | 09619
4 | 09648
4 | 09661
4 | 27252
4 | 27318
4 | 48480
4 | 49419
4 | 49762
4 | 49777
4 | 49838
4 | 49843
4 | 53919
4 | 67724
4 | 78464
3 | 01623
3 | 01689
3 | 01762
3 | 01774
3 | 01796
3 | 01825
3 | 01833
3 | 04603
3 | 06193
3 | 08107
3 | 08134
3 | 08396
3 | 09337
3 | 09366
3 | 09405
3 | 09434
3 | 09456
3 | 09468
3 | 09471
3 | 09481
3 | 09548
3 | 09569
3 | 09600
3 | 09618
3 | 26487
3 | 26901
3 | 27249
3 | 27327
3 | 27333
3 | 27432
3 | 29491
3 | 31622
3 | 32351
3 | 37632
3 | 37647
3 | 38729
3 | 4716
3 | 49406
3 | 49577
3 | 49757
3 | 49824
3 | 53426
3 | 53498
3 | 53545
3 | 54411
3 | 77716
3 | 8165
3 | 8274
3 | 94149
3 | 97241
2 | 01445
2 | 01640
2 | 01662
...
2 | 97896
2 | 99897
(466 rows)
Details müsste ich noch rauskitzeln. Insbesonders welche IDs davon betroffen sind.
und dann hab ich noch diese gefunden:
id | postal_code | regexp_matches
---------+-------------------------------------------------+----------------
455471 | 01738;01744;01774 | {;}
534534 | 01812;01813;01814 | {;}
534536 | 01851;01852;01853;01854;01855 | {;}
1060610 | 06886;06889 | {;}
163307 | 41460;41462;41464;41466;41468;41469;41470;41472 | {;}
168449 | 41539;41540;41541;41542 | {;}
935834 | 72271;72272;72273;72274;72275 | {;}
935833 | 72294;72297 | {;}
915486 | 73430;73431;73432;73433;73434 | {;}
403747 | 74856;74858 | {;}
452986 | 77740;72250 | {;}
(11 rows)
muß ich aber noch überprüfen. dachte, dass es mehr wären.
Die Auswertung ist relativ fix (~60 Sekunden), kann man also bei Bedarf mal eben laufen lassen. nur einen Automatismus mit allem drum und dran, naja… nicht so mein Ding
Gruss
walter