Obtaining raster data for topography/geological maps given LV 95 bounds

48 views
Skip to first unread message

Alexis Shakas

unread,
Jun 30, 2022, 7:12:18 AM6/30/22
to GeoAdminCh API
Hello, this is perhaps an easy one but I'm new to the interface and could not find any example of this.

Basically, I want to download (from command line, ideally using python or another interface) the Swiss ATLAS 3D topographic data and geologic map for a given bounding box, for which I have Easting Northing in LV 95.

Thank you for the help!

David Oesch

unread,
Jun 30, 2022, 7:21:40 AM6/30/22
to GeoAdmin API
Using the STAC API

--
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 geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/b5e652b4-79b5-4df7-9500-7db16afa085bn%40googlegroups.com.

Alexis Shakas

unread,
Jun 30, 2022, 7:37:24 AM6/30/22
to GeoAdminCh API
Fantastic David, thank you for the quick response. I will check it out !

Alexis Shakas

unread,
Jun 30, 2022, 7:54:30 AM6/30/22
to GeoAdminCh API
Hmm, could not get it to work "out of the box".

There seems to be a problem when installing the packages using pip, after cloning the project. First one is tkinter (not found in pip)

pip install tkinter
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter

And then with osgeo, but i think this is fixed by installing gdal directly.

I'm running ubuntu 20.04 and creating a conda environment for this with python 3, if that helps!


On Thursday, June 30, 2022 at 1:21:40 PM UTC+2 david...@gmail.com wrote:

David Oesch

unread,
Jun 30, 2022, 8:40:57 AM6/30/22
to GeoAdmin API
a little bit of googling revealed that might  would pip install tk work
for the command line version you dont  need tk

Alexis Shakas

unread,
Jun 30, 2022, 10:03:22 AM6/30/22
to geoadm...@googlegroups.com
Great, I got it to work without the tk installation. Last question, where exactly do I place the bbox argument?

I am trying something like this:

but I get an error:

Ausschneiden ...
Traceback (most recent call last):
  File "swisstopoBatchNmerge.py", line 341, in <module>
    processCSV(CSV_filepath,bbox)
  File "swisstopoBatchNmerge.py", line 267, in processCSV
    cropRaster(temp_merged,merged,geom)
UnboundLocalError: local variable 'temp_merged' referenced before assignment


Can you comment in general how the bounding box command can be used? I see that you input LAT/LON for the bottom left and top right ? (WGS84 I suppose). and can this show up as a flag or is it placed after the URL always?

Thank you for the help and feedback!




You received this message because you are subscribed to a topic in the Google Groups "GeoAdminCh API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geoadmin-api/m9CADUQjhsA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/CAE7nro2JdzV3evE-BR%3D4XBgd_QgPhCQoH84ANEEngBUEuBm%3DTg%40mail.gmail.com.

David Oesch

unread,
Jun 30, 2022, 12:26:07 PM6/30/22
to GeoAdmin API

Alexis Shakas

unread,
Jun 30, 2022, 12:47:02 PM6/30/22
to GeoAdminCh API
Thanks, this works. Is there no way to get smaller sections, or to define LV 95 coordinates?

David Oesch

unread,
Jun 30, 2022, 2:38:25 PM6/30/22
to Di Donato Pasquale swisstopo, geoadm...@googlegroups.com
Smaller sections: you can try to get it with 0.01 side length. What is the minimum size u want? If you click the link u will get a list with the items defined in the bbox by the STAC api as defined in the STAC 

Lv95: STAC does not yet Support other projections like lv95 etc but there are services where you can transform easily with a one liner

David Oesch

unread,
Jun 30, 2022, 3:06:28 PM6/30/22
to GeoAdmin API
Sorry correction
in Your initial example, LON and LAT were in wrong order..you can choose small sections....

Alexis Shakas

unread,
Jul 1, 2022, 5:00:39 PM7/1/22
to geoadm...@googlegroups.com
I am looking at ~10 km tiles. But this works, I will try it out and let you know. Thanks for all your help!

Reply all
Reply to author
Forward
0 new messages