geofunc package provides functions for processing GeoJSON.
Visitors can be registered for any of the GeoJSON object types. In addition, you can register a generic
Geometry visitor, a visitor for
LinearRing, and a visitor for
Coordinate. Where "type" is used in the API, you can provide one of the following strings:
Call a function for each object of a certain type. Properties in the
visitors object can be any of the supported types, and values are functions to be called with the corresponding objects. The
each function returns a function that can be called with any GeoJSON object.
const geofunc = ;let count = 0;const countPoints = geofunc;// this will count all the Point geometries;