Skip to content

Commit

Permalink
#1 Work in progress:
Browse files Browse the repository at this point in the history
- Modify code blocks in doc

[ci skip]
  • Loading branch information
FABallemand committed Oct 20, 2024
1 parent a91d68c commit ba66092
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
4 changes: 3 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Installation
============

Install ezGPX with :command:`pip`::
Install ezGPX with :command:`pip`

.. code-block:: bash
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade ezgpx
8 changes: 4 additions & 4 deletions docs/source/tutorials/analysing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ezGPX provides access to information related to points and their coordinates suc
- The first and last point
- The extreme points (ie: the points at which minimum and maximum latitude and longitude are reached)

::
.. code-block:: python
from ezgpx import GPX
Expand Down Expand Up @@ -62,7 +62,7 @@ There are several methods to compute insights related to distance and elevation.

.. note:: Distances are expressed in metres (m) and rates in percentage (%).

::
.. code-block:: python
from ezgpx import GPX
Expand Down Expand Up @@ -96,7 +96,7 @@ Time

If a :py:class:`~ezgpx.gpx.GPX` object contains time related data (mainly time-stamp at each point), many useful informations can be accessed.

::
.. code-block:: python
from ezgpx import GPX
Expand All @@ -123,7 +123,7 @@ If a :py:class:`~ezgpx.gpx.GPX` object contains time related data (mainly time-s

.. note:: Speeds are expressed in kilometres per hour (km/h) and paces in minutes per kilometre (min/km).

::
.. code-block:: python
from ezgpx import GPX
Expand Down
8 changes: 4 additions & 4 deletions docs/source/tutorials/modifying.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Remove Data

Not all the data contained in a GPX file is always relevant. With :py:class:`~ezgpx.gpx.GPX` objects, it is possible to remove unused data such as metadata, elevation and time data, as well as all data contained in extensions. This is particularily useful when using devices with limited storage space or computing power. A GPX file of a 10 km run downloaded from Strava weighing 345.4 kB can be reduced to a 52.5 kB file (ie: only 15.2 % of the original file size).

::
.. code-block:: python
from ezgpx import GPX
Expand All @@ -33,7 +33,7 @@ Simplify Track

It is sometimes usefull to reduce the amount of track points contained in a GPX file especially when dealing with low power or low capacity devices. The :py:meth:`~simplify` method reduces the number of points while maintaining good precision.

::
.. code-block:: python
import ezgpx
Expand All @@ -48,7 +48,7 @@ It is sometimes usefull to reduce the amount of track points contained in a GPX
In the following example, a 42 km run downloaded from Strava went from 3263 track points to only 1082. This correspond to a 69% decrease in points and allows to save 704.6 kB (ie: 85.4 % of the original file size) by reducing the file size from 824.8 kB to 120.2 kB. It is clear that the algorithm used only removes points that do not provide significant information preserving the shape of the track.

::
.. code-block:: python
from ezgpx import GPX
Expand Down Expand Up @@ -82,7 +82,7 @@ Remove GPS Errors

GPS devices sometimes lose signal generating errors in GPX files. The most noticeable errors (single isolated points) can be found and removed as follow.

::
.. code-block:: python
import ezgpx
Expand Down
8 changes: 4 additions & 4 deletions docs/source/tutorials/parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In order to parse a GPX file, simply create a new :py:class:`~ezgpx.gpx.GPX` obj

.. note:: In the next tutorials you will learn how to plot, modify and save this :py:class:`~ezgpx.gpx.GPX` object to a file.

::
.. code-block:: python
import ezgpx
Expand All @@ -23,7 +23,7 @@ In order to parse a KML file, simply create a new :py:class:`~ezgpx.gpx.GPX` obj

.. note:: This method is mainly designed to perform a simple conversion from KML to GPX. To that extent, only GPS data from the KML files will be processed.

::
.. code-block:: python
import ezgpx
Expand All @@ -41,7 +41,7 @@ In order to parse a KMZ file, simply create a new :py:class:`~ezgpx.gpx.GPX` obj

.. note:: This method is mainly designed to perform a simple conversion from KMZ to GPX. To that extent, only GPS data from the one of the KML files found in the KMZ will be processed.

::
.. code-block:: python
import ezgpx
Expand All @@ -54,7 +54,7 @@ FIT Files

In order to parse a FIT file, simply create a new :py:class:`~ezgpx.gpx.GPX` object with the path to the file.

::
.. code-block:: python
import ezgpx
Expand Down
12 changes: 6 additions & 6 deletions docs/source/tutorials/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This method relies on the well known Matplotlib Python library to create simple

.. warning:: Requires :py:mod:`~basemap`.

::
.. code-block:: python
import ezgpx
import matplotlib as mpl
Expand Down Expand Up @@ -48,7 +48,7 @@ This method uses the Google map engine to display the content of the GPX file in

.. warning:: Requires :py:mod:`~gmplot`.

::
.. code-block:: python
import ezgpx
Expand All @@ -75,7 +75,7 @@ The interactive HTML page resulting from this method allows you to visualize the

.. warning:: Requires :py:mod:`~folium`.

::
.. code-block:: python
import ezgpx
Expand Down Expand Up @@ -103,7 +103,7 @@ PaperMap

.. warning:: Requires :py:mod:`~papermap`.

::
.. code-block:: python
import ezgpx
Expand Down Expand Up @@ -131,7 +131,7 @@ This method creates animations of the activity contained in a GPX file.

.. warning:: Requires :py:mod:`~basemap`.

::
.. code-block:: python
import ezgpx
Expand Down Expand Up @@ -169,7 +169,7 @@ This is the most advanced plotting method built into ezGPX. It allows to plot th

.. warning:: Requires :py:mod:`~basemap`.

::
.. code-block:: python
import ezgpx
Expand Down
6 changes: 3 additions & 3 deletions docs/source/tutorials/schemas.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ During Parsing

It is possible to check during parsing, in which case an invalid GPX file will raise an error.

::
.. code-block:: python
import ezgpx
Expand All @@ -22,7 +22,7 @@ Test a :py:class:`~ezgpx.gpx.GPX` Object

A :py:class:`~ezgpx.gpx.GPX` object can directly be checked.

::
.. code-block:: python
import ezgpx
Expand All @@ -36,7 +36,7 @@ After Writting

It is possible to check whether a written GPX file follows XML schemas.

::
.. code-block:: python
import ezgpx
Expand Down
8 changes: 4 additions & 4 deletions docs/source/tutorials/writing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Save as GPX file

The :py:meth:`~to_gpx` method allows to export a :py:class:`~ezgpx.gpx.GPX` object as a `GPX <https://en.wikipedia.org/wiki/GPS_Exchange_Format>`_ file.

::
.. code-block:: python
from ezgpx import GPX
Expand All @@ -23,7 +23,7 @@ Save as KML file

The :py:meth:`~to_kml` method allows to export a :py:class:`~ezgpx.gpx.GPX` object as a `KML <https://en.wikipedia.org/wiki/Keyhole_Markup_Language>`_ file.

::
.. code-block:: python
from ezgpx import GPX
Expand All @@ -40,7 +40,7 @@ Save as CSV file

The :py:meth:`~to_csv` method allows to export a :py:class:`~ezgpx.gpx.GPX` object as a `CSV <https://en.wikipedia.org/wiki/Comma-separated_values>`_ file.

::
.. code-block:: python
from ezgpx import GPX
Expand All @@ -57,7 +57,7 @@ Convert to Pandas Dataframe

The :py:meth:`~to_dataframe` method allows to convert a :py:class:`~ezgpx.gpx.GPX` object to a `Pandas Dataframe <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html>`_.

::
.. code-block:: python
from ezgpx import GPX
Expand Down

0 comments on commit ba66092

Please sign in to comment.