Coder Social home page Coder Social logo

cg's Introduction

cg

Cartographic generalization

Requirements

  • Node.js 9+

Installation

git clone https://github.com/gis4dis/cg.git
cd cg
npm install

Run

OpenLayers in the browser

npm run dev
# open localhost:3000
```bash

### OpenLayers in Node.JS
```bash
node task/ol-node.js

Run Jasmine Specs

node spec/run

Repository Structure

/build          NextJS build directory
/components     NextJS components
/data           any data for testing
/pages          NextJS pages
/src            gis4dis CG subsystem (ES6 modules should be used)
/static         NextJS static content
/task           Node.JS commands (ES6 modules should not be used)

cg's People

Contributors

bulva avatar jirik avatar

Watchers

James Cloos avatar Pavel Grochal avatar  avatar  avatar

cg's Issues

Missing dependency

This dependency was not found:

  • @turf/polygon-smooth in ./node_modules/gis4dis-generalizer/src/cg/helpers.js

To install it, you can run: npm install --save @turf/polygon-smooth

Please check the dependency in your package.json.

Image is not defined

Error during the caching (branch imageerror):

Image is not defined

ReferenceError: Image is not defined
    at new Image (/home/bulva/WebstormProjects/cg/node_modules/ol/style/iconimage.js:34:30)
    at Function.module.exports../node_modules/ol/style/iconimage.js._ol_style_IconImage_.get (/home/bulva/WebstormProjects/cg/node_modules/ol/style/iconimage.js:106:17)
    at new get (/home/bulva/WebstormProjects/cg/node_modules/ol/style/icon.js:108:42)
    at Symbolizer.buildStyle (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/index.js:46715:24)
    at Symbolizer.styleBasedOnProperty (/home/bulva/WebstormProjects/cg/src/cg/symbolizers/Symbolizer.js:166:13)
    at styleBasedOnProperty (/home/bulva/WebstormProjects/cg/src/cg/generalize.js:101:53)
    at Array.forEach (<anonymous>)
    at forEach (/home/bulva/WebstormProjects/cg/src/cg/generalize.js:88:24)
    at Array.forEach (<anonymous>)
    at forEach (/home/bulva/WebstormProjects/cg/src/cg/generalize.js:82:27)
    at Object.generalize (/home/bulva/WebstormProjects/cg/component/Map.js:13:28)
    at __webpack_require__ (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/webpack/bootstrap 436ba26c890e5ef3d3bb:21:1)
    at Object../pages/index.js (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/index.js:46075:73)
    at __webpack_require__ (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/webpack/bootstrap 436ba26c890e5ef3d3bb:21:1)
    at Object.2 (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/index.js:46833:18)
    at __webpack_require__ (/home/bulva/WebstormProjects/cg/build/dist/bundles/pages/webpack/bootstrap 436ba26c890e5ef3d3bb:21:1)

It's terribly slow

About 4 second per frame when click to play (e.g. 2019-05-06). Not sure when this problem appeared, but it wasn't so slow before (it used to be definitely under 1 second). I guess it's related to aggregation/interpolation.

NaN value in CombinedSymbol setBuffer method

In CombinedSymbol, NaN value appears in maxValue variable if feature's array of values is shorter than the length given by date range - value_idx can overflow values lenght:
https://github.com/gis4dis/cg/blob/master/src/cg/symbolizers/CombinedSymbol.js#L139

And it looks like at least in this case value_index_shift is not taken into account, please check the documentation:
https://github.com/gis4dis/poster/wiki/Interface-between-MC-client-&-CG-v2#parameters

Generalization tasks

Generalization

  1. Concave envelope (1027ce3)
  2. Distance between points - find a middle of the cluster and replace by the point (partially d27a3ed)
  3. Density of points - size of the circle and number of the points inside the circle
  4. BFR (Best Fit Rectangle) - ellipse from the rectangle (find orientation). Concave or ellipse?

Testing between layers

  1. Intersections between layers (inside or cross)
  2. Compute value of intersection

Implementation of clustering

Implement clustering of points based on line shapes and polygons shapes. Should be used turf.js including direction of the points (and the cluster).

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.