Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 831 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 831 Bytes

geojson-seg

CDN

 <script type="text/javascript" src="https://unpkg.com/geojson-seg/dist/geojson-seg.min.js"></script>

 <script>

     fetch('./isoline.geojson').then(res=>res.json()).then(geojson=>{

          // the count of coordiante one geojson file
          const coordinateCount=12000;
          const geojsons=geojsonseg.seg(geojson,coordinateCount);
     })

</script>

NPM

npm i geojson-seg
# or
yarn add geojson-seg
  //ESM
  import {seg} from 'geojson-seg';

  // the count of coordiante one geojson file
  const coordinateCount=12000;
  const geojsons=seg(geojson,coordinateCount);


  //node
  const geojsonseg=require('geojson-seg');
  // the count of coordiante one geojson file
  const coordinateCount=12000;
  const geojsons=geojsonseg.seg(geojson,coordinateCount);