Struct ClusterSeed
One input to a cluster build pass: a position, how many markers it stands for, and the id to record as its membership entry.
public readonly struct ClusterSeed
- Inherited Members
Remarks
A seed is either a single marker (Count 1, with SourceId the marker's store slot) or an already-merged group standing in for several markers (Count above 1, with SourceId that group's own index). The second form is what lets one clustering level be folded into the next: the clusters produced at a high zoom become the seeds fed to the level below, and total marker count is carried through the fold instead of being recounted from the store.
A seed's position is normalized mercator (0..1 across the world), the same unit MercX uses. When a seed stands for a group, that position is the group's mean, so folding it forward keeps the weighted mean correct without revisiting the individual markers.
Constructors
ClusterSeed(double, double, int, int)
public ClusterSeed(double mercX, double mercY, int count, int sourceId)
Parameters
mercXdoubleNormalized mercator X, 0..1 across the world.
mercYdoubleNormalized mercator Y, 0..1 across the world.
countintHow many markers this seed stands for; at least 1.
sourceIdintId recorded as this seed's membership entry.
Properties
Count
How many markers this seed stands for; 1 for a single marker. Must be at least 1 - a build skips any seed below that instead of letting it into a cluster's mean.
public int Count { get; }
Property Value
MercX
Normalized mercator X, 0..1 across the world.
public double MercX { get; }
Property Value
MercY
Normalized mercator Y, 0..1 across the world.
public double MercY { get; }
Property Value
SourceId
The id recorded as this seed's membership entry: a marker's store slot for a single marker, or a group's own index when this seed stands for one.
public int SourceId { get; }