Coder Social home page Coder Social logo

story-tools's Introduction

Build Status

story-tools

Installation

run

    npm install
    bower install
    gulp develop

If you haven't used or installed Gulp previously, you may also need to run npm install --global gulp-cli before running gulp develop.

Alternatively, run

    docker-compose build
    docker-compose up

Accessing the examples

Example index will be available at: http://localhost:8001

Getting around

There are 3 large distinctions in the structure and bundling of code:

  • core - any core viewing/playback logic + provided UI this includes API, controller logic and the timeline and timeslider UI
  • edit - any non-UI editing related logic, parsing, etc.
  • ng - angular wrappers/integration for both core and edit

Within these categories, the specific functionality includes (not all physically separate):

  • time - timeline and timeslider integration
  • style - ol3/SLD styling
  • pins - spatial story-telling annotations
  • boxes - spatial story-telling chapters
  • layout - layout of viewing mode

Running tests in the browser

run

gulp karma --server

Karma will be available at: http://localhost:9876/debug.html

story-tools's People

Contributors

bartvde avatar coop56 avatar cuttlefish avatar davisc avatar emilyashley avatar garnertb avatar highsource avatar ischneider avatar jwileczek avatar lhcramer avatar trepagnier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

story-tools's Issues

icon commons client and UI

Once an icon commons API is settled on, need client, services and UI

Should:

  • use CORS ideally or JSONP
  • list tags and collections
  • list icons per tag(s) and/or collection
  • generate icon coloring URL for use in geoserver (see #85) based on style parameters
  • support configurable host

~~ allow search by icon name ~~ (not doing for now as tags basically support this)

issue with playback of map 2156

running it for the first time, the last 2/3 of the story don't update anymore

if it runs from cache though it works fine

need to further investigate

svg icon urls for SLD

To enable SVG icon coloring for geoserver, we need to:

  • generate SLD with appropriate URLs (e.g. /icon/school.svg?color=red&stroke=blue or such)
  • have an instance of an icon-commons endpoint available
  • verify with geoserver

ol3 marker size slightly off

@bartvde, totally minor but internally the canvas size for 'marks' (our builitin icons) is off - it doesn't account for the internal computation. This is a very minor issue.

See:

// final size is actually (2 * (radius + stroke.width)) + 1

And the same commit for adjustments in test expectations to account for the change. This commit uses the ol3 styles to render the mark/symbol drop-down in anticipation of adding more SVG support.

revisit color approach for unique classification

Currently using a palette with few colors. For large unique results, this yields duplicate colors.

We could:

  • allow using a color ramp
  • limit classes to size of palette
  • interpolate between palette colors
  • make palettes bigger

complete line style types

Currently simple and unique are implemented.

The others from the designs are:

  • weighted (use statistics to determine various stroke-width classes)
  • symbol (unsure of this one...)
  • choropleth (use statistics to determine stroke-color)

Punt on these until we understand the details further. My feeling is that having the width and color rules exclusive to each other is an arbitrary limitation and we should probably combine the two.

stop and then start does not always work

to reproduce, add PD1F89_54 and then press play, wait 5 steps. Press stop. Then move back 3 positions with the << button. Press start again, it does not start (it starts but only moves 1 time step).

cc @ischneider

means other than style to apply time filter for vector features

Currently the time filtering is being applied via an ol3 style. This has linear performance. It would be nicer to 'select' the features from an index based on the current time. I tried this by maintaining a separate cache of features but the source kept making further requests (probably because I was using 'clear').

Instead of loading features via the bounding box[1], it probably makes sense to load them (for now), all at once and filter client-side as needed. Initially, filtering can be naive but I am resurrecting[2] my indexing code and it seems to show better performance.

Eventually, we should support loading features by time slice...

[1] as currently implemented, I noticed more requests occurring while zooming out - didn't investigate but thought everything would have been loaded at the first zoom level (as it matches the extent of the layer)
[2] more tests and a minor cleanup needed yet

using natural breaks raises WPS error

point range created with the interval constructor must have min and max endpoints included

not sure yet what this means

Example request:

<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:xlink="http://www.w3.org/1999/xlink"
    xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wfs="http://www.opengis.net/wfs" service="WPS"
    version="1.0.0">
    <ows:Identifier>vec:FeatureClassStats</ows:Identifier>
    <wps:DataInputs>
        <wps:Input>
            <ows:Identifier>features</ows:Identifier>
            <wps:Reference xlink:href="http://geoserver/wfs" method="POST" mimeType="text/xml">
                <wps:Body>
                    <wfs:GetFeature service="WFS" version="1.1.0" outputFormat="GML2">
                        <wfs:Query xmlns:topp="http://www.openplans.org/topp" typeName="topp:states"
                        />
                    </wfs:GetFeature>
                </wps:Body>
            </wps:Reference>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>attribute</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>P_MALE</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>classes</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>5</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>method</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>NATURAL_BREAKS</wps:LiteralData>
            </wps:Data>
        </wps:Input>
        <wps:Input>
            <ows:Identifier>stats</ows:Identifier>
            <wps:Data>
                <wps:LiteralData>mean</wps:LiteralData>
            </wps:Data>
        </wps:Input>
    </wps:DataInputs>
    <wps:ResponseForm>
        <wps:RawDataOutput>
            <ows:Identifier>results</ows:Identifier>
        </wps:RawDataOutput>
    </wps:ResponseForm>
</wps:Execute>

implement stroke style

but hitting an ol3 issue here that stroke style does not work on point symbols somehow ...

support heatmap

@bartvde UI wise, this seems somewhat trivial - support the various layer options for the algorithm and provide an attribute chooser.

For a client implementation, it looks like we'll have to replace the layer in the map.

For a SLD approach (probably won't work well with tiling), we'd need to support generating the rendering transform. Let's make this a lower priority but this means introducing the concept that a style is only usable if client-side.

SLD generation

look into SLD generation from the intermediate style objects

ol3 style generation

need to build out service that transforms style model to ol3 styles

current (incomplete) approach:

module.factory('ol3StyleConverter', function() {

Need to support:

  • complete all simple styles (single rule)
  • inherit base from parents, encode rules
  • support colored, scaled SVG iicons (see for POC: 80809f5)

Also should:

  • remove this logic from services.js to avoid conflicts
  • formalize icon library service API

revisit tooltips

removed w/ @76ef74b59188f664d3c972daf0b911a52c713fc8 due to very high # of watches

this is a reminder

Bower unable to correctly solve dependencies due to packages conflicts

Doing an

npm install
bower install

I get an error about dependencies solving error e.g

Unable to find a suitable version for angular, please choose one:
1) angular#1.2.21 which resolved to 1.2.21 and is required by time-controls
2) angular#>=1 which resolved to 1.2.21 and is required by angular-bootstrap#0.11.2
3) angular#1.3.8 which resolved to 1.3.8 and is required by angular-mocks#1.3.8Prefix the choice with ! to persist it to bower.json

investigate WPS classify issues

a few examples, using tasmania water bodies and field AREA, all 3 methods raise errors, though different ones

Process failed during execution
java.lang.IllegalArgumentException: point range created with the interval constructor must have min and max endpoints included
point range created with the interval constructor must have min and max endpoints included
story-tools-edit-ng.js:660 Process failed during execution
java.lang.ArrayIndexOutOfBoundsException: -1
-1
story-tools-edit-ng.js:660 Process failed during execution
java.lang.IllegalArgumentException: minValue greater than maxValue
minValue greater than maxValue

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.