Giter VIP home page Giter VIP logo

flask-routing's Introduction

README FLASK GEOSPATIAL example

README Author: Evan Fraser

INTRODUCTION The code uses OpenLayer to present a map of the area west of DC that calculates geospatial distance between points. To do this, the user should click multiple consecutive points to set (lat,lon) positions on the map. Once a double click is made the application gathers all the points and calculates geospatial distances between each. The (lat,lon) and distances between each are presented below the map as html tables after the double click event.

SERVER CALCULATION The Flask web server does rudimentary nearest neighbor calcs from the json coords and distances. From there a number of 'closest' lines are calculated; all based on line-of-sight as viewed from the visible map. Then kml is generated and pushed to the client. The client renders the kml.

TODO Though the respective steps are in place, some details still need ironed out. For example OpenLayer doesnt seem to easily accommodate POST sending JSON from the client and then the response being pure kml.

DEVELOPER NOTES

Python version: Anaconda 3

IDE: PyCharm Community Edition 2018.2 (for personal use only)

This is a Flask (server based) version of the "Routing" project also on github. Initial tests in generating kruskal networks with Javascript showed it wasn't ideal for the task (working with and copying matrices resulted in slow performance). So this version starts with that initial code, but will remove it in favor of a python implementation which will be called via REST.

To run the web server application type (in the anaconda (commandline) prompt):

`python runner.py runserver`

then navigate to the url that the console lists. It's likely http://localhost:5000 or very similar. Use the map as described in the INTRODUCTION section. FYI: This is a prototype, so the calculated lines are still work in progress.

REFERENCE OpenLayers https://openlayers.org/en/latest/examples/ Look at web/templates/index.html for current version. Last check: v4.6.5

Stamen Maps http://maps.stamen.com/

flask-routing's People

Contributors

bulivyf 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.