Skip to content

Instantly share code, notes, and snippets.

View jnicho02's full-sized avatar

Jez Nicholson jnicho02

View GitHub Profile
@jnicho02
jnicho02 / merge-geojsons.py
Created June 6, 2019 14:54 — forked from migurski/merge-geojsons.py
Merge multiple GeoJSON files into one
from json import load, JSONEncoder
from optparse import OptionParser
from re import compile
float_pat = compile(r'^-?\d+\.\d+(e-?\d+)?$')
charfloat_pat = compile(r'^[\[,\,]-?\d+\.\d+(e-?\d+)?$')
parser = OptionParser(usage="""%prog [options]
Group multiple GeoJSON files into one output file.