Help on Super Simple Use Case

Skip to first unread message

Michael Bischof

Jun 16, 2023, 3:23:33 AM6/16/23
to GeoAdminCh API
I am reading through the API documentation and thought this should be easy as ordering a pizza.

What I need: coordinates of a Swiss address given, e.g. Lindenmattstrasse 15, 5616 Meisterschwanden
(and then calculate the distance to a fixed building but there are tons of nice python scripts around to do this as soon as I have the coordinates).

What's the appropriate api command?


Jürgen Hansmann

Jun 16, 2023, 8:54:37 AM6/16/23
to GeoAdminCh API
Hi Michael

Probably you can use some of this Python snippets here, that make use of swisstopo's services:
This one retrieves coordinates for a given address: 
You could additionally user the "sr" parameter to get the response in e.g. LV03 or LV95, which would be easier for the distance calculcation.

For the distance calculation, as simple example would be this: (ignore the conversion part of the Python example).
This are just some very simple example scripts based on simplified calculations that do not take the curvature of earth into account.
So probably not suitable, if you need exact numbers. But at least you can see which services might be useful for you to start digging.

Cheers and have a nice weekend

Jürgen Hansmann

Jun 16, 2023, 10:14:08 AM6/16/23
Sorry, forgot to add a link to where you can find details on the sr parameter:
You received this message because you are subscribed to the Google Groups "GeoAdminCh API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages