Giter Site home page Giter Site logo

clip-tool-for-echarts's Introduction

Clip Tool for ECharts

Clip Tool for ECharts 是一个基于 node 的大数据切割工具,用于将点数据和线数据切割、存储,以支持 ECharts 大数据量(百万以上)的渲染场景。

用法

  • 第一步:配置 config.json 文件

  • 第二步:运行 node 命令 $ npm start,(运行并输出进度命令:$ npm start-log)

  • 第三步:生成resultData文件夹,输出数据文件(默认操作)

config.json

config.json 配置文件示例与参数介绍如下:

{
  "url": "http://127.0.0.1:8090/iserver/services/data-beijingroads/rest/data",
  "exportFileCount": 10,
  "options": {
    "featuresCount": 60364,
    "isCompress": true,
    "datasetNames": "beijingroads:point", 
    "isAverageStorage": true
  }
}

必填参数

  • url: 数据来源URL。

    • 支持的数据来源
      • GeoJSON 格式文件
      //GeoJSON 数据格式示例:
      "features": [{
              "type": "Feature",
              "geometry": {
                 "type": "Point", // 或者为 "LineString" 和 "MultiLineString"
                 "coordinates": [-47.8977476573595,-15.792110943058866]
              }
         ]
      
      • SuperMap iServer Rest 数据服务
      http://support.supermap.com.cn:8090/iserver/services/data-world/rest/data
      • SuperMap iServer JSON 格式文件
      //SuperMap iServer JSON数据格式示例:
      {"features": [{
             "geometry": {
                "parts": [1],
                "type": "POINT", // 或者为 "LINE"
                "points": [{
                      "x": -47.8977476573595,
                      "y": -15.792110943058866
                    }
                ]
             }
        ]
      }
    • 支持的数据类型
      • 线
  • exportFileCount: 输出的文件数。

可选参数

  • options.featuresCount: 切割的要素个数,默认为所有features。
  • options.isCompress: 文件是否压缩存储。true 则压缩,数据将存为 *.bin 格式,false 则不压缩,数据将存为 *.json 格式。默认为 true。
  • options.datasetNames: 切割的数据集名称,当 "url" 为数据服务地址时,必须指定该参数。
  • options.isAverageStorage: 是否将数据平均存入文件。true 则平均存储,输出的每个文件大小相近;false 则不平均存储,输出文件大小将依次递减,默认为 false。

Samples

  • 加载数据效果示例如下:

许可

Apache License 2.0

clip-tool-for-echarts's People

Contributors

tangqingiser avatar

Stargazers

 avatar

Watchers

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