Example scripts
###############

On this page, some example scripts are presented, the scripts
are shipped with the code.

Example 1 - Basic objects (GeoPoint, GeoVector3D)
-------------------------------------------------

**Code**

.. literalinclude:: ../scripts/ex1_basic_objects.py

Example 2 - Introduction GeoSetup
---------------------------------

**Code**

.. literalinclude:: ../scripts/ex2_geosetup_intro.py

**Output figures**

.. figure::  ../scripts/scripts_out/ex2_out_1_map2D.png
  :align: center
  
  Example 2, Fig. 1: 2D overview map of GeoSetup (Etna volcano)
  
.. figure::  ../scripts/scripts_out/ex2_out_2_map3D.png
  :align: center
  
  Example 2, Fig. 2: 3D overview map of GeoSetup (Etna volcano)

Example 3 - Mapping and plotting
--------------------------------

**Code**

.. literalinclude:: ../scripts/ex3_mapping_basics.py

**Output figures**

.. figure::  ../scripts/scripts_out/ex3_out_1_map3D.png
  :align: center
  
  Example 3, Fig. 1: Exemplary 3D overview map for Guallatiri volcano
  
.. figure::  ../scripts/scripts_out/ex3_out_2_map2D.png
  :align: center
  
  Example 3, Fig. 2: Exemplary 2D overview map for Guallatiri volcano 
  
Example 4 - Elevation profiles and topographic analysis
-------------------------------------------------------

**Code** 

.. literalinclude:: ../scripts/ex4_elevation_profiles.py

**Output figures**

.. figure::  ../scripts/scripts_out/ex4_out_1_elev_profile_intersect.png
  :align: center
  
  Example 4, Fig. 1: Exemplary elevation profile for GeoSetup from Ex.1 determined along azimuth angle connecting camera and summit including retrieval of intersection with topography for viewing elevation angle of 10 deg. 
  
.. figure::  ../scripts/scripts_out/ex4_out_2_horizon_search.png
  :align: center
  
  Example 4, Fig. 2: Result from horizon search routine for profile shown in Fig. 1
  
Example 5 - Topography data access
----------------------------------

**Code** 

.. literalinclude:: ../scripts/ex5_topodata.py

**Output figures**

.. figure::  ../scripts/scripts_out/ex5_out_1_oslo_map.png
  :align: center
  
  Example 5, Fig. 1: Overview map of Oslo area, Norway (SRTM dataset has some gaps here)