Giter VIP home page Giter VIP logo

knudepunkter's People

Contributors

anastassiavybornova avatar anerv avatar mszell avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

knudepunkter's Issues

importing modules that reference qgis project

doesn't work currently for plot_func.py functions that reference the qgis project homepath (currently we run the the plot_func.py script from within the qgis script); same for eval

try with sys.path.append() to see if it solves this problem

check with our scripts that currently execute the modules instead of importing them, try to import them, fingers crossed

restructure data handling for non-danish use cases

@anerv what do you think of this?

general setup:

  • data/raw subfolders: this is where the user provides input.
  • data/processed mirorring the data/rawstructure. contains all the gpkg output of the evaluation (currently saved to results) and all files that are currently saved to data/processed/workflow_steps (distributed across subfolders, e.g. all the nodes.. and edges.. files from data/processed/workflow_steps will instead go into data/processed/network)
  • results to contain only plots and stats subfolders (the gpkg outputs are saved into corresponding data/processed subfolders)

Repo will look like so:

├── data
│   ├── processed
│   │   ├── elevation
│   │   ├── linestring
│   │   ├── network
│   │   ├── point
│   │   └── polygon
│   └── raw
│       ├── elevation
│       ├── linestring
│       ├── network
│       ├── point
│       ├── polygon
│       └── studyarea
├── results
│   ├── plots
│   └── stats
├── scripts
└── src

Required user input

  • data/raw/studyarea study area polygon
  • data/raw/polygon polygon layers to evaluate (hardcoded options: nature, culture, agriculture, tourism, verify). each layer is optional.
  • data/raw/point point layers to evaluate (hardcoded options: facility, service, poi)
  • ??? data/raw/linestring potentially: feature-match (like BikeDNA) to other network provided in linestring format? but let's rather leave that as future feature requeset
  • data/raw/elevation elevation data for study area

User configurations

In config file:

  • study area name
  • proj crs to use
  • buffer to use for polygon layers
  • buffer to use for point layers
  • segment lengths
  • elevation bands

Denmark use case:

We say that in general: user needs to generate input themselves. However in the case of DK: We provide (in separate repo) all the code and data necessary to generate the inputs to data/raw, for a user-provided region (defined by municipality codes). Output: the output folder, after running the single script ("merge study layers") for the DK municipalities indicated by the user in the config file here, will contain exactly the folders and data that are needed as user input for the "general" repo above.

DK-repo will look like so:

├── data
│   ├── elevation
│   │   ├── 1234
│   │   ├── 5678
│   │   └── 9012
│   ├── linestring
│   │   ├── 1234
│   │   ├── 5678
│   │   └── 9012
│   ├── network
│   │   └── technical_network_allDK.gpkg
│   ├── point
│   │   ├── 1234
│   │   ├── 5678
│   │   └── 9012
│   ├── polygon
│   │   ├── 1234
│   │   ├── 5678
│   │   └── 9012
│   └── studyarea
│       └── municipality_boundaries.gpkg
├── output
│   ├── elevation
│   ├── linestring
│   ├── network
│   ├── point
│   ├── polygon
│   └── studyarea
├── scripts
│   └── merge_layers_for_study_area.py
└── src

summary statistics to add

  • for each of the polygon layers, the number and percentage of kilometers of cycle node network within that layer
  • for each of the point layers, the number and percentage of reached vs. unreached points
  • for the elevation layer, the number and percentage of kilometers in each elevation category
  • for the entire network, the number of nodes, stretches, and loops
  • for the area covered by the network, the average node density

what else? suggestions very welcome. and how? suggestions equally welcome. i thought of having a separate script at the very end that computes all the statistics above; saves the result to a json; and then uses the results to make a series of png plots. (let's save ourselves the pdf fanciness for now - i would suggest to just point to the subfolder which will contain the png files)

insert parallel edge finding BEFORE network creation

  • replace 02a by (extended) "identify parallel edges"
  • unique edge and node ID is created here, and used in all future scripts
  • rewrite the 02b script to make it fit updated 02a output
  • network slope should NOT create an edge ID (but use the existing previously created one)
  • use the parallel edge information in the evaluate network script

! folkersma raw data >> plotting "technical layer" (to see the details)
! folkersma raw data MINUS parallel edges >> for evaluation layer (linestrings, not networkx object)
! folkersma raw data MINUS parallel edges >> polygonization

? folkersma raw data PLUS child/parent info >> to create a network object

  • edge between 2 child nodes: important
  • 2 edges between child nodes: 1 of them irrelevant, 1 of them important
  • child node == no navigation happening; but can still be important for the network structure
  • (compare on plot: MAIN vs CHILD nodes)

main-main >> by design there should be no parallel edges
main-child >> by design there should be no parallel edges
child-child >> parallel edge possible; if >> count; if 1 >> keep; if 2 >> keep the longer one

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.