Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enlarge a GeoJSON polygon

How to enlarge a GeoJSON polygon ?

Say I have a GeoJSON polygon

small polygon

I'd like to enlarge this shape to have a larger polygon with the same basis

enter image description here

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.

like image 509
Cyril CHAPON Avatar asked Nov 02 '16 13:11

Cyril CHAPON


1 Answers

I figured it out thanks to turf.js.

A combination of turf.buffer() and turf.simplify() does the trick.

Reference

like image 61
Cyril CHAPON Avatar answered Nov 14 '22 11:11

Cyril CHAPON