Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 5.48 KB

readme.asc

File metadata and controls

104 lines (72 loc) · 5.48 KB

35153043

Mapping tools for plotting topographic analyses using python

I am very sorry to say that the documentation for these tools are minimal. We have gone through several iterations of design of these tools so there are many useless dead ends in the repository. Sorry about that. The readme below should give you some insights into where to start if you are interested in trying to use these before we actaully release them with documentation.

General information

These are some plotting tools for working with geospatial data in python. The tools are mostly in the subdirectories in this repository. They are linked packages (in that each subdirectory has an init file). We have not at this stage created an installer: you simply need to clone this repository and use them from that directory.

Installation

At the moment we do not have a functioning pip installer. So to run the tools you need to: . Clone this repository. . install all the required packages . Either add the LSDMappingTools directory to your [python path] or run the tools within the LSDMappingTools directory.

Getting the dependencies working the Docker way

Docker is a software package that allows you to run containers inside your computer. These containers, in the case of LSDMappingTools, have been carefully constructed by the LSDTopoTools gnomes to make sure all of the necessary packages are installed. All you need to do is download the container to start working! Easy, right? Well, Docker is a bit of a pain to install on Windows. You will need Windows 10 Enterprise for it to work. On other operating systems it is a breeze.

To get it to work:

  1. Install docker

  2. Download the container from a terminal/powershell window:

    $ docker pull lsdtopotools/lsdtt_viz_docker
  3. Run the container

    $ docker run -it -v C:\LSDTopoTools:/LSDTopoTools lsdtopotools/lsdtt_viz_docker
  4. Run the setup script by running sh LSDTT_start.sh.

For more details see the LSDMappingTools dockerhub page.

Getting the dependencies the Conda way

So actually our Docker container uses miniconda. But all the setup is performed before the container is built so you never need to deal with it. You can set up in your own enviroment, however. The instructions are below. We do not recommend this unless there is some reason you cannot install docker.

Setting up python using a conda virtual environment

  1. Download and install miniconda on your host machine.

  2. Open a command prompt (use the start menu to search for cmd.exe)

  3. Get our environment file. This is the version that work on our docker container. It is python 3 and based on a 64 bit linux system. It is the most up to date version of the python environment.

  4. Create the environment from that file with:

    > conda env create -f environment_docker.yml

    I’m afraid this will take a little while. Actually it will take a very long time. Sorry.

  5. Activate the environment:

    > activate LSDTT
Note
This environment does not include spyder, you can install it with conda install -n LSDTT spyder

The sub-packages are:

  • LSDPlottingTools: A collection of utilities for plotting. The main geospatial plotting routines are in LSDMapFigure but there are some older plotting routines, along with a lot of geospatial bells and whistles, within this packages. The other packages don’t work without this.

  • LSDMapArtist: The first attempt by Declan Valters to build a artist-based geospatial plotting platform. The artist bit is an attempt to have a interface something like matplotlib. This has been replaced by LSDMapFigure and is here for educational purposes.

  • LSDMapFigure: This contains objects used for geospatial plotting.

  • LSDChiMappingExamples: Don’t bother with this for now. It is part of some tutorials we are developing bt those aren’t complete so you don’t need to look in there.

  • LSDMapWrappers: These have some simple plotting functions that allow users to make maps with minimal lines of code.

Actually plotting something

We have written some instructions on using the basic functionality of the mapping tools in the LSDTopoTools documentation. You can get started here:

Code generated documentation

There is some code generated documentation. You can find it here.

Notes

If you are developing this code, you should follow the documentation style explained on the readthedocs napolean page.