GithubHelp home page GithubHelp logo

iso-image's Introduction

iso-image

  • 等值面 等值线 生成
  • 支持渐变(除地图失量叠加)
  • 支持反距离平方权重法与克里金插值算法
  • 支持 worker 后台计算

use

      npm install iso-image
      import IsoImage from 'iso-image'
      new IsoImage(data, option[, callBack])

      // or 

      <script src="./iso-image.js"></script>
      new IsoImage(data, option[, callBack])
  • option
参数 类型 说明
type Sting idw(反距离平方权重法)/kriging(克里金插值)
pow Number idw 加权值
model String kriging 模型 (gaussian/exponential/spherical)
extent Array 计算区域
clip Array 裁剪边界
level Array 色值等级
cellWidth Number 计算精度 尽量确保总网格数在 2000 - 20000 之间 太大太小都可能出现堆栈溢出 导致失败
keyConfig Object data/clip 数据 key 配置
worker String worker 文件目录
smooth Boolean 平滑
  • function
方法 参数 说明
getIsosurface fun(option) 获取等值面
getIsoline fun(option) 获取等值线
getIsoImage fun(option) 获取等值面等值线
getLegend fun(option) 获取图例
layer fun(option) leaflet 绘制图层生成
getLeafletIsosurface fun(layer, option) leaflet 绘制等值面
getLeafletIsoline fun(layer, option) leaflet 绘制等值线
getLeafletIsoImage fun(layer, option) leaflet 绘制等值面等值线
getLeafletLegend fun(layer, option) leaflet 绘制图例
merge fun(new IsoImage(), option, callBack) 多图合并

worker 使用

  • 开启后台进程执行大量计算部分,防止js堵塞。
  • 下载 ./dist/worker 文件夹, 参数 worker 路径配置为该文件夹路径。
  • 不支持 ie

效果

基本 渐变 地图

iso-image's People

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.