简体   繁体   English

放大GeoJSON多边形

[英]Enlarge a GeoJSON polygon

How to enlarge a GeoJSON polygon ? 如何放大GeoJSON多边形?

Say I have a GeoJSON polygon 假设我有一个GeoJSON多边形

小多边形

I'd like to enlarge this shape to have a larger polygon with the same basis 我想将这个形状放大,以获得具有相同基础的更大的多边形

在此输入图像描述

I did not found anything on the web about this. 我没有在网上找到任何关于此的内容。 I found many promising libraries such as turf.js , but couldn't figure out how to achieve this. 我找到了许多有前途的库,比如turf.js ,但是无法弄清楚如何实现这一目标。

I figured it out thanks to turf.js . 我想通了turf.js。

A combination of turf.buffer() and turf.simplify() does the trick. turf.buffer()turf.simplify()可以解决这个问题。

Reference 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM