Stay organized with collections
Save and categorize content based on your preferences.
Creates a classifier that tests if its inputs lie within a polygon defined by a set of coordinates in an arbitrary 2D coordinate system. Each input to be classified must have 2 values (e.g., images must have 2 bands). The result will be 1 wherever the input values are contained within the given polygon and 0 otherwise.
Usage
Returns
ee.Classifier.spectralRegion(coordinates, schema)
Classifier
Argument
Type
Details
coordinates
List
The coordinates of the polygon, as a list of rings. Each ring is a list of coordinate pairs (e.g., [u1, v1, u2, v2, ..., uN, vN]). No edge may intersect any other edge. The resulting classification will be a 1 wherever the input values are within the interior of the given polygon, that is, an odd number of polygon edges must be crossed to get outside the polygon and 0 otherwise.
schema
List, default: null
The classifier's schema. A list of band or property names that the classifier will operate on. Since this classifier doesn't undergo a training step, these have to be specified manually. Defaults to ['u', 'v'].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-13 UTC."],[[["Creates a classifier to determine if input data points, represented by two values, fall within a defined polygon."],["The classifier uses a polygon defined by a set of coordinates in a 2D coordinate system."],["Input data, such as images with two bands, is classified as 1 if inside the polygon and 0 if outside."],["Users can specify the polygon coordinates and optionally define a schema for the classifier's input bands or properties."]]],[]]