Code Monkey home page Code Monkey logo

kml-movie-python's Introduction

Plotting trajectories over time on Google Earth with Python

This python script transform one or several temporal trajectories composed of a set of nodes and links into a KML file plotting these trajectories over time on Google Earth. More specifically, the script takes as input two csv files with column names, the value separator is a semicolon ";".

  • Nodes.csv is composed of 3 columns providing geographical information abbout the nodes:

    1. Node ID
    2. Longitude of the node
    3. Latitude of the node
  • Links.csv is composed of 5 columns providing information about the "temporal" link between nodes defined in Nodes.csv. The links should be sorted by starting time.

    1. Link ID (numeric)
    2. Node of origin
    3. Node of destination
    4. Departure time of the link from the node of origin (date format '2014-01-01T08:00:00Z')
    5. Arrival time of the link to the node of destination
  • The script has also 7 parameters to set the kml movie's time windows, the nodes' and links' visibility (remaining time on screen), the nodes' and links' styles and the name of the output file. Their values can be set directly into the Python script kmlMovie.py.

  1. begin: Starting time of the movie (date format '2014-01-01T08:00:00Z')
  2. end: Ending time of the movie (date format '2014-01-01T08:00:00Z')
  3. delay_node: Number of seconds the nodes remain visible after their creation
  4. delay_link: Number of seconds the links remain visible after their creation
  5. hrefnodestyle: Hyperlink leading to the node style file
  6. rgbcolorlink: Define the links color with an rgb code
  7. output_file: Name of the output file

The code is not very complicated and you can test it directly to plot three temporal trajectories in Madrid. If you want more details about this script feel free to visit this post.

Enjoy!

If you need help, find a bug, want to give me advice or feedback, please contact me! You can reach me at maxime.lenormand[at]irstea.fr

kml-movie-python's People

Contributors

maximelenormand avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.