1
0
Fork
You've already forked ch-loc
0
zone generator for postal code/town name LOC records and maybe other stuff
  • Python 100%
2025年11月16日 10:09:39 +01:00
AMTOVZ_CSV_WGS84 rebuild zone with latest data 2025年05月27日 05:00:31 +00:00
.gitignore switch to csv data provided by swisstopo 2024年02月12日 07:12:26 +01:00
build.md switch to csv data provided by swisstopo 2024年02月12日 07:12:26 +01:00
generate-zone.py move ns 2025年11月16日 10:09:39 +01:00
README.md formatting 2020年10月06日 20:08:48 +02:00
zipdns.ch.zone move ns 2025年11月16日 10:09:39 +01:00

Maybe, someday, we will have a useful readme with actual sentences here.

for now, just a list of stuff you can query:

LOC record of town name

dig loc uzwil.zipdns.ch +short
47 26 13.573 N 9 8 12.100 E 1.00m 1m 10000m 10m

Note:

  • may return multiple records if the city has multiple zip codes
  • some locations have the canton in the name as well, especially if there are multiple towns with the same name. Separated with underscore: dig loc seewen_sz.zipdns.ch
  • names with non-ascii characters are IDNA encoded. Some dig versions do this automatically, some don't. Example 'Rüdlingen': dig loc xn--rdlingen-65a.zipdns.ch

LOC record of zip

dig loc 8604.zipdns.ch +short
47 23 43.987 N 8 40 58.480 E 1.00m 1m 10000m 10m

TXT Record of town name -> get ZIP

dig txt embrach.zipdns.ch +short
"8424"

TXT record of zip -> Town name

dig txt 8302.zipdns.ch +short
"Kloten"

URI Record for town name or zip

Returns openstreetmap link

dig uri montreux.zipdns.ch +short
10 1 "http://www.openstreetmap.org/?mlat=46.4280492746&mlon=6.90336861785&zoom=12"
dig uri 8304.zipdns.ch +short
10 1 "http://www.openstreetmap.org/?mlat=47.4187043631&mlon=8.59603214251&zoom=12"

But why?!

Because JP Mens tweeted and blogged about it.

Implementation idea: M. Rimann

URI and TXT records stolen from Stéphane Bortzmeyer