1package compose23import (4 "github.com/FelineStateMachine/atlas/internal/generate/doc"5 "github.com/FelineStateMachine/atlas/internal/generate/tiles"6)78// worldGrid and lens are the generator's staging model. They are not a wire9// format: nativeVolume turns them into CoordinateSpace and RasterPyramid rows.10type worldGrid struct {11 SourceZoom int12 FirstTile int13}1415type lens struct {16 Name string17 Tiles string18 MinZoom int19 MaxZoom int20 FullZoom int21 SourceZoom int22 Formats []string23 Bounds *tiles.Box24 Surface *tiles.Box25 Interpolate bool26 Background string27 Shard int6428 Coverage map[string]*tiles.Coverage29}3031type origin struct {32 Source string `json:"source"`33 Slug string `json:"slug,omitempty"`34 Origin bool `json:"origin,omitempty"`35 DonorFeatures counts `json:"donorFeatures"`36 Added int `json:"added"`37}3839type counts struct {40 Point int `json:"point"`41 Path int `json:"path"`42 Area int `json:"area"`43}4445func tally(collections []composedCollection) counts {46 var out counts47 for _, collection := range collections {48 switch collection.Kind {49 case doc.KindPoint:50 out.Point += len(collection.Features)51 case doc.KindPath:52 out.Path += len(collection.Features)53 default:54 out.Area += len(collection.Features)55 }56 }57 return out58}