Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs update v0.3 #251

Merged
merged 54 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
5745a69
Add simplified ship class for examples
gecoombs Feb 14, 2024
b44fd9e
Adding downloadable example
hjabbot Feb 15, 2024
954f3f1
Fixing zip file
hjabbot Feb 15, 2024
9fab5be
Update instructions in readme
gecoombs Feb 15, 2024
06ba592
Minor readme changes
gecoombs Feb 15, 2024
fa71253
Add pyproj to requirements
gecoombs Feb 15, 2024
65d5740
Link to meshiphi docs
gecoombs Feb 15, 2024
528adf9
Update install instructions
gecoombs Feb 15, 2024
fd2b909
Changes to docs index
gecoombs Feb 15, 2024
efa591b
Further docs changes
gecoombs Feb 15, 2024
a738399
Remove ancient html file and install changes
gecoombs Feb 15, 2024
32e6e67
Finalised examples
hjabbot Feb 16, 2024
3a7f9c4
Merge branch 'docs_update' of github.com:antarctica/PolarRoute into d…
hjabbot Feb 16, 2024
12592d6
Reordering example numbers to match docs order
hjabbot Feb 16, 2024
419e851
Add reference to mesh configs in meshiphi docs
gecoombs Feb 16, 2024
b0b45f5
Trying new real-world mesh due to colab limits
hjabbot Feb 16, 2024
9ba5152
Merge branch 'docs_update' of github.com:antarctica/PolarRoute into d…
hjabbot Feb 16, 2024
6b7ccaf
Updated text in examples
hjabbot Feb 16, 2024
1e92511
Fixing broken links
hjabbot Feb 16, 2024
03d9dcd
Fleshing out CLI example
hjabbot Feb 16, 2024
0d795a3
Updating the code snippets
hjabbot Feb 16, 2024
d65d32a
Text changes in outputs documentation
gecoombs Feb 16, 2024
ad2dea4
Fix broken link
gecoombs Feb 16, 2024
8d30ff9
Update python section title
gecoombs Feb 16, 2024
f0fddb3
Add installation instructions for geoplot
gecoombs Feb 16, 2024
c8da2ac
adding smaller exmaple for plotting in colab
SamuelHall700 Feb 19, 2024
d4d44dd
fixing file structure in zip
SamuelHall700 Feb 19, 2024
fbf290d
Remove docs/html from .gitignore
gecoombs Feb 19, 2024
b885d00
Rebuild html docs
gecoombs Feb 19, 2024
6db8553
Remove mesh files from testing strategy
gecoombs Feb 19, 2024
48bf493
Update list of files in testing strategy
gecoombs Feb 19, 2024
5b632a8
updating example 6 to run in colab
SamuelHall700 Feb 19, 2024
9e45e6b
updating adding mesh to example_6.zip
SamuelHall700 Feb 19, 2024
a0a1a09
merging in docs build changes
SamuelHall700 Feb 19, 2024
d45a399
Rebuild docs
gecoombs Feb 20, 2024
537702f
Text changes in Examples.rst
gecoombs Feb 20, 2024
e593cce
Rebuild docs
gecoombs Feb 20, 2024
883f62f
updating download links to web host
SamuelHall700 Feb 20, 2024
acb9571
including one more web link
SamuelHall700 Feb 20, 2024
b313e0d
Add explicit reference to MeshiPhi in installation documentation
gecoombs Feb 20, 2024
14f29e6
Merge branch 'docs_update' of github.com:antarctica/PolarRoute into d…
gecoombs Feb 20, 2024
a73cafb
Rebuild docs again
gecoombs Feb 20, 2024
95a8c36
Remove mesh files from testing strategy
gecoombs Feb 19, 2024
eb59c30
Update list of files in testing strategy
gecoombs Feb 19, 2024
b4feebe
Remove docs/html from .gitignore
gecoombs Feb 19, 2024
7d7ea76
updating links to main repo
SamuelHall700 Feb 21, 2024
076125a
rebuilding docs
SamuelHall700 Feb 21, 2024
9afbd9b
Updates to Examples section
gecoombs Feb 21, 2024
714e566
updating real_example.config.json to avoid crashing due to ice thickn…
SamuelHall700 Feb 21, 2024
d6bf4b2
merging updates from docs_update branch, updating config
SamuelHall700 Feb 22, 2024
dd3d00e
Updating so if the waypoint is on the edge of the mesh boundary then …
Ulvetanna Feb 22, 2024
4d63328
removing grf minimal example
SamuelHall700 Feb 22, 2024
f8d4790
Merge pull request #254 from antarctica/bug_waypoint_boundarymesh
Ulvetanna Feb 22, 2024
0ba4243
Update version number
gecoombs Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ outputs/*
docs_builder/*
testing.ipynb
docs/build/*
docs/html/*
dev_venv/*
40 changes: 22 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,43 @@
# PolarRoute

![](logo.jpg)

<a href="https://colab.research.google.com/drive/12D-CN10X7xAcXn_df0zNLHtdiiXxZVkz?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab" alt="Colab">
<a href="https://antarctica.github.io/PolarRoute/"><img src="https://img.shields.io/badge/Manual%20-github.io%2FPolarRoute%2F-red" alt="Manual Page">
<a href="https://pypi.org/project/polar-route/"><img src="https://img.shields.io/pypi/v/polar-route" alt="PyPi">
<a href="https://colab.research.google.com/drive/12D-CN10X7xAcXn_df0zNLHtdiiXxZVkz?usp=sharing"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab" alt="Colab">
<a href="https://pypi.org/project/polar-route/"><img src="https://img.shields.io/pypi/v/polar-route" alt="PyPI">
<a href="https://github.com/antarctica/PolarRoute/tags"><img src="https://img.shields.io/github/v/tag/antarctica/PolarRoute" alt="Release Tag"></a>
<a href="https://github.com/antarctica/PolarRoute/issues"><img src="https://img.shields.io/github/issues/antarctica/PolarRoute" alt="Issues"></a>
<a href="https://github.com/antarctica/PolarRoute/blob/main/LICENSE"><img src="https://img.shields.io/github/license/antarctica/PolarRoute" alt="License"></a>

# PolarRoute
PolarRoute is a long-distance maritime polar route planning package, taking into account complex changing environmental conditions. The codebase allows the construction of optimised routes through three main stages: discrete modelling of the environmental conditions using a non-uniform mesh, the construction of mesh-optimal paths, and physics informed path smoothing. In order to account for different vehicle properties we construct a series of data driven functions that can be applied to the environmental mesh to determine the speed limitations and fuel requirements for a given vessel and mesh cell, representing these quantities graphically and geospatially.
PolarRoute is a long-distance maritime polar route planning package, able to take into account complex and changing environmental conditions. It allows the construction of optimised routes through three main stages: discrete modelling of the environmental conditions using a non-uniform mesh, the construction of mesh-optimal paths, and physics informed path smoothing. In order to account for different vehicle properties we construct a series of data-driven functions that can be applied to the environmental mesh to determine the speed limitations and fuel requirements for a given vessel and mesh cell. The environmental modelling component of this functionality is provided by the [MeshiPhi](https://github.com/antarctica/MeshiPhi) library.

## Installation
The PolarRoute package requires GDAL files to be installed. This software can be installed on Windows by running the required wheels for GDAL and FIONA. More information can be found in the manual pages linked above. Once these requirements are met then the software can be installed by:

Github:
PolarRoute is available from PyPI and can be installed by running:
```
git clone https://github.com/Antarctica/PolarRoute
python setup.py install
pip install polar-route
```

Pip:
Alternatively you can install PolarRoute by downloading the source code from GitHub:
```
pip install polar-route
git clone https://github.com/Antarctica/PolarRoute
pip install -e ./PolarRoute
```
Use of `-e` is optional, based on whether you want to be able to edit the installed copy of the package.

> NOTE: The installation process may vary slightly dependent on OS. Please consult the documentation for further installation guidance.
> NOTE: Some features of the PolarRoute package require GDAL to be installed. Please consult the documentation for further guidance.

## Required Data sources
Polar-route has been built to work with a variety of open-source atmospheric and oceanographic data sources.
A list of supported data sources and their associated data-loaders is given in the
'Data Loaders' section of the manual
PolarRoute has been built to work with a variety of open-source atmospheric and oceanographic data sources. For testing and demonstration purposes it is also possible to generate artificial Gaussian Random Field data.

A full list of supported data sources and their associated dataloaders is given in the
'Dataloader Overview' section of the [MeshiPhi manual](https://antarctica.github.io/MeshiPhi/)

## Documentation
Sphinx is used to generate documentation for this project. The dependencies can be installed through pip:
The documentation for the package is available to read at: https://antarctica.github.io/PolarRoute/

If you make changes to the source of the documentation you will need to rebuild the corresponding html files using Sphinx.
The dependencies for this can be installed through pip:
```
pip install sphinx sphinx_markdown_builder sphinx_rtd_theme rinohtype
```
Expand All @@ -42,19 +47,18 @@ sphinx-build -b html ./docs/source ./docs/html
```
Sometimes the cache needs to be cleared for internal links to update. If facing this problem, run this from the PolarRoute directory.
```
rm -r docs/build/.doctrees/
rm -r docs/html/.doctrees/
```
## Developers
Jonathan Smith, Samuel Hall, George Coombs, James Byrne, Michael Thorne, Maria Fox, Harrison Abbot, Ayat Fekry

## Collaboration
We are currently assessing the best practice for collaboration on the codebase, until then please contact [[email protected]]([email protected]) for further info.


## License
This software is licensed under a MIT license, but request users cite our publication.

Jonathan D. Smith, Samuel Hall, George Coombs, James Byrne, Michael A. S. Thorne, J. Alexander Brearley, Derek Long, Michael Meredith, Maria Fox, (2022), Autonomous Passage Planning for a Polar Vessel, arXiv, https://arxiv.org/abs/2209.02389
Jonathan D. Smith, Samuel Hall, George Coombs, James Byrne, Michael A. S. Thorne, J. Alexander Brearley, Derek Long, Michael Meredith, Maria Fox, (2022), Autonomous Passage Planning for a Polar Vessel, arXiv, https://arxiv.org/abs/2209.02389

For more information please see the attached ``LICENSE`` file.

Expand Down
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 9d6a109539075ab46ad3eba1940d0e3c
config: 9148f976cde425ab5b276686e1a054e9
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added docs/html/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/html/.doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/html/.doctrees/sections/Examples.doctree
Binary file not shown.
Binary file added docs/html/.doctrees/sections/Installation.doctree
Binary file not shown.
Binary file added docs/html/.doctrees/sections/Outputs.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14 changes: 7 additions & 7 deletions docs/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ Welcome to the PolarRoute Manual Pages
======================================

PolarRoute is a tool for the optimisation of routes for maritime vehicles travelling in polar waters.
It leverages `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_; a package designed to
It depends on `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_; a package designed to
discretise the world from heterogeneous data sources (follow link for more details and docs).
This software package has been developed by the **British Antarctic Survey** (BAS), primarily for the
optimisation of polar routes for the BAS research vessel RRS Sir David Attenborough, though it is applicable
This software package has been developed by the **British Antarctic Survey** (BAS). It was originally designed primarily for the
optimisation of polar routes for the BAS research vessel RRS Sir David Attenborough, however it is applicable
to any vessel (e.g. AUVs). The software is written in Python and is open source.

Plotting functionality for the outputs of PolarRoute is provided by the `GeoPlot <https://github.com/antarctica/GeoPlot>`_ package, also developed at BAS.

For more information on the project, please visit the `PolarRoute website <https://www.bas.ac.uk/project/autonomous-marine-operations-planning/>`_
and follow our `GitHub repository <https://github.com/antarctica/PolarRoute>`_.

Expand All @@ -21,14 +23,12 @@ Contents:
:maxdepth: 2
:numbered:

./sections/Code_overview
./sections/Installation
./sections/ipython_notebooks
./sections/Examples
./sections/Command_line_interface
./sections/Configuration/Configuration_overview
./sections/Outputs
./sections/Code_overview
./sections/Vehicle_specifics
./sections/Route_calculation
./sections/Route_optimisation
./sections/Examples

81 changes: 61 additions & 20 deletions docs/html/_sources/sections/Command_line_interface.rst.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
.. _cli:

###############################
Command Line Interface
###############################

The PolarRoute package provides multiple CLI entry points, intended to be used in succession to plan a route through a digital environment.

.. figure:: ./Figures/PolarRoute_CLI.png
:align: center
:width: 700
^^^^^^^^^^^
create_mesh
^^^^^^^^^^^
The *create_mesh* entry point builds a digital environment file from a collection of source data, which can then be used
by the vessel performance modeller and route planner.

::

create_mesh <config.json>

positional arguments:

::

config : A configuration file detailing how to build the digital environment. JSON parsable

The format of the required *config.json* file can be found in the `"Configuration - Mesh Construction" <https://antarctica.github.io/MeshiPhi/html/sections/Configuration/Mesh_construction_config.html>`_ section of the `MeshiPhi documentation <https://antarctica.github.io/MeshiPhi/>`_ .
There are also example configuration files available in the directory :code:`examples/environment_config/grf_example.config.json`

optional arguments:

::

-v (verbose logging)
-o <output location> (set output location for mesh)

*Overview figure of the Command Line Interface entry points of PolarRoute*

^^^^^^^^^^^
add_vehicle
Expand All @@ -24,11 +47,11 @@ positional arguments:

::

vessel_config : A configuration file detailing the vessel to be simulated in the digital environment.
vessel_config : A configuration file giving details of the vessel to be simulated.
mesh : A digital environment file.

The format for the required *<vessel.json>* file can be found in the :ref:`configuration - vessel performance modeller` section of the documentation.
The required *<mesh.json>* file can be created using the *create_mesh* command from the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ package.
The format for the required *vessel.json* file can be found in the :ref:`configuration - vessel performance modeller` section of the documentation.
The required *mesh.json* file can be created using the *create_mesh* command from the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ package.

optional arguments are

Expand Down Expand Up @@ -81,11 +104,11 @@ positional parameters:
waypoints: A .csv file containing waypoints to be travelled between.


The format for the required *<route_config.json>* file can be found in the :ref:`configuration - route planning` section of the documentation.
The required *<vessel_mesh.json>* file can be generated using the :ref:`add_vehicle` command shown above.
The format for the required *<waypoints.csv>* file is as follows:
The format for the required *route_config.json* file can be found in the :ref:`configuration - route planning` section of the documentation.
The required *vessel_mesh.json* file can be generated using the :ref:`add_vehicle` command shown above.
The format for the required *waypoints.csv* file is as follows:

As table:
As a table:

+------------------+---------------+---------------+---------+---------------+
| Name | Lat | Long | Source | Destination |
Expand All @@ -101,7 +124,7 @@ As table:
| Elephant Island | -60.54722222 | -55.18138889 | | |
+------------------+---------------+---------------+---------+---------------+

As .csv:
In .csv format:

::

Expand All @@ -112,8 +135,8 @@ As .csv:
Falklands,-55.63472222,-64.88,,
Elephant Island,-60.54722222,-55.18138889,,

Additional waypoints may be added by extending the '<waypoints.csv>' file. Which waypoints are navigated between is determined by
added a **X** in either the *Source* or *Destination* columns. When processed, the route planner will create routes from all
Additional waypoints may be added by extending the *waypoints.csv* file. Which waypoints are navigated between is determined by
adding an **X** in either the *Source* or *Destination* columns. When processed, the route planner will create routes from all
waypoints marked with an **X** in the source column to all waypoints marked with a **X** in the *destination* column.

optional arguments are
Expand All @@ -126,7 +149,7 @@ optional arguments are
-d (output Dijkstra path as well as smoothed path)


The format of the returned *<route.json>* file is explained in :ref:`the route.json file` section of the documentation.
The format of the returned *route.json* file is explained in :ref:`the route.json file` section of this documentation.

^^^^^^^^^^^^^^^
calculate_route
Expand All @@ -153,7 +176,7 @@ optional arguments:

Running this command will calculate the cost of a route between a set of waypoints provided in either csv or geojson
format. The route is assumed to travel from waypoint to waypoint in the order they are given, following a rhumb line.
The format of the output *<route.json>* file is identical to that from the :ref:`optimise_routes` command.
The format of the output *route.json* file is identical to that from the :ref:`optimise_routes` command.
This is explained in :ref:`the route.json file` section of the documentation. The time and fuel cost of the route will
also be logged out once the route file has been generated. If the user-defined route crosses a cell in the mesh that is
considered inaccessible to the vessel then a warning will be displayed and no route will be saved.
Expand Down Expand Up @@ -185,7 +208,25 @@ optional arguments:
^^^^^^^^
Plotting
^^^^^^^^
Meshes produced at any stage in the route planning process can be visualised using the GeoPlot
library found at the relevant `GitHub page <https://github.com/antarctica/GeoPlot>`_. Meshes and routes can also be
plotted in other GIS software such as QGIS by exporting the mesh to a common format such as .geojson or .tif using
the export_mesh command described in the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ docs.
Meshes produced at any stage in the route planning process can be visualised using the :code:`plot_mesh` cli command from the `GeoPlot <https://github.com/antarctica/GeoPlot>`_
library. Meshes and routes can also be plotted in other GIS software such as QGIS by exporting the mesh to a commonly used format such
as .geojson or .tif using the export_mesh command described in the `MeshiPhi <https://github.com/antarctica/MeshiPhi>`_ docs.

::

plot_mesh <mesh.json>

optional arguments:

::

-v : verbose logging
-o : output location
-a : add directional arrows to routes
-r : plot an additional route from a file

.. figure:: ./Figures/PolarRoute_CLI.png
:align: center
:width: 700

*Overview figure of the Command Line Interface entry points of PolarRoute*
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ route-planning process as command-line arguments or through a Python script.

Example configuration files are provided in the `config` directory.

The format of the config used to generate an environmental mesh can be found in the `"Configuration - Mesh Construction" <https://antarctica.github.io/MeshiPhi/html/sections/Configuration/Mesh_construction_config.html>`_ section of the `MeshiPhi documentation <https://antarctica.github.io/MeshiPhi/>`_ .

Descriptions of the configuration options for the Vessel Performance Modelling can
be found in the :ref:`Configuration - Vessel Performance Modeller` section of the
documentation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _route config:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configuration - Route Planning
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading