Reduce a GeoJSON to features matching a condition

ogr2ogr

  • Convert geospatial vector data between file formats.
    More information: <https://gdal.org/programs/ogr2ogr.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

ogr2ogr -where '{{myProperty > 42}}' -f {{GeoJSON}} {{path/to/output.geojson}} {{path/to/input.geojson}}

click the source code to copy install ogr2ogr on any operating system with command-not-found.com