systemapic / wu

Systemapic web server and API
https://systemapic.com
2 stars 3 forks source link

Task 1: filter by mask #525

Open knutole opened 8 years ago

knutole commented 8 years ago

Filter by mask

Tid/arbeid:

Totalt: 24 timer

knutole commented 8 years ago

Use API for adding mask, uploading. Wait with GUI.

knutole commented 8 years ago

Kunne ha flere masker i samme prosjekt

Tid/arbeid:

Totalt: 24 timer

knutole commented 8 years ago

Masks

Filters

knutole commented 8 years ago

Refactors

Description controls

Custom controls

Custom controls

knutole commented 8 years ago

Flow

  1. Upload mask to layer
  2. Mask is added as topojson + on server (postgis)
  3. Hover-capabilities on mask - filter is activated by clicking on the mask.
  4. Selectors in GUI for which mask should be active.
  5. Average data (for snow-raster chart) should be added separately, with an ID connecting it to the mask (how?) This data-type is so specific, it should be kept out of the GUI, really. Or made very general.
  6. GUI should be centered on the plugin - snow-chart plugin. Adding mask/filter must be more generic on the server-side, but could be stored directly on the layer.

Do this in API first, then GUI (if necessary) afterwards. Show added masks in GUI.

knutole commented 8 years ago

Options box

  1. List of masks - clickable (and showing if clicked)
knutole commented 8 years ago

Need to add 1) raster mask, 2) topojson representation of mask, 3) historical scf data for mask; all at the same time to API.

knutole commented 8 years ago

Scratch

Need to do it well the first time. No more patch work!

  1. API scripts for controlling all cube. No more GUI. Implement GUI after everything works perfectly.
    • con's: not possible to edit too much the cube
    • pro's: easier to keep clean and correct.
    • Datasets, mask must be added on upload
    • must take options, to separate deformation uploads (clicking on pixel to get history) from snow-raster (calculate averages, etc)
  2. Calculate the averages, don't upload average datasets. It's so unclean and ugly! Rather, when uploading, calculate the average of the whole, plus calculate average per mask. NB! Unfortunately not really possible, as it requires uploading 5000 rasters. It's actually better to use pre-calculated averages... Which sucks!
  3. Should be possible to add several masks.
  4. Masks must be selectable - perhaps in the custom plugin. Cleaner than in layer menu.
  5. Cubes are separate from single rasters. Focus on cubes now.
  6. Deformation will also become cubes. Keep this in mind. Deformation does not have any masks, so should work without mask also.
  7. Use geojson as mask for now. Implement topojson when everything works perfectly.
knutole commented 8 years ago

Difference between deformation and snow raster

Need an options object to control some of these options when uploading to API.

knutole commented 8 years ago

todo

for filter, mask issues

bugs

optimizations

repo

tests

scripts

knutole commented 8 years ago

PR's

knutole commented 8 years ago

PRI

  1. årlige line-graphs
  2. update scripts for cube (til eirik)
knutole commented 8 years ago

Yearly chosen plots

Tid/arbeid:

Totalt: 25 timer

knutole commented 8 years ago

Different scf data:

Line graphs therefore are created from data from both sources. 2016 from query data, 2014 from file data.

Each mask has different data - both for years 2000-2015 and 2016. So each mask must keep own dataset...

When calculating averages, the last unfinished year should not be part. Not a problem.

Line graphs should read data for relevant year.

Average graph should read all full-year data.

_prepareData only needs to run once per mask. _parseDates only needs to run once per mask.

When adding mask (which happens on click right now, could be done beforehand), data is queried from server and file-data is added.

this._cache.mask[mask.id] = {
    mma : [365...] // min, max, average of all full years
    years : {
        2016 : [], // queried data,
        2015 : [], // data from file
        2014 : [], // data from file
    }

}