getAll "Gemeinden" at once?

83 views
Skip to first unread message

Oliver Santschi

unread,
Jun 25, 2022, 9:01:40 AM6/25/22
to GeoAdminCh API
Hi there

Is there a way, where I can get all the BFS-Gemeinde-Id's at once?( via the GeoAdminCh API). Or maybe for each Kanton?

I already downloaded an Excel with this information, but would be nice if that's possible via the RestApi.

Cheers 

Oli


GeoAdminCh API

unread,
Jun 28, 2022, 3:13:57 AM6/28/22
to GeoAdminCh API
Hi Oli

The RESTApi api.geo.admin.ch  has a limited response of around  50-200 elements

The way to go is: use  geo.ld.admin.ch as described in https://www.geo.admin.ch/de/geo-dienstleistungen/geodienste/linkeddata.html  linked data approach via SPARQL for this data set  https://geo.ld.admin.ch/data/swissBOUNDARIES3D 

Dave

Pasquale Di Donato

unread,
Jun 28, 2022, 4:04:22 AM6/28/22
to GeoAdminCh API
here we are https://s.zazuko.com/c8aGhd 

Oliver Santschi

unread,
Jun 30, 2022, 5:22:11 AM6/30/22
to GeoAdminCh API
cool...thanks a lot

Nicolas Schmid

unread,
Sep 6, 2023, 3:03:08 PM9/6/23
to GeoAdminCh API
nvm i figured it out :)

Nicolas Schmid

unread,
Sep 6, 2023, 3:03:14 PM9/6/23
to GeoAdminCh API
I was looking for an example how to retrieve geometries from geo.ld.admin.ch using SPARQL but somehow I didn't find a concrete example.

I would actually need exactly this example: BFS-Number, Name, Geometry, for all Municipalities, is this possible?

The alternative would be to use this list of bfs numbers and query https://api3.geo.admin.ch/rest/services/api/MapServer/ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill/<<bfsnumber>> over 2000 times to get all geometries, but somehow I feel there should be a better option?

Cheers

On Thursday, 30 June 2022 at 11:22:11 UTC+2 Oliver Santschi wrote:
Reply all
Reply to author
Forward
0 new messages