Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (16 loc) · 1.69 KB

SPECS.md

File metadata and controls

24 lines (16 loc) · 1.69 KB

fn-dbscan-clusterer

Give us a bunch of GeoJSON polygons or points with some params, and we'll give you back clusters of them.

Parameters

JSON object containing:

  • subject: Required {GeoJSON FeatureCollection or URL} Points/polygons to cluster. If URL, point to a file that contains GeoJSON or zipped Shapefile of polygons or points. Coordinates must be specified in decimal degrees. Note that polygons will be converted to points (centroids) for the purpose of clustering.
  • parcel_by: Optional {Array of string (URL) | GeoJSON FeatureCollection} A FeatureCollection for which no clusters should intersect.
  • max_num: Required {integer} The maximum number of subject elements per cluster. Integer between 1 and number of features of subject.
  • max_dist_m: Required {integer} The maximum distance in metres between any two subject elements in a cluster. (>= 0). If 0, every element will be a cluster. If greater than max distance between any pair of subject elements, will create a single cluster.
  • return_type: Optional Defaults to 'both' {string: 'hull' | 'subject' | 'both' } If hull, return convex hull for each cluster. If subject, return subject elements with additional property cluster_id. If both, include both hull and subject return types.

Constraints

  • Maximum size of subject is ~XX MB or contains maximum of ~XX features. Currently being determined.
  • Timeout of 60 seconds

Response

Depends on return_type. JSON object of GeoJSON FeatureCollection(s).

Example input

An example JSON input can be found here