Skip to main content

Command line utility to transform model output into a flowmap that can be used for games or gpu-based visualizations.

Project description

===============================
Flowmap generator
===============================


.. image:: https://img.shields.io/pypi/v/flowmap.svg
:target: https://pypi.python.org/pypi/flowmap

.. image:: https://img.shields.io/travis/openearth/flowmap.svg
:target: https://travis-ci.org/openearth/flowmap

.. image:: https://readthedocs.org/projects/flowmap/badge/?version=latest
:target: https://flowmap.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://pyup.io/repos/github/openearth/flowmap/shield.svg
:target: https://pyup.io/repos/github/openearth/flowmap/
:alt: Updates


Command line utility to transform model output into a flowmap that can be used for games or gpu-based visualizations.


* Free software: GNU General Public License v3
* Documentation: https://flowmap.readthedocs.io.


Scripts
=======

Scripts that generate flowmaps for specific models:

- matroos_flowmap.sh (download model results for DCSM model and transform them to a flowmap)

Usage
=====

To use the software you can download the latest version using docker.
If you have docker installed you can download the software using the command:

.. code:: bash

docker pull openearth/flowmap

You can run the software by typing the command (for now please prepend the flowmap command with `/opt/conda/envs/py35/bin`.

.. code:: bash

# help
docker run openearth/flowmap flowmap --help

# help per command
docker run openearth/flowmap flowmap generate --help

# generate flowmap
docker run openearth/flowmap flowmap generate delft3doutput.nc --src_epsg=28992 --dst_epsg=3857

# compute subgrid interpolation
docker run openearth/flowmap flowmap subgrid delft3doutput.nc aw_refi_def_asc.tiff --src_epsg=28992

# export tables to nc format
docker run openearth/flowmap flowmap export --format tables --src_epsg=28992 delft3doutput.nc aw_refi_def_asc.tiff

# regrid the output to a tiff file can be done with gdal
gdal_grid -zfield subgrid_waterlevel groesbeek_map_waterlevel_last.geojson groesbeek_map_waterlevel_last_idw.tiff -outsize 16069 20071 -a invdistnn:power=3.0:max_points=4:radius=8 -txe 188819.156 196867.156 -tye 426992.399 416956.899

# extracting the relevant contour
gdalwarp -q -cutline "D:/11201337 Water op Straat WS Rivierenland/008. Model/B. Results/LeerdamWest/case14/Leerdam_contour.shp" -tr 0.5 0.5 "D:/11201337 Water op Straat WS Rivierenland/008. Model/F. Post Subgrid/Leerdam/from Fedor/wd_v20180131.tif"


In the case of Delft3D you can convert the default nefis output to netCDF using the vs_trim2nc.m matlab script.
There is also direct nefis support in development, but that has not been properly tested.
By default you will want to project to the web mercator projection. Then you can reuse the velocities as pixels/s in an animation.



Features
--------

* flowmap: animated vectorfield used for interactive particles
* streamlines: generate geojson of streamlines
* subgrid: generate subgrid waterdepth

Credits
---------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2016-07-25)
------------------

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flowmap-1.0.0.tar.gz (32.6 kB view details)

Uploaded Source

Built Distribution

flowmap-1.0.0-py2.py3-none-any.whl (32.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file flowmap-1.0.0.tar.gz.

File metadata

  • Download URL: flowmap-1.0.0.tar.gz
  • Upload date:
  • Size: 32.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flowmap-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aae7e12317ce991a50bf1032dc9b2f4f96acd4d935342df1fb1fd19e21066d58
MD5 1e27fe4274767f4d9715aa1713e64937
BLAKE2b-256 f8ce0b483db80e457822f6b3f299093162126e62ef09cdee86d2f30291ec936c

See more details on using hashes here.

File details

Details for the file flowmap-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flowmap-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c967faba687f0dd6a10fee8f884ef0a7aff444d32408e6f7cc37a98789a7f2bf
MD5 a787ad8770e586fc6254c990d3549d03
BLAKE2b-256 5a5c8cf6eaf36f760022eaad938059922cf558fd3dfc23323c2cd7ccc8eaa1b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page