こんにちは。
geojsonファイルの中の複数の polygon 領域を結合(dissolve, union, merge)させました。ogr2ogr
コマンド(GDAL
)を使っています(処理結果は dissolved.json となります)。
$ ogr2ogr -f GeoJSON -explodecollections dissolved.json two_rectangles.json -dialect sqlite -sql "select ST_Union(geometry) as geometry from OGRGeoJSON"

この処理前ファイルは、
two_rectangles.json
{"type":"FeatureCollection","features":[
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-98.4,43.9],[-98.4,44.9],[-95.5,44.9],[-95.5,43.9],[-98.4,43.9]]]}},
{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-97.9,44.4],[-97.9,45.4],[-95.0,45.4],[-95.0,44.4],[-97.9,44.4]]]}}]}