Polygons with values on which to aggregate
Points to be aggregated
An array of aggregation objects
Polygons with properties listed based on outField values in aggregations
Takes one or more features and returns their area in square meters.
Input features
Area in square meters
Calculates the average value of a field for a set of points within a set of polygons.
Polygons with values on which to average
Points from which to calculate the average
The field in the points features from which to pull values to average
The field in polygons to put results of the averages
Polygons with the value of outField set to the calculated averages
Takes a bbox and returns an equivalent polygon.
An Array of bounding box coordinates in the form: [xLow, yLow, xHigh, yHigh]
A Polygon representation of the bounding box
Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.
Input to be buffered
Distance to draw the buffer
'miles', 'kilometers', 'radians', or 'degrees'
Buffered features
Takes a FeatureCollection and returns the absolute center point of all features.
Input features
A Point feature at the absolute center point of all input features
Takes one or more features and calculates the centroid using the arithmetic mean of all vertices. This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.
Input features
The centroid of the input features
Combines a FeatureCollection of Point, LineString, or Polygon features into MultiPoint, MultiLineString, or MultiPolygon features.
A FeatureCollection of any type
A FeatureCollection of corresponding type to input
Takes a set of points and returns a concave hull polygon. Internally, this implements a Monotone chain algorithm.
Input points
The size of an edge necessary for part of the hull to become concave (in miles)
Used for maxEdge distance (miles or kilometers)
A concave hull
Takes a set of points and returns a convex hull polygon. Internally this uses the convex-hull module that implements a monotone chain hull.
Input points
A convex hull
Takes a set of points and a set of polygons and calculates the number of points that fall within the set of polygons.
Input polygons
Input points
A field to append to the attributes of the Polygon features representing Point counts
Polygons with countField appended
Takes a Point and calculates the location of a destination point given a distance in degrees, radians, miles, or kilometers; and bearing in degrees. This uses the Haversine formula to account for global curvature.
Starting point
Distance from the starting point
Ranging from -180 and 180
'miles', 'kilometers', 'radians', or 'degrees'
Destination point
Calculates the standard deviation value of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in points from which to aggregate
The field to append to polygons representing deviation
Polygons with appended field representing deviation
Takes any number of features and returns a rectangular Polygon that encompasses all vertices.
Input features
A rectangular Polygon feature that encompasses all vertices
Takes a feature or set of features and returns all positions as points.
Input features
Points representing the exploded input features
Takes a set of features, calculates the extent of all input features, and returns a bounding box.
Input features
The bounding box of input given as an array in WSEN order (west, south, east, north)
Takes one or more Features and creates a FeatureCollection.
Input features
A FeatureCollection of input features
Takes a FeatureCollection and filters it by a given property and value.
Input features
The property on which to filter
The value of that property on which to filter
A filtered collection with only features that match input key and value
Takes input features and flips all of their coordinates from [x, y] to [y, x].
Input features
A feature or set of features of the same type as input with flipped coordinates
Takes a bounding box and a cell size in degrees and returns a FeatureCollection of flat-topped hexagons (Polygon features) aligned in an "odd-q" vertical grid as described in Hexagonal Grids.
Bounding box in [minX, minY, maxX, maxY] order
Width of cell in specified units
Used in calculating cellWidth ('miles' or 'kilometers')
A hexagonal grid
Takes a Point and a Polygon or MultiPolygon and determines if the point resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.
true if the Point is inside the Polygon; false if the Point is not inside the Polygon
Takes two polygons and finds their intersection. If they share a border, returns the border; if they don't intersect, returns undefined.
If poly1 and poly2 overlap, returns a Polygon feature representing the area they overlap; if poly1 and poly2 do not overlap, returns undefined; if poly1 and poly2 share a border, a MultiLineString of the locations where their borders are shared
Takes points with z-values and an array of value breaks and generates isolines.
Input points
The property name in points from which z-values will be pulled
Resolution of the underlying grid
Where to draw contours
Isolines
Takes a set of features and returns an array of the Jenks Natural breaks for a given property.
Input features
The property in input on which to calculate Jenks natural breaks
Number of classes in which to group the data
The break number for each class plus the minimum and maximum values
Takes a polygon and returns points at all self-intersections.
Input polygon
Self-intersections
Takes a line and measures its length in the specified units.
Line to measure
'miles', 'kilometers', 'radians', or 'degrees'
Length of the input line
Creates a LineString based on a coordinate array. Properties can be added optionally.
An array of Positions
A LineString feature
Calculates the maximum value of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in input data to analyze
The field in which to store results
Polygons with properties listed as outField values
Calculates the median value of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in input data to analyze
The field in which to store results
Polygons with properties listed as outField values
Takes a set of polygons and returns a single merged polygon feature. If the input polygon features are not contiguous, this function returns a MultiPolygon feature.
Input polygons
Merged polygon or multipolygon
Calculates the minimum value of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in input data to analyze
The field in which to store results
Polygons with properties listed as outField values
Takes a reference point and a set of points and returns the point from the set closest to the reference.
The reference point
Input point set
The closest point in the set to the reference point
Takes a triangular plane as a Polygon and a Point within that triangle and returns the z-value at that point. The Polygon needs to have properties a, b, and c that define the values at its three corners.
The Point for which a z-value will be calculated
A Polygon feature with three vertices
The z-value for interpolatedPoint
Takes coordinates and properties (optional) and returns a new Point feature.
Longitude, latitude position (each in decimal degrees)
A Point feature
Takes a bounding box and a cell depth and returns a set of points in a grid.
Extent in [minX, minY, maxX, maxY] order
The distance across each cell
Used in calculating cellWidth ('miles' or 'kilometers')
Grid of points
Takes a feature and returns a Point guaranteed to be on the surface of the feature. Given a Polygon, the point will be in the area of the polygon. Given a LineString, the point will be along the string. Given a Point, the point will the same as the input.
Any feature or set of features
A point on the surface of input
Takes an array of LinearRings and optionally an Object with properties and returns a Polygon feature.
An array of LinearRings
A Polygon feature
Takes a FeatureCollection, a property name, and a set of percentiles and returns a quantile array.
Set of features
The property in input from which to retrieve quantile values
An Array of percentiles on which to calculate quantile values
An array of the break values
Generates random GeoJSON data, including Points and Polygons, for testing and experimentation.
Generated random features
Takes a FeatureCollection, an input field, an output field, and an array of translations and outputs an identical FeatureCollection with the output field property populated.
Set of input features
The field to translate
The field in which to store translated results
An array of translations
A FeatureCollection with identical geometries to input but with outField populated.
Takes a FeatureCollection of any type, a property, and a value and returns a FeatureCollection with features matching that property-value pair removed.
Set of input features
The property to remove
The value to remove
The resulting FeatureCollection without features that match the property-value pair
Takes a FeatureCollection and returns a FeatureCollection with given number of features at random.
Set of input features
Number of features to select
A FeatureCollection with n features
Takes a LineString or Polygon and returns a simplified version. Internally uses simplify-js to perform simplification.
Feature to be simplified
Simplification tolerance
Whether or not to spend more time to create a higher-quality simplification with a different algorithm
A simplified feature
Takes a bounding box and returns a new bounding box with a size expanded or contracted by a factor of X.
A bounding box
The ratio of the new bbox to the input bbox
The resized bbox
Takes a bounding box and calculates the minimum square bounding box that would contain the input.
A bounding box
A square surrounding bbox
Takes a bounding box and a cell depth and returns a set of square polygons in a grid.
Extent in [minX, minY, maxX, maxY] order
Width of each cell
Used in calculating cellWidth ('miles' or 'kilometers')
Grid of polygons
Calculates the sum of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in input data to analyze
The field in which to store results
Polygons with properties listed as outField
Takes a set of points and a set of polygons and performs a spatial join.
Input points
Input polygons
Property in polygons to add to joined Point features
Property in points in which to store joined property from polygons
Points with containingPolyId property containing values from polyId
Takes a set of points and the name of a z-value property and creates a Triangulated Irregular Network, or a TIN for short, returned as a collection of Polygons. These are often used for developing elevation contour maps or stepped heat visualizations. This triangulates the points, as well as adds properties called a, b, and c representing the value of the given propertyName at each of the points that represent the corners of the triangle.
Input points
TIN output
Takes a bounding box and a cell depth and returns a set of triangular polygons in a grid.
Extent in [minX, minY, maxX, maxY] order
Width of each cell
Used in calculating cellWidth ('miles' or 'kilometers')
Grid of triangles
Calculates the variance value of a field for a set of points within a set of polygons.
Input polygons
Input points
The field in input data to analyze
The field in which to store results
Polygons with properties listed as outField
Takes a set of points and a set of polygons and returns the points that fall within the polygons.
Input points
Input polygons
Points that land within at least one polygon
Calculates a series of aggregations for a set of points within a set of polygons. Sum, average, count, min, max, and deviation are supported.