Skip to content

Commit

Permalink
enhance documentation for KML file creation examples with additional …
Browse files Browse the repository at this point in the history
…images and improved formatting
  • Loading branch information
cleder committed Nov 17, 2024
1 parent 512fc92 commit 1d788aa
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions docs/create_kml_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Read a shapefile and build a 3D KML visualization.

This example shows how to read a shapefile and build a 3D KML visualization from it.

.. image:: co2-per-capita-2020.jpg
:alt: CO2 emissions per capita in 2020
:align: center
:width: 800px
:target: https://ion.cesium.com/stories/viewer/?id=a3cf93bb-bbb8-488b-8643-09c037ec12b8

You will need to install `pyshp <https://pypi.org/project/pyshp/>`_ (``pip install pyshp``).

For this example we will use the
Expand Down Expand Up @@ -108,12 +114,6 @@ Finally, we create the KML object and write it to a file:
The resulting KML file can be opened in Google Earth or any other KML viewer.

.. image:: co2-per-capita-2020.jpg
:alt: CO2 emissions per capita in 2020
:align: center
:width: 800px
:target: https://ion.cesium.com/stories/viewer/?id=a3cf93bb-bbb8-488b-8643-09c037ec12b8


Build an animated over time KML visualization
----------------------------------------------
Expand All @@ -122,6 +122,12 @@ This example shows how to build an animated KML visualization over time.
We will use the same data as in the previous example, but this time we will
create a KML file that shows the CO2 emissions accumulating from 1995 to 2022.

.. image:: co2growth.gif
:alt: CO2 emissions per capita growth
:align: center
:width: 800px
:target: https://ion.cesium.com/stories/viewer/?id=602c8c64-72aa-4c57-8a01-752b6fbc62d0

First we import the necessary modules:

.. code-block:: pycon
Expand Down Expand Up @@ -233,9 +239,3 @@ see the CO2 emissions per capita grow over time, Google Earth Web does not suppo
time animations, but
`Cesium Ion <https://ion.cesium.com/stories/viewer/?id=602c8c64-72aa-4c57-8a01-752b6fbc62d0>`_
can display the time animation.

.. image:: co2growth.gif
:alt: CO2 emissions per capita growth
:align: center
:width: 800px
:target: https://ion.cesium.com/stories/viewer/?id=602c8c64-72aa-4c57-8a01-752b6fbc62d0

0 comments on commit 1d788aa

Please sign in to comment.