JS解析shapefile(.shp)
程序员文章站
2021-12-07 08:20:32
js解析shapefile(.shp)
js解析shapefile(.shp)
<script src="https://unpkg.com/shapefile@0.6"></script> <script> shapefile.open("../../data/天津.shp") .then(source => source.read() .then(function log(result) { if (result.done) return; console.log(result.value); return source.read().then(log); })) .catch(error => console.error(error.stack)); </script>
控制台输出结果:
上一篇: 批处理位运算演示代码