(tessellation *v1pb.TessellationConfig)
| 812 | } |
| 813 | |
| 814 | func convertV1TessellationConfig(tessellation *v1pb.TessellationConfig) *storepb.TessellationConfig { |
| 815 | if tessellation == nil { |
| 816 | return nil |
| 817 | } |
| 818 | gridLevels := make([]*storepb.GridLevel, len(tessellation.GridLevels)) |
| 819 | for i, level := range tessellation.GridLevels { |
| 820 | gridLevels[i] = &storepb.GridLevel{ |
| 821 | Level: level.Level, |
| 822 | Density: level.Density, |
| 823 | } |
| 824 | } |
| 825 | return &storepb.TessellationConfig{ |
| 826 | Scheme: tessellation.Scheme, |
| 827 | GridLevels: gridLevels, |
| 828 | CellsPerObject: tessellation.CellsPerObject, |
| 829 | BoundingBox: convertV1BoundingBox(tessellation.BoundingBox), |
| 830 | } |
| 831 | } |
| 832 | |
| 833 | func convertStoreBoundingBox(bbox *storepb.BoundingBox) *v1pb.BoundingBox { |
| 834 | if bbox == nil { |
no test coverage detected